Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_lists/builders.rs

@@ -1,1 +387,486 @@
    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::xml_lists::_xml_lists_output::XmlListsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_lists::_xml_lists_input::XmlListsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_lists::builders::XmlListsInputBuilder {
    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::xml_lists::XmlListsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_lists::XmlListsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_lists();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlLists`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlLists`.
   24     27   
///
   25         -
/// This test case serializes XML lists for the following cases for both input and output: 1. Normal XML lists. 2. Normal XML sets. 3. XML lists of lists. 4. XML lists with @xmlName on its members 5. Flattened XML lists. 6. Flattened XML lists with @xmlName. 7. Flattened XML lists with @xmlNamespace. 8. Lists of structures. 9. Flattened XML list of structures
          28  +
/// /* FluentBuilderGenerator.kt:130 */This test case serializes XML lists for the following cases for both input and output: 1. Normal XML lists. 2. Normal XML sets. 3. XML lists of lists. 4. XML lists with @xmlName on its members 5. Flattened XML lists. 6. Flattened XML lists with @xmlName. 7. Flattened XML lists with @xmlNamespace. 8. Lists of structures. 9. Flattened XML list of structures
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct XmlListsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::xml_lists::builders::XmlListsInputBuilder,
   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::xml_lists::XmlListsOutput, crate::operation::xml_lists::XmlListsError>
   33     39   
    for XmlListsFluentBuilder
   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::xml_lists::XmlListsOutput, crate::operation::xml_lists::XmlListsError>,
   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 XmlListsFluentBuilder {
          52  +
    /* FluentBuilderGenerator.kt:288 */
   45     53   
    /// Creates a new `XmlListsFluentBuilder`.
   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 XmlLists as a reference.
   54     63   
    pub fn as_input(&self) -> &crate::operation::xml_lists::builders::XmlListsInputBuilder {
   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::xml_lists::XmlListsOutput,
   69     79   
        ::aws_smithy_runtime_api::client::result::SdkError<
   70     80   
            crate::operation::xml_lists::XmlListsError,
   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::xml_lists::XmlLists::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::xml_lists::XmlLists::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::xml_lists::XmlListsOutput, crate::operation::xml_lists::XmlListsError, 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:436 */
  103    114   
    /// Appends an item to `stringList`.
  104    115   
    ///
  105    116   
    /// To override the contents of this collection use [`set_string_list`](Self::set_string_list).
  106    117   
    ///
         118  +
    /* FluentBuilderGenerator.kt:443 */
  107    119   
    #[allow(missing_docs)] // documentation missing in model
         120  +
                           /* FluentBuilderGenerator.kt:446 */
  108    121   
    pub fn string_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  109    122   
        self.inner = self.inner.string_list(input.into());
  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_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  114    129   
        self.inner = self.inner.set_string_list(input);
  115    130   
        self
  116    131   
    }
         132  +
    /* FluentBuilderGenerator.kt:518 */
  117    133   
    #[allow(missing_docs)] // documentation missing in model
         134  +
                           /* FluentBuilderGenerator.kt:520 */
  118    135   
    pub fn get_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  119    136   
        self.inner.get_string_list()
  120    137   
    }
  121         -
    ///
         138  +
    /// /* FluentBuilderGenerator.kt:436 */
  122    139   
    /// Appends an item to `stringSet`.
  123    140   
    ///
  124    141   
    /// To override the contents of this collection use [`set_string_set`](Self::set_string_set).
  125    142   
    ///
         143  +
    /* FluentBuilderGenerator.kt:443 */
  126    144   
    #[allow(missing_docs)] // documentation missing in model
         145  +
                           /* FluentBuilderGenerator.kt:446 */
  127    146   
    pub fn string_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  128    147   
        self.inner = self.inner.string_set(input.into());
  129    148   
        self
  130    149   
    }
         150  +
    /* FluentBuilderGenerator.kt:498 */
  131    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* FluentBuilderGenerator.kt:500 */
  132    153   
    pub fn set_string_set(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  133    154   
        self.inner = self.inner.set_string_set(input);
  134    155   
        self
  135    156   
    }
         157  +
    /* FluentBuilderGenerator.kt:518 */
  136    158   
    #[allow(missing_docs)] // documentation missing in model
         159  +
                           /* FluentBuilderGenerator.kt:520 */
  137    160   
    pub fn get_string_set(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  138    161   
        self.inner.get_string_set()
  139    162   
    }
  140         -
    ///
         163  +
    /// /* FluentBuilderGenerator.kt:436 */
  141    164   
    /// Appends an item to `integerList`.
  142    165   
    ///
  143    166   
    /// To override the contents of this collection use [`set_integer_list`](Self::set_integer_list).
  144    167   
    ///
         168  +
    /* FluentBuilderGenerator.kt:443 */
  145    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:446 */
  146    171   
    pub fn integer_list(mut self, input: i32) -> Self {
  147    172   
        self.inner = self.inner.integer_list(input);
  148    173   
        self
  149    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:498 */
  150    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:500 */
  151    178   
    pub fn set_integer_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  152    179   
        self.inner = self.inner.set_integer_list(input);
  153    180   
        self
  154    181   
    }
         182  +
    /* FluentBuilderGenerator.kt:518 */
  155    183   
    #[allow(missing_docs)] // documentation missing in model
         184  +
                           /* FluentBuilderGenerator.kt:520 */
  156    185   
    pub fn get_integer_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  157    186   
        self.inner.get_integer_list()
  158    187   
    }
  159         -
    ///
         188  +
    /// /* FluentBuilderGenerator.kt:436 */
  160    189   
    /// Appends an item to `booleanList`.
  161    190   
    ///
  162    191   
    /// To override the contents of this collection use [`set_boolean_list`](Self::set_boolean_list).
  163    192   
    ///
         193  +
    /* FluentBuilderGenerator.kt:443 */
  164    194   
    #[allow(missing_docs)] // documentation missing in model
         195  +
                           /* FluentBuilderGenerator.kt:446 */
  165    196   
    pub fn boolean_list(mut self, input: bool) -> Self {
  166    197   
        self.inner = self.inner.boolean_list(input);
  167    198   
        self
  168    199   
    }
         200  +
    /* FluentBuilderGenerator.kt:498 */
  169    201   
    #[allow(missing_docs)] // documentation missing in model
         202  +
                           /* FluentBuilderGenerator.kt:500 */
  170    203   
    pub fn set_boolean_list(mut self, input: ::std::option::Option<::std::vec::Vec<bool>>) -> Self {
  171    204   
        self.inner = self.inner.set_boolean_list(input);
  172    205   
        self
  173    206   
    }
         207  +
    /* FluentBuilderGenerator.kt:518 */
  174    208   
    #[allow(missing_docs)] // documentation missing in model
         209  +
                           /* FluentBuilderGenerator.kt:520 */
  175    210   
    pub fn get_boolean_list(&self) -> &::std::option::Option<::std::vec::Vec<bool>> {
  176    211   
        self.inner.get_boolean_list()
  177    212   
    }
  178         -
    ///
         213  +
    /// /* FluentBuilderGenerator.kt:436 */
  179    214   
    /// Appends an item to `timestampList`.
  180    215   
    ///
  181    216   
    /// To override the contents of this collection use [`set_timestamp_list`](Self::set_timestamp_list).
  182    217   
    ///
         218  +
    /* FluentBuilderGenerator.kt:443 */
  183    219   
    #[allow(missing_docs)] // documentation missing in model
         220  +
                           /* FluentBuilderGenerator.kt:446 */
  184    221   
    pub fn timestamp_list(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  185    222   
        self.inner = self.inner.timestamp_list(input);
  186    223   
        self
  187    224   
    }
         225  +
    /* FluentBuilderGenerator.kt:498 */
  188    226   
    #[allow(missing_docs)] // documentation missing in model
         227  +
                           /* FluentBuilderGenerator.kt:500 */
  189    228   
    pub fn set_timestamp_list(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>) -> Self {
  190    229   
        self.inner = self.inner.set_timestamp_list(input);
  191    230   
        self
  192    231   
    }
         232  +
    /* FluentBuilderGenerator.kt:518 */
  193    233   
    #[allow(missing_docs)] // documentation missing in model
         234  +
                           /* FluentBuilderGenerator.kt:520 */
  194    235   
    pub fn get_timestamp_list(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>> {
  195    236   
        self.inner.get_timestamp_list()
  196    237   
    }
  197         -
    ///
         238  +
    /// /* FluentBuilderGenerator.kt:436 */
  198    239   
    /// Appends an item to `enumList`.
  199    240   
    ///
  200    241   
    /// To override the contents of this collection use [`set_enum_list`](Self::set_enum_list).
  201    242   
    ///
         243  +
    /* FluentBuilderGenerator.kt:443 */
  202    244   
    #[allow(missing_docs)] // documentation missing in model
         245  +
                           /* FluentBuilderGenerator.kt:446 */
  203    246   
    pub fn enum_list(mut self, input: crate::types::FooEnum) -> Self {
  204    247   
        self.inner = self.inner.enum_list(input);
  205    248   
        self
  206    249   
    }
         250  +
    /* FluentBuilderGenerator.kt:498 */
  207    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* FluentBuilderGenerator.kt:500 */
  208    253   
    pub fn set_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FooEnum>>) -> Self {
  209    254   
        self.inner = self.inner.set_enum_list(input);
  210    255   
        self
  211    256   
    }
         257  +
    /* FluentBuilderGenerator.kt:518 */
  212    258   
    #[allow(missing_docs)] // documentation missing in model
         259  +
                           /* FluentBuilderGenerator.kt:520 */
  213    260   
    pub fn get_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FooEnum>> {
  214    261   
        self.inner.get_enum_list()
  215    262   
    }
  216         -
    ///
         263  +
    /// /* FluentBuilderGenerator.kt:436 */
  217    264   
    /// Appends an item to `intEnumList`.
  218    265   
    ///
  219    266   
    /// To override the contents of this collection use [`set_int_enum_list`](Self::set_int_enum_list).
  220    267   
    ///
         268  +
    /* FluentBuilderGenerator.kt:443 */
  221    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* FluentBuilderGenerator.kt:446 */
  222    271   
    pub fn int_enum_list(mut self, input: i32) -> Self {
  223    272   
        self.inner = self.inner.int_enum_list(input);
  224    273   
        self
  225    274   
    }
         275  +
    /* FluentBuilderGenerator.kt:498 */
  226    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* FluentBuilderGenerator.kt:500 */
  227    278   
    pub fn set_int_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  228    279   
        self.inner = self.inner.set_int_enum_list(input);
  229    280   
        self
  230    281   
    }
         282  +
    /* FluentBuilderGenerator.kt:518 */
  231    283   
    #[allow(missing_docs)] // documentation missing in model
         284  +
                           /* FluentBuilderGenerator.kt:520 */
  232    285   
    pub fn get_int_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  233    286   
        self.inner.get_int_enum_list()
  234    287   
    }
  235         -
    ///
         288  +
    /// /* FluentBuilderGenerator.kt:436 */
  236    289   
    /// Appends an item to `nestedStringList`.
  237    290   
    ///
  238    291   
    /// To override the contents of this collection use [`set_nested_string_list`](Self::set_nested_string_list).
  239    292   
    ///
  240         -
    /// A list of lists of strings.
         293  +
    /// /* FluentBuilderGenerator.kt:443 */A list of lists of strings.
         294  +
    /* FluentBuilderGenerator.kt:446 */
  241    295   
    pub fn nested_string_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
  242    296   
        self.inner = self.inner.nested_string_list(input);
  243    297   
        self
  244    298   
    }
  245         -
    /// A list of lists of strings.
         299  +
    /// /* FluentBuilderGenerator.kt:498 */A list of lists of strings.
         300  +
    /* FluentBuilderGenerator.kt:500 */
  246    301   
    pub fn set_nested_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>) -> Self {
  247    302   
        self.inner = self.inner.set_nested_string_list(input);
  248    303   
        self
  249    304   
    }
  250         -
    /// A list of lists of strings.
         305  +
    /// /* FluentBuilderGenerator.kt:518 */A list of lists of strings.
         306  +
    /* FluentBuilderGenerator.kt:520 */
  251    307   
    pub fn get_nested_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>> {
  252    308   
        self.inner.get_nested_string_list()
  253    309   
    }
  254         -
    ///
         310  +
    /// /* FluentBuilderGenerator.kt:436 */
  255    311   
    /// Appends an item to `renamedListMembers`.
  256    312   
    ///
  257    313   
    /// To override the contents of this collection use [`set_renamed_list_members`](Self::set_renamed_list_members).
  258    314   
    ///
         315  +
    /* FluentBuilderGenerator.kt:443 */
  259    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* FluentBuilderGenerator.kt:446 */
  260    318   
    pub fn renamed_list_members(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  261    319   
        self.inner = self.inner.renamed_list_members(input.into());
  262    320   
        self
  263    321   
    }
         322  +
    /* FluentBuilderGenerator.kt:498 */
  264    323   
    #[allow(missing_docs)] // documentation missing in model
         324  +
                           /* FluentBuilderGenerator.kt:500 */
  265    325   
    pub fn set_renamed_list_members(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  266    326   
        self.inner = self.inner.set_renamed_list_members(input);
  267    327   
        self
  268    328   
    }
         329  +
    /* FluentBuilderGenerator.kt:518 */
  269    330   
    #[allow(missing_docs)] // documentation missing in model
         331  +
                           /* FluentBuilderGenerator.kt:520 */
  270    332   
    pub fn get_renamed_list_members(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  271    333   
        self.inner.get_renamed_list_members()
  272    334   
    }
  273         -
    ///
         335  +
    /// /* FluentBuilderGenerator.kt:436 */
  274    336   
    /// Appends an item to `flattenedList`.
  275    337   
    ///
  276    338   
    /// To override the contents of this collection use [`set_flattened_list`](Self::set_flattened_list).
  277    339   
    ///
         340  +
    /* FluentBuilderGenerator.kt:443 */
  278    341   
    #[allow(missing_docs)] // documentation missing in model
         342  +
                           /* FluentBuilderGenerator.kt:446 */
  279    343   
    pub fn flattened_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  280    344   
        self.inner = self.inner.flattened_list(input.into());
  281    345   
        self
  282    346   
    }
         347  +
    /* FluentBuilderGenerator.kt:498 */
  283    348   
    #[allow(missing_docs)] // documentation missing in model
         349  +
                           /* FluentBuilderGenerator.kt:500 */
  284    350   
    pub fn set_flattened_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  285    351   
        self.inner = self.inner.set_flattened_list(input);
  286    352   
        self
  287    353   
    }
         354  +
    /* FluentBuilderGenerator.kt:518 */
  288    355   
    #[allow(missing_docs)] // documentation missing in model
         356  +
                           /* FluentBuilderGenerator.kt:520 */
  289    357   
    pub fn get_flattened_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  290    358   
        self.inner.get_flattened_list()
  291    359   
    }
  292         -
    ///
         360  +
    /// /* FluentBuilderGenerator.kt:436 */
  293    361   
    /// Appends an item to `flattenedList2`.
  294    362   
    ///
  295    363   
    /// To override the contents of this collection use [`set_flattened_list2`](Self::set_flattened_list2).
  296    364   
    ///
         365  +
    /* FluentBuilderGenerator.kt:443 */
  297    366   
    #[allow(missing_docs)] // documentation missing in model
         367  +
                           /* FluentBuilderGenerator.kt:446 */
  298    368   
    pub fn flattened_list2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  299    369   
        self.inner = self.inner.flattened_list2(input.into());
  300    370   
        self
  301    371   
    }
         372  +
    /* FluentBuilderGenerator.kt:498 */
  302    373   
    #[allow(missing_docs)] // documentation missing in model
         374  +
                           /* FluentBuilderGenerator.kt:500 */
  303    375   
    pub fn set_flattened_list2(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  304    376   
        self.inner = self.inner.set_flattened_list2(input);
  305    377   
        self
  306    378   
    }
         379  +
    /* FluentBuilderGenerator.kt:518 */
  307    380   
    #[allow(missing_docs)] // documentation missing in model
         381  +
                           /* FluentBuilderGenerator.kt:520 */
  308    382   
    pub fn get_flattened_list2(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  309    383   
        self.inner.get_flattened_list2()
  310    384   
    }
  311         -
    ///
         385  +
    /// /* FluentBuilderGenerator.kt:436 */
  312    386   
    /// Appends an item to `flattenedListWithMemberNamespace`.
  313    387   
    ///
  314    388   
    /// To override the contents of this collection use [`set_flattened_list_with_member_namespace`](Self::set_flattened_list_with_member_namespace).
  315    389   
    ///
         390  +
    /* FluentBuilderGenerator.kt:443 */
  316    391   
    #[allow(missing_docs)] // documentation missing in model
         392  +
                           /* FluentBuilderGenerator.kt:446 */
  317    393   
    pub fn flattened_list_with_member_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  318    394   
        self.inner = self.inner.flattened_list_with_member_namespace(input.into());
  319    395   
        self
  320    396   
    }
         397  +
    /* FluentBuilderGenerator.kt:498 */
  321    398   
    #[allow(missing_docs)] // documentation missing in model
         399  +
                           /* FluentBuilderGenerator.kt:500 */
  322    400   
    pub fn set_flattened_list_with_member_namespace(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  323    401   
        self.inner = self.inner.set_flattened_list_with_member_namespace(input);
  324    402   
        self
  325    403   
    }
         404  +
    /* FluentBuilderGenerator.kt:518 */
  326    405   
    #[allow(missing_docs)] // documentation missing in model
         406  +
                           /* FluentBuilderGenerator.kt:520 */
  327    407   
    pub fn get_flattened_list_with_member_namespace(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  328    408   
        self.inner.get_flattened_list_with_member_namespace()
  329    409   
    }
  330         -
    ///
         410  +
    /// /* FluentBuilderGenerator.kt:436 */
  331    411   
    /// Appends an item to `flattenedListWithNamespace`.
  332    412   
    ///
  333    413   
    /// To override the contents of this collection use [`set_flattened_list_with_namespace`](Self::set_flattened_list_with_namespace).
  334    414   
    ///
         415  +
    /* FluentBuilderGenerator.kt:443 */
  335    416   
    #[allow(missing_docs)] // documentation missing in model
         417  +
                           /* FluentBuilderGenerator.kt:446 */
  336    418   
    pub fn flattened_list_with_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  337    419   
        self.inner = self.inner.flattened_list_with_namespace(input.into());
  338    420   
        self
  339    421   
    }
         422  +
    /* FluentBuilderGenerator.kt:498 */
  340    423   
    #[allow(missing_docs)] // documentation missing in model
         424  +
                           /* FluentBuilderGenerator.kt:500 */
  341    425   
    pub fn set_flattened_list_with_namespace(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  342    426   
        self.inner = self.inner.set_flattened_list_with_namespace(input);
  343    427   
        self
  344    428   
    }
         429  +
    /* FluentBuilderGenerator.kt:518 */
  345    430   
    #[allow(missing_docs)] // documentation missing in model
         431  +
                           /* FluentBuilderGenerator.kt:520 */
  346    432   
    pub fn get_flattened_list_with_namespace(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  347    433   
        self.inner.get_flattened_list_with_namespace()
  348    434   
    }
  349         -
    ///
         435  +
    /// /* FluentBuilderGenerator.kt:436 */
  350    436   
    /// Appends an item to `structureList`.
  351    437   
    ///
  352    438   
    /// To override the contents of this collection use [`set_structure_list`](Self::set_structure_list).
  353    439   
    ///
         440  +
    /* FluentBuilderGenerator.kt:443 */
  354    441   
    #[allow(missing_docs)] // documentation missing in model
         442  +
                           /* FluentBuilderGenerator.kt:446 */
  355    443   
    pub fn structure_list(mut self, input: crate::types::StructureListMember) -> Self {
  356    444   
        self.inner = self.inner.structure_list(input);
  357    445   
        self
  358    446   
    }
         447  +
    /* FluentBuilderGenerator.kt:498 */
  359    448   
    #[allow(missing_docs)] // documentation missing in model
         449  +
                           /* FluentBuilderGenerator.kt:500 */
  360    450   
    pub fn set_structure_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StructureListMember>>) -> Self {
  361    451   
        self.inner = self.inner.set_structure_list(input);
  362    452   
        self
  363    453   
    }
         454  +
    /* FluentBuilderGenerator.kt:518 */
  364    455   
    #[allow(missing_docs)] // documentation missing in model
         456  +
                           /* FluentBuilderGenerator.kt:520 */
  365    457   
    pub fn get_structure_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StructureListMember>> {
  366    458   
        self.inner.get_structure_list()
  367    459   
    }
  368         -
    ///
         460  +
    /// /* FluentBuilderGenerator.kt:436 */
  369    461   
    /// Appends an item to `flattenedStructureList`.
  370    462   
    ///
  371    463   
    /// To override the contents of this collection use [`set_flattened_structure_list`](Self::set_flattened_structure_list).
  372    464   
    ///
         465  +
    /* FluentBuilderGenerator.kt:443 */
  373    466   
    #[allow(missing_docs)] // documentation missing in model
         467  +
                           /* FluentBuilderGenerator.kt:446 */
  374    468   
    pub fn flattened_structure_list(mut self, input: crate::types::StructureListMember) -> Self {
  375    469   
        self.inner = self.inner.flattened_structure_list(input);
  376    470   
        self
  377    471   
    }
         472  +
    /* FluentBuilderGenerator.kt:498 */
  378    473   
    #[allow(missing_docs)] // documentation missing in model
         474  +
                           /* FluentBuilderGenerator.kt:500 */
  379    475   
    pub fn set_flattened_structure_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StructureListMember>>) -> Self {
  380    476   
        self.inner = self.inner.set_flattened_structure_list(input);
  381    477   
        self
  382    478   
    }
         479  +
    /* FluentBuilderGenerator.kt:518 */
  383    480   
    #[allow(missing_docs)] // documentation missing in model
         481  +
                           /* FluentBuilderGenerator.kt:520 */
  384    482   
    pub fn get_flattened_structure_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StructureListMember>> {
  385    483   
        self.inner.get_flattened_structure_list()
  386    484   
    }
         485  +
    /* FluentBuilderGenerator.kt:282 */
  387    486   
}

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_map_with_xml_namespace/_xml_map_with_xml_namespace_input.rs

