Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +12,18 @@
    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::_greeting_struct::GreetingStructBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_kitchen_sink::KitchenSinkBuilder;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_struct_with_json_name::StructWithJsonNameBuilder;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_simple_struct::SimpleStructBuilder;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_empty_struct::EmptyStructBuilder;

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

@@ -1,1 +23,33 @@
    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  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::error::_error_without_members::ErrorWithoutMembers;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::error::_error_with_members::ErrorWithMembers;
   11     16   
          17  +
/* RustModule.kt:172 */
   12     18   
mod _complex_error;
   13     19   
          20  +
/* RustModule.kt:172 */
   14     21   
mod _error_with_members;
   15     22   
          23  +
/* RustModule.kt:172 */
   16     24   
mod _error_without_members;
   17     25   
          26  +
/* RustModule.kt:172 */
   18     27   
mod _foo_error;
   19     28   
          29  +
/* RustModule.kt:172 */
   20     30   
mod _invalid_greeting;
   21     31   
   22         -
/// Builders
          32  +
/// /* CodegenDelegator.kt:51 */Builders
   23     33   
pub mod builders;

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

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

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

@@ -1,1 +226,393 @@
    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 ErrorWithMembers {
           8  +
pub /* StructureGenerator.kt:201 */ struct ErrorWithMembers {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub code: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub complex_data: ::std::option::Option<crate::types::KitchenSink>,
   10         -
    #[allow(missing_docs)] // documentation missing in model
          15  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   11     16   
    pub integer_field: ::std::option::Option<i32>,
          17  +
    /* StructureGenerator.kt:231 */
   12     18   
    #[allow(missing_docs)] // documentation missing in model
   13     19   
    pub list_field: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          20  +
    /* StructureGenerator.kt:231 */
   14     21   
    #[allow(missing_docs)] // documentation missing in model
   15     22   
    pub map_field: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          23  +
    /* StructureGenerator.kt:231 */
   16     24   
    #[allow(missing_docs)] // documentation missing in model
   17     25   
    pub message: ::std::option::Option<::std::string::String>,
   18         -
    /// abc
          26  +
    /// /* StructureGenerator.kt:231 */abc
   19     27   
    pub string_field: ::std::option::Option<::std::string::String>,
   20         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          28  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          29  +
    /* StructureGenerator.kt:201 */
   21     30   
}
          31  +
/* StructureGenerator.kt:135 */
   22     32   
impl ErrorWithMembers {
          33  +
    /* StructureGenerator.kt:231 */
   23     34   
    #[allow(missing_docs)] // documentation missing in model
          35  +
                           /* StructureGenerator.kt:166 */
   24     36   
    pub fn code(&self) -> ::std::option::Option<&str> {
          37  +
        /* StructureGenerator.kt:169 */
   25     38   
        self.code.as_deref()
          39  +
        /* StructureGenerator.kt:166 */
   26     40   
    }
          41  +
    /* StructureGenerator.kt:231 */
   27     42   
    #[allow(missing_docs)] // documentation missing in model
          43  +
                           /* StructureGenerator.kt:166 */
   28     44   
    pub fn complex_data(&self) -> ::std::option::Option<&crate::types::KitchenSink> {
          45  +
        /* StructureGenerator.kt:170 */
   29     46   
        self.complex_data.as_ref()
          47  +
        /* StructureGenerator.kt:166 */
   30     48   
    }
          49  +
    /* StructureGenerator.kt:231 */
   31     50   
    #[allow(missing_docs)] // documentation missing in model
          51  +
                           /* StructureGenerator.kt:166 */
   32     52   
    pub fn integer_field(&self) -> ::std::option::Option<i32> {
          53  +
        /* StructureGenerator.kt:168 */
   33     54   
        self.integer_field
          55  +
        /* StructureGenerator.kt:166 */
   34     56   
    }
          57  +
    /* StructureGenerator.kt:231 */
   35     58   
    #[allow(missing_docs)] // documentation missing in model
   36         -
    ///
   37         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list_field.is_none()`.
          59  +
    /// /* StructureGenerator.kt:162 */
          60  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list_field.is_none()`.
          61  +
    /* StructureGenerator.kt:166 */
   38     62   
    pub fn list_field(&self) -> &[::std::string::String] {
   39         -
        self.list_field.as_deref().unwrap_or_default()
   40         -
    }
          63  +
        /* StructureGenerator.kt:169 */
          64  +
        self.list_field
          65  +
            .as_deref()
          66  +
            /* StructureGenerator.kt:175 */
          67  +
            .unwrap_or_default()
          68  +
        /* StructureGenerator.kt:166 */
          69  +
    }
          70  +
    /* StructureGenerator.kt:231 */
   41     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* StructureGenerator.kt:166 */
   42     73   
    pub fn map_field(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          74  +
        /* StructureGenerator.kt:170 */
   43     75   
        self.map_field.as_ref()
          76  +
        /* StructureGenerator.kt:166 */
   44     77   
    }
   45         -
    /// abc
          78  +
    /// /* StructureGenerator.kt:231 */abc
          79  +
    /* StructureGenerator.kt:166 */
   46     80   
    pub fn string_field(&self) -> ::std::option::Option<&str> {
          81  +
        /* StructureGenerator.kt:169 */
   47     82   
        self.string_field.as_deref()
          83  +
        /* StructureGenerator.kt:166 */
   48     84   
    }
          85  +
    /* StructureGenerator.kt:135 */
   49     86   
}
          87  +
