Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +464,602 @@
    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::all_query_string_types::_all_query_string_types_output::AllQueryStringTypesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::all_query_string_types::_all_query_string_types_input::AllQueryStringTypesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::all_query_string_types::builders::AllQueryStringTypesInputBuilder {
    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::all_query_string_types::AllQueryStringTypesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::all_query_string_types::AllQueryStringTypesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.all_query_string_types();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `AllQueryStringTypes`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `AllQueryStringTypes`.
   24     27   
///
   25         -
/// This example uses all query string types.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example uses all query string types.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct AllQueryStringTypesFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::all_query_string_types::builders::AllQueryStringTypesInputBuilder,
   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::all_query_string_types::AllQueryStringTypesOutput,
   35     41   
        crate::operation::all_query_string_types::AllQueryStringTypesError,
   36     42   
    > for AllQueryStringTypesFluentBuilder
   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::all_query_string_types::AllQueryStringTypesOutput,
   44     50   
            crate::operation::all_query_string_types::AllQueryStringTypesError,
   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 AllQueryStringTypesFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `AllQueryStringTypesFluentBuilder`.
   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 AllQueryStringTypes as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::all_query_string_types::builders::AllQueryStringTypesInputBuilder {
   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::all_query_string_types::AllQueryStringTypesOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::all_query_string_types::AllQueryStringTypesError,
   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::all_query_string_types::AllQueryStringTypes::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::all_query_string_types::AllQueryStringTypes::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::all_query_string_types::AllQueryStringTypesOutput,
   97    107   
        crate::operation::all_query_string_types::AllQueryStringTypesError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.query_string(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_query_string(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_query_string()
  124    141   
    }
  125         -
    ///
         142  +
    /// /* FluentBuilderGenerator.kt:436 */
  126    143   
    /// Appends an item to `queryStringList`.
  127    144   
    ///
  128    145   
    /// To override the contents of this collection use [`set_query_string_list`](Self::set_query_string_list).
  129    146   
    ///
         147  +
    /* FluentBuilderGenerator.kt:443 */
  130    148   
    #[allow(missing_docs)] // documentation missing in model
         149  +
                           /* FluentBuilderGenerator.kt:446 */
  131    150   
    pub fn query_string_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  132    151   
        self.inner = self.inner.query_string_list(input.into());
  133    152   
        self
  134    153   
    }
         154  +
    /* FluentBuilderGenerator.kt:498 */
  135    155   
    #[allow(missing_docs)] // documentation missing in model
         156  +
                           /* FluentBuilderGenerator.kt:500 */
  136    157   
    pub fn set_query_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  137    158   
        self.inner = self.inner.set_query_string_list(input);
  138    159   
        self
  139    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:518 */
  140    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:520 */
  141    164   
    pub fn get_query_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  142    165   
        self.inner.get_query_string_list()
  143    166   
    }
  144         -
    ///
         167  +
    /// /* FluentBuilderGenerator.kt:436 */
  145    168   
    /// Appends an item to `queryStringSet`.
  146    169   
    ///
  147    170   
    /// To override the contents of this collection use [`set_query_string_set`](Self::set_query_string_set).
  148    171   
    ///
         172  +
    /* FluentBuilderGenerator.kt:443 */
  149    173   
    #[allow(missing_docs)] // documentation missing in model
         174  +
                           /* FluentBuilderGenerator.kt:446 */
  150    175   
    pub fn query_string_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  151    176   
        self.inner = self.inner.query_string_set(input.into());
  152    177   
        self
  153    178   
    }
         179  +
    /* FluentBuilderGenerator.kt:498 */
  154    180   
    #[allow(missing_docs)] // documentation missing in model
         181  +
                           /* FluentBuilderGenerator.kt:500 */
  155    182   
    pub fn set_query_string_set(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  156    183   
        self.inner = self.inner.set_query_string_set(input);
  157    184   
        self
  158    185   
    }
         186  +
    /* FluentBuilderGenerator.kt:518 */
  159    187   
    #[allow(missing_docs)] // documentation missing in model
         188  +
                           /* FluentBuilderGenerator.kt:520 */
  160    189   
    pub fn get_query_string_set(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  161    190   
        self.inner.get_query_string_set()
  162    191   
    }
         192  +
    /* FluentBuilderGenerator.kt:498 */
  163    193   
    #[allow(missing_docs)] // documentation missing in model
         194  +
                           /* FluentBuilderGenerator.kt:500 */
  164    195   
    pub fn query_byte(mut self, input: i8) -> Self {
  165    196   
        self.inner = self.inner.query_byte(input);
  166    197   
        self
  167    198   
    }
         199  +
    /* FluentBuilderGenerator.kt:498 */
  168    200   
    #[allow(missing_docs)] // documentation missing in model
         201  +
                           /* FluentBuilderGenerator.kt:500 */
  169    202   
    pub fn set_query_byte(mut self, input: ::std::option::Option<i8>) -> Self {
  170    203   
        self.inner = self.inner.set_query_byte(input);
  171    204   
        self
  172    205   
    }
         206  +
    /* FluentBuilderGenerator.kt:518 */
  173    207   
    #[allow(missing_docs)] // documentation missing in model
         208  +
                           /* FluentBuilderGenerator.kt:520 */
  174    209   
    pub fn get_query_byte(&self) -> &::std::option::Option<i8> {
  175    210   
        self.inner.get_query_byte()
  176    211   
    }
         212  +
    /* FluentBuilderGenerator.kt:498 */
  177    213   
    #[allow(missing_docs)] // documentation missing in model
         214  +
                           /* FluentBuilderGenerator.kt:500 */
  178    215   
    pub fn query_short(mut self, input: i16) -> Self {
  179    216   
        self.inner = self.inner.query_short(input);
  180    217   
        self
  181    218   
    }
         219  +
    /* FluentBuilderGenerator.kt:498 */
  182    220   
    #[allow(missing_docs)] // documentation missing in model
         221  +
                           /* FluentBuilderGenerator.kt:500 */
  183    222   
    pub fn set_query_short(mut self, input: ::std::option::Option<i16>) -> Self {
  184    223   
        self.inner = self.inner.set_query_short(input);
  185    224   
        self
  186    225   
    }
         226  +
    /* FluentBuilderGenerator.kt:518 */
  187    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* FluentBuilderGenerator.kt:520 */
  188    229   
    pub fn get_query_short(&self) -> &::std::option::Option<i16> {
  189    230   
        self.inner.get_query_short()
  190    231   
    }
         232  +
    /* FluentBuilderGenerator.kt:498 */
  191    233   
    #[allow(missing_docs)] // documentation missing in model
         234  +
                           /* FluentBuilderGenerator.kt:500 */
  192    235   
    pub fn query_integer(mut self, input: i32) -> Self {
  193    236   
        self.inner = self.inner.query_integer(input);
  194    237   
        self
  195    238   
    }
         239  +
    /* FluentBuilderGenerator.kt:498 */
  196    240   
    #[allow(missing_docs)] // documentation missing in model
         241  +
                           /* FluentBuilderGenerator.kt:500 */
  197    242   
    pub fn set_query_integer(mut self, input: ::std::option::Option<i32>) -> Self {
  198    243   
        self.inner = self.inner.set_query_integer(input);
  199    244   
        self
  200    245   
    }
         246  +
    /* FluentBuilderGenerator.kt:518 */
  201    247   
    #[allow(missing_docs)] // documentation missing in model
         248  +
                           /* FluentBuilderGenerator.kt:520 */
  202    249   
    pub fn get_query_integer(&self) -> &::std::option::Option<i32> {
  203    250   
        self.inner.get_query_integer()
  204    251   
    }
  205         -
    ///
         252  +
    /// /* FluentBuilderGenerator.kt:436 */
  206    253   
    /// Appends an item to `queryIntegerList`.
  207    254   
    ///
  208    255   
    /// To override the contents of this collection use [`set_query_integer_list`](Self::set_query_integer_list).
  209    256   
    ///
         257  +
    /* FluentBuilderGenerator.kt:443 */
  210    258   
    #[allow(missing_docs)] // documentation missing in model
         259  +
                           /* FluentBuilderGenerator.kt:446 */
  211    260   
    pub fn query_integer_list(mut self, input: i32) -> Self {
  212    261   
        self.inner = self.inner.query_integer_list(input);
  213    262   
        self
  214    263   
    }
         264  +
    /* FluentBuilderGenerator.kt:498 */
  215    265   
    #[allow(missing_docs)] // documentation missing in model
         266  +
                           /* FluentBuilderGenerator.kt:500 */
  216    267   
    pub fn set_query_integer_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  217    268   
        self.inner = self.inner.set_query_integer_list(input);
  218    269   
        self
  219    270   
    }
         271  +
    /* FluentBuilderGenerator.kt:518 */
  220    272   
    #[allow(missing_docs)] // documentation missing in model
         273  +
                           /* FluentBuilderGenerator.kt:520 */
  221    274   
    pub fn get_query_integer_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  222    275   
        self.inner.get_query_integer_list()
  223    276   
    }
  224         -
    ///
         277  +
    /// /* FluentBuilderGenerator.kt:436 */
  225    278   
    /// Appends an item to `queryIntegerSet`.
  226    279   
    ///
  227    280   
    /// To override the contents of this collection use [`set_query_integer_set`](Self::set_query_integer_set).
  228    281   
    ///
         282  +
    /* FluentBuilderGenerator.kt:443 */
  229    283   
    #[allow(missing_docs)] // documentation missing in model
         284  +
                           /* FluentBuilderGenerator.kt:446 */
  230    285   
    pub fn query_integer_set(mut self, input: i32) -> Self {
  231    286   
        self.inner = self.inner.query_integer_set(input);
  232    287   
        self
  233    288   
    }
         289  +
    /* FluentBuilderGenerator.kt:498 */
  234    290   
    #[allow(missing_docs)] // documentation missing in model
         291  +
                           /* FluentBuilderGenerator.kt:500 */
  235    292   
    pub fn set_query_integer_set(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  236    293   
        self.inner = self.inner.set_query_integer_set(input);
  237    294   
        self
  238    295   
    }
         296  +
    /* FluentBuilderGenerator.kt:518 */
  239    297   
    #[allow(missing_docs)] // documentation missing in model
         298  +
                           /* FluentBuilderGenerator.kt:520 */
  240    299   
    pub fn get_query_integer_set(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  241    300   
        self.inner.get_query_integer_set()
  242    301   
    }
         302  +
    /* FluentBuilderGenerator.kt:498 */
  243    303   
    #[allow(missing_docs)] // documentation missing in model
         304  +
                           /* FluentBuilderGenerator.kt:500 */
  244    305   
    pub fn query_long(mut self, input: i64) -> Self {
  245    306   
        self.inner = self.inner.query_long(input);
  246    307   
        self
  247    308   
    }
         309  +
    /* FluentBuilderGenerator.kt:498 */
  248    310   
    #[allow(missing_docs)] // documentation missing in model
         311  +
                           /* FluentBuilderGenerator.kt:500 */
  249    312   
    pub fn set_query_long(mut self, input: ::std::option::Option<i64>) -> Self {
  250    313   
        self.inner = self.inner.set_query_long(input);
  251    314   
        self
  252    315   
    }
         316  +
    /* FluentBuilderGenerator.kt:518 */
  253    317   
    #[allow(missing_docs)] // documentation missing in model
         318  +
                           /* FluentBuilderGenerator.kt:520 */
  254    319   
    pub fn get_query_long(&self) -> &::std::option::Option<i64> {
  255    320   
        self.inner.get_query_long()
  256    321   
    }
         322  +
    /* FluentBuilderGenerator.kt:498 */
  257    323   
    #[allow(missing_docs)] // documentation missing in model
         324  +
                           /* FluentBuilderGenerator.kt:500 */
  258    325   
    pub fn query_float(mut self, input: f32) -> Self {
  259    326   
        self.inner = self.inner.query_float(input);
  260    327   
        self
  261    328   
    }
         329  +
    /* FluentBuilderGenerator.kt:498 */
  262    330   
    #[allow(missing_docs)] // documentation missing in model
         331  +
                           /* FluentBuilderGenerator.kt:500 */
  263    332   
    pub fn set_query_float(mut self, input: ::std::option::Option<f32>) -> Self {
  264    333   
        self.inner = self.inner.set_query_float(input);
  265    334   
        self
  266    335   
    }
         336  +
    /* FluentBuilderGenerator.kt:518 */
  267    337   
    #[allow(missing_docs)] // documentation missing in model
         338  +
                           /* FluentBuilderGenerator.kt:520 */
  268    339   
    pub fn get_query_float(&self) -> &::std::option::Option<f32> {
  269    340   
        self.inner.get_query_float()
  270    341   
    }
         342  +
    /* FluentBuilderGenerator.kt:498 */
  271    343   
    #[allow(missing_docs)] // documentation missing in model
         344  +
                           /* FluentBuilderGenerator.kt:500 */
  272    345   
    pub fn query_double(mut self, input: f64) -> Self {
  273    346   
        self.inner = self.inner.query_double(input);
  274    347   
        self
  275    348   
    }
         349  +
    /* FluentBuilderGenerator.kt:498 */
  276    350   
    #[allow(missing_docs)] // documentation missing in model
         351  +
                           /* FluentBuilderGenerator.kt:500 */
  277    352   
    pub fn set_query_double(mut self, input: ::std::option::Option<f64>) -> Self {
  278    353   
        self.inner = self.inner.set_query_double(input);
  279    354   
        self
  280    355   
    }
         356  +
    /* FluentBuilderGenerator.kt:518 */
  281    357   
    #[allow(missing_docs)] // documentation missing in model
         358  +
                           /* FluentBuilderGenerator.kt:520 */
  282    359   
    pub fn get_query_double(&self) -> &::std::option::Option<f64> {
  283    360   
        self.inner.get_query_double()
  284    361   
    }
  285         -
    ///
         362  +
    /// /* FluentBuilderGenerator.kt:436 */
  286    363   
    /// Appends an item to `queryDoubleList`.
  287    364   
    ///
  288    365   
    /// To override the contents of this collection use [`set_query_double_list`](Self::set_query_double_list).
  289    366   
    ///
         367  +
    /* FluentBuilderGenerator.kt:443 */
  290    368   
    #[allow(missing_docs)] // documentation missing in model
         369  +
                           /* FluentBuilderGenerator.kt:446 */
  291    370   
    pub fn query_double_list(mut self, input: f64) -> Self {
  292    371   
        self.inner = self.inner.query_double_list(input);
  293    372   
        self
  294    373   
    }
         374  +
    /* FluentBuilderGenerator.kt:498 */
  295    375   
    #[allow(missing_docs)] // documentation missing in model
         376  +
                           /* FluentBuilderGenerator.kt:500 */
  296    377   
    pub fn set_query_double_list(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
  297    378   
        self.inner = self.inner.set_query_double_list(input);
  298    379   
        self
  299    380   
    }
         381  +
    /* FluentBuilderGenerator.kt:518 */
  300    382   
    #[allow(missing_docs)] // documentation missing in model
         383  +
                           /* FluentBuilderGenerator.kt:520 */
  301    384   
    pub fn get_query_double_list(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
  302    385   
        self.inner.get_query_double_list()
  303    386   
    }
         387  +
    /* FluentBuilderGenerator.kt:498 */
  304    388   
    #[allow(missing_docs)] // documentation missing in model
         389  +
                           /* FluentBuilderGenerator.kt:500 */
  305    390   
    pub fn query_boolean(mut self, input: bool) -> Self {
  306    391   
        self.inner = self.inner.query_boolean(input);
  307    392   
        self
  308    393   
    }
         394  +
    /* FluentBuilderGenerator.kt:498 */
  309    395   
    #[allow(missing_docs)] // documentation missing in model
         396  +
                           /* FluentBuilderGenerator.kt:500 */
  310    397   
    pub fn set_query_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
  311    398   
        self.inner = self.inner.set_query_boolean(input);
  312    399   
        self
  313    400   
    }
         401  +
    /* FluentBuilderGenerator.kt:518 */
  314    402   
    #[allow(missing_docs)] // documentation missing in model
         403  +
                           /* FluentBuilderGenerator.kt:520 */
  315    404   
    pub fn get_query_boolean(&self) -> &::std::option::Option<bool> {
  316    405   
        self.inner.get_query_boolean()
  317    406   
    }
  318         -
    ///
         407  +
    /// /* FluentBuilderGenerator.kt:436 */
  319    408   
    /// Appends an item to `queryBooleanList`.
  320    409   
    ///
  321    410   
    /// To override the contents of this collection use [`set_query_boolean_list`](Self::set_query_boolean_list).
  322    411   
    ///
         412  +
    /* FluentBuilderGenerator.kt:443 */
  323    413   
    #[allow(missing_docs)] // documentation missing in model
         414  +
                           /* FluentBuilderGenerator.kt:446 */
  324    415   
    pub fn query_boolean_list(mut self, input: bool) -> Self {
  325    416   
        self.inner = self.inner.query_boolean_list(input);
  326    417   
        self
  327    418   
    }
         419  +
    /* FluentBuilderGenerator.kt:498 */
  328    420   
    #[allow(missing_docs)] // documentation missing in model
         421  +
                           /* FluentBuilderGenerator.kt:500 */
  329    422   
    pub fn set_query_boolean_list(mut self, input: ::std::option::Option<::std::vec::Vec<bool>>) -> Self {
  330    423   
        self.inner = self.inner.set_query_boolean_list(input);
  331    424   
        self
  332    425   
    }
         426  +
    /* FluentBuilderGenerator.kt:518 */
  333    427   
    #[allow(missing_docs)] // documentation missing in model
         428  +
                           /* FluentBuilderGenerator.kt:520 */
  334    429   
    pub fn get_query_boolean_list(&self) -> &::std::option::Option<::std::vec::Vec<bool>> {
  335    430   
        self.inner.get_query_boolean_list()
  336    431   
    }
         432  +
    /* FluentBuilderGenerator.kt:498 */
  337    433   
    #[allow(missing_docs)] // documentation missing in model
         434  +
                           /* FluentBuilderGenerator.kt:500 */
  338    435   
    pub fn query_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  339    436   
        self.inner = self.inner.query_timestamp(input);
  340    437   
        self
  341    438   
    }
         439  +
    /* FluentBuilderGenerator.kt:498 */
  342    440   
    #[allow(missing_docs)] // documentation missing in model
         441  +
                           /* FluentBuilderGenerator.kt:500 */
  343    442   
    pub fn set_query_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  344    443   
        self.inner = self.inner.set_query_timestamp(input);
  345    444   
        self
  346    445   
    }
         446  +
    /* FluentBuilderGenerator.kt:518 */
  347    447   
    #[allow(missing_docs)] // documentation missing in model
         448  +
                           /* FluentBuilderGenerator.kt:520 */
  348    449   
    pub fn get_query_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  349    450   
        self.inner.get_query_timestamp()
  350    451   
    }
  351         -
    ///
         452  +
    /// /* FluentBuilderGenerator.kt:436 */
  352    453   
    /// Appends an item to `queryTimestampList`.
  353    454   
    ///
  354    455   
    /// To override the contents of this collection use [`set_query_timestamp_list`](Self::set_query_timestamp_list).
  355    456   
    ///
         457  +
    /* FluentBuilderGenerator.kt:443 */
  356    458   
    #[allow(missing_docs)] // documentation missing in model
         459  +
                           /* FluentBuilderGenerator.kt:446 */
  357    460   
    pub fn query_timestamp_list(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  358    461   
        self.inner = self.inner.query_timestamp_list(input);
  359    462   
        self
  360    463   
    }
         464  +
    /* FluentBuilderGenerator.kt:498 */
  361    465   
    #[allow(missing_docs)] // documentation missing in model
         466  +
                           /* FluentBuilderGenerator.kt:500 */
  362    467   
    pub fn set_query_timestamp_list(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>) -> Self {
  363    468   
        self.inner = self.inner.set_query_timestamp_list(input);
  364    469   
        self
  365    470   
    }
         471  +
    /* FluentBuilderGenerator.kt:518 */
  366    472   
    #[allow(missing_docs)] // documentation missing in model
         473  +
                           /* FluentBuilderGenerator.kt:520 */
  367    474   
    pub fn get_query_timestamp_list(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>> {
  368    475   
        self.inner.get_query_timestamp_list()
  369    476   
    }
         477  +
    /* FluentBuilderGenerator.kt:498 */
  370    478   
    #[allow(missing_docs)] // documentation missing in model
         479  +
                           /* FluentBuilderGenerator.kt:500 */
  371    480   
    pub fn query_enum(mut self, input: crate::types::FooEnum) -> Self {
  372    481   
        self.inner = self.inner.query_enum(input);
  373    482   
        self
  374    483   
    }
         484  +
    /* FluentBuilderGenerator.kt:498 */
  375    485   
    #[allow(missing_docs)] // documentation missing in model
         486  +
                           /* FluentBuilderGenerator.kt:500 */
  376    487   
    pub fn set_query_enum(mut self, input: ::std::option::Option<crate::types::FooEnum>) -> Self {
  377    488   
        self.inner = self.inner.set_query_enum(input);
  378    489   
        self
  379    490   
    }
         491  +
    /* FluentBuilderGenerator.kt:518 */
  380    492   
    #[allow(missing_docs)] // documentation missing in model
         493  +
                           /* FluentBuilderGenerator.kt:520 */
  381    494   
    pub fn get_query_enum(&self) -> &::std::option::Option<crate::types::FooEnum> {
  382    495   
        self.inner.get_query_enum()
  383    496   
    }
  384         -
    ///
         497  +
    /// /* FluentBuilderGenerator.kt:436 */
  385    498   
    /// Appends an item to `queryEnumList`.
  386    499   
    ///
  387    500   
    /// To override the contents of this collection use [`set_query_enum_list`](Self::set_query_enum_list).
  388    501   
    ///
         502  +
    /* FluentBuilderGenerator.kt:443 */
  389    503   
    #[allow(missing_docs)] // documentation missing in model
         504  +
                           /* FluentBuilderGenerator.kt:446 */
  390    505   
    pub fn query_enum_list(mut self, input: crate::types::FooEnum) -> Self {
  391    506   
        self.inner = self.inner.query_enum_list(input);
  392    507   
        self
  393    508   
    }
         509  +
    /* FluentBuilderGenerator.kt:498 */
  394    510   
    #[allow(missing_docs)] // documentation missing in model
         511  +
                           /* FluentBuilderGenerator.kt:500 */
  395    512   
    pub fn set_query_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FooEnum>>) -> Self {
  396    513   
        self.inner = self.inner.set_query_enum_list(input);
  397    514   
        self
  398    515   
    }
         516  +
    /* FluentBuilderGenerator.kt:518 */
  399    517   
    #[allow(missing_docs)] // documentation missing in model
         518  +
                           /* FluentBuilderGenerator.kt:520 */
  400    519   
    pub fn get_query_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FooEnum>> {
  401    520   
        self.inner.get_query_enum_list()
  402    521   
    }
         522  +
    /* FluentBuilderGenerator.kt:498 */
  403    523   
    #[allow(missing_docs)] // documentation missing in model
         524  +
                           /* FluentBuilderGenerator.kt:500 */
  404    525   
    pub fn query_integer_enum(mut self, input: i32) -> Self {
  405    526   
        self.inner = self.inner.query_integer_enum(input);
  406    527   
        self
  407    528   
    }
         529  +
    /* FluentBuilderGenerator.kt:498 */
  408    530   
    #[allow(missing_docs)] // documentation missing in model
         531  +
                           /* FluentBuilderGenerator.kt:500 */
  409    532   
    pub fn set_query_integer_enum(mut self, input: ::std::option::Option<i32>) -> Self {
  410    533   
        self.inner = self.inner.set_query_integer_enum(input);
  411    534   
        self
  412    535   
    }
         536  +
    /* FluentBuilderGenerator.kt:518 */
  413    537   
    #[allow(missing_docs)] // documentation missing in model
         538  +
                           /* FluentBuilderGenerator.kt:520 */
  414    539   
    pub fn get_query_integer_enum(&self) -> &::std::option::Option<i32> {
  415    540   
        self.inner.get_query_integer_enum()
  416    541   
    }
  417         -
    ///
         542  +
    /// /* FluentBuilderGenerator.kt:436 */
  418    543   
    /// Appends an item to `queryIntegerEnumList`.
  419    544   
    ///
  420    545   
    /// To override the contents of this collection use [`set_query_integer_enum_list`](Self::set_query_integer_enum_list).
  421    546   
    ///
         547  +
    /* FluentBuilderGenerator.kt:443 */
  422    548   
    #[allow(missing_docs)] // documentation missing in model
         549  +
                           /* FluentBuilderGenerator.kt:446 */
  423    550   
    pub fn query_integer_enum_list(mut self, input: i32) -> Self {
  424    551   
        self.inner = self.inner.query_integer_enum_list(input);
  425    552   
        self
  426    553   
    }
         554  +
    /* FluentBuilderGenerator.kt:498 */
  427    555   
    #[allow(missing_docs)] // documentation missing in model
         556  +
                           /* FluentBuilderGenerator.kt:500 */
  428    557   
    pub fn set_query_integer_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  429    558   
        self.inner = self.inner.set_query_integer_enum_list(input);
  430    559   
        self
  431    560   
    }
         561  +
    /* FluentBuilderGenerator.kt:518 */
  432    562   
    #[allow(missing_docs)] // documentation missing in model
         563  +
                           /* FluentBuilderGenerator.kt:520 */
  433    564   
    pub fn get_query_integer_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  434    565   
        self.inner.get_query_integer_enum_list()
  435    566   
    }
  436         -
    ///
         567  +
    /// /* FluentBuilderGenerator.kt:466 */
  437    568   
    /// Adds a key-value pair to `queryParamsMapOfStringList`.
  438    569   
    ///
  439    570   
    /// To override the contents of this collection use [`set_query_params_map_of_string_list`](Self::set_query_params_map_of_string_list).
  440    571   
    ///
         572  +
    /* FluentBuilderGenerator.kt:473 */
  441    573   
    #[allow(missing_docs)] // documentation missing in model
         574  +
                           /* FluentBuilderGenerator.kt:475 */
  442    575   
    pub fn query_params_map_of_string_list(
  443    576   
        mut self,
  444    577   
        k: impl ::std::convert::Into<::std::string::String>,
  445    578   
        v: ::std::vec::Vec<::std::string::String>,
  446    579   
    ) -> Self {
  447    580   
        self.inner = self.inner.query_params_map_of_string_list(k.into(), v);
  448    581   
        self
  449    582   
    }
         583  +
    /* FluentBuilderGenerator.kt:498 */
  450    584   
    #[allow(missing_docs)] // documentation missing in model
         585  +
                           /* FluentBuilderGenerator.kt:500 */
  451    586   
    pub fn set_query_params_map_of_string_list(
  452    587   
        mut self,
  453    588   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
  454    589   
    ) -> Self {
  455    590   
        self.inner = self.inner.set_query_params_map_of_string_list(input);
  456    591   
        self
  457    592   
    }
         593  +
    /* FluentBuilderGenerator.kt:518 */
  458    594   
    #[allow(missing_docs)] // documentation missing in model
         595  +
                           /* FluentBuilderGenerator.kt:520 */
  459    596   
    pub fn get_query_params_map_of_string_list(
  460    597   
        &self,
  461    598   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
  462    599   
        self.inner.get_query_params_map_of_string_list()
  463    600   
    }
         601  +
    /* FluentBuilderGenerator.kt:282 */
  464    602   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_and_variable_query_string.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 `ConstantAndVariableQueryString`.
           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 ConstantAndVariableQueryString;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ConstantAndVariableQueryString {
    7         -
    /// Creates a new `ConstantAndVariableQueryString`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ConstantAndVariableQueryString`
          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::constant_and_variable_query_string::ConstantAndVariableQueryStringInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +188,201 @@
   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 ConstantAndVariableQueryString {
   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("ConstantAndVariableQueryString");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            ConstantAndVariableQueryStringRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            ConstantAndVariableQueryStringResponseDeserializer,
  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   
            "ConstantAndVariableQueryString",
  111    122   
            "Rest Json 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("ConstantAndVariableQueryString")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(ConstantAndVariableQueryStringEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
  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 ConstantAndVariableQueryStringResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ConstantAndVariableQueryStringResponseDeserializer {
  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_constant_and_variable_query_string::de_constant_and_variable_query_string_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_constant_and_variable_query_string::de_constant_and_variable_query_string_http_response(
  153    165   
                status, headers, body,
  154    166   
            )
  155    167   
        };
  156    168   
        crate::protocol_serde::type_erase_result(parse_result)
  157    169   
    }
  158    170   
}
         171  +
