Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +276,339 @@
    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_lists::_json_lists_output::JsonListsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::json_lists::_json_lists_input::JsonListsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::json_lists::builders::JsonListsInputBuilder {
    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_lists::JsonListsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::json_lists::JsonListsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.json_lists();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `JsonLists`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `JsonLists`.
   24     27   
///
   25         -
/// This test case serializes JSON lists for the following cases for both input and output: 1. Normal JSON lists. 2. Normal JSON sets. 3. JSON lists of lists. 4. Lists of structures.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This test case serializes JSON lists for the following cases for both input and output: 1. Normal JSON lists. 2. Normal JSON sets. 3. JSON lists of lists. 4. Lists of structures.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct JsonListsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::json_lists::builders::JsonListsInputBuilder,
   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_lists::JsonListsOutput, crate::operation::json_lists::JsonListsError>
   33     39   
    for JsonListsFluentBuilder
   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_lists::JsonListsOutput, crate::operation::json_lists::JsonListsError>,
   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 JsonListsFluentBuilder {
          52  +
    /* FluentBuilderGenerator.kt:288 */
   45     53   
    /// Creates a new `JsonListsFluentBuilder`.
   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 JsonLists as a reference.
   54     63   
    pub fn as_input(&self) -> &crate::operation::json_lists::builders::JsonListsInputBuilder {
   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_lists::JsonListsOutput,
   69     79   
        ::aws_smithy_runtime_api::client::result::SdkError<
   70     80   
            crate::operation::json_lists::JsonListsError,
   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_lists::JsonLists::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_lists::JsonLists::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_lists::JsonListsOutput,
   91    101   
        crate::operation::json_lists::JsonListsError,
   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   
    }
  105         -
    ///
         116  +
    /// /* FluentBuilderGenerator.kt:436 */
  106    117   
    /// Appends an item to `stringList`.
  107    118   
    ///
  108    119   
    /// To override the contents of this collection use [`set_string_list`](Self::set_string_list).
  109    120   
    ///
         121  +
    /* FluentBuilderGenerator.kt:443 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:446 */
  111    124   
    pub fn string_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.string_list(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  117    132   
        self.inner = self.inner.set_string_list(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  122    139   
        self.inner.get_string_list()
  123    140   
    }
  124         -
    ///
         141  +
    /// /* FluentBuilderGenerator.kt:436 */
  125    142   
    /// Appends an item to `stringSet`.
  126    143   
    ///
  127    144   
    /// To override the contents of this collection use [`set_string_set`](Self::set_string_set).
  128    145   
    ///
         146  +
    /* FluentBuilderGenerator.kt:443 */
  129    147   
    #[allow(missing_docs)] // documentation missing in model
         148  +
                           /* FluentBuilderGenerator.kt:446 */
  130    149   
    pub fn string_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  131    150   
        self.inner = self.inner.string_set(input.into());
  132    151   
        self
  133    152   
    }
         153  +
    /* FluentBuilderGenerator.kt:498 */
  134    154   
    #[allow(missing_docs)] // documentation missing in model
         155  +
                           /* FluentBuilderGenerator.kt:500 */
  135    156   
    pub fn set_string_set(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  136    157   
        self.inner = self.inner.set_string_set(input);
  137    158   
        self
  138    159   
    }
         160  +
    /* FluentBuilderGenerator.kt:518 */
  139    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* FluentBuilderGenerator.kt:520 */
  140    163   
    pub fn get_string_set(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  141    164   
        self.inner.get_string_set()
  142    165   
    }
  143         -
    ///
         166  +
    /// /* FluentBuilderGenerator.kt:436 */
  144    167   
    /// Appends an item to `integerList`.
  145    168   
    ///
  146    169   
    /// To override the contents of this collection use [`set_integer_list`](Self::set_integer_list).
  147    170   
    ///
         171  +
    /* FluentBuilderGenerator.kt:443 */
  148    172   
    #[allow(missing_docs)] // documentation missing in model
         173  +
                           /* FluentBuilderGenerator.kt:446 */
  149    174   
    pub fn integer_list(mut self, input: i32) -> Self {
  150    175   
        self.inner = self.inner.integer_list(input);
  151    176   
        self
  152    177   
    }
         178  +
    /* FluentBuilderGenerator.kt:498 */
  153    179   
    #[allow(missing_docs)] // documentation missing in model
         180  +
                           /* FluentBuilderGenerator.kt:500 */
  154    181   
    pub fn set_integer_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  155    182   
        self.inner = self.inner.set_integer_list(input);
  156    183   
        self
  157    184   
    }
         185  +
    /* FluentBuilderGenerator.kt:518 */
  158    186   
    #[allow(missing_docs)] // documentation missing in model
         187  +
                           /* FluentBuilderGenerator.kt:520 */
  159    188   
    pub fn get_integer_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  160    189   
        self.inner.get_integer_list()
  161    190   
    }
  162         -
    ///
         191  +
    /// /* FluentBuilderGenerator.kt:436 */
  163    192   
    /// Appends an item to `booleanList`.
  164    193   
    ///
  165    194   
    /// To override the contents of this collection use [`set_boolean_list`](Self::set_boolean_list).
  166    195   
    ///
         196  +
    /* FluentBuilderGenerator.kt:443 */
  167    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* FluentBuilderGenerator.kt:446 */
  168    199   
    pub fn boolean_list(mut self, input: bool) -> Self {
  169    200   
        self.inner = self.inner.boolean_list(input);
  170    201   
        self
  171    202   
    }
         203  +
    /* FluentBuilderGenerator.kt:498 */
  172    204   
    #[allow(missing_docs)] // documentation missing in model
         205  +
                           /* FluentBuilderGenerator.kt:500 */
  173    206   
    pub fn set_boolean_list(mut self, input: ::std::option::Option<::std::vec::Vec<bool>>) -> Self {
  174    207   
        self.inner = self.inner.set_boolean_list(input);
  175    208   
        self
  176    209   
    }
         210  +
    /* FluentBuilderGenerator.kt:518 */
  177    211   
    #[allow(missing_docs)] // documentation missing in model
         212  +
                           /* FluentBuilderGenerator.kt:520 */
  178    213   
    pub fn get_boolean_list(&self) -> &::std::option::Option<::std::vec::Vec<bool>> {
  179    214   
        self.inner.get_boolean_list()
  180    215   
    }
  181         -
    ///
         216  +
    /// /* FluentBuilderGenerator.kt:436 */
  182    217   
    /// Appends an item to `timestampList`.
  183    218   
    ///
  184    219   
    /// To override the contents of this collection use [`set_timestamp_list`](Self::set_timestamp_list).
  185    220   
    ///
         221  +
    /* FluentBuilderGenerator.kt:443 */
  186    222   
    #[allow(missing_docs)] // documentation missing in model
         223  +
                           /* FluentBuilderGenerator.kt:446 */
  187    224   
    pub fn timestamp_list(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  188    225   
        self.inner = self.inner.timestamp_list(input);
  189    226   
        self
  190    227   
    }
         228  +
    /* FluentBuilderGenerator.kt:498 */
  191    229   
    #[allow(missing_docs)] // documentation missing in model
         230  +
                           /* FluentBuilderGenerator.kt:500 */
  192    231   
    pub fn set_timestamp_list(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>) -> Self {
  193    232   
        self.inner = self.inner.set_timestamp_list(input);
  194    233   
        self
  195    234   
    }
         235  +
    /* FluentBuilderGenerator.kt:518 */
  196    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* FluentBuilderGenerator.kt:520 */
  197    238   
    pub fn get_timestamp_list(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>> {
  198    239   
        self.inner.get_timestamp_list()
  199    240   
    }
  200         -
    ///
         241  +
    /// /* FluentBuilderGenerator.kt:436 */
  201    242   
    /// Appends an item to `enumList`.
  202    243   
    ///
  203    244   
    /// To override the contents of this collection use [`set_enum_list`](Self::set_enum_list).
  204    245   
    ///
         246  +
    /* FluentBuilderGenerator.kt:443 */
  205    247   
    #[allow(missing_docs)] // documentation missing in model
         248  +
                           /* FluentBuilderGenerator.kt:446 */
  206    249   
    pub fn enum_list(mut self, input: crate::types::FooEnum) -> Self {
  207    250   
        self.inner = self.inner.enum_list(input);
  208    251   
        self
  209    252   
    }
         253  +
    /* FluentBuilderGenerator.kt:498 */
  210    254   
    #[allow(missing_docs)] // documentation missing in model
         255  +
                           /* FluentBuilderGenerator.kt:500 */
  211    256   
    pub fn set_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FooEnum>>) -> Self {
  212    257   
        self.inner = self.inner.set_enum_list(input);
  213    258   
        self
  214    259   
    }
         260  +
    /* FluentBuilderGenerator.kt:518 */
  215    261   
    #[allow(missing_docs)] // documentation missing in model
         262  +
                           /* FluentBuilderGenerator.kt:520 */
  216    263   
    pub fn get_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FooEnum>> {
  217    264   
        self.inner.get_enum_list()
  218    265   
    }
  219         -
    ///
         266  +
    /// /* FluentBuilderGenerator.kt:436 */
  220    267   
    /// Appends an item to `intEnumList`.
  221    268   
    ///
  222    269   
    /// To override the contents of this collection use [`set_int_enum_list`](Self::set_int_enum_list).
  223    270   
    ///
         271  +
    /* FluentBuilderGenerator.kt:443 */
  224    272   
    #[allow(missing_docs)] // documentation missing in model
         273  +
                           /* FluentBuilderGenerator.kt:446 */
  225    274   
    pub fn int_enum_list(mut self, input: i32) -> Self {
  226    275   
        self.inner = self.inner.int_enum_list(input);
  227    276   
        self
  228    277   
    }
         278  +
    /* FluentBuilderGenerator.kt:498 */
  229    279   
    #[allow(missing_docs)] // documentation missing in model
         280  +
                           /* FluentBuilderGenerator.kt:500 */
  230    281   
    pub fn set_int_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  231    282   
        self.inner = self.inner.set_int_enum_list(input);
  232    283   
        self
  233    284   
    }
         285  +
    /* FluentBuilderGenerator.kt:518 */
  234    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* FluentBuilderGenerator.kt:520 */
  235    288   
    pub fn get_int_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  236    289   
        self.inner.get_int_enum_list()
  237    290   
    }
  238         -
    ///
         291  +
    /// /* FluentBuilderGenerator.kt:436 */
  239    292   
    /// Appends an item to `nestedStringList`.
  240    293   
    ///
  241    294   
    /// To override the contents of this collection use [`set_nested_string_list`](Self::set_nested_string_list).
  242    295   
    ///
  243         -
    /// A list of lists of strings.
         296  +
    /// /* FluentBuilderGenerator.kt:443 */A list of lists of strings.
         297  +
    /* FluentBuilderGenerator.kt:446 */
  244    298   
    pub fn nested_string_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
  245    299   
        self.inner = self.inner.nested_string_list(input);
  246    300   
        self
  247    301   
    }
  248         -
    /// A list of lists of strings.
         302  +
    /// /* FluentBuilderGenerator.kt:498 */A list of lists of strings.
         303  +
    /* FluentBuilderGenerator.kt:500 */
  249    304   
    pub fn set_nested_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>) -> Self {
  250    305   
        self.inner = self.inner.set_nested_string_list(input);
  251    306   
        self
  252    307   
    }
  253         -
    /// A list of lists of strings.
         308  +
    /// /* FluentBuilderGenerator.kt:518 */A list of lists of strings.
         309  +
    /* FluentBuilderGenerator.kt:520 */
  254    310   
    pub fn get_nested_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>> {
  255    311   
        self.inner.get_nested_string_list()
  256    312   
    }
  257         -
    ///
         313  +
    /// /* FluentBuilderGenerator.kt:436 */
  258    314   
    /// Appends an item to `structureList`.
  259    315   
    ///
  260    316   
    /// To override the contents of this collection use [`set_structure_list`](Self::set_structure_list).
  261    317   
    ///
         318  +
    /* FluentBuilderGenerator.kt:443 */
  262    319   
    #[allow(missing_docs)] // documentation missing in model
         320  +
                           /* FluentBuilderGenerator.kt:446 */
  263    321   
    pub fn structure_list(mut self, input: crate::types::StructureListMember) -> Self {
  264    322   
        self.inner = self.inner.structure_list(input);
  265    323   
        self
  266    324   
    }
         325  +
    /* FluentBuilderGenerator.kt:498 */
  267    326   
    #[allow(missing_docs)] // documentation missing in model
         327  +
                           /* FluentBuilderGenerator.kt:500 */
  268    328   
    pub fn set_structure_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StructureListMember>>) -> Self {
  269    329   
        self.inner = self.inner.set_structure_list(input);
  270    330   
        self
  271    331   
    }
         332  +
    /* FluentBuilderGenerator.kt:518 */
  272    333   
    #[allow(missing_docs)] // documentation missing in model
         334  +
                           /* FluentBuilderGenerator.kt:520 */
  273    335   
    pub fn get_structure_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StructureListMember>> {
  274    336   
        self.inner.get_structure_list()
  275    337   
    }
         338  +
    /* FluentBuilderGenerator.kt:282 */
  276    339   
}

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

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `JsonMaps`.
           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 JsonMaps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl JsonMaps {
    7         -
    /// Creates a new `JsonMaps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `JsonMaps`
          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_maps::JsonMapsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::json_maps::JsonMapsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::json_maps::JsonMapsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -53,62 +257,274 @@
   73     82   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   74     83   
            }
   75     84   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   76     85   
                config_override,
   77     86   
                client_config.config.clone(),
   78     87   
                &client_config.runtime_components,
   79     88   
            ));
   80     89   
        }
   81     90   
        runtime_plugins
   82     91   
    }
          92  +
    /* OperationGenerator.kt:85 */
   83     93   
}
          94  +