/* ErrorImplGenerator.kt:99 */
   50     88   
impl ErrorWithMembers {
          89  +
    /* ErrorImplGenerator.kt:128 */
   51     90   
    /// Returns the error message.
   52     91   
    pub fn message(&self) -> ::std::option::Option<&str> {
   53     92   
        self.message.as_deref()
   54     93   
    }
          94  +
    /* ErrorImplGenerator.kt:99 */
   55     95   
}
          96  +
/* ErrorImplGenerator.kt:153 */
   56     97   
impl ::std::fmt::Display for ErrorWithMembers {
          98  +
    /* ErrorImplGenerator.kt:154 */
   57     99   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         100  +
        /* ErrorImplGenerator.kt:161 */
   58    101   
        ::std::write!(f, "ErrorWithMembers")?;
         102  +
        /* ErrorImplGenerator.kt:166 */
   59    103   
        if let ::std::option::Option::Some(inner_1) = &self.message {
         104  +
            /* ErrorImplGenerator.kt:166 */
   60    105   
            {
         106  +
                /* ErrorImplGenerator.kt:167 */
   61    107   
                ::std::write!(f, ": {}", inner_1)?;
         108  +
                /* ErrorImplGenerator.kt:166 */
   62    109   
            }
         110  +
            /* ErrorImplGenerator.kt:166 */
   63    111   
        }
         112  +
        /* ErrorImplGenerator.kt:171 */
   64    113   
        Ok(())
         114  +
        /* ErrorImplGenerator.kt:154 */
   65    115   
    }
         116  +
    /* ErrorImplGenerator.kt:153 */
   66    117   
}
         118  +
/* ErrorImplGenerator.kt:175 */
   67    119   
impl ::std::error::Error for ErrorWithMembers {}
         120  +
/* ErrorGenerator.kt:77 */
   68    121   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ErrorWithMembers {
         122  +
    /* ErrorGenerator.kt:78 */
   69    123   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   70    124   
        &self.meta
   71    125   
    }
         126  +
    /* ErrorGenerator.kt:77 */
   72    127   
}
         128  +
/* ErrorGenerator.kt:81 */
   73    129   