@@ -1,1 +57,102 @@
    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 XmlMapWithXmlNamespaceInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapWithXmlNamespaceInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapWithXmlNamespaceInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapWithXmlNamespaceInput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapWithXmlNamespaceInput`](crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapWithXmlNamespaceInput`](crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_map_with_xml_namespace::builders::XmlMapWithXmlNamespaceInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_map_with_xml_namespace::builders::XmlMapWithXmlNamespaceInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapWithXmlNamespaceInput`](crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapWithXmlNamespaceInput`](crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapWithXmlNamespaceInputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapWithXmlNamespaceInputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v.into());
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
          70  +
        /* BuilderGenerator.kt:315 */
   41     71   
        self.my_map = input;
   42     72   
        self
          73  +
        /* BuilderGenerator.kt:314 */
   43     74   
    }
          75  +
    /* BuilderGenerator.kt:334 */
   44     76   
    #[allow(missing_docs)] // documentation missing in model
          77  +
                           /* BuilderGenerator.kt:336 */
   45     78   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          79  +
        /* BuilderGenerator.kt:337 */
   46     80   
        &self.my_map
          81  +
        /* BuilderGenerator.kt:336 */
   47     82   
    }
   48         -
    /// Consumes the builder and constructs a [`XmlMapWithXmlNamespaceInput`](crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput).
          83  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapWithXmlNamespaceInput`](crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput).
          84  +
    /* BuilderGenerator.kt:253 */
   49     85   
    pub fn build(
   50     86   
        self,
   51     87   
    ) -> ::std::result::Result<
   52     88   
        crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput,
   53     89   
        ::aws_smithy_types::error::operation::BuildError,
   54     90   
    > {
   55         -
        ::std::result::Result::Ok(crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput { my_map: self.my_map })
          91  +
        /* BuilderGenerator.kt:254 */
          92  +
        ::std::result::Result::Ok(
          93  +
            /* BuilderGenerator.kt:477 */
          94  +
            crate::operation::xml_map_with_xml_namespace::XmlMapWithXmlNamespaceInput {
          95  +
                /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          96  +
                /* BuilderGenerator.kt:477 */
          97  +
            }, /* BuilderGenerator.kt:254 */
          98  +
        )
          99  +
        /* BuilderGenerator.kt:253 */
   56    100   
    }
         101  +
    /* BuilderGenerator.kt:355 */
   57    102   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_map_with_xml_namespace/_xml_map_with_xml_namespace_output.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_map_with_xml_namespace/builders.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_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 `XmlMaps`.
           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 XmlMaps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlMaps {
    7         -
    /// Creates a new `XmlMaps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlMaps`
          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::xml_maps::XmlMapsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_maps::XmlMapsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_maps::XmlMapsError,
   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 XmlMaps {
   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("XmlMaps");
   87     98   
   88     99   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   89    100   
            XmlMapsRequestSerializer,
   90    101   
        ));
   91    102   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   92    103   
            XmlMapsResponseDeserializer,
   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   
            "XmlMaps",
  101    112   
            "Rest Xml 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("XmlMaps")
  113    124   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  114    125   
            .with_interceptor(XmlMapsEndpointParamsInterceptor)
  115    126   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  116    127   
                crate::operation::xml_maps::XmlMapsError,
  117    128   
            >::new())
  118    129   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  119    130   
                crate::operation::xml_maps::XmlMapsError,
  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 XmlMapsResponseDeserializer;
  128    140   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlMapsResponseDeserializer {
  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_xml_maps::de_xml_maps_http_error(status, headers, body)
  141    153   
        } else {
  142    154   
            crate::protocol_serde::shape_xml_maps::de_xml_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 XmlMapsRequestSerializer;
  149    162   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlMapsRequestSerializer {
  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::xml_maps::XmlMapsInput>().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::xml_maps::XmlMapsInput,
  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, "/XmlMaps").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::xml_maps::XmlMapsInput,
  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/xml");
  181    194   
            builder
  182    195   
        };
  183    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_maps::ser_xml_maps_op_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 XmlMapsEndpointParamsInterceptor;
  193    207   
  194    208   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlMapsEndpointParamsInterceptor {
  195    209   
    fn name(&self) -> &'static str {
  196    210   
        "XmlMapsEndpointParamsInterceptor"
  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::<XmlMapsInput>()
  212    226   
            .ok_or("failed to downcast to XmlMapsInput")?;
  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 xml_maps_test {
  229    246   
  230    247   
    /// Tests for XML map serialization
  231    248   
    /// Test ID: XmlMaps
  232    249   
    #[::tokio::test]
  233    250   
    #[::tracing_test::traced_test]
  234    251   
    async fn xml_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   
@@ -296,313 +425,501 @@
  316    333   
                )))
  317    334   
            });
  318    335   
            de.deserialize_nonstreaming(&http_response)
  319    336   
        });
  320    337   
        let parsed = parsed
  321    338   
            .expect("should be successful response")
  322    339   
            .downcast::<crate::operation::xml_maps::XmlMapsOutput>()
  323    340   
            .unwrap();
  324    341   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  325    342   
    }
         343  +
         344  +
    /* ProtocolTestGenerator.kt:98 */
  326    345   
}
  327    346   
         347  +
/* OperationErrorGenerator.kt:79 */
  328    348   
/// Error type for the `XmlMapsError` operation.
         349  +
/* RustType.kt:516 */
  329    350   
#[non_exhaustive]
         351  +
/* RustType.kt:516 */
  330    352   
#[derive(::std::fmt::Debug)]
  331         -
pub enum XmlMapsError {
         353  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlMapsError {
         354  +
    /* OperationErrorGenerator.kt:88 */
  332    355   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  333    356   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  334    357   
    variable wildcard pattern and check `.code()`:
  335    358   
     \
  336    359   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  337    360   
     \
  338    361   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlMapsError) for what information is available for the error.")]
  339    362   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         363  +
    /* OperationErrorGenerator.kt:81 */
  340    364   
}
         365  +
/* OperationErrorGenerator.kt:218 */
  341    366   
impl XmlMapsError {
         367  +
    /* OperationErrorGenerator.kt:219 */
  342    368   
    /// Creates the `XmlMapsError::Unhandled` variant from any error type.
  343    369   
    pub fn unhandled(
  344    370   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  345    371   
    ) -> Self {
  346    372   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  347    373   
            source: err.into(),
  348    374   
            meta: ::std::default::Default::default(),
  349    375   
        })
  350    376   
    }
  351    377   
  352    378   
    /// Creates the `XmlMapsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  353    379   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  354    380   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  355    381   
            source: err.clone().into(),
  356    382   
            meta: err,
  357    383   
        })
  358    384   
    }
  359         -
    ///
         385  +
    /// /* OperationErrorGenerator.kt:236 */
  360    386   
    /// Returns error metadata, which includes the error code, message,
  361    387   
    /// request ID, and potentially additional information.
  362    388   
    ///
         389  +
    /* OperationErrorGenerator.kt:242 */
  363    390   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         391  +
        /* OperationErrorGenerator.kt:243 */
  364    392   
        match self {
  365         -
            Self::Unhandled(e) => &e.meta,
         393  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         394  +
            /* OperationErrorGenerator.kt:243 */
  366    395   
        }
         396  +
        /* OperationErrorGenerator.kt:242 */
  367    397   
    }
         398  +
    /* OperationErrorGenerator.kt:218 */
  368    399   
}
         400  +