/* OperationRuntimePluginGenerator.kt:55 */
   84     95   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for JsonMaps {
   85     96   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   86     97   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("JsonMaps");
   87     98   
   88     99   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   89    100   
            JsonMapsRequestSerializer,
   90    101   
        ));
   91    102   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   92    103   
            JsonMapsResponseDeserializer,
   93    104   
        ));
   94    105   
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   96    107   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  100    111   
            "JsonMaps",
  101    112   
            "Rest Json Protocol",
  102    113   
        ));
  103    114   
  104    115   
        ::std::option::Option::Some(cfg.freeze())
  105    116   
    }
  106    117   
  107    118   
    fn runtime_components(
  108    119   
        &self,
  109    120   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  110    121   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  111    122   
        #[allow(unused_mut)]
  112    123   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("JsonMaps")
  113    124   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  114    125   
            .with_interceptor(JsonMapsEndpointParamsInterceptor)
  115    126   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  116    127   
                crate::operation::json_maps::JsonMapsError,
  117    128   
            >::new())
  118    129   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  119    130   
                crate::operation::json_maps::JsonMapsError,
  120    131   
            >::new());
  121    132   
  122    133   
        ::std::borrow::Cow::Owned(rcb)
  123    134   
    }
  124    135   
}
  125    136   
         137  +