/* RequestSerializerGenerator.kt:67 */
  159    172   
#[derive(Debug)]
  160    173   
struct ConstantAndVariableQueryStringRequestSerializer;
  161    174   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ConstantAndVariableQueryStringRequestSerializer {
  162    175   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    176   
    fn serialize_input(
  164    177   
        &self,
  165    178   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    179   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    180   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    181   
        let input = input
@@ -190,203 +412,488 @@
  210    223   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  211    224   
            }
  212    225   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  213    226   
            builder
  214    227   
        };
  215    228   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  216    229   
  217    230   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  218    231   
    }
  219    232   
}
         233  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  220    234   
#[derive(Debug)]
  221    235   
struct ConstantAndVariableQueryStringEndpointParamsInterceptor;
  222    236   
  223    237   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ConstantAndVariableQueryStringEndpointParamsInterceptor {
  224    238   
    fn name(&self) -> &'static str {
  225    239   
        "ConstantAndVariableQueryStringEndpointParamsInterceptor"
  226    240   
    }
  227    241   
  228    242   
    fn read_before_execution(
  229    243   
        &self,
  230    244   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  231    245   
            '_,
  232    246   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  233    247   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  235    249   
        >,
  236    250   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  237    251   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  238    252   
        let _input = context
  239    253   
            .input()
  240    254   
            .downcast_ref::<ConstantAndVariableQueryStringInput>()
  241    255   
            .ok_or("failed to downcast to ConstantAndVariableQueryStringInput")?;
  242    256   
  243    257   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  244    258   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  245    259   
        })?;
  246    260   
        cfg.interceptor_state()
  247    261   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  248    262   
        ::std::result::Result::Ok(())
  249    263   
    }
  250    264   
}
  251    265   
  252    266   