/* OperationErrorGenerator.kt:269 */
  369    401   
impl ::std::error::Error for XmlMapsError {
         402  +
    /* OperationErrorGenerator.kt:270 */
  370    403   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         404  +
        /* OperationErrorGenerator.kt:318 */
  371    405   
        match self {
  372         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         406  +
            /* OperationErrorGenerator.kt:326 */
         407  +
            Self::Unhandled(_inner) => {
         408  +
                /* OperationErrorGenerator.kt:279 */
         409  +
                ::std::option::Option::Some(&*_inner.source)
         410  +
                /* OperationErrorGenerator.kt:326 */
         411  +
            } /* OperationErrorGenerator.kt:318 */
  373    412   
        }
         413  +
        /* OperationErrorGenerator.kt:270 */
  374    414   
    }
         415  +
    /* OperationErrorGenerator.kt:269 */
  375    416   
}
         417  +
/* OperationErrorGenerator.kt:133 */
  376    418   
impl ::std::fmt::Display for XmlMapsError {
         419  +
    /* OperationErrorGenerator.kt:134 */
  377    420   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         421  +
        /* OperationErrorGenerator.kt:318 */
  378    422   
        match self {
         423  +
            /* OperationErrorGenerator.kt:326 */
  379    424   
            Self::Unhandled(_inner) => {
         425  +
                /* OperationErrorGenerator.kt:139 */
  380    426   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  381    427   
                    write!(f, "unhandled error ({code})")
  382    428   
                } else {
  383    429   
                    f.write_str("unhandled error")
  384    430   
                }
  385         -
            }
         431  +
                /* OperationErrorGenerator.kt:326 */
         432  +
            } /* OperationErrorGenerator.kt:318 */
  386    433   
        }
         434  +
        /* OperationErrorGenerator.kt:134 */
  387    435   
    }
         436  +
    /* OperationErrorGenerator.kt:133 */
  388    437   
}
         438  +