/* ResponseDeserializerGenerator.kt:64 */
  126    138   
#[derive(Debug)]
  127    139   
struct JsonMapsResponseDeserializer;
  128    140   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for JsonMapsResponseDeserializer {
  129    141   
    fn deserialize_nonstreaming(
  130    142   
        &self,
  131    143   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  132    144   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  133    145   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  134    146   
        let headers = response.headers();
  135    147   
        let body = response.body().bytes().expect("body loaded");
  136    148   
        #[allow(unused_mut)]
  137    149   
        let mut force_error = false;
  138    150   
  139    151   
        let parse_result = if !success && status != 200 || force_error {
  140    152   
            crate::protocol_serde::shape_json_maps::de_json_maps_http_error(status, headers, body)
  141    153   
        } else {
  142    154   
            crate::protocol_serde::shape_json_maps::de_json_maps_http_response(status, headers, body)
  143    155   
        };
  144    156   
        crate::protocol_serde::type_erase_result(parse_result)
  145    157   
    }
  146    158   
}
         159  +
/* RequestSerializerGenerator.kt:67 */
  147    160   
#[derive(Debug)]
  148    161   
struct JsonMapsRequestSerializer;
  149    162   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for JsonMapsRequestSerializer {
  150    163   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  151    164   
    fn serialize_input(
  152    165   
        &self,
  153    166   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  154    167   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  155    168   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  156    169   
        let input = input.downcast::<crate::operation::json_maps::JsonMapsInput>().expect("correct type");
  157    170   
        let _header_serialization_settings = _cfg
  158    171   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  159    172   
            .cloned()
  160    173   
            .unwrap_or_default();
  161    174   
        let mut request_builder = {
  162    175   
            fn uri_base(
  163    176   
                _input: &crate::operation::json_maps::JsonMapsInput,
  164    177   
                output: &mut ::std::string::String,
  165    178   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  166    179   
                use ::std::fmt::Write as _;
  167    180   
                ::std::write!(output, "/JsonMaps").expect("formatting should succeed");
  168    181   
                ::std::result::Result::Ok(())
  169    182   
            }
  170    183   
            #[allow(clippy::unnecessary_wraps)]
  171    184   
            fn update_http_builder(
  172    185   
                input: &crate::operation::json_maps::JsonMapsInput,
  173    186   
                builder: ::http::request::Builder,
  174    187   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  175    188   
                let mut uri = ::std::string::String::new();
  176    189   
                uri_base(input, &mut uri)?;
  177    190   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  178    191   
            }
  179    192   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  180    193   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  181    194   
            builder
  182    195   
        };
  183    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_maps::ser_json_maps_input(&input)?);
  184    197   
        if let Some(content_length) = body.content_length() {
  185    198   
            let content_length = content_length.to_string();
  186    199   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  187    200   
        }
  188    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  189    202   
    }
  190    203   
}
         204  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  191    205   
#[derive(Debug)]
  192    206   
struct JsonMapsEndpointParamsInterceptor;
  193    207   
  194    208   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonMapsEndpointParamsInterceptor {
  195    209   
    fn name(&self) -> &'static str {
  196    210   
        "JsonMapsEndpointParamsInterceptor"
  197    211   
    }
  198    212   
  199    213   
    fn read_before_execution(
  200    214   
        &self,
  201    215   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  202    216   
            '_,
  203    217   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  204    218   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  205    219   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  206    220   
        >,
  207    221   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  208    222   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  209    223   
        let _input = context
  210    224   
            .input()
  211    225   
            .downcast_ref::<JsonMapsInput>()
  212    226   
            .ok_or("failed to downcast to JsonMapsInput")?;
  213    227   
  214    228   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  216    230   
        })?;
  217    231   
        cfg.interceptor_state()
  218    232   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  219    233   
        ::std::result::Result::Ok(())
  220    234   
    }
  221    235   
}
  222    236   
  223    237   
// The get_* functions below are generated from JMESPath expressions in the
  224    238   
// operationContextParams trait. They target the operation's input shape.
  225    239   
         240  +
/* RustType.kt:516 */
  226    241   
#[allow(unreachable_code, unused_variables)]
         242  +
/* RustType.kt:516 */
  227    243   
#[cfg(test)]
         244  +
/* ProtocolTestGenerator.kt:98 */
  228    245   
mod json_maps_test {
  229    246   
  230    247   
    /// Serializes JSON maps
  231    248   
    /// Test ID: RestJsonJsonMaps
  232    249   
    #[::tokio::test]
  233    250   
    #[::tracing_test::traced_test]
  234    251   
    async fn rest_json_json_maps_request() {
  235    252   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  236    253   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  237    254   
@@ -616,633 +745,821 @@
  636    653   
            parsed.dense_string_map,
  637    654   
            expected_output.dense_string_map,
  638    655   
            "Unexpected value for `dense_string_map`"
  639    656   
        );
  640    657   
        ::pretty_assertions::assert_eq!(
  641    658   
            parsed.dense_set_map,
  642    659   
            expected_output.dense_set_map,
  643    660   
            "Unexpected value for `dense_set_map`"
  644    661   
        );
  645    662   
    }
         663  +
         664  +
    /* ProtocolTestGenerator.kt:98 */
  646    665   
}
  647    666   
         667  +
/* OperationErrorGenerator.kt:79 */
  648    668   
/// Error type for the `JsonMapsError` operation.
         669  +
/* RustType.kt:516 */
  649    670   
#[non_exhaustive]
         671  +
/* RustType.kt:516 */
  650    672   
#[derive(::std::fmt::Debug)]
  651         -
pub enum JsonMapsError {
         673  +
pub /* OperationErrorGenerator.kt:81 */ enum JsonMapsError {
         674  +
    /* OperationErrorGenerator.kt:88 */
  652    675   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  653    676   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  654    677   
    variable wildcard pattern and check `.code()`:
  655    678   
     \
  656    679   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  657    680   
     \
  658    681   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-JsonMapsError) for what information is available for the error.")]
  659    682   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         683  +
    /* OperationErrorGenerator.kt:81 */
  660    684   
}
         685  +
/* OperationErrorGenerator.kt:218 */
  661    686   
impl JsonMapsError {
         687  +
    /* OperationErrorGenerator.kt:219 */
  662    688   
    /// Creates the `JsonMapsError::Unhandled` variant from any error type.
  663    689   
    pub fn unhandled(
  664    690   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  665    691   
    ) -> Self {
  666    692   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  667    693   
            source: err.into(),
  668    694   
            meta: ::std::default::Default::default(),
  669    695   
        })
  670    696   
    }
  671    697   
  672    698   
    /// Creates the `JsonMapsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  673    699   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  674    700   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  675    701   
            source: err.clone().into(),
  676    702   
            meta: err,
  677    703   
        })
  678    704   
    }
  679         -
    ///
         705  +
    /// /* OperationErrorGenerator.kt:236 */
  680    706   
    /// Returns error metadata, which includes the error code, message,
  681    707   
    /// request ID, and potentially additional information.
  682    708   
    ///
         709  +
    /* OperationErrorGenerator.kt:242 */
  683    710   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         711  +
        /* OperationErrorGenerator.kt:243 */
  684    712   
        match self {
  685         -
            Self::Unhandled(e) => &e.meta,
         713  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         714  +
            /* OperationErrorGenerator.kt:243 */
  686    715   
        }
         716  +
        /* OperationErrorGenerator.kt:242 */
  687    717   
    }
         718  +
    /* OperationErrorGenerator.kt:218 */
  688    719   
}
         720  +