// The get_* functions below are generated from JMESPath expressions in the
  253    267   
// operationContextParams trait. They target the operation's input shape.
  254    268   
         269  +
/* RustType.kt:516 */
  255    270   
#[allow(unreachable_code, unused_variables)]
         271  +
/* RustType.kt:516 */
  256    272   
#[cfg(test)]
         273  +
/* ProtocolTestGenerator.kt:98 */
  257    274   
mod constant_and_variable_query_string_test {
  258    275   
  259    276   
    /// Mixes constant and variable query string parameters
  260    277   
    /// Test ID: RestJsonConstantAndVariableQueryStringMissingOneValue
  261    278   
    #[::tokio::test]
  262    279   
    #[::tracing_test::traced_test]
  263    280   
    async fn rest_json_constant_and_variable_query_string_missing_one_value_request() {
  264    281   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  265    282   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  266    283   
  267    284   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  268    285   
        let result = client
  269    286   
            .constant_and_variable_query_string()
  270    287   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  271    288   
            .send()
  272    289   
            .await;
  273    290   
        let _ = dbg!(result);
  274    291   
        let http_request = request_receiver.expect_request();
  275    292   
        let expected_query_params = &["foo=bar", "baz=bam"];
  276    293   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  277    294   
        let forbid_params = &["maybeSet"];
  278    295   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_query_params(&http_request, forbid_params));
  279    296   
        let body = http_request.body().bytes().expect("body should be strict");
  280    297   
        // No body.
  281    298   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  282    299   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  283    300   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  284    301   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantAndVariableQueryString", "path was incorrect");
  285    302   
    }
  286    303   
  287    304   
    /// Mixes constant and variable query string parameters
  288    305   
    /// Test ID: RestJsonConstantAndVariableQueryStringAllValues
  289    306   
    #[::tokio::test]
  290    307   
    #[::tracing_test::traced_test]
  291    308   
    async fn rest_json_constant_and_variable_query_string_all_values_request() {
  292    309   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  293    310   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  294    311   
  295    312   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  296    313   
        let result = client
  297    314   
            .constant_and_variable_query_string()
  298    315   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  299    316   
            .set_maybe_set(::std::option::Option::Some("yes".to_owned()))
  300    317   
            .send()
  301    318   
            .await;
  302    319   
        let _ = dbg!(result);
  303    320   
        let http_request = request_receiver.expect_request();
  304    321   
        let expected_query_params = &["foo=bar", "baz=bam", "maybeSet=yes"];
  305    322   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  306    323   
        let body = http_request.body().bytes().expect("body should be strict");
  307    324   
        // No body.
  308    325   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  309    326   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  310    327   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  311    328   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantAndVariableQueryString", "path was incorrect");
  312    329   
    }
         330  +
         331  +
    /* ProtocolTestGenerator.kt:98 */
  313    332   
}
  314    333   
         334  +
