Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/_top_level.rs

@@ -1,1 +112,191 @@
    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 TopLevel {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct TopLevel {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub dialog: crate::types::Dialog,
          11  +
    /* StructureGenerator.kt:231 */
    8     12   
    #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub dialog_list: ::std::vec::Vec<crate::types::Dialog>,
          14  +
    /* StructureGenerator.kt:231 */
   10     15   
    #[allow(missing_docs)] // documentation missing in model
   11     16   
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::types::Dialog>,
          17  +
    /* StructureGenerator.kt:201 */
   12     18   
}
          19  +
/* StructureGenerator.kt:135 */
   13     20   
impl TopLevel {
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
          23  +
                           /* StructureGenerator.kt:166 */
   15     24   
    pub fn dialog(&self) -> &crate::types::Dialog {
          25  +
        /* StructureGenerator.kt:172 */
   16     26   
        &self.dialog
          27  +
        /* StructureGenerator.kt:166 */
   17     28   
    }
          29  +
    /* StructureGenerator.kt:231 */
   18     30   
    #[allow(missing_docs)] // documentation missing in model
          31  +
                           /* StructureGenerator.kt:166 */
   19     32   
    pub fn dialog_list(&self) -> &[crate::types::Dialog] {
          33  +
        /* StructureGenerator.kt:171 */
   20     34   
        use std::ops::Deref;
   21     35   
        self.dialog_list.deref()
          36  +
        /* StructureGenerator.kt:166 */
   22     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   23     39   
    #[allow(missing_docs)] // documentation missing in model
          40  +
                           /* StructureGenerator.kt:166 */
   24     41   
    pub fn dialog_map(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::Dialog> {
          42  +
        /* StructureGenerator.kt:172 */
   25     43   
        &self.dialog_map
          44  +
        /* StructureGenerator.kt:166 */
   26     45   
    }
          46  +
    /* StructureGenerator.kt:135 */
   27     47   
}
          48  +
/* ClientCodegenVisitor.kt:237 */
   28     49   
impl TopLevel {
   29         -
    /// Creates a new builder-style object to manufacture [`TopLevel`](crate::types::TopLevel).
          50  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TopLevel`](crate::types::TopLevel).
          51  +
    /* BuilderGenerator.kt:175 */
   30     52   
    pub fn builder() -> crate::types::builders::TopLevelBuilder {
          53  +
        /* BuilderGenerator.kt:176 */
   31     54   
        crate::types::builders::TopLevelBuilder::default()
          55  +
        /* BuilderGenerator.kt:175 */
   32     56   
    }
          57  +
    /* ClientCodegenVisitor.kt:237 */
   33     58   
}
   34     59   
   35         -
/// A builder for [`TopLevel`](crate::types::TopLevel).
          60  +
/// /* BuilderGenerator.kt:342 */A builder for [`TopLevel`](crate::types::TopLevel).
          61  +
/* RustType.kt:516 */
   36     62   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          63  +
/* RustType.kt:516 */
   37     64   
#[non_exhaustive]
          65  +
/* BuilderGenerator.kt:345 */
   38     66   
pub struct TopLevelBuilder {
   39         -
    pub(crate) dialog: ::std::option::Option<crate::types::Dialog>,
   40         -
    pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>,
          67  +
    /* BuilderGenerator.kt:275 */ pub(crate) dialog: ::std::option::Option<crate::types::Dialog>,
          68  +
    /* BuilderGenerator.kt:275 */ pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>,
          69  +
    /* BuilderGenerator.kt:275 */
   41     70   
    pub(crate) dialog_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>,
          71  +
    /* BuilderGenerator.kt:345 */
   42     72   
}
          73  +
/* BuilderGenerator.kt:355 */
   43     74   
impl TopLevelBuilder {
          75  +
    /* BuilderGenerator.kt:286 */
   44     76   
    #[allow(missing_docs)] // documentation missing in model
   45         -
    /// This field is required.
          77  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          78  +
    /* BuilderGenerator.kt:291 */
   46     79   
    pub fn dialog(mut self, input: crate::types::Dialog) -> Self {
          80  +
        /* BuilderGenerator.kt:292 */
   47     81   
        self.dialog = ::std::option::Option::Some(input);
          82  +
        /* BuilderGenerator.kt:293 */
   48     83   
        self
          84  +
        /* BuilderGenerator.kt:291 */
   49     85   
    }
          86  +
    /* BuilderGenerator.kt:312 */
   50     87   
    #[allow(missing_docs)] // documentation missing in model
          88  +
                           /* BuilderGenerator.kt:314 */
   51     89   
    pub fn set_dialog(mut self, input: ::std::option::Option<crate::types::Dialog>) -> Self {
          90  +
        /* BuilderGenerator.kt:315 */
   52     91   
        self.dialog = input;
   53     92   
        self
          93  +
        /* BuilderGenerator.kt:314 */
   54     94   
    }
          95  +
    /* BuilderGenerator.kt:334 */
   55     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:336 */
   56     98   
    pub fn get_dialog(&self) -> &::std::option::Option<crate::types::Dialog> {
          99  +
        /* BuilderGenerator.kt:337 */
   57    100   
        &self.dialog
         101  +
        /* BuilderGenerator.kt:336 */
   58    102   
    }
   59         -
    /// Appends an item to `dialog_list`.
         103  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `dialog_list`.
         104  +
    /* BuilderGenerator.kt:411 */
   60    105   
    ///
   61         -
    /// To override the contents of this collection use [`set_dialog_list`](Self::set_dialog_list).
         106  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_dialog_list`](Self::set_dialog_list).
         107  +
    /* BuilderGenerator.kt:413 */
   62    108   
    ///
         109  +
    /* BuilderGenerator.kt:418 */
   63    110   
    pub fn dialog_list(mut self, input: crate::types::Dialog) -> Self {
         111  +
        /* BuilderGenerator.kt:419 */
   64    112   
        let mut v = self.dialog_list.unwrap_or_default();
   65    113   
        v.push(input);
   66    114   
        self.dialog_list = ::std::option::Option::Some(v);
   67    115   
        self
         116  +
        /* BuilderGenerator.kt:418 */
   68    117   
    }
         118  +
    /* BuilderGenerator.kt:312 */
   69    119   
    #[allow(missing_docs)] // documentation missing in model
         120  +
                           /* BuilderGenerator.kt:314 */
   70    121   
    pub fn set_dialog_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>) -> Self {
         122  +
        /* BuilderGenerator.kt:315 */
   71    123   
        self.dialog_list = input;
   72    124   
        self
         125  +
        /* BuilderGenerator.kt:314 */
   73    126   
    }
         127  +
    /* BuilderGenerator.kt:334 */
   74    128   
    #[allow(missing_docs)] // documentation missing in model
         129  +
                           /* BuilderGenerator.kt:336 */
   75    130   
    pub fn get_dialog_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Dialog>> {
         131  +
        /* BuilderGenerator.kt:337 */
   76    132   
        &self.dialog_list
         133  +
        /* BuilderGenerator.kt:336 */
   77    134   
    }
   78         -
    /// Adds a key-value pair to `dialog_map`.
         135  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dialog_map`.
         136  +
    /* BuilderGenerator.kt:437 */
   79    137   
    ///
   80         -
    /// To override the contents of this collection use [`set_dialog_map`](Self::set_dialog_map).
         138  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dialog_map`](Self::set_dialog_map).
         139  +
    /* BuilderGenerator.kt:439 */
   81    140   
    ///
         141  +
    /* BuilderGenerator.kt:445 */
   82    142   
    pub fn dialog_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Dialog) -> Self {
         143  +
        /* BuilderGenerator.kt:448 */
   83    144   
        let mut hash_map = self.dialog_map.unwrap_or_default();
   84    145   
        hash_map.insert(k.into(), v);
   85    146   
        self.dialog_map = ::std::option::Option::Some(hash_map);
   86    147   
        self
         148  +
        /* BuilderGenerator.kt:445 */
   87    149   
    }
         150  +
    /* BuilderGenerator.kt:312 */
   88    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:314 */
   89    153   
    pub fn set_dialog_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>) -> Self {
         154  +
        /* BuilderGenerator.kt:315 */
   90    155   
        self.dialog_map = input;
   91    156   
        self
         157  +
        /* BuilderGenerator.kt:314 */
   92    158   
    }
         159  +
    /* BuilderGenerator.kt:334 */
   93    160   
    #[allow(missing_docs)] // documentation missing in model
         161  +
                           /* BuilderGenerator.kt:336 */
   94    162   
    pub fn get_dialog_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>> {
         163  +
        /* BuilderGenerator.kt:337 */
   95    164   
        &self.dialog_map
         165  +
        /* BuilderGenerator.kt:336 */
   96    166   
    }
   97         -
    /// Consumes the builder and constructs a [`TopLevel`](crate::types::TopLevel).
   98         -
    /// This method will fail if any of the following fields are not set:
   99         -
    /// - [`dialog`](crate::types::builders::TopLevelBuilder::dialog)
         167  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TopLevel`](crate::types::TopLevel).
         168  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         169  +
    /// /* BuilderGenerator.kt:246 */- [`dialog`](crate::types::builders::TopLevelBuilder::dialog)
         170  +
    /* BuilderGenerator.kt:253 */
  100    171   
    pub fn build(self) -> ::std::result::Result<crate::types::TopLevel, ::aws_smithy_types::error::operation::BuildError> {
  101         -
        ::std::result::Result::Ok(crate::types::TopLevel {
  102         -
            dialog: self.dialog.ok_or_else(|| {
  103         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  104         -
                    "dialog",
  105         -
                    "dialog was not specified but it is required when building TopLevel",
  106         -
                )
  107         -
            })?,
  108         -
            dialog_list: self.dialog_list.unwrap_or_default(),
  109         -
            dialog_map: self.dialog_map.unwrap_or_default(),
  110         -
        })
         172  +
        /* BuilderGenerator.kt:254 */
         173  +
        ::std::result::Result::Ok(
         174  +
            /* BuilderGenerator.kt:477 */crate::types::TopLevel {
         175  +
                /* BuilderGenerator.kt:481 */dialog: self.dialog
         176  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         177  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("dialog", "dialog was not specified but it is required when building TopLevel")
         178  +
                    /* BuilderGenerator.kt:494 */)?
         179  +
                ,
         180  +
                /* BuilderGenerator.kt:481 */dialog_list: self.dialog_list
         181  +
                    /* BuilderGenerator.kt:487 */.unwrap_or_default()
         182  +
                ,
         183  +
                /* BuilderGenerator.kt:481 */dialog_map: self.dialog_map
         184  +
                    /* BuilderGenerator.kt:487 */.unwrap_or_default()
         185  +
                ,
         186  +
            /* BuilderGenerator.kt:477 */}
         187  +
        /* BuilderGenerator.kt:254 */)
         188  +
        /* BuilderGenerator.kt:253 */
  111    189   
    }
         190  +
    /* BuilderGenerator.kt:355 */
  112    191   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/_union_payload.rs

@@ -1,1 +37,67 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* UnionGenerator.kt:67 */
    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 enum UnionPayload {
           8  +
pub /* UnionGenerator.kt:85 */ enum UnionPayload {
           9  +
    /* UnionGenerator.kt:90 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* UnionGenerator.kt:190 */
    7     12   
    Greeting(::std::string::String),
    8         -
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          13  +
    /// /* UnionGenerator.kt:96 */The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          14  +
    /* UnionGenerator.kt:97 */
    9     15   
    /// An unknown enum variant
          16  +
    /* UnionGenerator.kt:98 */
   10     17   
    ///
          18  +
    /* UnionGenerator.kt:99 */
   11     19   
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          20  +
    /* UnionGenerator.kt:100 */
   12     21   
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          22  +
    /* UnionGenerator.kt:101 */
   13     23   
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          24  +
    /* UnionGenerator.kt:102 */
   14     25   
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          26  +
    /* RustType.kt:516 */
   15     27   
    #[non_exhaustive]
          28  +
    /* UnionGenerator.kt:105 */
   16     29   
    Unknown,
          30  +
    /* UnionGenerator.kt:85 */
   17     31   
}
          32  +
/* UnionGenerator.kt:111 */
   18     33   
impl UnionPayload {
          34  +
    /* RustType.kt:516 */
   19     35   
    #[allow(irrefutable_let_patterns)]
          36  +
    /* UnionGenerator.kt:217 */
   20     37   
    /// Tries to convert the enum instance into [`Greeting`](crate::types::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
          38  +
    /* UnionGenerator.kt:222 */
   21     39   
    /// Returns `Err(&Self)` if it can't be converted.
          40  +
    /* UnionGenerator.kt:223 */
   22     41   
    pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          42  +
        /* UnionGenerator.kt:227 */
   23     43   
        if let UnionPayload::Greeting(val) = &self {
   24     44   
            ::std::result::Result::Ok(val)
   25     45   
        } else {
   26     46   
            ::std::result::Result::Err(self)
   27     47   
        }
          48  +
        /* UnionGenerator.kt:223 */
   28     49   
    }
          50  +
    /* UnionGenerator.kt:121 */
   29     51   
    /// Returns true if this is a [`Greeting`](crate::types::UnionPayload::Greeting).
          52  +
    /* UnionGenerator.kt:122 */
   30     53   
    pub fn is_greeting(&self) -> bool {
          54  +
        /* UnionGenerator.kt:123 */
   31     55   
        self.as_greeting().is_ok()
          56  +
        /* UnionGenerator.kt:122 */
   32     57   
    }
          58  +
    /* UnionGenerator.kt:127 */
   33     59   
    /// Returns true if the enum instance is the `Unknown` variant.
          60  +
    /* UnionGenerator.kt:128 */
   34     61   
    pub fn is_unknown(&self) -> bool {
          62  +
        /* UnionGenerator.kt:129 */
   35     63   
        matches!(self, Self::Unknown)
          64  +
        /* UnionGenerator.kt:128 */
   36     65   
    }
          66  +
    /* UnionGenerator.kt:111 */
   37     67   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/_union_with_json_name.rs

@@ -1,1 +66,117 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* UnionGenerator.kt:67 */
    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 enum UnionWithJsonName {
           8  +
pub /* UnionGenerator.kt:85 */ enum UnionWithJsonName {
           9  +
    /* UnionGenerator.kt:90 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* UnionGenerator.kt:190 */
    7     12   
    Bar(::std::string::String),
          13  +
    /* UnionGenerator.kt:90 */
    8     14   
    #[allow(missing_docs)] // documentation missing in model
          15  +
    /* UnionGenerator.kt:190 */
    9     16   
    Baz(::std::string::String),
          17  +
    /* UnionGenerator.kt:90 */
   10     18   
    #[allow(missing_docs)] // documentation missing in model
          19  +
    /* UnionGenerator.kt:190 */
   11     20   
    Foo(::std::string::String),
   12         -
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          21  +
    /// /* UnionGenerator.kt:96 */The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          22  +
    /* UnionGenerator.kt:97 */
   13     23   
    /// An unknown enum variant
          24  +
    /* UnionGenerator.kt:98 */
   14     25   
    ///
          26  +
    /* UnionGenerator.kt:99 */
   15     27   
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          28  +
    /* UnionGenerator.kt:100 */
   16     29   
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          30  +
    /* UnionGenerator.kt:101 */
   17     31   
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          32  +
    /* UnionGenerator.kt:102 */
   18     33   
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          34  +
    /* RustType.kt:516 */
   19     35   
    #[non_exhaustive]
          36  +
    /* UnionGenerator.kt:105 */
   20     37   
    Unknown,
          38  +
    /* UnionGenerator.kt:85 */
   21     39   
}
          40  +
/* UnionGenerator.kt:111 */
   22     41   
impl UnionWithJsonName {
          42  +
    /* UnionGenerator.kt:217 */
   23     43   
    /// Tries to convert the enum instance into [`Bar`](crate::types::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
          44  +
    /* UnionGenerator.kt:222 */
   24     45   
    /// Returns `Err(&Self)` if it can't be converted.
          46  +
    /* UnionGenerator.kt:223 */
   25     47   
    pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          48  +
        /* UnionGenerator.kt:227 */
   26     49   
        if let UnionWithJsonName::Bar(val) = &self {
   27     50   
            ::std::result::Result::Ok(val)
   28     51   
        } else {
   29     52   
            ::std::result::Result::Err(self)
   30     53   
        }
          54  +
        /* UnionGenerator.kt:223 */
   31     55   
    }
          56  +
    /* UnionGenerator.kt:121 */
   32     57   
    /// Returns true if this is a [`Bar`](crate::types::UnionWithJsonName::Bar).
          58  +
    /* UnionGenerator.kt:122 */
   33     59   
    pub fn is_bar(&self) -> bool {
          60  +
        /* UnionGenerator.kt:123 */
   34     61   
        self.as_bar().is_ok()
          62  +
        /* UnionGenerator.kt:122 */
   35     63   
    }
          64  +
    /* UnionGenerator.kt:217 */
   36     65   
    /// Tries to convert the enum instance into [`Baz`](crate::types::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
          66  +
    /* UnionGenerator.kt:222 */
   37     67   
    /// Returns `Err(&Self)` if it can't be converted.
          68  +
    /* UnionGenerator.kt:223 */
   38     69   
    pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          70  +
        /* UnionGenerator.kt:227 */
   39     71   
        if let UnionWithJsonName::Baz(val) = &self {
   40     72   
            ::std::result::Result::Ok(val)
   41     73   
        } else {
   42     74   
            ::std::result::Result::Err(self)
   43     75   
        }
          76  +
        /* UnionGenerator.kt:223 */
   44     77   
    }
          78  +
    /* UnionGenerator.kt:121 */
   45     79   
    /// Returns true if this is a [`Baz`](crate::types::UnionWithJsonName::Baz).
          80  +
    /* UnionGenerator.kt:122 */
   46     81   
    pub fn is_baz(&self) -> bool {
          82  +
        /* UnionGenerator.kt:123 */
   47     83   
        self.as_baz().is_ok()
          84  +
        /* UnionGenerator.kt:122 */
   48     85   
    }
          86  +
    /* UnionGenerator.kt:217 */
   49     87   
    /// Tries to convert the enum instance into [`Foo`](crate::types::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
          88  +
    /* UnionGenerator.kt:222 */
   50     89   
    /// Returns `Err(&Self)` if it can't be converted.
          90  +
    /* UnionGenerator.kt:223 */
   51     91   
    pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          92  +
        /* UnionGenerator.kt:227 */
   52     93   
        if let UnionWithJsonName::Foo(val) = &self {
   53     94   
            ::std::result::Result::Ok(val)
   54     95   
        } else {
   55     96   
            ::std::result::Result::Err(self)
   56     97   
        }
          98  +
        /* UnionGenerator.kt:223 */
   57     99   
    }
         100  +
    /* UnionGenerator.kt:121 */
   58    101   
    /// Returns true if this is a [`Foo`](crate::types::UnionWithJsonName::Foo).
         102  +
    /* UnionGenerator.kt:122 */
   59    103   
    pub fn is_foo(&self) -> bool {
         104  +
        /* UnionGenerator.kt:123 */
   60    105   
        self.as_foo().is_ok()
         106  +
        /* UnionGenerator.kt:122 */
   61    107   
    }
         108  +
    /* UnionGenerator.kt:127 */
   62    109   
    /// Returns true if the enum instance is the `Unknown` variant.
         110  +
    /* UnionGenerator.kt:128 */
   63    111   
    pub fn is_unknown(&self) -> bool {
         112  +
        /* UnionGenerator.kt:129 */
   64    113   
        matches!(self, Self::Unknown)
         114  +
        /* UnionGenerator.kt:128 */
   65    115   
    }
         116  +
    /* UnionGenerator.kt:111 */
   66    117   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/_unit.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 Unit {}
           8  +
pub /* StructureGenerator.kt:201 */ struct Unit {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl Unit {
    7         -
    /// Creates a new builder-style object to manufacture [`Unit`](crate::types::Unit).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`Unit`](crate::types::Unit).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::types::builders::UnitBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::types::builders::UnitBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`Unit`](crate::types::Unit).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`Unit`](crate::types::Unit).
          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 UnitBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct UnitBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl UnitBuilder {
   18         -
    /// Consumes the builder and constructs a [`Unit`](crate::types::Unit).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`Unit`](crate::types::Unit).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::types::Unit {
   20         -
        crate::types::Unit {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::types::Unit {
          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/types/builders.rs

@@ -1,1 +30,45 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::_dialog::DialogBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_farewell::FarewellBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_top_level::TopLevelBuilder;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_client_optional_defaults::ClientOptionalDefaultsBuilder;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_defaults::DefaultsBuilder;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_payload_config::PayloadConfigBuilder;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::_test_config::TestConfigBuilder;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::_unit::UnitBuilder;
   17     25   
          26  +
/* CodegenDelegator.kt:255 */
   18     27   
pub use crate::types::_renamed_greeting::RenamedGreetingBuilder;
   19     28   
          29  +
/* CodegenDelegator.kt:255 */
   20     30   
pub use crate::types::_greeting_struct::GreetingStructBuilder;
   21     31   
          32  +
/* CodegenDelegator.kt:255 */
   22     33   
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
   23     34   
          35  +
/* CodegenDelegator.kt:255 */
   24     36   
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1Builder;
   25     37   
          38  +
/* CodegenDelegator.kt:255 */
   26     39   
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2Builder;
   27     40   
          41  +
/* CodegenDelegator.kt:255 */
   28     42   
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
   29     43   
          44  +
/* CodegenDelegator.kt:255 */
   30     45   
pub use crate::types::_nested_payload::NestedPayloadBuilder;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/error.rs

@@ -1,1 +15,21 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::error::_foo_error::FooError;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_complex_error::ComplexError;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::error::_invalid_greeting::InvalidGreeting;
    7     10   
          11  +
/* RustModule.kt:172 */
    8     12   
mod _complex_error;
    9     13   
          14  +
/* RustModule.kt:172 */
   10     15   
mod _foo_error;
   11     16   
          17  +
/* RustModule.kt:172 */
   12     18   
mod _invalid_greeting;
   13     19   
   14         -
/// Builders
          20  +
/// /* CodegenDelegator.kt:51 */Builders
   15     21   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/error/_complex_error.rs

@@ -1,1 +149,260 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This error is thrown when a request is invalid.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct ComplexError {
           8  +
pub /* StructureGenerator.kt:201 */ struct ComplexError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub header: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    9     13   
    #[allow(missing_docs)] // documentation missing in model
   10     14   
    pub top_level: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   11     16   
    #[allow(missing_docs)] // documentation missing in model
   12     17   
    pub nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
          18  +
    /* StructureGenerator.kt:231 */
   13     19   
    #[allow(missing_docs)] // documentation missing in model
   14     20   
    pub message: ::std::option::Option<::std::string::String>,
   15         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          21  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          22  +
    /* StructureGenerator.kt:201 */
   16     23   
}
          24  +
/* StructureGenerator.kt:135 */
   17     25   
impl ComplexError {
          26  +
    /* StructureGenerator.kt:231 */
   18     27   
    #[allow(missing_docs)] // documentation missing in model
          28  +
                           /* StructureGenerator.kt:166 */
   19     29   
    pub fn header(&self) -> ::std::option::Option<&str> {
          30  +
        /* StructureGenerator.kt:169 */
   20     31   
        self.header.as_deref()
          32  +
        /* StructureGenerator.kt:166 */
   21     33   
    }
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn top_level(&self) -> ::std::option::Option<&str> {
          38  +
        /* StructureGenerator.kt:169 */
   24     39   
        self.top_level.as_deref()
          40  +
        /* StructureGenerator.kt:166 */
   25     41   
    }
          42  +
    /* StructureGenerator.kt:231 */
   26     43   
    #[allow(missing_docs)] // documentation missing in model
          44  +
                           /* StructureGenerator.kt:166 */
   27     45   
    pub fn nested(&self) -> ::std::option::Option<&crate::types::ComplexNestedErrorData> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.nested.as_ref()
          48  +
        /* StructureGenerator.kt:166 */
   29     49   
    }
          50  +
    /* StructureGenerator.kt:135 */
   30     51   
}
          52  +
/* ErrorImplGenerator.kt:99 */
   31     53   
impl ComplexError {
          54  +
    /* ErrorImplGenerator.kt:128 */
   32     55   
    /// Returns the error message.
   33     56   
    pub fn message(&self) -> ::std::option::Option<&str> {
   34     57   
        self.message.as_deref()
   35     58   
    }
          59  +
    /* ErrorImplGenerator.kt:99 */
   36     60   
}
          61  +
/* ErrorImplGenerator.kt:153 */
   37     62   
impl ::std::fmt::Display for ComplexError {
          63  +
    /* ErrorImplGenerator.kt:154 */
   38     64   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          65  +
        /* ErrorImplGenerator.kt:161 */
   39     66   
        ::std::write!(f, "ComplexError")?;
          67  +
        /* ErrorImplGenerator.kt:166 */
   40     68   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          69  +
            /* ErrorImplGenerator.kt:166 */
   41     70   
            {
          71  +
                /* ErrorImplGenerator.kt:167 */
   42     72   
                ::std::write!(f, ": {}", inner_1)?;
          73  +
                /* ErrorImplGenerator.kt:166 */
   43     74   
            }
          75  +
            /* ErrorImplGenerator.kt:166 */
   44     76   
        }
          77  +
        /* ErrorImplGenerator.kt:171 */
   45     78   
        Ok(())
          79  +
        /* ErrorImplGenerator.kt:154 */
   46     80   
    }
          81  +
    /* ErrorImplGenerator.kt:153 */
   47     82   
}
          83  +
/* ErrorImplGenerator.kt:175 */
   48     84   
impl ::std::error::Error for ComplexError {}
          85  +
/* ErrorGenerator.kt:77 */
   49     86   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ComplexError {
          87  +
    /* ErrorGenerator.kt:78 */
   50     88   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   51     89   
        &self.meta
   52     90   
    }
          91  +
    /* ErrorGenerator.kt:77 */
   53     92   
}
          93  +
/* ErrorGenerator.kt:81 */
   54     94   
impl ComplexError {
   55         -
    /// Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
          95  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
          96  +
    /* BuilderGenerator.kt:175 */
   56     97   
    pub fn builder() -> crate::types::error::builders::ComplexErrorBuilder {
          98  +
        /* BuilderGenerator.kt:176 */
   57     99   
        crate::types::error::builders::ComplexErrorBuilder::default()
         100  +
        /* BuilderGenerator.kt:175 */
   58    101   
    }
         102  +
    /* ErrorGenerator.kt:81 */
   59    103   
}
   60    104   
   61         -
/// A builder for [`ComplexError`](crate::types::error::ComplexError).
         105  +
/// /* BuilderGenerator.kt:342 */A builder for [`ComplexError`](crate::types::error::ComplexError).
         106  +
/* RustType.kt:516 */
   62    107   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         108  +
/* RustType.kt:516 */
   63    109   
#[non_exhaustive]
         110  +
/* BuilderGenerator.kt:345 */
   64    111   
pub struct ComplexErrorBuilder {
   65         -
    pub(crate) header: ::std::option::Option<::std::string::String>,
   66         -
    pub(crate) top_level: ::std::option::Option<::std::string::String>,
   67         -
    pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
   68         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   69         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) header: ::std::option::Option<::std::string::String>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) top_level: ::std::option::Option<::std::string::String>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
         116  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         117  +
    /* BuilderGenerator.kt:345 */
   70    118   
}
         119  +
/* BuilderGenerator.kt:355 */
   71    120   
impl ComplexErrorBuilder {
         121  +
    /* BuilderGenerator.kt:286 */
   72    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* BuilderGenerator.kt:291 */
   73    124   
    pub fn header(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         125  +
        /* BuilderGenerator.kt:292 */
   74    126   
        self.header = ::std::option::Option::Some(input.into());
         127  +
        /* BuilderGenerator.kt:293 */
   75    128   
        self
         129  +
        /* BuilderGenerator.kt:291 */
   76    130   
    }
         131  +
    /* BuilderGenerator.kt:312 */
   77    132   
    #[allow(missing_docs)] // documentation missing in model
         133  +
                           /* BuilderGenerator.kt:314 */
   78    134   
    pub fn set_header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         135  +
        /* BuilderGenerator.kt:315 */
   79    136   
        self.header = input;
   80    137   
        self
         138  +
        /* BuilderGenerator.kt:314 */
   81    139   
    }
         140  +
    /* BuilderGenerator.kt:334 */
   82    141   
    #[allow(missing_docs)] // documentation missing in model
         142  +
                           /* BuilderGenerator.kt:336 */
   83    143   
    pub fn get_header(&self) -> &::std::option::Option<::std::string::String> {
         144  +
        /* BuilderGenerator.kt:337 */
   84    145   
        &self.header
         146  +
        /* BuilderGenerator.kt:336 */
   85    147   
    }
         148  +
    /* BuilderGenerator.kt:286 */
   86    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* BuilderGenerator.kt:291 */
   87    151   
    pub fn top_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         152  +
        /* BuilderGenerator.kt:292 */
   88    153   
        self.top_level = ::std::option::Option::Some(input.into());
         154  +
        /* BuilderGenerator.kt:293 */
   89    155   
        self
         156  +
        /* BuilderGenerator.kt:291 */
   90    157   
    }
         158  +
    /* BuilderGenerator.kt:312 */
   91    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:314 */
   92    161   
    pub fn set_top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         162  +
        /* BuilderGenerator.kt:315 */
   93    163   
        self.top_level = input;
   94    164   
        self
         165  +
        /* BuilderGenerator.kt:314 */
   95    166   
    }
         167  +
    /* BuilderGenerator.kt:334 */
   96    168   
    #[allow(missing_docs)] // documentation missing in model
         169  +
                           /* BuilderGenerator.kt:336 */
   97    170   
    pub fn get_top_level(&self) -> &::std::option::Option<::std::string::String> {
         171  +
        /* BuilderGenerator.kt:337 */
   98    172   
        &self.top_level
         173  +
        /* BuilderGenerator.kt:336 */
   99    174   
    }
         175  +
    /* BuilderGenerator.kt:286 */
  100    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* BuilderGenerator.kt:291 */
  101    178   
    pub fn nested(mut self, input: crate::types::ComplexNestedErrorData) -> Self {
         179  +
        /* BuilderGenerator.kt:292 */
  102    180   
        self.nested = ::std::option::Option::Some(input);
         181  +
        /* BuilderGenerator.kt:293 */
  103    182   
        self
         183  +
        /* BuilderGenerator.kt:291 */
  104    184   
    }
         185  +
    /* BuilderGenerator.kt:312 */
  105    186   
    #[allow(missing_docs)] // documentation missing in model
         187  +
                           /* BuilderGenerator.kt:314 */
  106    188   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::ComplexNestedErrorData>) -> Self {
         189  +
        /* BuilderGenerator.kt:315 */
  107    190   
        self.nested = input;
  108    191   
        self
         192  +
        /* BuilderGenerator.kt:314 */
  109    193   
    }
         194  +
    /* BuilderGenerator.kt:334 */
  110    195   
    #[allow(missing_docs)] // documentation missing in model
         196  +
                           /* BuilderGenerator.kt:336 */
  111    197   
    pub fn get_nested(&self) -> &::std::option::Option<crate::types::ComplexNestedErrorData> {
         198  +
        /* BuilderGenerator.kt:337 */
  112    199   
        &self.nested
         200  +
        /* BuilderGenerator.kt:336 */
  113    201   
    }
         202  +
    /* BuilderGenerator.kt:286 */
  114    203   
    #[allow(missing_docs)] // documentation missing in model
         204  +
                           /* BuilderGenerator.kt:291 */
  115    205   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         206  +
        /* BuilderGenerator.kt:292 */
  116    207   
        self.message = ::std::option::Option::Some(input.into());
         208  +
        /* BuilderGenerator.kt:293 */
  117    209   
        self
         210  +
        /* BuilderGenerator.kt:291 */
  118    211   
    }
         212  +
    /* BuilderGenerator.kt:312 */
  119    213   
    #[allow(missing_docs)] // documentation missing in model
         214  +
                           /* BuilderGenerator.kt:314 */
  120    215   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         216  +
        /* BuilderGenerator.kt:315 */
  121    217   
        self.message = input;
  122    218   
        self
         219  +
        /* BuilderGenerator.kt:314 */
  123    220   
    }
         221  +
    /* BuilderGenerator.kt:334 */
  124    222   
    #[allow(missing_docs)] // documentation missing in model
         223  +
                           /* BuilderGenerator.kt:336 */
  125    224   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         225  +
        /* BuilderGenerator.kt:337 */
  126    226   
        &self.message
         227  +
        /* BuilderGenerator.kt:336 */
  127    228   
    }
         229  +
    /* ErrorGenerator.kt:101 */
  128    230   
    /// Sets error metadata
  129    231   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  130    232   
        self.meta = Some(meta);
  131    233   
        self
  132    234   
    }
  133    235   
  134    236   
    /// Sets error metadata
  135    237   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
  136    238   
        self.meta = meta;
  137    239   
        self
  138    240   
    }
  139         -
    /// Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
         241  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
         242  +
    /* BuilderGenerator.kt:253 */
  140    243   
    pub fn build(self) -> crate::types::error::ComplexError {
         244  +
        /* BuilderGenerator.kt:477 */
  141    245   
        crate::types::error::ComplexError {
  142         -
            header: self.header,
         246  +
            /* BuilderGenerator.kt:481 */ header: self.header,
         247  +
            /* BuilderGenerator.kt:481 */
  143    248   
            top_level: self.top_level,
         249  +
            /* BuilderGenerator.kt:481 */
  144    250   
            nested: self.nested,
         251  +
            /* BuilderGenerator.kt:481 */
  145    252   
            message: self.message,
         253  +
            /* ErrorGenerator.kt:120 */
  146    254   
            meta: self.meta.unwrap_or_default(),
         255  +
            /* BuilderGenerator.kt:477 */
  147    256   
        }
         257  +
        /* BuilderGenerator.kt:253 */
  148    258   
    }
         259  +
    /* BuilderGenerator.kt:355 */
  149    260   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/error/_foo_error.rs

@@ -1,1 +81,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct FooError {
           8  +
pub /* StructureGenerator.kt:201 */ struct FooError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* ErrorImplGenerator.kt:99 */
   11     16   
impl FooError {
          17  +
    /* ErrorImplGenerator.kt:128 */
   12     18   
    /// Returns the error message.
   13     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
   14     20   
        self.message.as_deref()
   15     21   
    }
          22  +
    /* ErrorImplGenerator.kt:99 */
   16     23   
}
          24  +
/* ErrorImplGenerator.kt:153 */
   17     25   
impl ::std::fmt::Display for FooError {
          26  +
    /* ErrorImplGenerator.kt:154 */
   18     27   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          28  +
        /* ErrorImplGenerator.kt:161 */
   19     29   
        ::std::write!(f, "FooError")?;
          30  +
        /* ErrorImplGenerator.kt:166 */
   20     31   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          32  +
            /* ErrorImplGenerator.kt:166 */
   21     33   
            {
          34  +
                /* ErrorImplGenerator.kt:167 */
   22     35   
                ::std::write!(f, ": {}", inner_1)?;
          36  +
                /* ErrorImplGenerator.kt:166 */
   23     37   
            }
          38  +
            /* ErrorImplGenerator.kt:166 */
   24     39   
        }
          40  +
        /* ErrorImplGenerator.kt:171 */
   25     41   
        Ok(())
          42  +
        /* ErrorImplGenerator.kt:154 */
   26     43   
    }
          44  +
    /* ErrorImplGenerator.kt:153 */
   27     45   
}
          46  +
/* ErrorImplGenerator.kt:175 */
   28     47   
impl ::std::error::Error for FooError {}
          48  +
/* ErrorGenerator.kt:77 */
   29     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for FooError {
          50  +
    /* ErrorGenerator.kt:78 */
   30     51   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   31     52   
        &self.meta
   32     53   
    }
          54  +
    /* ErrorGenerator.kt:77 */
   33     55   
}
          56  +
/* ErrorGenerator.kt:81 */
   34     57   
impl FooError {
   35         -
    /// Creates a new builder-style object to manufacture [`FooError`](crate::types::error::FooError).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`FooError`](crate::types::error::FooError).
          59  +
    /* BuilderGenerator.kt:175 */
   36     60   
    pub fn builder() -> crate::types::error::builders::FooErrorBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   37     62   
        crate::types::error::builders::FooErrorBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   38     64   
    }
          65  +
    /* ErrorGenerator.kt:81 */
   39     66   
}
   40     67   
   41         -
/// A builder for [`FooError`](crate::types::error::FooError).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`FooError`](crate::types::error::FooError).
          69  +
/* RustType.kt:516 */
   42     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   43     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   44     74   
pub struct FooErrorBuilder {
   45         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   46         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          76  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          77  +
    /* BuilderGenerator.kt:345 */
   47     78   
}
          79  +
/* BuilderGenerator.kt:355 */
   48     80   
impl FooErrorBuilder {
          81  +
    /* BuilderGenerator.kt:286 */
   49     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:291 */
   50     84   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   51     86   
        self.message = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   52     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   53     90   
    }
          91  +
    /* BuilderGenerator.kt:312 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* BuilderGenerator.kt:314 */
   55     94   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:315 */
   56     96   
        self.message = input;
   57     97   
        self
          98  +
        /* BuilderGenerator.kt:314 */
   58     99   
    }
         100  +
    /* BuilderGenerator.kt:334 */
   59    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:336 */
   60    103   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         104  +
        /* BuilderGenerator.kt:337 */
   61    105   
        &self.message
         106  +
        /* BuilderGenerator.kt:336 */
   62    107   
    }
         108  +
    /* ErrorGenerator.kt:101 */
   63    109   
    /// Sets error metadata
   64    110   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   65    111   
        self.meta = Some(meta);
   66    112   
        self
   67    113   
    }
   68    114   
   69    115   
    /// Sets error metadata
   70    116   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   71    117   
        self.meta = meta;
   72    118   
        self
   73    119   
    }
   74         -
    /// Consumes the builder and constructs a [`FooError`](crate::types::error::FooError).
         120  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`FooError`](crate::types::error::FooError).
         121  +
    /* BuilderGenerator.kt:253 */
   75    122   
    pub fn build(self) -> crate::types::error::FooError {
         123  +
        /* BuilderGenerator.kt:477 */
   76    124   
        crate::types::error::FooError {
   77         -
            message: self.message,
         125  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         126  +
            /* ErrorGenerator.kt:120 */
   78    127   
            meta: self.meta.unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   79    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   80    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   81    133   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/error/_invalid_greeting.rs

@@ -1,1 +81,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This error is thrown when an invalid greeting value is provided.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */This error is thrown when an invalid greeting value is provided.
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct InvalidGreeting {
           8  +
pub /* StructureGenerator.kt:201 */ struct InvalidGreeting {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* ErrorImplGenerator.kt:99 */
   11     16   
impl InvalidGreeting {
          17  +
    /* ErrorImplGenerator.kt:128 */
   12     18   
    /// Returns the error message.
   13     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
   14     20   
        self.message.as_deref()
   15     21   
    }
          22  +
    /* ErrorImplGenerator.kt:99 */
   16     23   
}
          24  +
/* ErrorImplGenerator.kt:153 */
   17     25   
impl ::std::fmt::Display for InvalidGreeting {
          26  +
    /* ErrorImplGenerator.kt:154 */
   18     27   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          28  +
        /* ErrorImplGenerator.kt:161 */
   19     29   
        ::std::write!(f, "InvalidGreeting")?;
          30  +
        /* ErrorImplGenerator.kt:166 */
   20     31   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          32  +
            /* ErrorImplGenerator.kt:166 */
   21     33   
            {
          34  +
                /* ErrorImplGenerator.kt:167 */
   22     35   
                ::std::write!(f, ": {}", inner_1)?;
          36  +
                /* ErrorImplGenerator.kt:166 */
   23     37   
            }
          38  +
            /* ErrorImplGenerator.kt:166 */
   24     39   
        }
          40  +
        /* ErrorImplGenerator.kt:171 */
   25     41   
        Ok(())
          42  +
        /* ErrorImplGenerator.kt:154 */
   26     43   
    }
          44  +
    /* ErrorImplGenerator.kt:153 */
   27     45   
}
          46  +
/* ErrorImplGenerator.kt:175 */
   28     47   
impl ::std::error::Error for InvalidGreeting {}
          48  +
/* ErrorGenerator.kt:77 */
   29     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvalidGreeting {
          50  +
    /* ErrorGenerator.kt:78 */
   30     51   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   31     52   
        &self.meta
   32     53   
    }
          54  +
    /* ErrorGenerator.kt:77 */
   33     55   
}
          56  +
/* ErrorGenerator.kt:81 */
   34     57   
impl InvalidGreeting {
   35         -
    /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          59  +
    /* BuilderGenerator.kt:175 */
   36     60   
    pub fn builder() -> crate::types::error::builders::InvalidGreetingBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   37     62   
        crate::types::error::builders::InvalidGreetingBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   38     64   
    }
          65  +
    /* ErrorGenerator.kt:81 */
   39     66   
}
   40     67   
   41         -
/// A builder for [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          69  +
/* RustType.kt:516 */
   42     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   43     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   44     74   
pub struct InvalidGreetingBuilder {
   45         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   46         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          76  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          77  +
    /* BuilderGenerator.kt:345 */
   47     78   
}
          79  +
/* BuilderGenerator.kt:355 */
   48     80   
impl InvalidGreetingBuilder {
          81  +
    /* BuilderGenerator.kt:286 */
   49     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:291 */
   50     84   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   51     86   
        self.message = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   52     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   53     90   
    }
          91  +
    /* BuilderGenerator.kt:312 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* BuilderGenerator.kt:314 */
   55     94   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:315 */
   56     96   
        self.message = input;
   57     97   
        self
          98  +
        /* BuilderGenerator.kt:314 */
   58     99   
    }
         100  +
    /* BuilderGenerator.kt:334 */
   59    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:336 */
   60    103   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         104  +
        /* BuilderGenerator.kt:337 */
   61    105   
        &self.message
         106  +
        /* BuilderGenerator.kt:336 */
   62    107   
    }
         108  +
    /* ErrorGenerator.kt:101 */
   63    109   
    /// Sets error metadata
   64    110   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   65    111   
        self.meta = Some(meta);
   66    112   
        self
   67    113   
    }
   68    114   
   69    115   
    /// Sets error metadata
   70    116   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   71    117   
        self.meta = meta;
   72    118   
        self
   73    119   
    }
   74         -
    /// Consumes the builder and constructs a [`InvalidGreeting`](crate::types::error::InvalidGreeting).
         120  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`InvalidGreeting`](crate::types::error::InvalidGreeting).
         121  +
    /* BuilderGenerator.kt:253 */
   75    122   
    pub fn build(self) -> crate::types::error::InvalidGreeting {
         123  +
        /* BuilderGenerator.kt:477 */
   76    124   
        crate::types::error::InvalidGreeting {
   77         -
            message: self.message,
         125  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         126  +
            /* ErrorGenerator.kt:120 */
   78    127   
            meta: self.meta.unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   79    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   80    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   81    133   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/error/builders.rs

@@ -1,1 +6,9 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::error::_foo_error::FooErrorBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_complex_error::ComplexErrorBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::error::_invalid_greeting::InvalidGreetingBuilder;

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:105 */
    2      3   
#[derive(Debug)]
    3      4   
pub(crate) struct Handle {
    4      5   
    pub(crate) conf: crate::Config,
    5      6   
    #[allow(dead_code)] // unused when a service does not provide any operations
    6      7   
    pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
    7      8   
}
    8      9   
    9     10   
///
   10     11   
/// An ergonomic client for the service.
   11     12   
///
@@ -77,78 +154,166 @@
   97     98   
    fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
   98     99   
        let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
   99    100   
        handle
  100    101   
            .runtime_plugins
  101    102   
            .apply_client_configuration(&mut cfg)?
  102    103   
            .validate_base_client_config(&cfg)?;
  103    104   
        Ok(())
  104    105   
    }
  105    106   
}
  106    107   
         108  +
/* RustModule.kt:172 */
  107    109   
mod case_insensitive_error_operation;
  108    110   
  109         -
/// Operation customization and supporting types.
         111  +
/// /* ClientRustModule.kt:161 */Operation customization and supporting types.
  110    112   
///
  111         -
/// The underlying HTTP requests made during an operation can be customized
         113  +
/// /* ClientRustModule.kt:170 */The underlying HTTP requests made during an operation can be customized
  112    114   
/// by calling the `customize()` method on the builder returned from a client
  113    115   
/// operation call. For example, this can be used to add an additional HTTP header:
  114    116   
///
  115    117   
/// ```ignore
  116    118   