/* OperationErrorGenerator.kt:269 */
  689    721   
impl ::std::error::Error for JsonMapsError {
         722  +
    /* OperationErrorGenerator.kt:270 */
  690    723   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         724  +
        /* OperationErrorGenerator.kt:318 */
  691    725   
        match self {
  692         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         726  +
            /* OperationErrorGenerator.kt:326 */
         727  +
            Self::Unhandled(_inner) => {
         728  +
                /* OperationErrorGenerator.kt:279 */
         729  +
                ::std::option::Option::Some(&*_inner.source)
         730  +
                /* OperationErrorGenerator.kt:326 */
         731  +
            } /* OperationErrorGenerator.kt:318 */
  693    732   
        }
         733  +
        /* OperationErrorGenerator.kt:270 */
  694    734   
    }
         735  +
    /* OperationErrorGenerator.kt:269 */
  695    736   
}
         737  +
/* OperationErrorGenerator.kt:133 */
  696    738   
impl ::std::fmt::Display for JsonMapsError {
         739  +
    /* OperationErrorGenerator.kt:134 */
  697    740   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         741  +
        /* OperationErrorGenerator.kt:318 */
  698    742   
        match self {
         743  +
            /* OperationErrorGenerator.kt:326 */
  699    744   
            Self::Unhandled(_inner) => {
         745  +
                /* OperationErrorGenerator.kt:139 */
  700    746   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  701    747   
                    write!(f, "unhandled error ({code})")
  702    748   
                } else {
  703    749   
                    f.write_str("unhandled error")
  704    750   
                }
  705         -
            }
         751  +
                /* OperationErrorGenerator.kt:326 */
         752  +
            } /* OperationErrorGenerator.kt:318 */
  706    753   
        }
         754  +
        /* OperationErrorGenerator.kt:134 */
  707    755   
    }
         756  +
    /* OperationErrorGenerator.kt:133 */
  708    757   
}
         758  +
/* OperationErrorGenerator.kt:182 */
  709    759   
impl ::aws_smithy_types::retry::ProvideErrorKind for JsonMapsError {
         760  +
    /* OperationErrorGenerator.kt:186 */
  710    761   
    fn code(&self) -> ::std::option::Option<&str> {
         762  +
        /* OperationErrorGenerator.kt:187 */
  711    763   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         764  +
        /* OperationErrorGenerator.kt:186 */
  712    765   
    }
         766  +
    /* OperationErrorGenerator.kt:190 */
  713    767   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         768  +
        /* OperationErrorGenerator.kt:197 */
  714    769   
        ::std::option::Option::None
         770  +
        /* OperationErrorGenerator.kt:190 */
  715    771   
    }
         772  +
    /* OperationErrorGenerator.kt:182 */
  716    773   
}
         774  +
/* OperationErrorGenerator.kt:163 */
  717    775   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for JsonMapsError {
         776  +
    /* OperationErrorGenerator.kt:164 */
  718    777   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         778  +
        /* OperationErrorGenerator.kt:318 */
  719    779   
        match self {
  720         -
            Self::Unhandled(_inner) => &_inner.meta,
         780  +
            /* OperationErrorGenerator.kt:326 */
         781  +
            Self::Unhandled(_inner) => {
         782  +
                /* OperationErrorGenerator.kt:168 */
         783  +
                &_inner.meta
         784  +
                /* OperationErrorGenerator.kt:326 */
         785  +
            } /* OperationErrorGenerator.kt:318 */
  721    786   
        }
         787  +
        /* OperationErrorGenerator.kt:164 */
  722    788   
    }
         789  +
    /* OperationErrorGenerator.kt:163 */
  723    790   
}
         791  +
/* OperationErrorGenerator.kt:109 */
  724    792   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for JsonMapsError {
         793  +
    /* OperationErrorGenerator.kt:110 */
  725    794   
    fn create_unhandled_error(
  726    795   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  727    796   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  728    797   
    ) -> Self {
         798  +
        /* OperationErrorGenerator.kt:121 */
  729    799   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  730    800   
            source,
  731    801   
            meta: meta.unwrap_or_default(),
  732    802   
        })
         803  +
        /* OperationErrorGenerator.kt:110 */
  733    804   
    }
         805  +
    /* OperationErrorGenerator.kt:109 */
  734    806   
}
  735    807   
         808  +
/* CodegenDelegator.kt:255 */
  736    809   
pub use crate::operation::json_maps::_json_maps_output::JsonMapsOutput;
  737    810   
         811  +
/* CodegenDelegator.kt:255 */
  738    812   
pub use crate::operation::json_maps::_json_maps_input::JsonMapsInput;
  739    813   
         814  +
/* RustModule.kt:172 */
  740    815   
mod _json_maps_input;
  741    816   
         817  +
/* RustModule.kt:172 */
  742    818   
mod _json_maps_output;
  743    819   
  744         -
/// Builders
         820  +
/// /* CodegenDelegator.kt:51 */Builders
  745    821   