/* OperationErrorGenerator.kt:182 */
  389    439   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlMapsError {
         440  +
    /* OperationErrorGenerator.kt:186 */
  390    441   
    fn code(&self) -> ::std::option::Option<&str> {
         442  +
        /* OperationErrorGenerator.kt:187 */
  391    443   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         444  +
        /* OperationErrorGenerator.kt:186 */
  392    445   
    }
         446  +
    /* OperationErrorGenerator.kt:190 */
  393    447   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         448  +
        /* OperationErrorGenerator.kt:197 */
  394    449   
        ::std::option::Option::None
         450  +
        /* OperationErrorGenerator.kt:190 */
  395    451   
    }
         452  +
    /* OperationErrorGenerator.kt:182 */
  396    453   
}
         454  +
/* OperationErrorGenerator.kt:163 */
  397    455   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlMapsError {
         456  +
    /* OperationErrorGenerator.kt:164 */
  398    457   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         458  +
        /* OperationErrorGenerator.kt:318 */
  399    459   
        match self {
  400         -
            Self::Unhandled(_inner) => &_inner.meta,
         460  +
            /* OperationErrorGenerator.kt:326 */
         461  +
            Self::Unhandled(_inner) => {
         462  +
                /* OperationErrorGenerator.kt:168 */
         463  +
                &_inner.meta
         464  +
                /* OperationErrorGenerator.kt:326 */
         465  +
            } /* OperationErrorGenerator.kt:318 */
  401    466   
        }
         467  +
        /* OperationErrorGenerator.kt:164 */
  402    468   
    }
         469  +
    /* OperationErrorGenerator.kt:163 */
  403    470   
}
         471  +