impl ErrorWithMembers {
   74         -
    /// Creates a new builder-style object to manufacture [`ErrorWithMembers`](crate::types::error::ErrorWithMembers).
         130  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ErrorWithMembers`](crate::types::error::ErrorWithMembers).
         131  +
    /* BuilderGenerator.kt:175 */
   75    132   
    pub fn builder() -> crate::types::error::builders::ErrorWithMembersBuilder {
         133  +
        /* BuilderGenerator.kt:176 */
   76    134   
        crate::types::error::builders::ErrorWithMembersBuilder::default()
         135  +
        /* BuilderGenerator.kt:175 */
   77    136   
    }
         137  +
    /* ErrorGenerator.kt:81 */
   78    138   
}
   79    139   
   80         -
/// A builder for [`ErrorWithMembers`](crate::types::error::ErrorWithMembers).
         140  +
/// /* BuilderGenerator.kt:342 */A builder for [`ErrorWithMembers`](crate::types::error::ErrorWithMembers).
         141  +
/* RustType.kt:516 */
   81    142   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         143  +
/* RustType.kt:516 */
   82    144   
#[non_exhaustive]
         145  +
/* BuilderGenerator.kt:345 */
   83    146   
pub struct ErrorWithMembersBuilder {
   84         -
    pub(crate) code: ::std::option::Option<::std::string::String>,
   85         -
    pub(crate) complex_data: ::std::option::Option<crate::types::KitchenSink>,
   86         -
    pub(crate) integer_field: ::std::option::Option<i32>,
   87         -
    pub(crate) list_field: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         147  +
    /* BuilderGenerator.kt:275 */ pub(crate) code: ::std::option::Option<::std::string::String>,
         148  +
    /* BuilderGenerator.kt:275 */ pub(crate) complex_data: ::std::option::Option<crate::types::KitchenSink>,
         149  +
    /* BuilderGenerator.kt:275 */ pub(crate) integer_field: ::std::option::Option<i32>,
         150  +
    /* BuilderGenerator.kt:275 */ pub(crate) list_field: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         151  +
    /* BuilderGenerator.kt:275 */
   88    152   
    pub(crate) map_field: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
   89         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   90         -
    pub(crate) string_field: ::std::option::Option<::std::string::String>,
   91         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         153  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
         154  +
    /* BuilderGenerator.kt:275 */ pub(crate) string_field: ::std::option::Option<::std::string::String>,
         155  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         156  +
    /* BuilderGenerator.kt:345 */
   92    157   
}
         158  +
/* BuilderGenerator.kt:355 */
   93    159   
impl ErrorWithMembersBuilder {
         160  +
    /* BuilderGenerator.kt:286 */
   94    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:291 */
   95    163   
    pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         164  +
        /* BuilderGenerator.kt:292 */
   96    165   
        self.code = ::std::option::Option::Some(input.into());
         166  +
        /* BuilderGenerator.kt:293 */
   97    167   
        self
         168  +
        /* BuilderGenerator.kt:291 */
   98    169   
    }
         170  +
    /* BuilderGenerator.kt:312 */
   99    171   
    #[allow(missing_docs)] // documentation missing in model
         172  +
                           /* BuilderGenerator.kt:314 */
  100    173   
    pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         174  +
        /* BuilderGenerator.kt:315 */
  101    175   
        self.code = input;
  102    176   
        self
         177  +
        /* BuilderGenerator.kt:314 */
  103    178   
    }
         179  +
    /* BuilderGenerator.kt:334 */
  104    180   
    #[allow(missing_docs)] // documentation missing in model
         181  +
                           /* BuilderGenerator.kt:336 */
  105    182   
    pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
         183  +
        /* BuilderGenerator.kt:337 */
  106    184   
        &self.code
         185  +
        /* BuilderGenerator.kt:336 */
  107    186   
    }
         187  +
    /* BuilderGenerator.kt:286 */
  108    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:291 */
  109    190   
    pub fn complex_data(mut self, input: crate::types::KitchenSink) -> Self {
         191  +
        /* BuilderGenerator.kt:292 */
  110    192   
        self.complex_data = ::std::option::Option::Some(input);
         193  +
        /* BuilderGenerator.kt:293 */
  111    194   
        self
         195  +
        /* BuilderGenerator.kt:291 */
  112    196   
    }
         197  +
    /* BuilderGenerator.kt:312 */
  113    198   
    #[allow(missing_docs)] // documentation missing in model
         199  +
                           /* BuilderGenerator.kt:314 */
  114    200   
    pub fn set_complex_data(mut self, input: ::std::option::Option<crate::types::KitchenSink>) -> Self {
         201  +
        /* BuilderGenerator.kt:315 */
  115    202   
        self.complex_data = input;
  116    203   
        self
         204  +
        /* BuilderGenerator.kt:314 */
  117    205   
    }
         206  +
    /* BuilderGenerator.kt:334 */
  118    207   
    #[allow(missing_docs)] // documentation missing in model
         208  +
                           /* BuilderGenerator.kt:336 */
  119    209   
    pub fn get_complex_data(&self) -> &::std::option::Option<crate::types::KitchenSink> {
         210  +
        /* BuilderGenerator.kt:337 */
  120    211   
        &self.complex_data
         212  +
        /* BuilderGenerator.kt:336 */
  121    213   
    }
         214  +
    /* BuilderGenerator.kt:286 */
  122    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:291 */
  123    217   
    pub fn integer_field(mut self, input: i32) -> Self {
         218  +
        /* BuilderGenerator.kt:292 */
  124    219   
        self.integer_field = ::std::option::Option::Some(input);
         220  +
        /* BuilderGenerator.kt:293 */
  125    221   
        self
         222  +
        /* BuilderGenerator.kt:291 */
  126    223   
    }
         224  +
    /* BuilderGenerator.kt:312 */
  127    225   
    #[allow(missing_docs)] // documentation missing in model
         226  +
                           /* BuilderGenerator.kt:314 */
  128    227   
    pub fn set_integer_field(mut self, input: ::std::option::Option<i32>) -> Self {
         228  +
        /* BuilderGenerator.kt:315 */
  129    229   
        self.integer_field = input;
  130    230   
        self
         231  +
        /* BuilderGenerator.kt:314 */
  131    232   
    }
         233  +
    /* BuilderGenerator.kt:334 */
  132    234   
    #[allow(missing_docs)] // documentation missing in model
         235  +
                           /* BuilderGenerator.kt:336 */
  133    236   
    pub fn get_integer_field(&self) -> &::std::option::Option<i32> {
         237  +
        /* BuilderGenerator.kt:337 */
  134    238   
        &self.integer_field
         239  +
        /* BuilderGenerator.kt:336 */
  135    240   
    }
  136         -
    /// Appends an item to `list_field`.
         241  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `list_field`.
         242  +
    /* BuilderGenerator.kt:411 */
  137    243   
    ///
  138         -
    /// To override the contents of this collection use [`set_list_field`](Self::set_list_field).
         244  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_list_field`](Self::set_list_field).
         245  +
    /* BuilderGenerator.kt:413 */
  139    246   
    ///
         247  +
    /* BuilderGenerator.kt:418 */
  140    248   
    pub fn list_field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         249  +
        /* BuilderGenerator.kt:419 */
  141    250   
        let mut v = self.list_field.unwrap_or_default();
  142    251   
        v.push(input.into());
  143    252   
        self.list_field = ::std::option::Option::Some(v);
  144    253   
        self
         254  +
        /* BuilderGenerator.kt:418 */
  145    255   
    }
         256  +
    /* BuilderGenerator.kt:312 */
  146    257   
    #[allow(missing_docs)] // documentation missing in model
         258  +
                           /* BuilderGenerator.kt:314 */
  147    259   
    pub fn set_list_field(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         260  +
        /* BuilderGenerator.kt:315 */
  148    261   
        self.list_field = input;
  149    262   
        self
         263  +
        /* BuilderGenerator.kt:314 */
  150    264   
    }
         265  +
    /* BuilderGenerator.kt:334 */
  151    266   
    #[allow(missing_docs)] // documentation missing in model
         267  +
                           /* BuilderGenerator.kt:336 */
  152    268   
    pub fn get_list_field(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         269  +
        /* BuilderGenerator.kt:337 */
  153    270   
        &self.list_field
         271  +
        /* BuilderGenerator.kt:336 */
  154    272   
    }
  155         -
    /// Adds a key-value pair to `map_field`.
         273  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `map_field`.
         274  +
    /* BuilderGenerator.kt:437 */
  156    275   
    ///
  157         -
    /// To override the contents of this collection use [`set_map_field`](Self::set_map_field).
         276  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_map_field`](Self::set_map_field).
         277  +
    /* BuilderGenerator.kt:439 */
  158    278   
    ///
         279  +
    /* BuilderGenerator.kt:445 */
  159    280   
    pub fn map_field(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
         281  +
        /* BuilderGenerator.kt:448 */
  160    282   
        let mut hash_map = self.map_field.unwrap_or_default();
  161    283   
        hash_map.insert(k.into(), v.into());
  162    284   
        self.map_field = ::std::option::Option::Some(hash_map);
  163    285   
        self
         286  +
        /* BuilderGenerator.kt:445 */
  164    287   
    }
         288  +
    /* BuilderGenerator.kt:312 */
  165    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* BuilderGenerator.kt:314 */
  166    291   
    pub fn set_map_field(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
         292  +
        /* BuilderGenerator.kt:315 */
  167    293   
        self.map_field = input;
  168    294   
        self
         295  +
        /* BuilderGenerator.kt:314 */
  169    296   
    }
         297  +
    /* BuilderGenerator.kt:334 */
  170    298   
    #[allow(missing_docs)] // documentation missing in model
         299  +
                           /* BuilderGenerator.kt:336 */
  171    300   
    pub fn get_map_field(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         301  +
        /* BuilderGenerator.kt:337 */
  172    302   
        &self.map_field
         303  +
        /* BuilderGenerator.kt:336 */
  173    304   
    }
         305  +
    /* BuilderGenerator.kt:286 */
  174    306   
    #[allow(missing_docs)] // documentation missing in model
         307  +
                           /* BuilderGenerator.kt:291 */
  175    308   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         309  +
        /* BuilderGenerator.kt:292 */
  176    310   
        self.message = ::std::option::Option::Some(input.into());
         311  +
        /* BuilderGenerator.kt:293 */
  177    312   
        self
         313  +
        /* BuilderGenerator.kt:291 */
  178    314   
    }
         315  +
    /* BuilderGenerator.kt:312 */
  179    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* BuilderGenerator.kt:314 */
  180    318   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         319  +
        /* BuilderGenerator.kt:315 */
  181    320   
        self.message = input;
  182    321   
        self
         322  +
        /* BuilderGenerator.kt:314 */
  183    323   
    }
         324  +
    /* BuilderGenerator.kt:334 */
  184    325   
    #[allow(missing_docs)] // documentation missing in model
         326  +
                           /* BuilderGenerator.kt:336 */
  185    327   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         328  +
        /* BuilderGenerator.kt:337 */
  186    329   
        &self.message
         330  +
        /* BuilderGenerator.kt:336 */
  187    331   
    }
  188         -
    /// abc
         332  +
    /// /* BuilderGenerator.kt:286 */abc
         333  +
    /* BuilderGenerator.kt:291 */
  189    334   
    pub fn string_field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         335  +
        /* BuilderGenerator.kt:292 */
  190    336   
        self.string_field = ::std::option::Option::Some(input.into());
         337  +
        /* BuilderGenerator.kt:293 */
  191    338   
        self
         339  +
        /* BuilderGenerator.kt:291 */
  192    340   
    }
  193         -
    /// abc
         341  +
    /// /* BuilderGenerator.kt:312 */abc
         342  +
    /* BuilderGenerator.kt:314 */
  194    343   
    pub fn set_string_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         344  +
        /* BuilderGenerator.kt:315 */
  195    345   
        self.string_field = input;
  196    346   
        self
         347  +
        /* BuilderGenerator.kt:314 */
  197    348   
    }
  198         -
    /// abc
         349  +
    /// /* BuilderGenerator.kt:334 */abc
         350  +
    /* BuilderGenerator.kt:336 */
  199    351   
    pub fn get_string_field(&self) -> &::std::option::Option<::std::string::String> {
         352  +
        /* BuilderGenerator.kt:337 */
  200    353   
        &self.string_field
         354  +
        /* BuilderGenerator.kt:336 */
  201    355   
    }
         356  +
    /* ErrorGenerator.kt:101 */
  202    357   
    /// Sets error metadata
  203    358   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  204    359   
        self.meta = Some(meta);
  205    360   
        self
  206    361   
    }
  207    362   
  208    363   
    /// Sets error metadata
  209    364   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
  210    365   
        self.meta = meta;
  211    366   
        self
  212    367   
    }
  213         -
    /// Consumes the builder and constructs a [`ErrorWithMembers`](crate::types::error::ErrorWithMembers).
         368  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ErrorWithMembers`](crate::types::error::ErrorWithMembers).
         369  +
    /* BuilderGenerator.kt:253 */
  214    370   
    pub fn build(self) -> crate::types::error::ErrorWithMembers {
         371  +
        /* BuilderGenerator.kt:477 */
  215    372   
        crate::types::error::ErrorWithMembers {
  216         -
            code: self.code,
         373  +
            /* BuilderGenerator.kt:481 */ code: self.code,
         374  +
            /* BuilderGenerator.kt:481 */
  217    375   
            complex_data: self.complex_data,
         376  +
            /* BuilderGenerator.kt:481 */
  218    377   
            integer_field: self.integer_field,
         378  +
            /* BuilderGenerator.kt:481 */
  219    379   
            list_field: self.list_field,
         380  +
            /* BuilderGenerator.kt:481 */
  220    381   
            map_field: self.map_field,
         382  +
            /* BuilderGenerator.kt:481 */
  221    383   
            message: self.message,
         384  +
            /* BuilderGenerator.kt:481 */
  222    385   
            string_field: self.string_field,
         386  +
            /* ErrorGenerator.kt:120 */
  223    387   
            meta: self.meta.unwrap_or_default(),
         388  +
            /* BuilderGenerator.kt:477 */
  224    389   
        }
         390  +
        /* BuilderGenerator.kt:253 */
  225    391   
    }
         392  +
    /* BuilderGenerator.kt:355 */
  226    393   
}

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

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