pub mod builders;

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

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

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/json_timestamps.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 `JsonTimestamps`.
           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 JsonTimestamps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl JsonTimestamps {
    7         -
    /// Creates a new `JsonTimestamps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `JsonTimestamps`
          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_timestamps::JsonTimestampsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::json_timestamps::JsonTimestampsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::json_timestamps::JsonTimestampsError,
   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 JsonTimestamps {
   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("JsonTimestamps");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            JsonTimestampsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            JsonTimestampsResponseDeserializer,
   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   
            "JsonTimestamps",
  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("JsonTimestamps")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(JsonTimestampsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::json_timestamps::JsonTimestampsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::json_timestamps::JsonTimestampsError,
  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 JsonTimestampsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for JsonTimestampsResponseDeserializer {
  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_timestamps::de_json_timestamps_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_json_timestamps::de_json_timestamps_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 JsonTimestampsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for JsonTimestampsRequestSerializer {
  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_timestamps::JsonTimestampsInput>()
  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_timestamps::JsonTimestampsInput,
  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, "/JsonTimestamps").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_timestamps::JsonTimestampsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_timestamps::ser_json_timestamps_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 JsonTimestampsEndpointParamsInterceptor;
  199    213   
  200    214   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonTimestampsEndpointParamsInterceptor {
  201    215   
    fn name(&self) -> &'static str {
  202    216   
        "JsonTimestampsEndpointParamsInterceptor"
  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::<JsonTimestampsInput>()
  218    232   
            .ok_or("failed to downcast to JsonTimestampsInput")?;
  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_timestamps_test {
  235    252   
  236    253   
    /// Tests how normal timestamps are serialized
  237    254   
    /// Test ID: RestJsonJsonTimestamps
  238    255   
    #[::tokio::test]
  239    256   
    #[::tracing_test::traced_test]
  240    257   
    async fn rest_json_json_timestamps_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   
@@ -892,909 +1021,1097 @@
  912    929   
            expected_output.epoch_seconds_on_target,
  913    930   
            "Unexpected value for `epoch_seconds_on_target`"
  914    931   
        );
  915    932   
        ::pretty_assertions::assert_eq!(parsed.http_date, expected_output.http_date, "Unexpected value for `http_date`");
  916    933   
        ::pretty_assertions::assert_eq!(
  917    934   
            parsed.http_date_on_target,
  918    935   
            expected_output.http_date_on_target,
  919    936   
            "Unexpected value for `http_date_on_target`"
  920    937   
        );
  921    938   
    }
         939  +
         940  +
    /* ProtocolTestGenerator.kt:98 */
  922    941   
}
  923    942   
         943  +
/* OperationErrorGenerator.kt:79 */
  924    944   
/// Error type for the `JsonTimestampsError` operation.
         945  +
/* RustType.kt:516 */
  925    946   
#[non_exhaustive]
         947  +
/* RustType.kt:516 */
  926    948   
#[derive(::std::fmt::Debug)]
  927         -
pub enum JsonTimestampsError {
         949  +
pub /* OperationErrorGenerator.kt:81 */ enum JsonTimestampsError {
         950  +
    /* OperationErrorGenerator.kt:88 */
  928    951   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  929    952   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  930    953   
    variable wildcard pattern and check `.code()`:
  931    954   
     \
  932    955   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  933    956   
     \
  934    957   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-JsonTimestampsError) for what information is available for the error.")]
  935    958   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         959  +
    /* OperationErrorGenerator.kt:81 */
  936    960   
}
         961  +
/* OperationErrorGenerator.kt:218 */
  937    962   
impl JsonTimestampsError {
         963  +
    /* OperationErrorGenerator.kt:219 */
  938    964   
    /// Creates the `JsonTimestampsError::Unhandled` variant from any error type.
  939    965   
    pub fn unhandled(
  940    966   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  941    967   
    ) -> Self {
  942    968   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  943    969   
            source: err.into(),
  944    970   
            meta: ::std::default::Default::default(),
  945    971   
        })
  946    972   
    }
  947    973   
  948    974   
    /// Creates the `JsonTimestampsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  949    975   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  950    976   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  951    977   
            source: err.clone().into(),
  952    978   
            meta: err,
  953    979   
        })
  954    980   
    }
  955         -
    ///
         981  +
    /// /* OperationErrorGenerator.kt:236 */
  956    982   
    /// Returns error metadata, which includes the error code, message,
  957    983   
    /// request ID, and potentially additional information.
  958    984   
    ///
         985  +
    /* OperationErrorGenerator.kt:242 */
  959    986   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         987  +
        /* OperationErrorGenerator.kt:243 */
  960    988   
        match self {
  961         -
            Self::Unhandled(e) => &e.meta,
         989  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         990  +
            /* OperationErrorGenerator.kt:243 */
  962    991   
        }
         992  +
        /* OperationErrorGenerator.kt:242 */
  963    993   
    }
         994  +
    /* OperationErrorGenerator.kt:218 */
  964    995   
}
         996  +
/* OperationErrorGenerator.kt:269 */
  965    997   
impl ::std::error::Error for JsonTimestampsError {
         998  +
    /* OperationErrorGenerator.kt:270 */
  966    999   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1000  +
        /* OperationErrorGenerator.kt:318 */
  967   1001   
        match self {
  968         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
        1002  +
            /* OperationErrorGenerator.kt:326 */
        1003  +
            Self::Unhandled(_inner) => {
        1004  +
                /* OperationErrorGenerator.kt:279 */
        1005  +
                ::std::option::Option::Some(&*_inner.source)
        1006  +
                /* OperationErrorGenerator.kt:326 */
        1007  +
            } /* OperationErrorGenerator.kt:318 */
  969   1008   
        }
        1009  +
        /* OperationErrorGenerator.kt:270 */
  970   1010   
    }
        1011  +
    /* OperationErrorGenerator.kt:269 */
  971   1012   
}
        1013  +
/* OperationErrorGenerator.kt:133 */
  972   1014   
impl ::std::fmt::Display for JsonTimestampsError {
        1015  +
    /* OperationErrorGenerator.kt:134 */
  973   1016   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        1017  +
        /* OperationErrorGenerator.kt:318 */
  974   1018   
        match self {
        1019  +
            /* OperationErrorGenerator.kt:326 */
  975   1020   
            Self::Unhandled(_inner) => {
        1021  +
                /* OperationErrorGenerator.kt:139 */
  976   1022   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  977   1023   
                    write!(f, "unhandled error ({code})")
  978   1024   
                } else {
  979   1025   
                    f.write_str("unhandled error")
  980   1026   
                }
  981         -
            }
        1027  +
                /* OperationErrorGenerator.kt:326 */
        1028  +
            } /* OperationErrorGenerator.kt:318 */
  982   1029   
        }
        1030  +
        /* OperationErrorGenerator.kt:134 */
  983   1031   
    }
        1032  +
    /* OperationErrorGenerator.kt:133 */
  984   1033   
}
        1034  +
/* OperationErrorGenerator.kt:182 */
  985   1035   
impl ::aws_smithy_types::retry::ProvideErrorKind for JsonTimestampsError {
        1036  +
    /* OperationErrorGenerator.kt:186 */
  986   1037   
    fn code(&self) -> ::std::option::Option<&str> {
        1038  +
        /* OperationErrorGenerator.kt:187 */
  987   1039   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
        1040  +
        /* OperationErrorGenerator.kt:186 */
  988   1041   
    }
        1042  +
    /* OperationErrorGenerator.kt:190 */
  989   1043   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
        1044  +
        /* OperationErrorGenerator.kt:197 */
  990   1045   
        ::std::option::Option::None
        1046  +
        /* OperationErrorGenerator.kt:190 */
  991   1047   
    }
        1048  +
    /* OperationErrorGenerator.kt:182 */
  992   1049   
}
        1050  +
/* OperationErrorGenerator.kt:163 */
  993   1051   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for JsonTimestampsError {
        1052  +
    /* OperationErrorGenerator.kt:164 */
  994   1053   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
        1054  +
        /* OperationErrorGenerator.kt:318 */
  995   1055   
        match self {
  996         -
            Self::Unhandled(_inner) => &_inner.meta,
        1056  +
            /* OperationErrorGenerator.kt:326 */
        1057  +
            Self::Unhandled(_inner) => {
        1058  +
                /* OperationErrorGenerator.kt:168 */
        1059  +
                &_inner.meta
        1060  +
                /* OperationErrorGenerator.kt:326 */
        1061  +
            } /* OperationErrorGenerator.kt:318 */
  997   1062   
        }
        1063  +
        /* OperationErrorGenerator.kt:164 */
  998   1064   
    }
        1065  +
    /* OperationErrorGenerator.kt:163 */
  999   1066   
}
        1067  +
/* OperationErrorGenerator.kt:109 */
 1000   1068   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for JsonTimestampsError {
        1069  +
    /* OperationErrorGenerator.kt:110 */
 1001   1070   
    fn create_unhandled_error(
 1002   1071   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
 1003   1072   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
 1004   1073   
    ) -> Self {
        1074  +
        /* OperationErrorGenerator.kt:121 */
 1005   1075   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
 1006   1076   
            source,
 1007   1077   
            meta: meta.unwrap_or_default(),
 1008   1078   
        })
        1079  +
        /* OperationErrorGenerator.kt:110 */
 1009   1080   
    }
        1081  +
    /* OperationErrorGenerator.kt:109 */
 1010   1082   
}
 1011   1083   
        1084  +
/* CodegenDelegator.kt:255 */
 1012   1085   
pub use crate::operation::json_timestamps::_json_timestamps_output::JsonTimestampsOutput;
 1013   1086   
        1087  +
/* CodegenDelegator.kt:255 */
 1014   1088   