/* OperationErrorGenerator.kt:109 */
  404    472   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlMapsError {
         473  +
    /* OperationErrorGenerator.kt:110 */
  405    474   
    fn create_unhandled_error(
  406    475   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  407    476   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  408    477   
    ) -> Self {
         478  +
        /* OperationErrorGenerator.kt:121 */
  409    479   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  410    480   
            source,
  411    481   
            meta: meta.unwrap_or_default(),
  412    482   
        })
         483  +
        /* OperationErrorGenerator.kt:110 */
  413    484   
    }
         485  +
    /* OperationErrorGenerator.kt:109 */
  414    486   
}
  415    487   
         488  +
/* CodegenDelegator.kt:255 */
  416    489   
pub use crate::operation::xml_maps::_xml_maps_output::XmlMapsOutput;
  417    490   
         491  +
/* CodegenDelegator.kt:255 */
  418    492   
pub use crate::operation::xml_maps::_xml_maps_input::XmlMapsInput;
  419    493   
         494  +
/* RustModule.kt:172 */
  420    495   
mod _xml_maps_input;
  421    496   
         497  +
/* RustModule.kt:172 */
  422    498   
mod _xml_maps_output;
  423    499   
  424         -
/// Builders
         500  +
/// /* CodegenDelegator.kt:51 */Builders
  425    501   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps/_xml_maps_input.rs

@@ -1,1 +55,100 @@
    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 XmlMapsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapsInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapsInput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapsInput`](crate::operation::xml_maps::XmlMapsInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsInput`](crate::operation::xml_maps::XmlMapsInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_maps::builders::XmlMapsInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_maps::builders::XmlMapsInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapsInput`](crate::operation::xml_maps::XmlMapsInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsInput`](crate::operation::xml_maps::XmlMapsInput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapsInputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapsInputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v);
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(
   41     70   
        mut self,
   42     71   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   43     72   
    ) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.my_map = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
          78  +
    /* BuilderGenerator.kt:334 */
   47     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:336 */
   48     81   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          82  +
        /* BuilderGenerator.kt:337 */
   49     83   
        &self.my_map
          84  +
        /* BuilderGenerator.kt:336 */
   50     85   
    }
   51         -
    /// Consumes the builder and constructs a [`XmlMapsInput`](crate::operation::xml_maps::XmlMapsInput).
          86  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsInput`](crate::operation::xml_maps::XmlMapsInput).
          87  +
    /* BuilderGenerator.kt:253 */
   52     88   
    pub fn build(self) -> ::std::result::Result<crate::operation::xml_maps::XmlMapsInput, ::aws_smithy_types::error::operation::BuildError> {
   53         -
        ::std::result::Result::Ok(crate::operation::xml_maps::XmlMapsInput { my_map: self.my_map })
          89  +
        /* BuilderGenerator.kt:254 */
          90  +
        ::std::result::Result::Ok(
          91  +
            /* BuilderGenerator.kt:477 */
          92  +
            crate::operation::xml_maps::XmlMapsInput {
          93  +
                /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          94  +
                /* BuilderGenerator.kt:477 */
          95  +
            }, /* BuilderGenerator.kt:254 */
          96  +
        )
          97  +
        /* BuilderGenerator.kt:253 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:355 */
   55    100   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps/_xml_maps_output.rs

@@ -1,1 +55,97 @@
    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 XmlMapsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapsOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapsOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_maps::builders::XmlMapsOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_maps::builders::XmlMapsOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapsOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapsOutputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v);
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(
   41     70   
        mut self,
   42     71   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   43     72   
    ) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.my_map = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
          78  +
    /* BuilderGenerator.kt:334 */
   47     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:336 */
   48     81   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          82  +
        /* BuilderGenerator.kt:337 */
   49     83   
        &self.my_map
          84  +
        /* BuilderGenerator.kt:336 */
   50     85   
    }
   51         -
    /// Consumes the builder and constructs a [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          86  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          87  +
    /* BuilderGenerator.kt:253 */
   52     88   
    pub fn build(self) -> crate::operation::xml_maps::XmlMapsOutput {
   53         -
        crate::operation::xml_maps::XmlMapsOutput { my_map: self.my_map }
          89  +
        /* BuilderGenerator.kt:477 */
          90  +
        crate::operation::xml_maps::XmlMapsOutput {
          91  +
            /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          92  +
            /* BuilderGenerator.kt:477 */
          93  +
        }
          94  +
        /* BuilderGenerator.kt:253 */
   54     95   
    }
          96  +
    /* BuilderGenerator.kt:355 */
   55     97   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps/builders.rs

@@ -1,1 +124,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::xml_maps::_xml_maps_output::XmlMapsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_maps::_xml_maps_input::XmlMapsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_maps::builders::XmlMapsInputBuilder {
    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::xml_maps::XmlMapsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_maps::XmlMapsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_maps();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlMaps`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlMaps`.
   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 XmlMapsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::xml_maps::builders::XmlMapsInputBuilder,
   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::xml_maps::XmlMapsOutput, crate::operation::xml_maps::XmlMapsError>
   33     39   
    for XmlMapsFluentBuilder
   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::xml_maps::XmlMapsOutput, crate::operation::xml_maps::XmlMapsError>,
   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 XmlMapsFluentBuilder {
          52  +
    /* FluentBuilderGenerator.kt:288 */
   45     53   
    /// Creates a new `XmlMapsFluentBuilder`.
   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 XmlMaps as a reference.
   54     63   
    pub fn as_input(&self) -> &crate::operation::xml_maps::builders::XmlMapsInputBuilder {
   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::xml_maps::XmlMapsOutput,
   69     79   
        ::aws_smithy_runtime_api::client::result::SdkError<
   70     80   
            crate::operation::xml_maps::XmlMapsError,
   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::xml_maps::XmlMaps::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::xml_maps::XmlMaps::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::xml_maps::XmlMapsOutput, crate::operation::xml_maps::XmlMapsError, 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 `myMap`.
  104    115   
    ///
  105    116   
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
  106    117   
    ///
         118  +
    /* FluentBuilderGenerator.kt:473 */
  107    119   
    #[allow(missing_docs)] // documentation missing in model
         120  +
                           /* FluentBuilderGenerator.kt:475 */
  108    121   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
  109    122   
        self.inner = self.inner.my_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_my_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_my_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_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
  122    139   
        self.inner.get_my_map()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps_xml_name.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 `XmlMapsXmlName`.
           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 XmlMapsXmlName;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlMapsXmlName {
    7         -
    /// Creates a new `XmlMapsXmlName`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlMapsXmlName`
          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::xml_maps_xml_name::XmlMapsXmlNameInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   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 XmlMapsXmlName {
   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("XmlMapsXmlName");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlMapsXmlNameRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlMapsXmlNameResponseDeserializer,
   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   
            "XmlMapsXmlName",
  105    116   
            "Rest Xml 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("XmlMapsXmlName")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlMapsXmlNameEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
  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 XmlMapsXmlNameResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlMapsXmlNameResponseDeserializer {
  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_xml_maps_xml_name::de_xml_maps_xml_name_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_maps_xml_name::de_xml_maps_xml_name_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 XmlMapsXmlNameRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlMapsXmlNameRequestSerializer {
  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::xml_maps_xml_name::XmlMapsXmlNameInput>()
  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::xml_maps_xml_name::XmlMapsXmlNameInput,
  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, "/XmlMapsXmlName").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::xml_maps_xml_name::XmlMapsXmlNameInput,
  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/xml");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_maps_xml_name::ser_xml_maps_xml_name_op_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 XmlMapsXmlNameEndpointParamsInterceptor;
  199    213   
  200    214   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlMapsXmlNameEndpointParamsInterceptor {
  201    215   
    fn name(&self) -> &'static str {
  202    216   
        "XmlMapsXmlNameEndpointParamsInterceptor"
  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::<XmlMapsXmlNameInput>()
  218    232   
            .ok_or("failed to downcast to XmlMapsXmlNameInput")?;
  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 xml_maps_xml_name_test {
  235    252   
  236    253   
    /// Serializes XML maps that have xmlName on members
  237    254   
    /// Test ID: XmlMapsXmlName
  238    255   
    #[::tokio::test]
  239    256   
    #[::tracing_test::traced_test]
  240    257   
    async fn xml_maps_xml_name_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   
@@ -302,319 +431,507 @@
  322    339   
                )))
  323    340   
            });
  324    341   
            de.deserialize_nonstreaming(&http_response)
  325    342   
        });
  326    343   
        let parsed = parsed
  327    344   
            .expect("should be successful response")
  328    345   
            .downcast::<crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput>()
  329    346   
            .unwrap();
  330    347   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  331    348   
    }
         349  +
         350  +
    /* ProtocolTestGenerator.kt:98 */
  332    351   
}
  333    352   
         353  +