tmp-codegen-diff/codegen-client-test/json_rpc11/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/json_rpc11/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/json_rpc11/rust-client-codegen/src/types/error/builders.rs

@@ -1,1 +10,15 @@
    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;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::error::_error_without_members::ErrorWithoutMembersBuilder;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::error::_error_with_members::ErrorWithMembersBuilder;

tmp-codegen-diff/codegen-client-test/misc/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 MiscService.
   11     12   
///
@@ -59,60 +126,133 @@
   79     80   
    fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
   80     81   
        let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
   81     82   
        handle
   82     83   
            .runtime_plugins
   83     84   
            .apply_client_configuration(&mut cfg)?
   84     85   
            .validate_base_client_config(&cfg)?;
   85     86   
        Ok(())
   86     87   
    }
   87     88   
}
   88     89   
   89         -
/// Operation customization and supporting types.
          90  +
/// /* ClientRustModule.kt:161 */Operation customization and supporting types.
   90     91   
///
   91         -
/// The underlying HTTP requests made during an operation can be customized
          92  +
/// /* ClientRustModule.kt:170 */The underlying HTTP requests made during an operation can be customized
   92     93   
/// by calling the `customize()` method on the builder returned from a client
   93     94   
/// operation call. For example, this can be used to add an additional HTTP header:
   94     95   