/* OperationErrorGenerator.kt:79 */
  315    335   
/// Error type for the `ConstantAndVariableQueryStringError` operation.
         336  +
/* RustType.kt:516 */
  316    337   
#[non_exhaustive]
         338  +
/* RustType.kt:516 */
  317    339   
#[derive(::std::fmt::Debug)]
  318         -
pub enum ConstantAndVariableQueryStringError {
         340  +
pub /* OperationErrorGenerator.kt:81 */ enum ConstantAndVariableQueryStringError {
         341  +
    /* OperationErrorGenerator.kt:88 */
  319    342   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  320    343   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  321    344   
    variable wildcard pattern and check `.code()`:
  322    345   
     \
  323    346   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  324    347   
     \
  325    348   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ConstantAndVariableQueryStringError) for what information is available for the error.")]
  326    349   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         350  +
    /* OperationErrorGenerator.kt:81 */
  327    351   
}
         352  +
/* OperationErrorGenerator.kt:218 */
  328    353   
impl ConstantAndVariableQueryStringError {
         354  +
    /* OperationErrorGenerator.kt:219 */
  329    355   
    /// Creates the `ConstantAndVariableQueryStringError::Unhandled` variant from any error type.
  330    356   
    pub fn unhandled(
  331    357   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  332    358   
    ) -> Self {
  333    359   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  334    360   
            source: err.into(),
  335    361   
            meta: ::std::default::Default::default(),
  336    362   
        })
  337    363   
    }
  338    364   
  339    365   
    /// Creates the `ConstantAndVariableQueryStringError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  340    366   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  341    367   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  342    368   
            source: err.clone().into(),
  343    369   
            meta: err,
  344    370   
        })
  345    371   
    }
  346         -
    ///
         372  +
    /// /* OperationErrorGenerator.kt:236 */
  347    373   
    /// Returns error metadata, which includes the error code, message,
  348    374   
    /// request ID, and potentially additional information.
  349    375   
    ///
         376  +
    /* OperationErrorGenerator.kt:242 */
  350    377   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         378  +
        /* OperationErrorGenerator.kt:243 */
  351    379   
        match self {
  352         -
            Self::Unhandled(e) => &e.meta,
         380  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         381  +
            /* OperationErrorGenerator.kt:243 */
  353    382   
        }
         383  +
        /* OperationErrorGenerator.kt:242 */
  354    384   
    }
         385  +
    /* OperationErrorGenerator.kt:218 */
  355    386   
}
         387  +
/* OperationErrorGenerator.kt:269 */
  356    388   
impl ::std::error::Error for ConstantAndVariableQueryStringError {
         389  +
    /* OperationErrorGenerator.kt:270 */
  357    390   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         391  +
        /* OperationErrorGenerator.kt:318 */
  358    392   
        match self {
  359         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         393  +
            /* OperationErrorGenerator.kt:326 */
         394  +
            Self::Unhandled(_inner) => {
         395  +
                /* OperationErrorGenerator.kt:279 */
         396  +
                ::std::option::Option::Some(&*_inner.source)
         397  +
                /* OperationErrorGenerator.kt:326 */
         398  +
            } /* OperationErrorGenerator.kt:318 */
  360    399   
        }
         400  +
        /* OperationErrorGenerator.kt:270 */
  361    401   
    }
         402  +
    /* OperationErrorGenerator.kt:269 */
  362    403   
}
         404  +
/* OperationErrorGenerator.kt:133 */
  363    405   
impl ::std::fmt::Display for ConstantAndVariableQueryStringError {
         406  +
    /* OperationErrorGenerator.kt:134 */
  364    407   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         408  +
        /* OperationErrorGenerator.kt:318 */
  365    409   
        match self {
         410  +
            /* OperationErrorGenerator.kt:326 */
  366    411   
            Self::Unhandled(_inner) => {
         412  +
                /* OperationErrorGenerator.kt:139 */
  367    413   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  368    414   
                    write!(f, "unhandled error ({code})")
  369    415   
                } else {
  370    416   
                    f.write_str("unhandled error")
  371    417   
                }
  372         -
            }
         418  +
                /* OperationErrorGenerator.kt:326 */
         419  +
            } /* OperationErrorGenerator.kt:318 */
  373    420   
        }
         421  +
        /* OperationErrorGenerator.kt:134 */
  374    422   
    }
         423  +
    /* OperationErrorGenerator.kt:133 */
  375    424   
}
         425  +
/* OperationErrorGenerator.kt:182 */
  376    426   
impl ::aws_smithy_types::retry::ProvideErrorKind for ConstantAndVariableQueryStringError {
         427  +
    /* OperationErrorGenerator.kt:186 */
  377    428   
    fn code(&self) -> ::std::option::Option<&str> {
         429  +
        /* OperationErrorGenerator.kt:187 */
  378    430   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         431  +
        /* OperationErrorGenerator.kt:186 */
  379    432   
    }
         433  +
    /* OperationErrorGenerator.kt:190 */
  380    434   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         435  +
        /* OperationErrorGenerator.kt:197 */
  381    436   
        ::std::option::Option::None
         437  +
        /* OperationErrorGenerator.kt:190 */
  382    438   
    }
         439  +
    /* OperationErrorGenerator.kt:182 */
  383    440   
}
         441  +
/* OperationErrorGenerator.kt:163 */
  384    442   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConstantAndVariableQueryStringError {
         443  +
    /* OperationErrorGenerator.kt:164 */
  385    444   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         445  +
        /* OperationErrorGenerator.kt:318 */
  386    446   
        match self {
  387         -
            Self::Unhandled(_inner) => &_inner.meta,
         447  +
            /* OperationErrorGenerator.kt:326 */
         448  +
            Self::Unhandled(_inner) => {
         449  +
                /* OperationErrorGenerator.kt:168 */
         450  +
                &_inner.meta
         451  +
                /* OperationErrorGenerator.kt:326 */
         452  +
            } /* OperationErrorGenerator.kt:318 */
  388    453   
        }
         454  +
        /* OperationErrorGenerator.kt:164 */
  389    455   
    }
         456  +
    /* OperationErrorGenerator.kt:163 */
  390    457   
}
         458  +