/// # async fn wrapper() -> ::std::result::Result<(), rest_json_extras::Error> {
  117    119   
/// # let client: rest_json_extras::Client = unimplemented!();
  118    120   
/// use ::http::header::{HeaderName, HeaderValue};
  119    121   
///
  120    122   
/// let result = client.case_insensitive_error_operation()
  121    123   
///     .customize()
  122    124   
///     .mutate_request(|req| {
  123    125   
///         // Add `x-example-header` with value
  124    126   
///         req.headers_mut()
  125    127   
///             .insert(
  126    128   
///                 HeaderName::from_static("x-example-header"),
  127    129   
///                 HeaderValue::from_static("1"),
  128    130   
///             );
  129    131   
///     })
  130    132   
///     .send()
  131    133   
///     .await;
  132    134   
/// # }
  133    135   
/// ```
  134    136   
pub mod customize;
  135    137   
         138  +
/* RustModule.kt:172 */
  136    139   
mod empty_struct_with_content_on_wire_op;
  137    140   
         141  +
/* RustModule.kt:172 */
  138    142   
mod enum_query;
  139    143   
         144  +
/* RustModule.kt:172 */
  140    145   
mod escaped_string_values;
  141    146   
         147  +
/* RustModule.kt:172 */
  142    148   
mod map_with_enum_key_op;
  143    149   
         150  +