///
   95     96   
/// ```ignore
   96     97   
/// # async fn wrapper() -> ::std::result::Result<(), misc::Error> {
   97     98   
/// # let client: misc::Client = unimplemented!();
   98     99   
/// use ::http::header::{HeaderName, HeaderValue};
   99    100   
///
  100    101   
/// let result = client.required_header_collection_operation()
  101    102   
///     .customize()
  102    103   
///     .mutate_request(|req| {
  103    104   
///         // Add `x-example-header` with value
  104    105   
///         req.headers_mut()
  105    106   
///             .insert(
  106    107   
///                 HeaderName::from_static("x-example-header"),
  107    108   
///                 HeaderValue::from_static("1"),
  108    109   
///             );
  109    110   
///     })
  110    111   
///     .send()
  111    112   
///     .await;
  112    113   
/// # }
  113    114   
/// ```
  114    115   
pub mod customize;
  115    116   
         117  +
/* RustModule.kt:172 */
  116    118   
mod required_header_collection_operation;
  117    119   
         120  +
/* RustModule.kt:172 */
  118    121   
mod required_inner_shape_operation;
  119    122   
         123  +
/* RustModule.kt:172 */
  120    124   
mod response_code_default_operation;
  121    125   
         126  +
/* RustModule.kt:172 */
  122    127   