/* OperationErrorGenerator.kt:109 */
  391    459   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ConstantAndVariableQueryStringError {
         460  +
    /* OperationErrorGenerator.kt:110 */
  392    461   
    fn create_unhandled_error(
  393    462   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  394    463   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  395    464   
    ) -> Self {
         465  +
        /* OperationErrorGenerator.kt:121 */
  396    466   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  397    467   
            source,
  398    468   
            meta: meta.unwrap_or_default(),
  399    469   
        })
         470  +
        /* OperationErrorGenerator.kt:110 */
  400    471   
    }
         472  +
    /* OperationErrorGenerator.kt:109 */
  401    473   
}
  402    474   
         475  +
/* CodegenDelegator.kt:255 */
  403    476   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutput;
  404    477   
         478  +
/* CodegenDelegator.kt:255 */
  405    479   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_input::ConstantAndVariableQueryStringInput;
  406    480   
         481  +
/* RustModule.kt:172 */
  407    482   
mod _constant_and_variable_query_string_input;
  408    483   
         484  +
/* RustModule.kt:172 */
  409    485   
mod _constant_and_variable_query_string_output;
  410    486   
  411         -
/// Builders
         487  +
/// /* CodegenDelegator.kt:51 */Builders
  412    488   
pub mod builders;

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

@@ -1,1 +78,137 @@
    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 ConstantAndVariableQueryStringInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct ConstantAndVariableQueryStringInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub baz: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub maybe_set: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl ConstantAndVariableQueryStringInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn baz(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.baz.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn maybe_set(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.maybe_set.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl ConstantAndVariableQueryStringInput {
   22         -
    /// Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringInput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringInput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`ConstantAndVariableQueryStringInput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConstantAndVariableQueryStringInput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct ConstantAndVariableQueryStringInputBuilder {
   32         -
    pub(crate) baz: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) maybe_set: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) baz: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) maybe_set: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl ConstantAndVariableQueryStringInputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn baz(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.baz = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   39     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   40     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   41     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   42     75   
    pub fn set_baz(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.baz = input;
   44     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   45     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   46     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   47     84   
    pub fn get_baz(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.baz
          87  +
        /* BuilderGenerator.kt:336 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:291 */
   51     92   
    pub fn maybe_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.maybe_set = ::std::option::Option::Some(input.into());
          95  +
        /* BuilderGenerator.kt:293 */
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:312 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:314 */
   56    102   
    pub fn set_maybe_set(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.maybe_set = input;
   58    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   59    107   
    }
         108  +
    /* BuilderGenerator.kt:334 */
   60    109   
    #[allow(missing_docs)] // documentation missing in model
         110  +
                           /* BuilderGenerator.kt:336 */
   61    111   
    pub fn get_maybe_set(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.maybe_set
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`ConstantAndVariableQueryStringInput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConstantAndVariableQueryStringInput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(
   66    119   
        self,
   67    120   
    ) -> ::std::result::Result<
   68    121   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput,
   69    122   
        ::aws_smithy_types::error::operation::BuildError,
   70    123   
    > {
         124  +
        /* BuilderGenerator.kt:254 */
   71    125   
        ::std::result::Result::Ok(
         126  +
            /* BuilderGenerator.kt:477 */
   72    127   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput {
   73         -
                baz: self.baz,
         128  +
                /* BuilderGenerator.kt:481 */ baz: self.baz,
         129  +
                /* BuilderGenerator.kt:481 */
   74    130   
                maybe_set: self.maybe_set,
   75         -
            },
         131  +
                /* BuilderGenerator.kt:477 */
         132  +
            }, /* BuilderGenerator.kt:254 */
   76    133   
        )
         134  +
        /* BuilderGenerator.kt:253 */
   77    135   
    }
         136  +
    /* BuilderGenerator.kt:355 */
   78    137   
}

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

@@ -1,1 +22,39 @@
    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 ConstantAndVariableQueryStringOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ConstantAndVariableQueryStringOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ConstantAndVariableQueryStringOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ConstantAndVariableQueryStringOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ConstantAndVariableQueryStringOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ConstantAndVariableQueryStringOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput {
   20         -
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +139,163 @@
    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::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_input::ConstantAndVariableQueryStringInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder {
    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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.constant_and_variable_query_string();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ConstantAndVariableQueryString`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ConstantAndVariableQueryString`.
   24     27   
///
   25         -
/// This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ConstantAndVariableQueryStringFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder,
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   35     41   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   36     42   
    > for ConstantAndVariableQueryStringFluentBuilder
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   44     50   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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 ConstantAndVariableQueryStringFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ConstantAndVariableQueryStringFluentBuilder`.
   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 ConstantAndVariableQueryString as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder {
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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::constant_and_variable_query_string::ConstantAndVariableQueryString::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::constant_and_variable_query_string::ConstantAndVariableQueryString::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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   97    107   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn baz(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.baz(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_baz(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_baz(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_baz(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_baz()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn maybe_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  127    146   
        self.inner = self.inner.maybe_set(input.into());
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_maybe_set(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  132    153   
        self.inner = self.inner.set_maybe_set(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_maybe_set(&self) -> &::std::option::Option<::std::string::String> {
  137    160   
        self.inner.get_maybe_set()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_query_string.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 `ConstantQueryString`.
           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 ConstantQueryString;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ConstantQueryString {
    7         -
    /// Creates a new `ConstantQueryString`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ConstantQueryString`
          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::constant_query_string::ConstantQueryStringInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::constant_query_string::ConstantQueryStringOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::constant_query_string::ConstantQueryStringError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +186,199 @@
   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 ConstantQueryString {
   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("ConstantQueryString");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            ConstantQueryStringRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            ConstantQueryStringResponseDeserializer,
  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   
            "ConstantQueryString",
  111    122   
            "Rest Json 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("ConstantQueryString")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(ConstantQueryStringEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::constant_query_string::ConstantQueryStringError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::constant_query_string::ConstantQueryStringError,
  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 ConstantQueryStringResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ConstantQueryStringResponseDeserializer {
  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_constant_query_string::de_constant_query_string_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_constant_query_string::de_constant_query_string_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 ConstantQueryStringRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ConstantQueryStringRequestSerializer {
  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
@@ -190,203 +383,459 @@
  210    223   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  211    224   
            }
  212    225   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  213    226   
            builder
  214    227   
        };
  215    228   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  216    229   
  217    230   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  218    231   
    }
  219    232   
}
         233  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  220    234   
#[derive(Debug)]
  221    235   
struct ConstantQueryStringEndpointParamsInterceptor;
  222    236   
  223    237   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ConstantQueryStringEndpointParamsInterceptor {
  224    238   
    fn name(&self) -> &'static str {
  225    239   
        "ConstantQueryStringEndpointParamsInterceptor"
  226    240   
    }
  227    241   
  228    242   
    fn read_before_execution(
  229    243   
        &self,
  230    244   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  231    245   
            '_,
  232    246   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  233    247   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  235    249   
        >,
  236    250   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  237    251   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  238    252   
        let _input = context
  239    253   
            .input()
  240    254   
            .downcast_ref::<ConstantQueryStringInput>()
  241    255   
            .ok_or("failed to downcast to ConstantQueryStringInput")?;
  242    256   
  243    257   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  244    258   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  245    259   
        })?;
  246    260   
        cfg.interceptor_state()
  247    261   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  248    262   
        ::std::result::Result::Ok(())
  249    263   
    }
  250    264   
}
  251    265   
  252    266   
// The get_* functions below are generated from JMESPath expressions in the
  253    267   
// operationContextParams trait. They target the operation's input shape.
  254    268   
         269  +
/* RustType.kt:516 */
  255    270   
#[allow(unreachable_code, unused_variables)]
         271  +
/* RustType.kt:516 */
  256    272   
#[cfg(test)]
         273  +
/* ProtocolTestGenerator.kt:98 */
  257    274   
mod constant_query_string_test {
  258    275   
  259    276   
    /// Includes constant query string parameters
  260    277   
    /// Test ID: RestJsonConstantQueryString
  261    278   
    #[::tokio::test]
  262    279   
    #[::tracing_test::traced_test]
  263    280   
    async fn rest_json_constant_query_string_request() {
  264    281   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  265    282   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  266    283   
  267    284   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  268    285   
        let result = client
  269    286   
            .constant_query_string()
  270    287   
            .set_hello(::std::option::Option::Some("hi".to_owned()))
  271    288   
            .send()
  272    289   
            .await;
  273    290   
        let _ = dbg!(result);
  274    291   
        let http_request = request_receiver.expect_request();
  275    292   
        let expected_query_params = &["foo=bar", "hello"];
  276    293   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  277    294   
        let body = http_request.body().bytes().expect("body should be strict");
  278    295   
        // No body.
  279    296   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  280    297   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  281    298   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  282    299   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantQueryString/hi", "path was incorrect");
  283    300   
    }
         301  +
         302  +
    /* ProtocolTestGenerator.kt:98 */
  284    303   
}
  285    304   
         305  +
/* OperationErrorGenerator.kt:79 */
  286    306   
/// Error type for the `ConstantQueryStringError` operation.
         307  +
/* RustType.kt:516 */
  287    308   
#[non_exhaustive]
         309  +
/* RustType.kt:516 */
  288    310   
#[derive(::std::fmt::Debug)]
  289         -
pub enum ConstantQueryStringError {
         311  +
pub /* OperationErrorGenerator.kt:81 */ enum ConstantQueryStringError {
         312  +
    /* OperationErrorGenerator.kt:88 */
  290    313   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  291    314   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  292    315   
    variable wildcard pattern and check `.code()`:
  293    316   
     \
  294    317   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  295    318   
     \
  296    319   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ConstantQueryStringError) for what information is available for the error.")]
  297    320   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         321  +
    /* OperationErrorGenerator.kt:81 */
  298    322   
}
         323  +
/* OperationErrorGenerator.kt:218 */
  299    324   
impl ConstantQueryStringError {
         325  +
    /* OperationErrorGenerator.kt:219 */
  300    326   
    /// Creates the `ConstantQueryStringError::Unhandled` variant from any error type.
  301    327   
    pub fn unhandled(
  302    328   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  303    329   
    ) -> Self {
  304    330   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  305    331   
            source: err.into(),
  306    332   
            meta: ::std::default::Default::default(),
  307    333   
        })
  308    334   
    }
  309    335   
  310    336   
    /// Creates the `ConstantQueryStringError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  311    337   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  312    338   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  313    339   
            source: err.clone().into(),
  314    340   
            meta: err,
  315    341   
        })
  316    342   
    }
  317         -
    ///
         343  +
    /// /* OperationErrorGenerator.kt:236 */
  318    344   
    /// Returns error metadata, which includes the error code, message,
  319    345   
    /// request ID, and potentially additional information.
  320    346   
    ///
         347  +
    /* OperationErrorGenerator.kt:242 */
  321    348   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         349  +
        /* OperationErrorGenerator.kt:243 */
  322    350   
        match self {
  323         -
            Self::Unhandled(e) => &e.meta,
         351  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         352  +
            /* OperationErrorGenerator.kt:243 */
  324    353   
        }
         354  +
        /* OperationErrorGenerator.kt:242 */
  325    355   
    }
         356  +
    /* OperationErrorGenerator.kt:218 */
  326    357   
}
         358  +
/* OperationErrorGenerator.kt:269 */
  327    359   
impl ::std::error::Error for ConstantQueryStringError {
         360  +
    /* OperationErrorGenerator.kt:270 */
  328    361   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         362  +
        /* OperationErrorGenerator.kt:318 */
  329    363   
        match self {
  330         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         364  +
            /* OperationErrorGenerator.kt:326 */
         365  +
            Self::Unhandled(_inner) => {
         366  +
                /* OperationErrorGenerator.kt:279 */
         367  +
                ::std::option::Option::Some(&*_inner.source)
         368  +
                /* OperationErrorGenerator.kt:326 */
         369  +
            } /* OperationErrorGenerator.kt:318 */
  331    370   
        }
         371  +
        /* OperationErrorGenerator.kt:270 */
  332    372   
    }
         373  +
    /* OperationErrorGenerator.kt:269 */
  333    374   
}
         375  +
/* OperationErrorGenerator.kt:133 */
  334    376   
impl ::std::fmt::Display for ConstantQueryStringError {
         377  +
    /* OperationErrorGenerator.kt:134 */
  335    378   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         379  +
        /* OperationErrorGenerator.kt:318 */
  336    380   
        match self {
         381  +
            /* OperationErrorGenerator.kt:326 */
  337    382   
            Self::Unhandled(_inner) => {
         383  +
                /* OperationErrorGenerator.kt:139 */
  338    384   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  339    385   
                    write!(f, "unhandled error ({code})")
  340    386   
                } else {
  341    387   
                    f.write_str("unhandled error")
  342    388   
                }
  343         -
            }
         389  +
                /* OperationErrorGenerator.kt:326 */
         390  +
            } /* OperationErrorGenerator.kt:318 */
  344    391   
        }
         392  +
        /* OperationErrorGenerator.kt:134 */
  345    393   
    }
         394  +
    /* OperationErrorGenerator.kt:133 */
  346    395   
}
         396  +