/* RustModule.kt:172 */
  144    151   
mod null_in_non_sparse;
  145    152   
         153  +
/* RustModule.kt:172 */
  146    154   
mod primitive_int_header;
  147    155   
         156  +
/* RustModule.kt:172 */
  148    157   
mod primitive_int_op;
  149    158   
         159  +
/* RustModule.kt:172 */
  150    160   
mod query_precedence;
  151    161   
         162  +
/* RustModule.kt:172 */
  152    163   
mod status_response;
  153    164   
         165  +
/* RustModule.kt:172 */
  154    166   
mod string_payload;

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client/case_insensitive_error_operation.rs

@@ -1,1 +13,17 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:187 */
    2      3   
impl super::Client {
           4  +
    /* FluentClientGenerator.kt:221 */
    3      5   
    /// Constructs a fluent builder for the [`CaseInsensitiveErrorOperation`](crate::operation::case_insensitive_error_operation::builders::CaseInsensitiveErrorOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder takes no input, just [`send`](crate::operation::case_insensitive_error_operation::builders::CaseInsensitiveErrorOperationFluentBuilder::send) it.
    6      8   
    /// - On success, responds with [`CaseInsensitiveErrorOperationOutput`](crate::operation::case_insensitive_error_operation::CaseInsensitiveErrorOperationOutput)
    7      9   
    /// - On failure, responds with [`SdkError<CaseInsensitiveErrorOperationError>`](crate::operation::case_insensitive_error_operation::CaseInsensitiveErrorOperationError)
          10  +
    /* FluentClientGenerator.kt:234 */
    8     11   
    pub fn case_insensitive_error_operation(
    9     12   
        &self,
   10     13   
    ) -> crate::operation::case_insensitive_error_operation::builders::CaseInsensitiveErrorOperationFluentBuilder {
   11     14   
        crate::operation::case_insensitive_error_operation::builders::CaseInsensitiveErrorOperationFluentBuilder::new(self.handle.clone())
   12     15   
    }
          16  +
    /* FluentClientGenerator.kt:187 */
   13     17   
}

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client/customize.rs