mod response_code_http_fallback_operation;
  123    128   
         129  +
/* RustModule.kt:172 */
  124    130   
mod response_code_required_operation;
  125    131   
         132  +
/* RustModule.kt:172 */
  126    133   
mod type_complexity_operation;

tmp-codegen-diff/codegen-client-test/misc/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/misc/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/misc/rust-client-codegen/src/client/required_header_collection_operation.rs

@@ -1,1 +17,21 @@
    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 [`RequiredHeaderCollectionOperation`](crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder is configurable:
    6      8   
    ///   - [`required_header_list(impl Into<String>)`](crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder::required_header_list) / [`set_required_header_list(Option<Vec::<String>>)`](crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder::set_required_header_list):<br>required: **true**<br>(undocumented)<br>
    7      9   
    ///   - [`required_header_set(impl Into<String>)`](crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder::required_header_set) / [`set_required_header_set(Option<Vec::<String>>)`](crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder::set_required_header_set):<br>required: **true**<br>(undocumented)<br>
    8     10   
    /// - On success, responds with [`RequiredHeaderCollectionOperationOutput`](crate::operation::required_header_collection_operation::RequiredHeaderCollectionOperationOutput) with field(s):
    9     11   
    ///   - [`required_header_list(Vec::<String>)`](crate::operation::required_header_collection_operation::RequiredHeaderCollectionOperationOutput::required_header_list): (undocumented)
   10     12   
    ///   - [`required_header_set(Vec::<String>)`](crate::operation::required_header_collection_operation::RequiredHeaderCollectionOperationOutput::required_header_set): (undocumented)
   11     13   
    /// - On failure, responds with [`SdkError<RequiredHeaderCollectionOperationError>`](crate::operation::required_header_collection_operation::RequiredHeaderCollectionOperationError)
          14  +
    /* FluentClientGenerator.kt:234 */
   12     15   
    pub fn required_header_collection_operation(
   13     16   
        &self,
   14     17   
    ) -> crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder {
   15     18   
        crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationFluentBuilder::new(self.handle.clone())
   16     19   
    }
          20  +
    /* FluentClientGenerator.kt:187 */
   17     21   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/client/required_inner_shape_operation.rs

@@ -1,1 +15,19 @@
    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 [`RequiredInnerShapeOperation`](crate::operation::required_inner_shape_operation::builders::RequiredInnerShapeOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder is configurable:
    6      8   
    ///   - [`inner(InnerShape)`](crate::operation::required_inner_shape_operation::builders::RequiredInnerShapeOperationFluentBuilder::inner) / [`set_inner(Option<InnerShape>)`](crate::operation::required_inner_shape_operation::builders::RequiredInnerShapeOperationFluentBuilder::set_inner):<br>required: **false**<br>(undocumented)<br>
    7      9   
    /// - On success, responds with [`RequiredInnerShapeOperationOutput`](crate::operation::required_inner_shape_operation::RequiredInnerShapeOperationOutput) with field(s):
    8     10   
    ///   - [`inner(Option<InnerShape>)`](crate::operation::required_inner_shape_operation::RequiredInnerShapeOperationOutput::inner): (undocumented)
    9     11   
    /// - On failure, responds with [`SdkError<RequiredInnerShapeOperationError>`](crate::operation::required_inner_shape_operation::RequiredInnerShapeOperationError)
          12  +
    /* FluentClientGenerator.kt:234 */
   10     13   
    pub fn required_inner_shape_operation(
   11     14   
        &self,
   12     15   
    ) -> crate::operation::required_inner_shape_operation::builders::RequiredInnerShapeOperationFluentBuilder {
   13     16   
        crate::operation::required_inner_shape_operation::builders::RequiredInnerShapeOperationFluentBuilder::new(self.handle.clone())
   14     17   
    }
          18  +
    /* FluentClientGenerator.kt:187 */
   15     19   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/client/response_code_default_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 [`ResponseCodeDefaultOperation`](crate::operation::response_code_default_operation::builders::ResponseCodeDefaultOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder takes no input, just [`send`](crate::operation::response_code_default_operation::builders::ResponseCodeDefaultOperationFluentBuilder::send) it.
    6      8   
    /// - On success, responds with [`ResponseCodeDefaultOperationOutput`](crate::operation::response_code_default_operation::ResponseCodeDefaultOperationOutput)
    7      9   
    /// - On failure, responds with [`SdkError<ResponseCodeDefaultOperationError>`](crate::operation::response_code_default_operation::ResponseCodeDefaultOperationError)
          10  +
    /* FluentClientGenerator.kt:234 */
    8     11   
    pub fn response_code_default_operation(
    9     12   
        &self,
   10     13   
    ) -> crate::operation::response_code_default_operation::builders::ResponseCodeDefaultOperationFluentBuilder {
   11     14   
        crate::operation::response_code_default_operation::builders::ResponseCodeDefaultOperationFluentBuilder::new(self.handle.clone())
   12     15   
    }
          16  +
    /* FluentClientGenerator.kt:187 */
   13     17   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/client/response_code_http_fallback_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 [`ResponseCodeHttpFallbackOperation`](crate::operation::response_code_http_fallback_operation::builders::ResponseCodeHttpFallbackOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder takes no input, just [`send`](crate::operation::response_code_http_fallback_operation::builders::ResponseCodeHttpFallbackOperationFluentBuilder::send) it.
    6      8   
    /// - On success, responds with [`ResponseCodeHttpFallbackOperationOutput`](crate::operation::response_code_http_fallback_operation::ResponseCodeHttpFallbackOperationOutput)
    7      9   
    /// - On failure, responds with [`SdkError<ResponseCodeHttpFallbackOperationError>`](crate::operation::response_code_http_fallback_operation::ResponseCodeHttpFallbackOperationError)
          10  +
    /* FluentClientGenerator.kt:234 */
    8     11   
    pub fn response_code_http_fallback_operation(
    9     12   
        &self,
   10     13   
    ) -> crate::operation::response_code_http_fallback_operation::builders::ResponseCodeHttpFallbackOperationFluentBuilder {
   11     14   
        crate::operation::response_code_http_fallback_operation::builders::ResponseCodeHttpFallbackOperationFluentBuilder::new(self.handle.clone())
   12     15   
    }
          16  +
    /* FluentClientGenerator.kt:187 */
   13     17   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/client/response_code_required_operation.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 [`ResponseCodeRequiredOperation`](crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder takes no input, just [`send`](crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationFluentBuilder::send) it.
    6      8   
    /// - On success, responds with [`ResponseCodeRequiredOperationOutput`](crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput) with field(s):
    7      9   
    ///   - [`response_code(i32)`](crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput::response_code): (undocumented)
    8     10   
    /// - On failure, responds with [`SdkError<ResponseCodeRequiredOperationError>`](crate::operation::response_code_required_operation::ResponseCodeRequiredOperationError)
          11  +
    /* FluentClientGenerator.kt:234 */
    9     12   
    pub fn response_code_required_operation(
   10     13   
        &self,
   11     14   
    ) -> crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationFluentBuilder {
   12     15   
        crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationFluentBuilder::new(self.handle.clone())
   13     16   
    }
          17  +
    /* FluentClientGenerator.kt:187 */
   14     18   
}