/* OperationErrorGenerator.kt:182 */
  347    397   
impl ::aws_smithy_types::retry::ProvideErrorKind for ConstantQueryStringError {
         398  +
    /* OperationErrorGenerator.kt:186 */
  348    399   
    fn code(&self) -> ::std::option::Option<&str> {
         400  +
        /* OperationErrorGenerator.kt:187 */
  349    401   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         402  +
        /* OperationErrorGenerator.kt:186 */
  350    403   
    }
         404  +
    /* OperationErrorGenerator.kt:190 */
  351    405   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         406  +
        /* OperationErrorGenerator.kt:197 */
  352    407   
        ::std::option::Option::None
         408  +
        /* OperationErrorGenerator.kt:190 */
  353    409   
    }
         410  +
    /* OperationErrorGenerator.kt:182 */
  354    411   
}
         412  +
/* OperationErrorGenerator.kt:163 */
  355    413   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConstantQueryStringError {
         414  +
    /* OperationErrorGenerator.kt:164 */
  356    415   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         416  +
        /* OperationErrorGenerator.kt:318 */
  357    417   
        match self {
  358         -
            Self::Unhandled(_inner) => &_inner.meta,
         418  +
            /* OperationErrorGenerator.kt:326 */
         419  +
            Self::Unhandled(_inner) => {
         420  +
                /* OperationErrorGenerator.kt:168 */
         421  +
                &_inner.meta
         422  +
                /* OperationErrorGenerator.kt:326 */
         423  +
            } /* OperationErrorGenerator.kt:318 */
  359    424   
        }
         425  +
        /* OperationErrorGenerator.kt:164 */
  360    426   
    }
         427  +
    /* OperationErrorGenerator.kt:163 */
  361    428   
}
         429  +
/* OperationErrorGenerator.kt:109 */
  362    430   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ConstantQueryStringError {
         431  +
    /* OperationErrorGenerator.kt:110 */
  363    432   
    fn create_unhandled_error(
  364    433   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  365    434   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  366    435   
    ) -> Self {
         436  +
        /* OperationErrorGenerator.kt:121 */
  367    437   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  368    438   
            source,
  369    439   
            meta: meta.unwrap_or_default(),
  370    440   
        })
         441  +
        /* OperationErrorGenerator.kt:110 */
  371    442   
    }
         443  +
    /* OperationErrorGenerator.kt:109 */
  372    444   
}
  373    445   
         446  +
/* CodegenDelegator.kt:255 */
  374    447   
pub use crate::operation::constant_query_string::_constant_query_string_output::ConstantQueryStringOutput;
  375    448   
         449  +
/* CodegenDelegator.kt:255 */
  376    450   
pub use crate::operation::constant_query_string::_constant_query_string_input::ConstantQueryStringInput;
  377    451   
         452  +
/* RustModule.kt:172 */
  378    453   
mod _constant_query_string_input;
  379    454   
         455  +
/* RustModule.kt:172 */
  380    456   
mod _constant_query_string_output;
  381    457   
  382         -
/// Builders
         458  +
/// /* CodegenDelegator.kt:51 */Builders
  383    459   
pub mod builders;

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

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

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

@@ -1,1 +22,39 @@
    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 ConstantQueryStringOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ConstantQueryStringOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ConstantQueryStringOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::constant_query_string::builders::ConstantQueryStringOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::constant_query_string::builders::ConstantQueryStringOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ConstantQueryStringOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ConstantQueryStringOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ConstantQueryStringOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::constant_query_string::ConstantQueryStringOutput {
   20         -
        crate::operation::constant_query_string::ConstantQueryStringOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::constant_query_string::ConstantQueryStringOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +125,143 @@
    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::constant_query_string::_constant_query_string_output::ConstantQueryStringOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::constant_query_string::_constant_query_string_input::ConstantQueryStringInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder {
    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::constant_query_string::ConstantQueryStringOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::constant_query_string::ConstantQueryStringError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.constant_query_string();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ConstantQueryString`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ConstantQueryString`.
   24     27   
///
   25         -
/// This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, `{hello}`.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, `{hello}`.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ConstantQueryStringFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder,
   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::constant_query_string::ConstantQueryStringOutput,
   35     41   
        crate::operation::constant_query_string::ConstantQueryStringError,
   36     42   
    > for ConstantQueryStringFluentBuilder
   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::constant_query_string::ConstantQueryStringOutput,
   44     50   
            crate::operation::constant_query_string::ConstantQueryStringError,
   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 ConstantQueryStringFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ConstantQueryStringFluentBuilder`.
   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 ConstantQueryString as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder {
   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::constant_query_string::ConstantQueryStringOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::constant_query_string::ConstantQueryStringError,
   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::constant_query_string::ConstantQueryString::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::constant_query_string::ConstantQueryString::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::constant_query_string::ConstantQueryStringOutput,
   97    107   
        crate::operation::constant_query_string::ConstantQueryStringError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn hello(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.hello(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_hello(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_hello(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_hello(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_hello()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/content_type_parameters.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 `ContentTypeParameters`.
           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 ContentTypeParameters;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ContentTypeParameters {
    7         -
    /// Creates a new `ContentTypeParameters`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ContentTypeParameters`
          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::content_type_parameters::ContentTypeParametersInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +337,408 @@
   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 ContentTypeParameters {
   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("ContentTypeParameters");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            ContentTypeParametersRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            ContentTypeParametersResponseDeserializer,
  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   
            "ContentTypeParameters",
  111    122   
            "Rest Json 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("ContentTypeParameters")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(ContentTypeParametersEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::content_type_parameters::ContentTypeParametersError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::content_type_parameters::ContentTypeParametersError,
  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 ContentTypeParametersResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ContentTypeParametersResponseDeserializer {
  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_content_type_parameters::de_content_type_parameters_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_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 ContentTypeParametersRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ContentTypeParametersRequestSerializer {
  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::content_type_parameters::ContentTypeParametersInput>()
  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::content_type_parameters::ContentTypeParametersInput,
  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, "/ContentTypeParameters").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::content_type_parameters::ContentTypeParametersInput,
  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/json");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_input(
  196    209   
            &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 ContentTypeParametersEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ContentTypeParametersEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "ContentTypeParametersEndpointParamsInterceptor"
  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::<ContentTypeParametersInput>()
  226    240   
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
  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  +
/* OperationErrorGenerator.kt:79 */
  240    255   
/// Error type for the `ContentTypeParametersError` operation.
         256  +
/* RustType.kt:516 */
  241    257   
#[non_exhaustive]
         258  +
/* RustType.kt:516 */
  242    259   
#[derive(::std::fmt::Debug)]
  243         -
pub enum ContentTypeParametersError {
         260  +
pub /* OperationErrorGenerator.kt:81 */ enum ContentTypeParametersError {
         261  +
    /* OperationErrorGenerator.kt:88 */
  244    262   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  245    263   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  246    264   
    variable wildcard pattern and check `.code()`:
  247    265   
     \
  248    266   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  249    267   
     \
  250    268   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ContentTypeParametersError) for what information is available for the error.")]
  251    269   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         270  +
    /* OperationErrorGenerator.kt:81 */
  252    271   
}
         272  +
/* OperationErrorGenerator.kt:218 */
  253    273   
impl ContentTypeParametersError {
         274  +
    /* OperationErrorGenerator.kt:219 */
  254    275   
    /// Creates the `ContentTypeParametersError::Unhandled` variant from any error type.
  255    276   
    pub fn unhandled(
  256    277   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  257    278   
    ) -> Self {
  258    279   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  259    280   
            source: err.into(),
  260    281   
            meta: ::std::default::Default::default(),
  261    282   
        })
  262    283   
    }
  263    284   
  264    285   
    /// Creates the `ContentTypeParametersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  265    286   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  266    287   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  267    288   
            source: err.clone().into(),
  268    289   
            meta: err,
  269    290   
        })
  270    291   
    }
  271         -
    ///
         292  +
    /// /* OperationErrorGenerator.kt:236 */
  272    293   
    /// Returns error metadata, which includes the error code, message,
  273    294   
    /// request ID, and potentially additional information.
  274    295   
    ///
         296  +
    /* OperationErrorGenerator.kt:242 */
  275    297   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         298  +
        /* OperationErrorGenerator.kt:243 */
  276    299   
        match self {
  277         -
            Self::Unhandled(e) => &e.meta,
         300  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         301  +
            /* OperationErrorGenerator.kt:243 */
  278    302   
        }
         303  +
        /* OperationErrorGenerator.kt:242 */
  279    304   
    }
         305  +
    /* OperationErrorGenerator.kt:218 */
  280    306   
}
         307  +