pub use crate::operation::json_timestamps::_json_timestamps_input::JsonTimestampsInput;
 1015   1089   
        1090  +
/* RustModule.kt:172 */
 1016   1091   
mod _json_timestamps_input;
 1017   1092   
        1093  +
/* RustModule.kt:172 */
 1018   1094   
mod _json_timestamps_output;
 1019   1095   
 1020         -
/// Builders
        1096  +
/// /* CodegenDelegator.kt:51 */Builders
 1021   1097   
pub mod builders;

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

@@ -1,1 +183,340 @@
    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 JsonTimestampsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct JsonTimestampsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub normal: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl JsonTimestampsInput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn normal(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.normal.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   25     41   
    }
          42  +
    /* StructureGenerator.kt:231 */
   26     43   
    #[allow(missing_docs)] // documentation missing in model
          44  +
                           /* StructureGenerator.kt:166 */
   27     45   
    pub fn date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.date_time.as_ref()
          48  +
        /* StructureGenerator.kt:166 */
   29     49   
    }
          50  +
    /* StructureGenerator.kt:231 */
   30     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* StructureGenerator.kt:166 */
   31     53   
    pub fn date_time_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.date_time_on_target.as_ref()
          56  +
        /* StructureGenerator.kt:166 */
   33     57   
    }
          58  +
    /* StructureGenerator.kt:231 */
   34     59   
    #[allow(missing_docs)] // documentation missing in model
          60  +
                           /* StructureGenerator.kt:166 */
   35     61   
    pub fn epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.epoch_seconds.as_ref()
          64  +
        /* StructureGenerator.kt:166 */
   37     65   
    }
          66  +
    /* StructureGenerator.kt:231 */
   38     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* StructureGenerator.kt:166 */
   39     69   
    pub fn epoch_seconds_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.epoch_seconds_on_target.as_ref()
          72  +
        /* StructureGenerator.kt:166 */
   41     73   
    }
          74  +
    /* StructureGenerator.kt:231 */
   42     75   
    #[allow(missing_docs)] // documentation missing in model
          76  +
                           /* StructureGenerator.kt:166 */
   43     77   
    pub fn http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.http_date.as_ref()
          80  +
        /* StructureGenerator.kt:166 */
   45     81   
    }
          82  +
    /* StructureGenerator.kt:231 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* StructureGenerator.kt:166 */
   47     85   
    pub fn http_date_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.http_date_on_target.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl JsonTimestampsInput {
   52         -
    /// Creates a new builder-style object to manufacture [`JsonTimestampsInput`](crate::operation::json_timestamps::JsonTimestampsInput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`JsonTimestampsInput`](crate::operation::json_timestamps::JsonTimestampsInput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::json_timestamps::builders::JsonTimestampsInputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::json_timestamps::builders::JsonTimestampsInputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`JsonTimestampsInput`](crate::operation::json_timestamps::JsonTimestampsInput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`JsonTimestampsInput`](crate::operation::json_timestamps::JsonTimestampsInput).
         105  +
/* RustType.kt:516 */
   59    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   60    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   61    110   
pub struct JsonTimestampsInputBuilder {
   62         -
    pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl JsonTimestampsInputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn normal(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.normal = ::std::option::Option::Some(input);
         129  +
        /* BuilderGenerator.kt:293 */
   74    130   
        self
         131  +
        /* BuilderGenerator.kt:291 */
   75    132   
    }
         133  +
    /* BuilderGenerator.kt:312 */
   76    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* BuilderGenerator.kt:314 */
   77    136   
    pub fn set_normal(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.normal = input;
   79    139   
        self
         140  +
        /* BuilderGenerator.kt:314 */
   80    141   
    }
         142  +
    /* BuilderGenerator.kt:334 */
   81    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* BuilderGenerator.kt:336 */
   82    145   
    pub fn get_normal(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.normal
         148  +
        /* BuilderGenerator.kt:336 */
   84    149   
    }
         150  +
    /* BuilderGenerator.kt:286 */
   85    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:291 */
   86    153   
    pub fn date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.date_time = ::std::option::Option::Some(input);
         156  +
        /* BuilderGenerator.kt:293 */
   88    157   
        self
         158  +
        /* BuilderGenerator.kt:291 */
   89    159   
    }
         160  +
    /* BuilderGenerator.kt:312 */
   90    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:314 */
   91    163   
    pub fn set_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.date_time = input;
   93    166   
        self
         167  +
        /* BuilderGenerator.kt:314 */
   94    168   
    }
         169  +
    /* BuilderGenerator.kt:334 */
   95    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* BuilderGenerator.kt:336 */
   96    172   
    pub fn get_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.date_time
         175  +
        /* BuilderGenerator.kt:336 */
   98    176   
    }
         177  +
    /* BuilderGenerator.kt:286 */
   99    178   
    #[allow(missing_docs)] // documentation missing in model
         179  +
                           /* BuilderGenerator.kt:291 */
  100    180   
    pub fn date_time_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.date_time_on_target = ::std::option::Option::Some(input);
         183  +
        /* BuilderGenerator.kt:293 */
  102    184   
        self
         185  +
        /* BuilderGenerator.kt:291 */
  103    186   
    }
         187  +
    /* BuilderGenerator.kt:312 */
  104    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:314 */
  105    190   
    pub fn set_date_time_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.date_time_on_target = input;
  107    193   
        self
         194  +
        /* BuilderGenerator.kt:314 */
  108    195   
    }
         196  +
    /* BuilderGenerator.kt:334 */
  109    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* BuilderGenerator.kt:336 */
  110    199   
    pub fn get_date_time_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.date_time_on_target
         202  +
        /* BuilderGenerator.kt:336 */
  112    203   
    }
         204  +
    /* BuilderGenerator.kt:286 */
  113    205   
    #[allow(missing_docs)] // documentation missing in model
         206  +
                           /* BuilderGenerator.kt:291 */
  114    207   
    pub fn epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.epoch_seconds = ::std::option::Option::Some(input);
         210  +
        /* BuilderGenerator.kt:293 */
  116    211   
        self
         212  +
        /* BuilderGenerator.kt:291 */
  117    213   
    }
         214  +
    /* BuilderGenerator.kt:312 */
  118    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:314 */
  119    217   
    pub fn set_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.epoch_seconds = input;
  121    220   
        self
         221  +
        /* BuilderGenerator.kt:314 */
  122    222   
    }
         223  +
    /* BuilderGenerator.kt:334 */
  123    224   
    #[allow(missing_docs)] // documentation missing in model
         225  +
                           /* BuilderGenerator.kt:336 */
  124    226   
    pub fn get_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.epoch_seconds
         229  +
        /* BuilderGenerator.kt:336 */
  126    230   
    }
         231  +
    /* BuilderGenerator.kt:286 */
  127    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* BuilderGenerator.kt:291 */
  128    234   
    pub fn epoch_seconds_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.epoch_seconds_on_target = ::std::option::Option::Some(input);
         237  +
        /* BuilderGenerator.kt:293 */
  130    238   
        self
         239  +
        /* BuilderGenerator.kt:291 */
  131    240   
    }
         241  +
    /* BuilderGenerator.kt:312 */
  132    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* BuilderGenerator.kt:314 */
  133    244   
    pub fn set_epoch_seconds_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.epoch_seconds_on_target = input;
  135    247   
        self
         248  +
        /* BuilderGenerator.kt:314 */
  136    249   
    }
         250  +
    /* BuilderGenerator.kt:334 */
  137    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* BuilderGenerator.kt:336 */
  138    253   
    pub fn get_epoch_seconds_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.epoch_seconds_on_target
         256  +
        /* BuilderGenerator.kt:336 */
  140    257   
    }
         258  +
    /* BuilderGenerator.kt:286 */
  141    259   
    #[allow(missing_docs)] // documentation missing in model
         260  +
                           /* BuilderGenerator.kt:291 */
  142    261   
    pub fn http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.http_date = ::std::option::Option::Some(input);
         264  +
        /* BuilderGenerator.kt:293 */
  144    265   
        self
         266  +
        /* BuilderGenerator.kt:291 */
  145    267   
    }
         268  +
    /* BuilderGenerator.kt:312 */
  146    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* BuilderGenerator.kt:314 */
  147    271   
    pub fn set_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.http_date = input;
  149    274   
        self
         275  +
        /* BuilderGenerator.kt:314 */
  150    276   
    }
         277  +
    /* BuilderGenerator.kt:334 */
  151    278   
    #[allow(missing_docs)] // documentation missing in model
         279  +
                           /* BuilderGenerator.kt:336 */
  152    280   
    pub fn get_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.http_date
         283  +
        /* BuilderGenerator.kt:336 */
  154    284   
    }
         285  +
    /* BuilderGenerator.kt:286 */
  155    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* BuilderGenerator.kt:291 */
  156    288   
    pub fn http_date_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.http_date_on_target = ::std::option::Option::Some(input);
         291  +
        /* BuilderGenerator.kt:293 */
  158    292   
        self
         293  +
        /* BuilderGenerator.kt:291 */
  159    294   
    }
         295  +
    /* BuilderGenerator.kt:312 */
  160    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* BuilderGenerator.kt:314 */
  161    298   
    pub fn set_http_date_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.http_date_on_target = input;
  163    301   
        self
         302  +
        /* BuilderGenerator.kt:314 */
  164    303   
    }
         304  +
    /* BuilderGenerator.kt:334 */
  165    305   
    #[allow(missing_docs)] // documentation missing in model
         306  +
                           /* BuilderGenerator.kt:336 */
  166    307   
    pub fn get_http_date_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.http_date_on_target
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`JsonTimestampsInput`](crate::operation::json_timestamps::JsonTimestampsInput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`JsonTimestampsInput`](crate::operation::json_timestamps::JsonTimestampsInput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(
  171    315   
        self,
  172    316   
    ) -> ::std::result::Result<crate::operation::json_timestamps::JsonTimestampsInput, ::aws_smithy_types::error::operation::BuildError> {
  173         -
        ::std::result::Result::Ok(crate::operation::json_timestamps::JsonTimestampsInput {
  174         -
            normal: self.normal,
  175         -
            date_time: self.date_time,
  176         -
            date_time_on_target: self.date_time_on_target,
  177         -
            epoch_seconds: self.epoch_seconds,
  178         -
            epoch_seconds_on_target: self.epoch_seconds_on_target,
  179         -
            http_date: self.http_date,
  180         -
            http_date_on_target: self.http_date_on_target,
  181         -
        })
         317  +
        /* BuilderGenerator.kt:254 */
         318  +
        ::std::result::Result::Ok(
         319  +
            /* BuilderGenerator.kt:477 */
         320  +
            crate::operation::json_timestamps::JsonTimestampsInput {
         321  +
                /* BuilderGenerator.kt:481 */ normal: self.normal,
         322  +
                /* BuilderGenerator.kt:481 */
         323  +
                date_time: self.date_time,
         324  +
                /* BuilderGenerator.kt:481 */
         325  +
                date_time_on_target: self.date_time_on_target,
         326  +
                /* BuilderGenerator.kt:481 */
         327  +
                epoch_seconds: self.epoch_seconds,
         328  +
                /* BuilderGenerator.kt:481 */
         329  +
                epoch_seconds_on_target: self.epoch_seconds_on_target,
         330  +
                /* BuilderGenerator.kt:481 */
         331  +
                http_date: self.http_date,
         332  +
                /* BuilderGenerator.kt:481 */
         333  +
                http_date_on_target: self.http_date_on_target,
         334  +
                /* BuilderGenerator.kt:477 */
         335  +
            }, /* BuilderGenerator.kt:254 */
         336  +
        )
         337  +
        /* BuilderGenerator.kt:253 */
  182    338   
    }
         339  +
    /* BuilderGenerator.kt:355 */
  183    340   
}

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