/* OperationErrorGenerator.kt:79 */
  334    354   
/// Error type for the `XmlMapsXmlNameError` operation.
         355  +
/* RustType.kt:516 */
  335    356   
#[non_exhaustive]
         357  +
/* RustType.kt:516 */
  336    358   
#[derive(::std::fmt::Debug)]
  337         -
pub enum XmlMapsXmlNameError {
         359  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlMapsXmlNameError {
         360  +
    /* OperationErrorGenerator.kt:88 */
  338    361   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  339    362   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  340    363   
    variable wildcard pattern and check `.code()`:
  341    364   
     \
  342    365   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  343    366   
     \
  344    367   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlMapsXmlNameError) for what information is available for the error.")]
  345    368   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         369  +
    /* OperationErrorGenerator.kt:81 */
  346    370   
}
         371  +
/* OperationErrorGenerator.kt:218 */
  347    372   
impl XmlMapsXmlNameError {
         373  +
    /* OperationErrorGenerator.kt:219 */
  348    374   
    /// Creates the `XmlMapsXmlNameError::Unhandled` variant from any error type.
  349    375   
    pub fn unhandled(
  350    376   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  351    377   
    ) -> Self {
  352    378   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  353    379   
            source: err.into(),
  354    380   
            meta: ::std::default::Default::default(),
  355    381   
        })
  356    382   
    }
  357    383   
  358    384   
    /// Creates the `XmlMapsXmlNameError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  359    385   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  360    386   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  361    387   
            source: err.clone().into(),
  362    388   
            meta: err,
  363    389   
        })
  364    390   
    }
  365         -
    ///
         391  +
    /// /* OperationErrorGenerator.kt:236 */
  366    392   
    /// Returns error metadata, which includes the error code, message,
  367    393   
    /// request ID, and potentially additional information.
  368    394   
    ///
         395  +
    /* OperationErrorGenerator.kt:242 */
  369    396   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         397  +
        /* OperationErrorGenerator.kt:243 */
  370    398   
        match self {
  371         -
            Self::Unhandled(e) => &e.meta,
         399  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         400  +
            /* OperationErrorGenerator.kt:243 */
  372    401   
        }
         402  +
        /* OperationErrorGenerator.kt:242 */
  373    403   
    }
         404  +
    /* OperationErrorGenerator.kt:218 */
  374    405   
}
         406  +
/* OperationErrorGenerator.kt:269 */
  375    407   
impl ::std::error::Error for XmlMapsXmlNameError {
         408  +
    /* OperationErrorGenerator.kt:270 */
  376    409   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         410  +
        /* OperationErrorGenerator.kt:318 */
  377    411   
        match self {
  378         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         412  +
            /* OperationErrorGenerator.kt:326 */
         413  +
            Self::Unhandled(_inner) => {
         414  +
                /* OperationErrorGenerator.kt:279 */
         415  +
                ::std::option::Option::Some(&*_inner.source)
         416  +
                /* OperationErrorGenerator.kt:326 */
         417  +
            } /* OperationErrorGenerator.kt:318 */
  379    418   
        }
         419  +
        /* OperationErrorGenerator.kt:270 */
  380    420   
    }
         421  +
    /* OperationErrorGenerator.kt:269 */
  381    422   
}
         423  +
/* OperationErrorGenerator.kt:133 */
  382    424   
impl ::std::fmt::Display for XmlMapsXmlNameError {
         425  +
    /* OperationErrorGenerator.kt:134 */
  383    426   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         427  +
        /* OperationErrorGenerator.kt:318 */
  384    428   
        match self {
         429  +
            /* OperationErrorGenerator.kt:326 */
  385    430   
            Self::Unhandled(_inner) => {
         431  +
                /* OperationErrorGenerator.kt:139 */
  386    432   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  387    433   
                    write!(f, "unhandled error ({code})")
  388    434   
                } else {
  389    435   
                    f.write_str("unhandled error")
  390    436   
                }
  391         -
            }
         437  +
                /* OperationErrorGenerator.kt:326 */
         438  +
            } /* OperationErrorGenerator.kt:318 */
  392    439   
        }
         440  +
        /* OperationErrorGenerator.kt:134 */
  393    441   
    }
         442  +
    /* OperationErrorGenerator.kt:133 */
  394    443   
}
         444  +