@@ -1,1 +32,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* CustomizableOperationGenerator.kt:72 */
    3      4   
/// `CustomizableOperation` allows for configuring a single operation invocation before it is sent.
    4      5   
pub struct CustomizableOperation<T, E, B> {
    5      6   
    customizable_send: B,
    6      7   
    config_override: ::std::option::Option<crate::config::Builder>,
    7      8   
    interceptors: Vec<::aws_smithy_runtime_api::client::interceptors::SharedInterceptor>,
    8      9   
    runtime_plugins: Vec<::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin>,
    9     10   
    _output: ::std::marker::PhantomData<T>,
   10     11   
    _error: ::std::marker::PhantomData<E>,
   11     12   
}
   12     13   

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client/customize/internal.rs

@@ -1,1 +12,13 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CustomizableOperationGenerator.kt:204 */
    2      3   
pub type BoxFuture<T> = ::std::pin::Pin<::std::boxed::Box<dyn ::std::future::Future<Output = T> + ::std::marker::Send>>;
    3      4   
    4      5   
pub type SendResult<T, E> =
    5      6   
    ::std::result::Result<T, ::aws_smithy_runtime_api::client::result::SdkError<E, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>>;
    6      7   
    7      8   
pub trait CustomizableSend<T, E>: ::std::marker::Send + ::std::marker::Sync {
    8      9   
    // Takes an owned `self` as the implementation will internally call methods that take `self`.
    9     10   
    // If it took `&self`, that would make this trait object safe, but some implementing types do not
   10     11   
    // derive `Clone`, unable to yield `self` from `&self`.
   11     12   
    fn send(self, config_override: crate::config::Builder) -> BoxFuture<SendResult<T, E>>;

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client/empty_struct_with_content_on_wire_op.rs

@@ -1,1 +14,18 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:187 */
    2      3   
impl super::Client {
           4  +
    /* FluentClientGenerator.kt:221 */
    3      5   
    /// Constructs a fluent builder for the [`EmptyStructWithContentOnWireOp`](crate::operation::empty_struct_with_content_on_wire_op::builders::EmptyStructWithContentOnWireOpFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder takes no input, just [`send`](crate::operation::empty_struct_with_content_on_wire_op::builders::EmptyStructWithContentOnWireOpFluentBuilder::send) it.
    6      8   
    /// - On success, responds with [`EmptyStructWithContentOnWireOpOutput`](crate::operation::empty_struct_with_content_on_wire_op::EmptyStructWithContentOnWireOpOutput) with field(s):
    7      9   
    ///   - [`empty(Option<EmptyStruct>)`](crate::operation::empty_struct_with_content_on_wire_op::EmptyStructWithContentOnWireOpOutput::empty): (undocumented)
    8     10   
    /// - On failure, responds with [`SdkError<EmptyStructWithContentOnWireOpError>`](crate::operation::empty_struct_with_content_on_wire_op::EmptyStructWithContentOnWireOpError)
          11  +
    /* FluentClientGenerator.kt:234 */
    9     12   
    pub fn empty_struct_with_content_on_wire_op(
   10     13   
        &self,
   11     14   
    ) -> crate::operation::empty_struct_with_content_on_wire_op::builders::EmptyStructWithContentOnWireOpFluentBuilder {
   12     15   
        crate::operation::empty_struct_with_content_on_wire_op::builders::EmptyStructWithContentOnWireOpFluentBuilder::new(self.handle.clone())
   13     16   
    }
          17  +
    /* FluentClientGenerator.kt:187 */
   14     18   
}

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client/enum_query.rs

@@ -1,1 +12,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:187 */
    2      3   
impl super::Client {
           4  +
    /* FluentClientGenerator.kt:221 */
    3      5   
    /// Constructs a fluent builder for the [`EnumQuery`](crate::operation::enum_query::builders::EnumQueryFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder is configurable:
    6      8   
    ///   - [`r#enum(StringEnum)`](crate::operation::enum_query::builders::EnumQueryFluentBuilder::enum) / [`set_enum(Option<StringEnum>)`](crate::operation::enum_query::builders::EnumQueryFluentBuilder::set_enum):<br>required: **true**<br>(undocumented)<br>
    7      9   
    /// - On success, responds with [`EnumQueryOutput`](crate::operation::enum_query::EnumQueryOutput)
    8     10   
    /// - On failure, responds with [`SdkError<EnumQueryError>`](crate::operation::enum_query::EnumQueryError)
          11  +
    /* FluentClientGenerator.kt:234 */
    9     12   
    pub fn enum_query(&self) -> crate::operation::enum_query::builders::EnumQueryFluentBuilder {
   10     13   
        crate::operation::enum_query::builders::EnumQueryFluentBuilder::new(self.handle.clone())
   11     14   
    }
          15  +
    /* FluentClientGenerator.kt:187 */
   12     16   
}