@@ -1,1 +181,335 @@
    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 JsonTimestampsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct JsonTimestampsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub normal: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl JsonTimestampsOutput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn normal(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.normal.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   25     41   
    }
          42  +
    /* StructureGenerator.kt:231 */
   26     43   
    #[allow(missing_docs)] // documentation missing in model
          44  +
                           /* StructureGenerator.kt:166 */
   27     45   
    pub fn date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.date_time.as_ref()
          48  +
        /* StructureGenerator.kt:166 */
   29     49   
    }
          50  +
    /* StructureGenerator.kt:231 */
   30     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* StructureGenerator.kt:166 */
   31     53   
    pub fn date_time_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.date_time_on_target.as_ref()
          56  +
        /* StructureGenerator.kt:166 */
   33     57   
    }
          58  +
    /* StructureGenerator.kt:231 */
   34     59   
    #[allow(missing_docs)] // documentation missing in model
          60  +
                           /* StructureGenerator.kt:166 */
   35     61   
    pub fn epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.epoch_seconds.as_ref()
          64  +
        /* StructureGenerator.kt:166 */
   37     65   
    }
          66  +
    /* StructureGenerator.kt:231 */
   38     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* StructureGenerator.kt:166 */
   39     69   
    pub fn epoch_seconds_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.epoch_seconds_on_target.as_ref()
          72  +
        /* StructureGenerator.kt:166 */
   41     73   
    }
          74  +
    /* StructureGenerator.kt:231 */
   42     75   
    #[allow(missing_docs)] // documentation missing in model
          76  +
                           /* StructureGenerator.kt:166 */
   43     77   
    pub fn http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.http_date.as_ref()
          80  +
        /* StructureGenerator.kt:166 */
   45     81   
    }
          82  +
    /* StructureGenerator.kt:231 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* StructureGenerator.kt:166 */
   47     85   
    pub fn http_date_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.http_date_on_target.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl JsonTimestampsOutput {
   52         -
    /// Creates a new builder-style object to manufacture [`JsonTimestampsOutput`](crate::operation::json_timestamps::JsonTimestampsOutput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`JsonTimestampsOutput`](crate::operation::json_timestamps::JsonTimestampsOutput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::json_timestamps::builders::JsonTimestampsOutputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::json_timestamps::builders::JsonTimestampsOutputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`JsonTimestampsOutput`](crate::operation::json_timestamps::JsonTimestampsOutput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`JsonTimestampsOutput`](crate::operation::json_timestamps::JsonTimestampsOutput).
         105  +
/* RustType.kt:516 */
   59    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   60    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   61    110   
pub struct JsonTimestampsOutputBuilder {
   62         -
    pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl JsonTimestampsOutputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn normal(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.normal = ::std::option::Option::Some(input);
         129  +
        /* BuilderGenerator.kt:293 */
   74    130   
        self
         131  +
        /* BuilderGenerator.kt:291 */
   75    132   
    }
         133  +
    /* BuilderGenerator.kt:312 */
   76    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* BuilderGenerator.kt:314 */
   77    136   
    pub fn set_normal(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.normal = input;
   79    139   
        self
         140  +
        /* BuilderGenerator.kt:314 */
   80    141   
    }
         142  +
    /* BuilderGenerator.kt:334 */
   81    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* BuilderGenerator.kt:336 */
   82    145   
    pub fn get_normal(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.normal
         148  +
        /* BuilderGenerator.kt:336 */
   84    149   
    }
         150  +
    /* BuilderGenerator.kt:286 */
   85    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:291 */
   86    153   
    pub fn date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.date_time = ::std::option::Option::Some(input);
         156  +
        /* BuilderGenerator.kt:293 */
   88    157   
        self
         158  +
        /* BuilderGenerator.kt:291 */
   89    159   
    }
         160  +
    /* BuilderGenerator.kt:312 */
   90    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:314 */
   91    163   
    pub fn set_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.date_time = input;
   93    166   
        self
         167  +
        /* BuilderGenerator.kt:314 */
   94    168   
    }
         169  +
    /* BuilderGenerator.kt:334 */
   95    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* BuilderGenerator.kt:336 */
   96    172   
    pub fn get_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.date_time
         175  +
        /* BuilderGenerator.kt:336 */
   98    176   
    }
         177  +
    /* BuilderGenerator.kt:286 */
   99    178   
    #[allow(missing_docs)] // documentation missing in model
         179  +
                           /* BuilderGenerator.kt:291 */
  100    180   
    pub fn date_time_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.date_time_on_target = ::std::option::Option::Some(input);
         183  +
        /* BuilderGenerator.kt:293 */
  102    184   
        self
         185  +
        /* BuilderGenerator.kt:291 */
  103    186   
    }
         187  +
    /* BuilderGenerator.kt:312 */
  104    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:314 */
  105    190   
    pub fn set_date_time_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.date_time_on_target = input;
  107    193   
        self
         194  +
        /* BuilderGenerator.kt:314 */
  108    195   
    }
         196  +
    /* BuilderGenerator.kt:334 */
  109    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* BuilderGenerator.kt:336 */
  110    199   
    pub fn get_date_time_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.date_time_on_target
         202  +
        /* BuilderGenerator.kt:336 */
  112    203   
    }
         204  +
    /* BuilderGenerator.kt:286 */
  113    205   
    #[allow(missing_docs)] // documentation missing in model
         206  +
                           /* BuilderGenerator.kt:291 */
  114    207   
    pub fn epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.epoch_seconds = ::std::option::Option::Some(input);
         210  +
        /* BuilderGenerator.kt:293 */
  116    211   
        self
         212  +
        /* BuilderGenerator.kt:291 */
  117    213   
    }
         214  +
    /* BuilderGenerator.kt:312 */
  118    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:314 */
  119    217   
    pub fn set_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.epoch_seconds = input;
  121    220   
        self
         221  +
        /* BuilderGenerator.kt:314 */
  122    222   
    }
         223  +
    /* BuilderGenerator.kt:334 */
  123    224   
    #[allow(missing_docs)] // documentation missing in model
         225  +
                           /* BuilderGenerator.kt:336 */
  124    226   
    pub fn get_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.epoch_seconds
         229  +
        /* BuilderGenerator.kt:336 */
  126    230   
    }
         231  +
    /* BuilderGenerator.kt:286 */
  127    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* BuilderGenerator.kt:291 */
  128    234   
    pub fn epoch_seconds_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.epoch_seconds_on_target = ::std::option::Option::Some(input);
         237  +
        /* BuilderGenerator.kt:293 */
  130    238   
        self
         239  +
        /* BuilderGenerator.kt:291 */
  131    240   
    }
         241  +
    /* BuilderGenerator.kt:312 */
  132    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* BuilderGenerator.kt:314 */
  133    244   
    pub fn set_epoch_seconds_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.epoch_seconds_on_target = input;
  135    247   
        self
         248  +
        /* BuilderGenerator.kt:314 */
  136    249   
    }
         250  +
    /* BuilderGenerator.kt:334 */
  137    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* BuilderGenerator.kt:336 */
  138    253   
    pub fn get_epoch_seconds_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.epoch_seconds_on_target
         256  +
        /* BuilderGenerator.kt:336 */
  140    257   
    }
         258  +
    /* BuilderGenerator.kt:286 */
  141    259   
    #[allow(missing_docs)] // documentation missing in model
         260  +
                           /* BuilderGenerator.kt:291 */
  142    261   
    pub fn http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.http_date = ::std::option::Option::Some(input);
         264  +
        /* BuilderGenerator.kt:293 */
  144    265   
        self
         266  +
        /* BuilderGenerator.kt:291 */
  145    267   
    }
         268  +
    /* BuilderGenerator.kt:312 */
  146    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* BuilderGenerator.kt:314 */
  147    271   
    pub fn set_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.http_date = input;
  149    274   
        self
         275  +
        /* BuilderGenerator.kt:314 */
  150    276   
    }
         277  +
    /* BuilderGenerator.kt:334 */
  151    278   
    #[allow(missing_docs)] // documentation missing in model
         279  +
                           /* BuilderGenerator.kt:336 */
  152    280   
    pub fn get_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.http_date
         283  +
        /* BuilderGenerator.kt:336 */
  154    284   
    }
         285  +
    /* BuilderGenerator.kt:286 */
  155    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* BuilderGenerator.kt:291 */
  156    288   
    pub fn http_date_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.http_date_on_target = ::std::option::Option::Some(input);
         291  +
        /* BuilderGenerator.kt:293 */
  158    292   
        self
         293  +
        /* BuilderGenerator.kt:291 */
  159    294   
    }
         295  +
    /* BuilderGenerator.kt:312 */
  160    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* BuilderGenerator.kt:314 */
  161    298   
    pub fn set_http_date_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.http_date_on_target = input;
  163    301   
        self
         302  +
        /* BuilderGenerator.kt:314 */
  164    303   
    }
         304  +
    /* BuilderGenerator.kt:334 */
  165    305   
    #[allow(missing_docs)] // documentation missing in model
         306  +
                           /* BuilderGenerator.kt:336 */
  166    307   
    pub fn get_http_date_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.http_date_on_target
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`JsonTimestampsOutput`](crate::operation::json_timestamps::JsonTimestampsOutput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`JsonTimestampsOutput`](crate::operation::json_timestamps::JsonTimestampsOutput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(self) -> crate::operation::json_timestamps::JsonTimestampsOutput {
         315  +
        /* BuilderGenerator.kt:477 */
  171    316   
        crate::operation::json_timestamps::JsonTimestampsOutput {
  172         -
            normal: self.normal,
         317  +
            /* BuilderGenerator.kt:481 */ normal: self.normal,
         318  +
            /* BuilderGenerator.kt:481 */
  173    319   
            date_time: self.date_time,
         320  +
            /* BuilderGenerator.kt:481 */
  174    321   
            date_time_on_target: self.date_time_on_target,
         322  +
            /* BuilderGenerator.kt:481 */
  175    323   
            epoch_seconds: self.epoch_seconds,
         324  +
            /* BuilderGenerator.kt:481 */
  176    325   
            epoch_seconds_on_target: self.epoch_seconds_on_target,
         326  +
            /* BuilderGenerator.kt:481 */
  177    327   
            http_date: self.http_date,
         328  +
            /* BuilderGenerator.kt:481 */
  178    329   
            http_date_on_target: self.http_date_on_target,
         330  +
            /* BuilderGenerator.kt:477 */
  179    331   
        }
         332  +
        /* BuilderGenerator.kt:253 */
  180    333   
    }
         334  +
    /* BuilderGenerator.kt:355 */
  181    335   
}