/* OperationErrorGenerator.kt:269 */
  281    308   
impl ::std::error::Error for ContentTypeParametersError {
         309  +
    /* OperationErrorGenerator.kt:270 */
  282    310   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         311  +
        /* OperationErrorGenerator.kt:318 */
  283    312   
        match self {
  284         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         313  +
            /* OperationErrorGenerator.kt:326 */
         314  +
            Self::Unhandled(_inner) => {
         315  +
                /* OperationErrorGenerator.kt:279 */
         316  +
                ::std::option::Option::Some(&*_inner.source)
         317  +
                /* OperationErrorGenerator.kt:326 */
         318  +
            } /* OperationErrorGenerator.kt:318 */
  285    319   
        }
         320  +
        /* OperationErrorGenerator.kt:270 */
  286    321   
    }
         322  +
    /* OperationErrorGenerator.kt:269 */
  287    323   
}
         324  +
/* OperationErrorGenerator.kt:133 */
  288    325   
impl ::std::fmt::Display for ContentTypeParametersError {
         326  +
    /* OperationErrorGenerator.kt:134 */
  289    327   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         328  +
        /* OperationErrorGenerator.kt:318 */
  290    329   
        match self {
         330  +
            /* OperationErrorGenerator.kt:326 */
  291    331   
            Self::Unhandled(_inner) => {
         332  +
                /* OperationErrorGenerator.kt:139 */
  292    333   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  293    334   
                    write!(f, "unhandled error ({code})")
  294    335   
                } else {
  295    336   
                    f.write_str("unhandled error")
  296    337   
                }
  297         -
            }
         338  +
                /* OperationErrorGenerator.kt:326 */
         339  +
            } /* OperationErrorGenerator.kt:318 */
  298    340   
        }
         341  +
        /* OperationErrorGenerator.kt:134 */
  299    342   
    }
         343  +
    /* OperationErrorGenerator.kt:133 */
  300    344   
}
         345  +
/* OperationErrorGenerator.kt:182 */
  301    346   
impl ::aws_smithy_types::retry::ProvideErrorKind for ContentTypeParametersError {
         347  +
    /* OperationErrorGenerator.kt:186 */
  302    348   
    fn code(&self) -> ::std::option::Option<&str> {
         349  +
        /* OperationErrorGenerator.kt:187 */
  303    350   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         351  +
        /* OperationErrorGenerator.kt:186 */
  304    352   
    }
         353  +
    /* OperationErrorGenerator.kt:190 */
  305    354   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         355  +
        /* OperationErrorGenerator.kt:197 */
  306    356   
        ::std::option::Option::None
         357  +
        /* OperationErrorGenerator.kt:190 */
  307    358   
    }
         359  +
    /* OperationErrorGenerator.kt:182 */
  308    360   
}
         361  +
/* OperationErrorGenerator.kt:163 */
  309    362   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ContentTypeParametersError {
         363  +
    /* OperationErrorGenerator.kt:164 */
  310    364   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         365  +
        /* OperationErrorGenerator.kt:318 */
  311    366   
        match self {
  312         -
            Self::Unhandled(_inner) => &_inner.meta,
         367  +
            /* OperationErrorGenerator.kt:326 */
         368  +
            Self::Unhandled(_inner) => {
         369  +
                /* OperationErrorGenerator.kt:168 */
         370  +
                &_inner.meta
         371  +
                /* OperationErrorGenerator.kt:326 */
         372  +
            } /* OperationErrorGenerator.kt:318 */
  313    373   
        }
         374  +
        /* OperationErrorGenerator.kt:164 */
  314    375   
    }
         376  +
    /* OperationErrorGenerator.kt:163 */
  315    377   
}
         378  +
/* OperationErrorGenerator.kt:109 */
  316    379   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ContentTypeParametersError {
         380  +
    /* OperationErrorGenerator.kt:110 */
  317    381   
    fn create_unhandled_error(
  318    382   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  319    383   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  320    384   
    ) -> Self {
         385  +
        /* OperationErrorGenerator.kt:121 */
  321    386   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  322    387   
            source,
  323    388   
            meta: meta.unwrap_or_default(),
  324    389   
        })
         390  +
        /* OperationErrorGenerator.kt:110 */
  325    391   
    }
         392  +
    /* OperationErrorGenerator.kt:109 */
  326    393   
}
  327    394   
         395  +
/* CodegenDelegator.kt:255 */
  328    396   
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutput;
  329    397   
         398  +
/* CodegenDelegator.kt:255 */
  330    399   
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInput;
  331    400   
         401  +
/* RustModule.kt:172 */
  332    402   
mod _content_type_parameters_input;
  333    403   
         404  +
/* RustModule.kt:172 */
  334    405   
mod _content_type_parameters_output;
  335    406   
  336         -
/// Builders
         407  +
/// /* CodegenDelegator.kt:51 */Builders
  337    408   
pub mod builders;

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

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

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

@@ -1,1 +22,39 @@
    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 ContentTypeParametersOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ContentTypeParametersOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ContentTypeParametersOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ContentTypeParametersOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ContentTypeParametersOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
   20         -
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +125,143 @@
    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::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
    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::content_type_parameters::ContentTypeParametersOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.content_type_parameters();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ContentTypeParameters`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ContentTypeParameters`.
   24     27   