/* OperationErrorGenerator.kt:182 */
  395    445   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlMapsXmlNameError {
         446  +
    /* OperationErrorGenerator.kt:186 */
  396    447   
    fn code(&self) -> ::std::option::Option<&str> {
         448  +
        /* OperationErrorGenerator.kt:187 */
  397    449   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         450  +
        /* OperationErrorGenerator.kt:186 */
  398    451   
    }
         452  +
    /* OperationErrorGenerator.kt:190 */
  399    453   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         454  +
        /* OperationErrorGenerator.kt:197 */
  400    455   
        ::std::option::Option::None
         456  +
        /* OperationErrorGenerator.kt:190 */
  401    457   
    }
         458  +
    /* OperationErrorGenerator.kt:182 */
  402    459   
}
         460  +
/* OperationErrorGenerator.kt:163 */
  403    461   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlMapsXmlNameError {
         462  +
    /* OperationErrorGenerator.kt:164 */
  404    463   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         464  +
        /* OperationErrorGenerator.kt:318 */
  405    465   
        match self {
  406         -
            Self::Unhandled(_inner) => &_inner.meta,
         466  +
            /* OperationErrorGenerator.kt:326 */
         467  +
            Self::Unhandled(_inner) => {
         468  +
                /* OperationErrorGenerator.kt:168 */
         469  +
                &_inner.meta
         470  +
                /* OperationErrorGenerator.kt:326 */
         471  +
            } /* OperationErrorGenerator.kt:318 */
  407    472   
        }
         473  +
        /* OperationErrorGenerator.kt:164 */
  408    474   
    }
         475  +
    /* OperationErrorGenerator.kt:163 */
  409    476   
}
         477  +
/* OperationErrorGenerator.kt:109 */
  410    478   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlMapsXmlNameError {
         479  +
    /* OperationErrorGenerator.kt:110 */
  411    480   
    fn create_unhandled_error(
  412    481   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  413    482   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  414    483   
    ) -> Self {
         484  +
        /* OperationErrorGenerator.kt:121 */
  415    485   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  416    486   
            source,
  417    487   
            meta: meta.unwrap_or_default(),
  418    488   
        })
         489  +
        /* OperationErrorGenerator.kt:110 */
  419    490   
    }
         491  +
    /* OperationErrorGenerator.kt:109 */
  420    492   
}
  421    493   
         494  +
/* CodegenDelegator.kt:255 */
  422    495   
pub use crate::operation::xml_maps_xml_name::_xml_maps_xml_name_output::XmlMapsXmlNameOutput;
  423    496   
         497  +
/* CodegenDelegator.kt:255 */
  424    498   
pub use crate::operation::xml_maps_xml_name::_xml_maps_xml_name_input::XmlMapsXmlNameInput;
  425    499   
         500  +
/* RustModule.kt:172 */
  426    501   
mod _xml_maps_xml_name_input;
  427    502   
         503  +
/* RustModule.kt:172 */
  428    504   
mod _xml_maps_xml_name_output;
  429    505   
  430         -
/// Builders
         506  +
/// /* CodegenDelegator.kt:51 */Builders
  431    507   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps_xml_name/_xml_maps_xml_name_input.rs

@@ -1,1 +57,102 @@
    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 XmlMapsXmlNameInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsXmlNameInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapsXmlNameInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapsXmlNameInput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapsXmlNameInputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapsXmlNameInputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v);
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(
   41     70   
        mut self,
   42     71   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   43     72   
    ) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.my_map = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
          78  +
    /* BuilderGenerator.kt:334 */
   47     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:336 */
   48     81   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          82  +
        /* BuilderGenerator.kt:337 */
   49     83   
        &self.my_map
          84  +
        /* BuilderGenerator.kt:336 */
   50     85   
    }
   51         -
    /// Consumes the builder and constructs a [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          86  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          87  +
    /* BuilderGenerator.kt:253 */
   52     88   
    pub fn build(
   53     89   
        self,
   54     90   
    ) -> ::std::result::Result<crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput, ::aws_smithy_types::error::operation::BuildError> {
   55         -
        ::std::result::Result::Ok(crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput { my_map: self.my_map })
          91  +
        /* BuilderGenerator.kt:254 */
          92  +
        ::std::result::Result::Ok(
          93  +
            /* BuilderGenerator.kt:477 */
          94  +
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput {
          95  +
                /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          96  +
                /* BuilderGenerator.kt:477 */
          97  +
            }, /* BuilderGenerator.kt:254 */
          98  +
        )
          99  +
        /* BuilderGenerator.kt:253 */
   56    100   
    }
         101  +
    /* BuilderGenerator.kt:355 */
   57    102   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps_xml_name/_xml_maps_xml_name_output.rs

@@ -1,1 +55,97 @@
    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 XmlMapsXmlNameOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsXmlNameOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapsXmlNameOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapsXmlNameOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapsXmlNameOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapsXmlNameOutputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v);
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(
   41     70   
        mut self,
   42     71   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   43     72   
    ) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.my_map = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
          78  +
    /* BuilderGenerator.kt:334 */
   47     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:336 */
   48     81   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          82  +
        /* BuilderGenerator.kt:337 */
   49     83   
        &self.my_map
          84  +
        /* BuilderGenerator.kt:336 */
   50     85   
    }
   51         -
    /// Consumes the builder and constructs a [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          86  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          87  +
    /* BuilderGenerator.kt:253 */
   52     88   
    pub fn build(self) -> crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput {
   53         -
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput { my_map: self.my_map }
          89  +
        /* BuilderGenerator.kt:477 */
          90  +
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput {
          91  +
            /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          92  +
            /* BuilderGenerator.kt:477 */
          93  +
        }
          94  +
        /* BuilderGenerator.kt:253 */
   54     95   
    }
          96  +
    /* BuilderGenerator.kt:355 */
   55     97   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_maps_xml_name/builders.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_namespaces.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 `XmlNamespaces`.
           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 XmlNamespaces;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlNamespaces {
    7         -
    /// Creates a new `XmlNamespaces`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlNamespaces`
          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::xml_namespaces::XmlNamespacesInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_namespaces::XmlNamespacesOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_namespaces::XmlNamespacesError,
   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 XmlNamespaces {
   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("XmlNamespaces");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlNamespacesRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlNamespacesResponseDeserializer,
   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   
            "XmlNamespaces",
  105    116   
            "Rest Xml 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("XmlNamespaces")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlNamespacesEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_namespaces::XmlNamespacesError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_namespaces::XmlNamespacesError,
  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 XmlNamespacesResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlNamespacesResponseDeserializer {
  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_xml_namespaces::de_xml_namespaces_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_namespaces::de_xml_namespaces_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 XmlNamespacesRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlNamespacesRequestSerializer {
  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::xml_namespaces::XmlNamespacesInput>()
  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::xml_namespaces::XmlNamespacesInput,
  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, "/XmlNamespaces").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::xml_namespaces::XmlNamespacesInput,
  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/xml");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_namespaces::ser_xml_namespaces_op_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 XmlNamespacesEndpointParamsInterceptor;
  199    213   
  200    214   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlNamespacesEndpointParamsInterceptor {
  201    215   
    fn name(&self) -> &'static str {
  202    216   
        "XmlNamespacesEndpointParamsInterceptor"
  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::<XmlNamespacesInput>()
  218    232   
            .ok_or("failed to downcast to XmlNamespacesInput")?;
  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 xml_namespaces_test {
  235    252   
  236    253   
    /// Serializes XML namespaces
  237    254   
    /// Test ID: XmlNamespaces
  238    255   
    #[::tokio::test]
  239    256   
    #[::tracing_test::traced_test]
  240    257   
    async fn xml_namespaces_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   
@@ -282,299 +411,487 @@
  302    319   
                )))
  303    320   
            });
  304    321   
            de.deserialize_nonstreaming(&http_response)
  305    322   
        });
  306    323   
        let parsed = parsed
  307    324   
            .expect("should be successful response")
  308    325   
            .downcast::<crate::operation::xml_namespaces::XmlNamespacesOutput>()
  309    326   
            .unwrap();
  310    327   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  311    328   
    }
         329  +
         330  +
    /* ProtocolTestGenerator.kt:98 */
  312    331   
}
  313    332   
         333  +
/* OperationErrorGenerator.kt:79 */
  314    334   
/// Error type for the `XmlNamespacesError` operation.
         335  +
/* RustType.kt:516 */
  315    336   
#[non_exhaustive]
         337  +
/* RustType.kt:516 */
  316    338   
#[derive(::std::fmt::Debug)]
  317         -
pub enum XmlNamespacesError {
         339  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlNamespacesError {
         340  +
    /* OperationErrorGenerator.kt:88 */
  318    341   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  319    342   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  320    343   
    variable wildcard pattern and check `.code()`:
  321    344   
     \
  322    345   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  323    346   
     \
  324    347   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlNamespacesError) for what information is available for the error.")]
  325    348   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         349  +
    /* OperationErrorGenerator.kt:81 */
  326    350   
}
         351  +
/* OperationErrorGenerator.kt:218 */
  327    352   
impl XmlNamespacesError {
         353  +
    /* OperationErrorGenerator.kt:219 */
  328    354   
    /// Creates the `XmlNamespacesError::Unhandled` variant from any error type.
  329    355   
    pub fn unhandled(
  330    356   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  331    357   
    ) -> Self {
  332    358   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  333    359   
            source: err.into(),
  334    360   
            meta: ::std::default::Default::default(),
  335    361   
        })
  336    362   
    }
  337    363   
  338    364   
    /// Creates the `XmlNamespacesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  339    365   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  340    366   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  341    367   
            source: err.clone().into(),
  342    368   
            meta: err,
  343    369   
        })
  344    370   
    }
  345         -
    ///
         371  +
    /// /* OperationErrorGenerator.kt:236 */
  346    372   
    /// Returns error metadata, which includes the error code, message,
  347    373   
    /// request ID, and potentially additional information.
  348    374   
    ///
         375  +
    /* OperationErrorGenerator.kt:242 */
  349    376   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         377  +
        /* OperationErrorGenerator.kt:243 */
  350    378   
        match self {
  351         -
            Self::Unhandled(e) => &e.meta,
         379  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         380  +
            /* OperationErrorGenerator.kt:243 */
  352    381   
        }
         382  +
        /* OperationErrorGenerator.kt:242 */
  353    383   
    }
         384  +
    /* OperationErrorGenerator.kt:218 */
  354    385   
}
         386  +
/* OperationErrorGenerator.kt:269 */
  355    387   
impl ::std::error::Error for XmlNamespacesError {
         388  +
    /* OperationErrorGenerator.kt:270 */
  356    389   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         390  +
        /* OperationErrorGenerator.kt:318 */
  357    391   
        match self {
  358         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         392  +
            /* OperationErrorGenerator.kt:326 */
         393  +
            Self::Unhandled(_inner) => {
         394  +
                /* OperationErrorGenerator.kt:279 */
         395  +
                ::std::option::Option::Some(&*_inner.source)
         396  +
                /* OperationErrorGenerator.kt:326 */
         397  +
            } /* OperationErrorGenerator.kt:318 */
  359    398   
        }
         399  +
        /* OperationErrorGenerator.kt:270 */
  360    400   
    }
         401  +
    /* OperationErrorGenerator.kt:269 */
  361    402   
}
         403  +
/* OperationErrorGenerator.kt:133 */
  362    404   
impl ::std::fmt::Display for XmlNamespacesError {
         405  +
    /* OperationErrorGenerator.kt:134 */
  363    406   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         407  +
        /* OperationErrorGenerator.kt:318 */
  364    408   
        match self {
         409  +
            /* OperationErrorGenerator.kt:326 */
  365    410   
            Self::Unhandled(_inner) => {
         411  +
                /* OperationErrorGenerator.kt:139 */
  366    412   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  367    413   
                    write!(f, "unhandled error ({code})")
  368    414   
                } else {
  369    415   
                    f.write_str("unhandled error")
  370    416   
                }
  371         -
            }
         417  +
                /* OperationErrorGenerator.kt:326 */
         418  +
            } /* OperationErrorGenerator.kt:318 */
  372    419   
        }
         420  +
        /* OperationErrorGenerator.kt:134 */
  373    421   
    }
         422  +
    /* OperationErrorGenerator.kt:133 */
  374    423   
}
         424  +
/* OperationErrorGenerator.kt:182 */
  375    425   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlNamespacesError {
         426  +
    /* OperationErrorGenerator.kt:186 */
  376    427   
    fn code(&self) -> ::std::option::Option<&str> {
         428  +
        /* OperationErrorGenerator.kt:187 */
  377    429   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         430  +
        /* OperationErrorGenerator.kt:186 */
  378    431   
    }
         432  +
    /* OperationErrorGenerator.kt:190 */
  379    433   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         434  +
        /* OperationErrorGenerator.kt:197 */
  380    435   
        ::std::option::Option::None
         436  +
        /* OperationErrorGenerator.kt:190 */
  381    437   
    }
         438  +
    /* OperationErrorGenerator.kt:182 */
  382    439   
}
         440  +
/* OperationErrorGenerator.kt:163 */
  383    441   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlNamespacesError {
         442  +
    /* OperationErrorGenerator.kt:164 */
  384    443   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         444  +
        /* OperationErrorGenerator.kt:318 */
  385    445   
        match self {
  386         -
            Self::Unhandled(_inner) => &_inner.meta,
         446  +
            /* OperationErrorGenerator.kt:326 */
         447  +
            Self::Unhandled(_inner) => {
         448  +
                /* OperationErrorGenerator.kt:168 */
         449  +
                &_inner.meta
         450  +
                /* OperationErrorGenerator.kt:326 */
         451  +
            } /* OperationErrorGenerator.kt:318 */
  387    452   
        }
         453  +
        /* OperationErrorGenerator.kt:164 */
  388    454   
    }
         455  +
    /* OperationErrorGenerator.kt:163 */
  389    456   
}
         457  +
/* OperationErrorGenerator.kt:109 */
  390    458   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlNamespacesError {
         459  +
    /* OperationErrorGenerator.kt:110 */
  391    460   
    fn create_unhandled_error(
  392    461   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  393    462   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  394    463   
    ) -> Self {
         464  +
        /* OperationErrorGenerator.kt:121 */
  395    465   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  396    466   
            source,
  397    467   
            meta: meta.unwrap_or_default(),
  398    468   
        })
         469  +
        /* OperationErrorGenerator.kt:110 */
  399    470   
    }
         471  +
    /* OperationErrorGenerator.kt:109 */
  400    472   
}
  401    473   
         474  +
/* CodegenDelegator.kt:255 */
  402    475   
pub use crate::operation::xml_namespaces::_xml_namespaces_output::XmlNamespacesOutput;
  403    476   
         477  +
/* CodegenDelegator.kt:255 */
  404    478   
pub use crate::operation::xml_namespaces::_xml_namespaces_input::XmlNamespacesInput;
  405    479   
         480  +
/* RustModule.kt:172 */
  406    481   
mod _xml_namespaces_input;
  407    482   
         483  +
/* RustModule.kt:172 */
  408    484   
mod _xml_namespaces_output;
  409    485   
  410         -
/// Builders
         486  +
/// /* CodegenDelegator.kt:51 */Builders
  411    487   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_output.rs

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