///
   25         -
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how servers must support requests containing a `Content-Type` header with parameters.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ContentTypeParametersFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder,
   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::content_type_parameters::ContentTypeParametersOutput,
   35     41   
        crate::operation::content_type_parameters::ContentTypeParametersError,
   36     42   
    > for ContentTypeParametersFluentBuilder
   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::content_type_parameters::ContentTypeParametersOutput,
   44     50   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   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 ContentTypeParametersFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ContentTypeParametersFluentBuilder`.
   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 ContentTypeParameters as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
   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::content_type_parameters::ContentTypeParametersOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   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::content_type_parameters::ContentTypeParameters::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::content_type_parameters::ContentTypeParameters::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::content_type_parameters::ContentTypeParametersOutput,
   97    107   
        crate::operation::content_type_parameters::ContentTypeParametersError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn value(mut self, input: i32) -> Self {
  113    126   
        self.inner = self.inner.value(input);
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
  118    133   
        self.inner = self.inner.set_value(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_value(&self) -> &::std::option::Option<i32> {
  123    140   
        self.inner.get_value()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/datetime_offsets.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 `DatetimeOffsets`.
           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 DatetimeOffsets;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl DatetimeOffsets {
    7         -
    /// Creates a new `DatetimeOffsets`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `DatetimeOffsets`
          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::datetime_offsets::DatetimeOffsetsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::datetime_offsets::DatetimeOffsetsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +265,282 @@
   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 DatetimeOffsets {
   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("DatetimeOffsets");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            DatetimeOffsetsRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            DatetimeOffsetsResponseDeserializer,
  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   
            "DatetimeOffsets",
  111    122   
            "Rest Json 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("DatetimeOffsets")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(DatetimeOffsetsEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::datetime_offsets::DatetimeOffsetsError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::datetime_offsets::DatetimeOffsetsError,
  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 DatetimeOffsetsResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DatetimeOffsetsResponseDeserializer {
  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_datetime_offsets::de_datetime_offsets_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets_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 DatetimeOffsetsRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DatetimeOffsetsRequestSerializer {
  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::datetime_offsets::DatetimeOffsetsInput>()
  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::datetime_offsets::DatetimeOffsetsInput,
  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, "/DatetimeOffsets").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::datetime_offsets::DatetimeOffsetsInput,
  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
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  195    208   
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct DatetimeOffsetsEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DatetimeOffsetsEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "DatetimeOffsetsEndpointParamsInterceptor"
  205    219   
    }
  206    220   
  207    221   
    fn read_before_execution(
  208    222   
        &self,
  209    223   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  210    224   
            '_,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  214    228   
        >,
  215    229   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  216    230   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  217    231   
        let _input = context
  218    232   
            .input()
  219    233   
            .downcast_ref::<DatetimeOffsetsInput>()
  220    234   
            .ok_or("failed to downcast to DatetimeOffsetsInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod datetime_offsets_test {
  237    254   
  238    255   
    /// Ensures that clients can correctly parse datetime (timestamps) with offsets
  239    256   
    /// Test ID: RestJsonDateTimeWithNegativeOffset
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn rest_json_date_time_with_negative_offset_response() {
  243    260   
        let expected_output = crate::operation::datetime_offsets::DatetimeOffsetsOutput::builder()
  244    261   
            .set_datetime(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  245    262   
                1576540098, 0_f64,
@@ -297,314 +426,502 @@
  317    334   
                )))
  318    335   
            });
  319    336   
            de.deserialize_nonstreaming(&http_response)
  320    337   
        });
  321    338   
        let parsed = parsed
  322    339   
            .expect("should be successful response")
  323    340   
            .downcast::<crate::operation::datetime_offsets::DatetimeOffsetsOutput>()
  324    341   
            .unwrap();
  325    342   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  326    343   
    }
         344  +
         345  +
    /* ProtocolTestGenerator.kt:98 */
  327    346   
}
  328    347   
         348  +
/* OperationErrorGenerator.kt:79 */
  329    349   
/// Error type for the `DatetimeOffsetsError` operation.
         350  +
/* RustType.kt:516 */
  330    351   
#[non_exhaustive]
         352  +
/* RustType.kt:516 */
  331    353   
#[derive(::std::fmt::Debug)]
  332         -
pub enum DatetimeOffsetsError {
         354  +
pub /* OperationErrorGenerator.kt:81 */ enum DatetimeOffsetsError {
         355  +
    /* OperationErrorGenerator.kt:88 */
  333    356   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  334    357   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  335    358   
    variable wildcard pattern and check `.code()`:
  336    359   
     \
  337    360   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  338    361   
     \
  339    362   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DatetimeOffsetsError) for what information is available for the error.")]
  340    363   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         364  +
    /* OperationErrorGenerator.kt:81 */
  341    365   
}
         366  +
/* OperationErrorGenerator.kt:218 */
  342    367   
impl DatetimeOffsetsError {
         368  +
    /* OperationErrorGenerator.kt:219 */
  343    369   
    /// Creates the `DatetimeOffsetsError::Unhandled` variant from any error type.
  344    370   
    pub fn unhandled(
  345    371   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  346    372   
    ) -> Self {
  347    373   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  348    374   
            source: err.into(),
  349    375   
            meta: ::std::default::Default::default(),
  350    376   
        })
  351    377   
    }
  352    378   
  353    379   
    /// Creates the `DatetimeOffsetsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  354    380   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  355    381   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  356    382   
            source: err.clone().into(),
  357    383   
            meta: err,
  358    384   
        })
  359    385   
    }
  360         -
    ///
         386  +
    /// /* OperationErrorGenerator.kt:236 */
  361    387   
    /// Returns error metadata, which includes the error code, message,
  362    388   
    /// request ID, and potentially additional information.
  363    389   
    ///
         390  +
    /* OperationErrorGenerator.kt:242 */
  364    391   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         392  +
        /* OperationErrorGenerator.kt:243 */
  365    393   
        match self {
  366         -
            Self::Unhandled(e) => &e.meta,
         394  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         395  +
            /* OperationErrorGenerator.kt:243 */
  367    396   
        }
         397  +
        /* OperationErrorGenerator.kt:242 */
  368    398   
    }
         399  +
    /* OperationErrorGenerator.kt:218 */
  369    400   
}
         401  +
/* OperationErrorGenerator.kt:269 */
  370    402   
impl ::std::error::Error for DatetimeOffsetsError {
         403  +
    /* OperationErrorGenerator.kt:270 */
  371    404   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         405  +
        /* OperationErrorGenerator.kt:318 */
  372    406   
        match self {
  373         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         407  +
            /* OperationErrorGenerator.kt:326 */
         408  +
            Self::Unhandled(_inner) => {
         409  +
                /* OperationErrorGenerator.kt:279 */
         410  +
                ::std::option::Option::Some(&*_inner.source)
         411  +
                /* OperationErrorGenerator.kt:326 */
         412  +
            } /* OperationErrorGenerator.kt:318 */
  374    413   
        }
         414  +
        /* OperationErrorGenerator.kt:270 */
  375    415   
    }
         416  +
    /* OperationErrorGenerator.kt:269 */
  376    417   
}
         418  +
/* OperationErrorGenerator.kt:133 */
  377    419   
impl ::std::fmt::Display for DatetimeOffsetsError {
         420  +
    /* OperationErrorGenerator.kt:134 */
  378    421   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         422  +
        /* OperationErrorGenerator.kt:318 */
  379    423   
        match self {
         424  +
            /* OperationErrorGenerator.kt:326 */
  380    425   
            Self::Unhandled(_inner) => {
         426  +
                /* OperationErrorGenerator.kt:139 */
  381    427   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  382    428   
                    write!(f, "unhandled error ({code})")
  383    429   
                } else {
  384    430   
                    f.write_str("unhandled error")
  385    431   
                }
  386         -
            }
         432  +
                /* OperationErrorGenerator.kt:326 */
         433  +
            } /* OperationErrorGenerator.kt:318 */
  387    434   
        }
         435  +
        /* OperationErrorGenerator.kt:134 */
  388    436   
    }
         437  +
    /* OperationErrorGenerator.kt:133 */
  389    438   
}
         439  +
/* OperationErrorGenerator.kt:182 */
  390    440   
impl ::aws_smithy_types::retry::ProvideErrorKind for DatetimeOffsetsError {
         441  +
    /* OperationErrorGenerator.kt:186 */
  391    442   
    fn code(&self) -> ::std::option::Option<&str> {
         443  +
        /* OperationErrorGenerator.kt:187 */
  392    444   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         445  +
        /* OperationErrorGenerator.kt:186 */
  393    446   
    }
         447  +
    /* OperationErrorGenerator.kt:190 */
  394    448   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         449  +
        /* OperationErrorGenerator.kt:197 */
  395    450   
        ::std::option::Option::None
         451  +
        /* OperationErrorGenerator.kt:190 */
  396    452   
    }
         453  +
    /* OperationErrorGenerator.kt:182 */
  397    454   
}
         455  +
/* OperationErrorGenerator.kt:163 */
  398    456   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DatetimeOffsetsError {
         457  +
    /* OperationErrorGenerator.kt:164 */
  399    458   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         459  +
        /* OperationErrorGenerator.kt:318 */
  400    460   
        match self {
  401         -
            Self::Unhandled(_inner) => &_inner.meta,
         461  +
            /* OperationErrorGenerator.kt:326 */
         462  +
            Self::Unhandled(_inner) => {
         463  +
                /* OperationErrorGenerator.kt:168 */
         464  +
                &_inner.meta
         465  +
                /* OperationErrorGenerator.kt:326 */
         466  +
            } /* OperationErrorGenerator.kt:318 */
  402    467   
        }
         468  +
        /* OperationErrorGenerator.kt:164 */
  403    469   
    }
         470  +
    /* OperationErrorGenerator.kt:163 */
  404    471   
}
         472  +
/* OperationErrorGenerator.kt:109 */
  405    473   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DatetimeOffsetsError {
         474  +
    /* OperationErrorGenerator.kt:110 */
  406    475   
    fn create_unhandled_error(
  407    476   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  408    477   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  409    478   
    ) -> Self {
         479  +
        /* OperationErrorGenerator.kt:121 */
  410    480   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  411    481   
            source,
  412    482   
            meta: meta.unwrap_or_default(),
  413    483   
        })
         484  +
        /* OperationErrorGenerator.kt:110 */
  414    485   
    }
         486  +
    /* OperationErrorGenerator.kt:109 */
  415    487   
}
  416    488   
         489  +
/* CodegenDelegator.kt:255 */
  417    490   
pub use crate::operation::datetime_offsets::_datetime_offsets_output::DatetimeOffsetsOutput;
  418    491   
         492  +
/* CodegenDelegator.kt:255 */
  419    493   
pub use crate::operation::datetime_offsets::_datetime_offsets_input::DatetimeOffsetsInput;
  420    494   
         495  +
/* RustModule.kt:172 */
  421    496   
mod _datetime_offsets_input;
  422    497   
         498  +
/* RustModule.kt:172 */
  423    499   
mod _datetime_offsets_output;
  424    500   
  425         -
/// Builders
         501  +
/// /* CodegenDelegator.kt:51 */Builders
  426    502   
pub mod builders;

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

@@ -1,1 +24,44 @@
    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 DatetimeOffsetsInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct DatetimeOffsetsInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl DatetimeOffsetsInput {
    7         -
    /// Creates a new builder-style object to manufacture [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::datetime_offsets::builders::DatetimeOffsetsInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct DatetimeOffsetsInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct DatetimeOffsetsInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl DatetimeOffsetsInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`DatetimeOffsetsInput`](crate::operation::datetime_offsets::DatetimeOffsetsInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::datetime_offsets::DatetimeOffsetsInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::datetime_offsets::DatetimeOffsetsInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::datetime_offsets::DatetimeOffsetsInput {
          39  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          40  +
        )
          41  +
        /* BuilderGenerator.kt:253 */
   23     42   
    }
          43  +
    /* BuilderGenerator.kt:355 */
   24     44   
}

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

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