Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/types/_xml_namespace_nested.rs

@@ -1,1 +78,140 @@
    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 XmlNamespaceNested {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlNamespaceNested {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl XmlNamespaceNested {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
   17         -
    ///
   18         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.values.is_none()`.
          29  +
    /// /* StructureGenerator.kt:162 */
          30  +
    /// /* 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 `.values.is_none()`.
          31  +
    /* StructureGenerator.kt:166 */
   19     32   
    pub fn values(&self) -> &[::std::string::String] {
   20         -
        self.values.as_deref().unwrap_or_default()
          33  +
        /* StructureGenerator.kt:169 */
          34  +
        self.values
          35  +
            .as_deref()
          36  +
            /* StructureGenerator.kt:175 */
          37  +
            .unwrap_or_default()
          38  +
        /* StructureGenerator.kt:166 */
   21     39   
    }
          40  +
    /* StructureGenerator.kt:135 */
   22     41   
}
          42  +
/* ClientCodegenVisitor.kt:237 */
   23     43   
impl XmlNamespaceNested {
   24         -
    /// Creates a new builder-style object to manufacture [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          44  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          45  +
    /* BuilderGenerator.kt:175 */
   25     46   
    pub fn builder() -> crate::types::builders::XmlNamespaceNestedBuilder {
          47  +
        /* BuilderGenerator.kt:176 */
   26     48   
        crate::types::builders::XmlNamespaceNestedBuilder::default()
          49  +
        /* BuilderGenerator.kt:175 */
   27     50   
    }
          51  +
    /* ClientCodegenVisitor.kt:237 */
   28     52   
}
   29     53   
   30         -
/// A builder for [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          54  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          55  +
/* RustType.kt:516 */
   31     56   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          57  +
/* RustType.kt:516 */
   32     58   
#[non_exhaustive]
          59  +
/* BuilderGenerator.kt:345 */
   33     60   
pub struct XmlNamespaceNestedBuilder {
   34         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          61  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          62  +
    /* BuilderGenerator.kt:275 */
   35     63   
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          64  +
    /* BuilderGenerator.kt:345 */
   36     65   
}
          66  +
/* BuilderGenerator.kt:355 */
   37     67   
impl XmlNamespaceNestedBuilder {
          68  +
    /* BuilderGenerator.kt:286 */
   38     69   
    #[allow(missing_docs)] // documentation missing in model
          70  +
                           /* BuilderGenerator.kt:291 */
   39     71   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          72  +
        /* BuilderGenerator.kt:292 */
   40     73   
        self.foo = ::std::option::Option::Some(input.into());
          74  +
        /* BuilderGenerator.kt:293 */
   41     75   
        self
          76  +
        /* BuilderGenerator.kt:291 */
   42     77   
    }
          78  +
    /* BuilderGenerator.kt:312 */
   43     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:314 */
   44     81   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          82  +
        /* BuilderGenerator.kt:315 */
   45     83   
        self.foo = input;
   46     84   
        self
          85  +
        /* BuilderGenerator.kt:314 */
   47     86   
    }
          87  +
    /* BuilderGenerator.kt:334 */
   48     88   
    #[allow(missing_docs)] // documentation missing in model
          89  +
                           /* BuilderGenerator.kt:336 */
   49     90   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          91  +
        /* BuilderGenerator.kt:337 */
   50     92   
        &self.foo
          93  +
        /* BuilderGenerator.kt:336 */
   51     94   
    }
   52         -
    /// Appends an item to `values`.
          95  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `values`.
          96  +
    /* BuilderGenerator.kt:411 */
   53     97   
    ///
   54         -
    /// To override the contents of this collection use [`set_values`](Self::set_values).
          98  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_values`](Self::set_values).
          99  +
    /* BuilderGenerator.kt:413 */
   55    100   
    ///
         101  +
    /* BuilderGenerator.kt:418 */
   56    102   
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:419 */
   57    104   
        let mut v = self.values.unwrap_or_default();
   58    105   
        v.push(input.into());
   59    106   
        self.values = ::std::option::Option::Some(v);
   60    107   
        self
         108  +
        /* BuilderGenerator.kt:418 */
   61    109   
    }
         110  +
    /* BuilderGenerator.kt:312 */
   62    111   
    #[allow(missing_docs)] // documentation missing in model
         112  +
                           /* BuilderGenerator.kt:314 */
   63    113   
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         114  +
        /* BuilderGenerator.kt:315 */
   64    115   
        self.values = input;
   65    116   
        self
         117  +
        /* BuilderGenerator.kt:314 */
   66    118   
    }
         119  +
    /* BuilderGenerator.kt:334 */
   67    120   
    #[allow(missing_docs)] // documentation missing in model
         121  +
                           /* BuilderGenerator.kt:336 */
   68    122   
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         123  +
        /* BuilderGenerator.kt:337 */
   69    124   
        &self.values
         125  +
        /* BuilderGenerator.kt:336 */
   70    126   
    }
   71         -
    /// Consumes the builder and constructs a [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
         127  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
         128  +
    /* BuilderGenerator.kt:253 */
   72    129   
    pub fn build(self) -> crate::types::XmlNamespaceNested {
         130  +
        /* BuilderGenerator.kt:477 */
   73    131   
        crate::types::XmlNamespaceNested {
   74         -
            foo: self.foo,
         132  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         133  +
            /* BuilderGenerator.kt:481 */
   75    134   
            values: self.values,
         135  +
            /* BuilderGenerator.kt:477 */
   76    136   
        }
         137  +
        /* BuilderGenerator.kt:253 */
   77    138   
    }
         139  +
    /* BuilderGenerator.kt:355 */
   78    140   
}

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

@@ -1,1 +16,24 @@
    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::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_xml_namespace_nested::XmlNamespaceNestedBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_recursive_xml_shapes_output_nested1::RecursiveXmlShapesOutputNested1Builder;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_recursive_xml_shapes_output_nested2::RecursiveXmlShapesOutputNested2Builder;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_nested_struct_with_list::NestedStructWithListBuilder;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::_greeting_struct::GreetingStructBuilder;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::_struct_arg::StructArgBuilder;

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

@@ -1,1 +11,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::_complex_error::ComplexError;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_invalid_greeting::InvalidGreeting;
    5      7   
           8  +
/* RustModule.kt:172 */
    6      9   
mod _complex_error;
    7     10   
          11  +
/* RustModule.kt:172 */
    8     12   
mod _invalid_greeting;
    9     13   
   10         -
/// Builders
          14  +
/// /* CodegenDelegator.kt:51 */Builders
   11     15   
pub mod builders;

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

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

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

@@ -1,1 +4,6 @@
    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::_complex_error::ComplexErrorBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_invalid_greeting::InvalidGreetingBuilder;

tmp-codegen-diff/codegen-client-test/endpoint-rules/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 +134,136 @@
   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   
  107         -
/// Operation customization and supporting types.
         108  +
/// /* ClientRustModule.kt:161 */Operation customization and supporting types.
  108    109   
///
  109         -
/// The underlying HTTP requests made during an operation can be customized
         110  +
/// /* ClientRustModule.kt:170 */The underlying HTTP requests made during an operation can be customized
  110    111   
/// by calling the `customize()` method on the builder returned from a client
  111    112   
/// operation call. For example, this can be used to add an additional HTTP header:
  112    113   
///
  113    114   
/// ```ignore
  114    115   
/// # async fn wrapper() -> ::std::result::Result<(), endpoint_rules::Error> {
  115    116   
/// # let client: endpoint_rules::Client = unimplemented!();
  116    117   
/// use ::http::header::{HeaderName, HeaderValue};
  117    118   
///
  118    119   
/// let result = client.test_operation()
  119    120   
///     .customize()
  120    121   
///     .mutate_request(|req| {
  121    122   
///         // Add `x-example-header` with value
  122    123   
///         req.headers_mut()
  123    124   
///             .insert(
  124    125   
///                 HeaderName::from_static("x-example-header"),
  125    126   
///                 HeaderValue::from_static("1"),
  126    127   
///             );
  127    128   
///     })
  128    129   
///     .send()
  129    130   
///     .await;
  130    131   
/// # }
  131    132   
/// ```
  132    133   
pub mod customize;
  133    134   
         135  +
/* RustModule.kt:172 */
  134    136   
mod test_operation;

tmp-codegen-diff/codegen-client-test/endpoint-rules/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/endpoint-rules/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/endpoint-rules/rust-client-codegen/src/client/test_operation.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 [`TestOperation`](crate::operation::test_operation::builders::TestOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder is configurable:
    6      8   
    ///   - [`bucket(impl Into<String>)`](crate::operation::test_operation::builders::TestOperationFluentBuilder::bucket) / [`set_bucket(Option<String>)`](crate::operation::test_operation::builders::TestOperationFluentBuilder::set_bucket):<br>required: **false**<br>(undocumented)<br>
    7      9   
    /// - On success, responds with [`TestOperationOutput`](crate::operation::test_operation::TestOperationOutput)
    8     10   
    /// - On failure, responds with [`SdkError<TestOperationError>`](crate::operation::test_operation::TestOperationError)
          11  +
    /* FluentClientGenerator.kt:234 */
    9     12   
    pub fn test_operation(&self) -> crate::operation::test_operation::builders::TestOperationFluentBuilder {
   10     13   
        crate::operation::test_operation::builders::TestOperationFluentBuilder::new(self.handle.clone())
   11     14   
    }
          15  +
    /* FluentClientGenerator.kt:187 */
   12     16   
}

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/config.rs

@@ -1,1 +171,209 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Configuration for a endpoint_rules service client.
           2  +
/* ServiceConfigGenerator.kt:409 */
           3  +
/// /* ServiceConfigGenerator.kt:409 */Configuration for a endpoint_rules service client.
    4      4   
///
           5  +
/* RustType.kt:516 */
    5      6   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
           7  +
/* ServiceConfigGenerator.kt:414 */
    6      8   
pub struct Config {
    7         -
    // Both `config` and `cloneable` are the same config, but the cloneable one
           9  +
    /* ServiceConfigGenerator.kt:415 */// Both `config` and `cloneable` are the same config, but the cloneable one
    8     10   
    // is kept around so that it is possible to convert back into a builder. This can be
    9     11   
    // optimized in the future.
   10     12   
    pub(crate) config: crate::config::FrozenLayer,
   11     13   
    cloneable: ::aws_smithy_types::config_bag::CloneableLayer,
   12     14   
    pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
   13     15   
    pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
   14     16   
    pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
          17  +
    /* ServiceConfigGenerator.kt:414 */
   15     18   
}
          19  +
/* ServiceConfigGenerator.kt:433 */
   16     20   
impl Config {
   17         -
    ///
          21  +
    /// /* ServiceConfigGenerator.kt:434 */
   18     22   
    /// Constructs a config builder.
   19     23   
    /// <div class="warning">
   20     24   
    /// Note that a config created from this builder will not have the same safe defaults as one created by
   21     25   
    /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
   22     26   
    /// </div>
   23     27   
    ///
          28  +
    /* ServiceConfigGenerator.kt:435 */
   24     29   
    pub fn builder() -> Builder {
   25     30   
        Builder::default()
   26     31   
    }
          32  +
    /* ServiceConfigGenerator.kt:440 */
   27     33   
    /// Converts this config back into a builder so that it can be tweaked.
   28     34   
    pub fn to_builder(&self) -> Builder {
   29     35   
        Builder {
   30     36   
            config: self.cloneable.clone(),
   31     37   
            runtime_components: self.runtime_components.clone(),
   32     38   
            runtime_plugins: self.runtime_plugins.clone(),
   33     39   
            behavior_version: self.behavior_version,
   34     40   
        }
   35     41   
    }
          42  +
    /* StalledStreamProtectionConfigCustomization.kt:57 */
   36     43   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   37     44   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   38     45   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   39     46   
    }
          47  +
    /* HttpConnectorConfigDecorator.kt:52 */
   40     48   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   41     49   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   42     50   
        self.runtime_components.http_client()
   43     51   
    }
          52  +
    /* EndpointConfigCustomization.kt:47 */
   44     53   
    /// Returns the endpoint resolver.
   45     54   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   46     55   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   47     56   
    }
          57  +
    /* ResiliencyConfigCustomization.kt:51 */
   48     58   
    /// Return a reference to the retry configuration contained in this config, if any.
   49     59   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   50     60   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   51     61   
    }
   52     62   
   53     63   
    /// Return a cloned shared async sleep implementation from this config, if any.
   54     64   
    pub fn sleep_impl(&self) -> ::std::option::Option<crate::config::SharedAsyncSleep> {
   55     65   
        self.runtime_components.sleep_impl()
   56     66   
    }
   57     67   
   58     68   
    /// Return a reference to the timeout configuration contained in this config, if any.
   59     69   
    pub fn timeout_config(&self) -> ::std::option::Option<&::aws_smithy_types::timeout::TimeoutConfig> {
   60     70   
        self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>()
   61     71   
    }
   62     72   
   63     73   
    /// Returns a reference to the retry partition contained in this config, if any.
   64     74   
    ///
   65     75   
    /// WARNING: This method is unstable and may be removed at any time. Do not rely on this
   66     76   
    /// method for anything!
   67     77   
    pub fn retry_partition(&self) -> ::std::option::Option<&::aws_smithy_runtime::client::retries::RetryPartition> {
   68     78   
        self.config.load::<::aws_smithy_runtime::client::retries::RetryPartition>()
   69     79   
    }
          80  +
    /* IdentityCacheDecorator.kt:96 */
   70     81   
    /// Returns the configured identity cache for auth.
   71     82   
    pub fn identity_cache(&self) -> ::std::option::Option<crate::config::SharedIdentityCache> {
   72     83   
        self.runtime_components.identity_cache()
   73     84   
    }
          85  +
    /* InterceptorConfigCustomization.kt:30 */
   74     86   
    /// Returns interceptors currently registered by the user.
   75     87   
    pub fn interceptors(&self) -> impl Iterator<Item = crate::config::SharedInterceptor> + '_ {
   76     88   
        self.runtime_components.interceptors()
   77     89   
    }
          90  +
    /* TimeSourceCustomization.kt:34 */
   78     91   
    /// Return time source used for this service.
          92  +
    /* TimeSourceCustomization.kt:35 */
   79     93   
    pub fn time_source(&self) -> ::std::option::Option<::aws_smithy_async::time::SharedTimeSource> {
          94  +
        /* TimeSourceCustomization.kt:39 */
   80     95   
        self.runtime_components.time_source()
          96  +
        /* TimeSourceCustomization.kt:35 */
   81     97   
    }
          98  +
    /* RetryClassifierConfigCustomization.kt:39 */
   82     99   
    /// Returns retry classifiers currently registered by the user.
   83    100   
    pub fn retry_classifiers(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier> + '_ {
   84    101   
        self.runtime_components.retry_classifiers()
   85    102   
    }
         103  +
    /* ServiceConfigGenerator.kt:433 */
   86    104   
}
   87         -
/// Builder for creating a `Config`.
         105  +
/// /* ServiceConfigGenerator.kt:458 */Builder for creating a `Config`.
         106  +
/* RustType.kt:516 */
   88    107   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
         108  +
/* ServiceConfigGenerator.kt:460 */
   89    109   
pub struct Builder {
   90         -
    pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer,
         110  +
    /* ServiceConfigGenerator.kt:461 */ pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer,
   91    111   
    pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
   92    112   
    pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
   93    113   
    pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
         114  +
    /* ServiceConfigGenerator.kt:460 */
   94    115   
}
         116  +
/* ServiceConfigGenerator.kt:476 */
   95    117   
impl ::std::default::Default for Builder {
         118  +
    /* ServiceConfigGenerator.kt:477 */
   96    119   
    fn default() -> Self {
   97    120   
        Self {
   98    121   
            config: ::std::default::Default::default(),
   99    122   
            runtime_components: crate::config::RuntimeComponentsBuilder::new("service config"),
  100    123   
            runtime_plugins: ::std::default::Default::default(),
  101    124   
            behavior_version: ::std::default::Default::default(),
  102    125   
        }
  103    126   
    }
         127  +
    /* ServiceConfigGenerator.kt:476 */
  104    128   
}
         129  +
/* ServiceConfigGenerator.kt:492 */
  105    130   
impl Builder {
  106         -
    ///
         131  +
    /// /* ServiceConfigGenerator.kt:493 */
  107    132   
    /// Constructs a config builder.
  108    133   
    /// <div class="warning">
  109    134   
    /// Note that a config created from this builder will not have the same safe defaults as one created by
  110    135   
    /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
  111    136   
    /// </div>
  112    137   
    ///
         138  +
    /* ServiceConfigGenerator.kt:494 */
  113    139   
    pub fn new() -> Self {
  114    140   
        Self::default()
  115    141   
    }
  116         -
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  117         -
    /// but not those in runtime components.
         142  +
    /// /* ServiceConfigGenerator.kt:327 */Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
         143  +
    /// /* ServiceConfigGenerator.kt:328 */but not those in runtime components.
         144  +
    /* RustType.kt:516 */
  118    145   
    #[allow(unused)]
         146  +
    /* ServiceConfigGenerator.kt:330 */
  119    147   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
         148  +
        /* ServiceConfigGenerator.kt:334 */
  120    149   
        let mut builder = Self::new();
         150  +
        /* StalledStreamProtectionConfigCustomization.kt:102 */
  121    151   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         152  +
        /* ResiliencyConfigCustomization.kt:294 */
  122    153   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
         154  +
        /* ResiliencyConfigCustomization.kt:298 */
  123    155   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
         156  +
        /* ResiliencyConfigCustomization.kt:302 */
  124    157   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
         158  +
        /* ServiceConfigGenerator.kt:338 */
  125    159   
        builder
         160  +
        /* ServiceConfigGenerator.kt:330 */
  126    161   
    }
         162  +
    /* StalledStreamProtectionConfigCustomization.kt:69 */
  127    163   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  128    164   
    /// to configure protection for stalled streams.
  129    165   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  130    166   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  131    167   
        self
  132    168   
    }
         169  +
    /* StalledStreamProtectionConfigCustomization.kt:84 */
  133    170   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  134    171   
    /// to configure protection for stalled streams.
  135    172   
    pub fn set_stalled_stream_protection(
  136    173   
        &mut self,
  137    174   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  138    175   
    ) -> &mut Self {
  139    176   
        self.config.store_or_unset(stalled_stream_protection_config);
  140    177   
        self
  141    178   
    }
         179  +
    /* HttpConnectorConfigDecorator.kt:65 */
  142    180   
    /// Sets the HTTP client to use when making requests.
  143    181   
    ///
  144    182   
    /// # Examples
  145    183   
    /// ```no_run
  146    184   
    /// # #[cfg(test)]
  147    185   
    /// # mod tests {
  148    186   
    /// # #[test]
  149    187   
    /// # fn example() {
  150    188   
    /// use std::time::Duration;
  151    189   
    /// use endpoint_rules::config::Config;
@@ -179,217 +466,516 @@
  199    237   
    /// let mut builder = endpoint_rules::Config::builder();
  200    238   
    /// override_http_client(&mut builder);
  201    239   
    /// let config = builder.build();
  202    240   
    /// # }
  203    241   
    /// # }
  204    242   
    /// ```
  205    243   
    pub fn set_http_client(&mut self, http_client: Option<crate::config::SharedHttpClient>) -> &mut Self {
  206    244   
        self.runtime_components.set_http_client(http_client);
  207    245   
        self
  208    246   
    }
         247  +
    /* EndpointConfigCustomization.kt:73 */
  209    248   
    /// Set the endpoint URL to use when making requests.
  210    249   
    ///
  211    250   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  212    251   
    ///
  213    252   
    /// # Panics
  214    253   
    /// Panics if an invalid URL is given.
  215    254   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  216    255   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  217    256   
        self
  218    257   
    }
  219    258   
  220    259   
    /// Set the endpoint URL to use when making requests.
  221    260   
    ///
  222    261   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  223    262   
    ///
  224    263   
    /// # Panics
  225    264   
    /// Panics if an invalid URL is given.
  226    265   
    pub fn set_endpoint_url(&mut self, endpoint_url: ::std::option::Option<::std::string::String>) -> &mut Self {
  227    266   
        #[allow(deprecated)]
  228    267   
        self.set_endpoint_resolver(endpoint_url.map(|url| {
  229    268   
            ::aws_smithy_runtime_api::shared::IntoShared::into_shared(
  230    269   
                ::aws_smithy_runtime::client::orchestrator::endpoints::StaticUriEndpointResolver::uri(url),
  231    270   
            )
  232    271   
        }));
  233    272   
        self
  234    273   
    }
         274  +
    /* EndpointConfigCustomization.kt:105 */
  235    275   
    /// Sets the endpoint resolver to use when making requests.
  236    276   
    ///
  237    277   
  238    278   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  239    279   
    /// rules for `endpoint_rules`.
  240    280   
  241    281   
    ///
  242    282   
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
  243    283   
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
  244    284   
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
  245    285   
    ///
  246    286   
    /// # Examples
  247    287   
    /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production.
  248    288   
    /// ```no_run
  249    289   
    /// use endpoint_rules::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint};
  250    290   
    /// #[derive(Debug)]
  251    291   
    /// struct StageResolver { stage: String }
  252    292   
    /// impl ResolveEndpoint for StageResolver {
  253    293   
    ///     fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> {
  254    294   
    ///         let stage = &self.stage;
  255    295   
    ///         EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build()))
  256    296   
    ///     }
  257    297   
    /// }
  258    298   
    /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() };
  259    299   
    /// let config = endpoint_rules::Config::builder().endpoint_resolver(resolver).build();
  260    300   
    /// let client = endpoint_rules::Client::from_conf(config);
  261    301   
    /// ```
  262    302   
    pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self {
  263    303   
        self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver()));
  264    304   
        self
  265    305   
    }
  266    306   
  267    307   
    /// Sets the endpoint resolver to use when making requests.
  268    308   
    ///
  269    309   
  270    310   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  271    311   
    /// rules for `endpoint_rules`.
         312  +
    /* EndpointConfigCustomization.kt:143 */
  272    313   
    pub fn set_endpoint_resolver(
  273    314   
        &mut self,
  274    315   
        endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>,
  275    316   
    ) -> &mut Self {
  276    317   
        self.runtime_components.set_endpoint_resolver(endpoint_resolver);
  277    318   
        self
  278    319   
    }
         320  +
    /* ResiliencyConfigCustomization.kt:81 */
  279    321   
    /// Set the retry_config for the builder
  280    322   
    ///
  281    323   
    /// # Examples
  282    324   
    /// ```no_run
  283    325   
    /// use endpoint_rules::config::Config;
  284    326   
    /// use endpoint_rules::config::retry::RetryConfig;
  285    327   
    ///
  286    328   
    /// let retry_config = RetryConfig::standard().with_max_attempts(5);
  287    329   
    /// let config = Config::builder().retry_config(retry_config).build();
  288    330   
    /// ```
  289    331   
    pub fn retry_config(mut self, retry_config: ::aws_smithy_types::retry::RetryConfig) -> Self {
  290    332   
        self.set_retry_config(Some(retry_config));
  291    333   
        self
  292    334   
    }
  293    335   
  294    336   
    /// Set the retry_config for the builder
  295    337   
    ///
  296    338   
    /// # Examples
  297    339   
    /// ```no_run
  298    340   
    /// use endpoint_rules::config::{Builder, Config};
  299    341   
    /// use endpoint_rules::config::retry::RetryConfig;
  300    342   
    ///
  301    343   
    /// fn disable_retries(builder: &mut Builder) {
  302    344   
    ///     let retry_config = RetryConfig::standard().with_max_attempts(1);
  303    345   
    ///     builder.set_retry_config(Some(retry_config));
  304    346   
    /// }
  305    347   
    ///
  306    348   
    /// let mut builder = Config::builder();
  307    349   
    /// disable_retries(&mut builder);
  308    350   
    /// let config = builder.build();
  309    351   
    /// ```
         352  +
    /* ResiliencyConfigCustomization.kt:118 */
  310    353   
    pub fn set_retry_config(&mut self, retry_config: ::std::option::Option<::aws_smithy_types::retry::RetryConfig>) -> &mut Self {
  311    354   
        retry_config.map(|r| self.config.store_put(r));
  312    355   
        self
  313    356   
    }
         357  +
    /* ResiliencyConfigCustomization.kt:128 */
  314    358   
    /// Set the sleep_impl for the builder
  315    359   
    ///
  316    360   
    /// # Examples
  317    361   
    ///
  318    362   
    /// ```no_run
  319    363   
    /// use endpoint_rules::config::{AsyncSleep, Config, SharedAsyncSleep, Sleep};
  320    364   
    ///
  321    365   
    /// #[derive(Debug)]
  322    366   
    /// pub struct ForeverSleep;
  323    367   
    ///
  324    368   
    /// impl AsyncSleep for ForeverSleep {
  325    369   
    ///     fn sleep(&self, duration: std::time::Duration) -> Sleep {
  326    370   
    ///         Sleep::new(std::future::pending())
  327    371   
    ///     }
  328    372   
    /// }
  329    373   
    ///
  330    374   
    /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
  331    375   
    /// let config = Config::builder().sleep_impl(sleep_impl).build();
  332    376   
    /// ```
  333    377   
    pub fn sleep_impl(mut self, sleep_impl: impl crate::config::AsyncSleep + 'static) -> Self {
  334    378   
        self.set_sleep_impl(Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(sleep_impl)));
  335    379   
        self
  336    380   
    }
  337    381   
  338    382   
    /// Set the sleep_impl for the builder
  339    383   
    ///
  340    384   
    /// # Examples
  341    385   
    ///
  342    386   
    /// ```no_run
  343    387   
    /// use endpoint_rules::config::{AsyncSleep, Builder, Config, SharedAsyncSleep, Sleep};
  344    388   
    ///
  345    389   
    /// #[derive(Debug)]
  346    390   
    /// pub struct ForeverSleep;
  347    391   
    ///
  348    392   
    /// impl AsyncSleep for ForeverSleep {
  349    393   
    ///     fn sleep(&self, duration: std::time::Duration) -> Sleep {
  350    394   
    ///         Sleep::new(std::future::pending())
  351    395   
    ///     }
  352    396   
    /// }
  353    397   
    ///
  354    398   
    /// fn set_never_ending_sleep_impl(builder: &mut Builder) {
  355    399   
    ///     let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
  356    400   
    ///     builder.set_sleep_impl(Some(sleep_impl));
  357    401   
    /// }
  358    402   
    ///
  359    403   
    /// let mut builder = Config::builder();
  360    404   
    /// set_never_ending_sleep_impl(&mut builder);
  361    405   
    /// let config = builder.build();
  362    406   
    /// ```
         407  +
    /* ResiliencyConfigCustomization.kt:184 */
  363    408   
    pub fn set_sleep_impl(&mut self, sleep_impl: ::std::option::Option<crate::config::SharedAsyncSleep>) -> &mut Self {
  364    409   
        self.runtime_components.set_sleep_impl(sleep_impl);
  365    410   
        self
  366    411   
    }
         412  +
    /* ResiliencyConfigCustomization.kt:194 */
  367    413   
    /// Set the timeout_config for the builder
  368    414   
    ///
  369    415   
    /// # Examples
  370    416   
    ///
  371    417   
    /// ```no_run
  372    418   
    /// # use std::time::Duration;
  373    419   
    /// use endpoint_rules::config::Config;
  374    420   
    /// use endpoint_rules::config::timeout::TimeoutConfig;
  375    421   
    ///
  376    422   
    /// let timeout_config = TimeoutConfig::builder()
  377    423   
    ///     .operation_attempt_timeout(Duration::from_secs(1))
  378    424   
    ///     .build();
  379    425   
    /// let config = Config::builder().timeout_config(timeout_config).build();
  380    426   
    /// ```
  381    427   
    pub fn timeout_config(mut self, timeout_config: ::aws_smithy_types::timeout::TimeoutConfig) -> Self {
  382    428   
        self.set_timeout_config(Some(timeout_config));
  383    429   
        self
  384    430   
    }
  385    431   
  386    432   
    /// Set the timeout_config for the builder.
  387    433   
    ///
  388    434   
    /// Setting this to `None` has no effect if another source of configuration has set timeouts. If you
  389    435   
    /// are attempting to disable timeouts, use [`TimeoutConfig::disabled`](::aws_smithy_types::timeout::TimeoutConfig::disabled)
  390    436   
    ///
  391    437   
    ///
  392    438   
    /// # Examples
  393    439   
    ///
  394    440   
    /// ```no_run
  395    441   
    /// # use std::time::Duration;
  396    442   
    /// use endpoint_rules::config::{Builder, Config};
  397    443   
    /// use endpoint_rules::config::timeout::TimeoutConfig;
  398    444   
    ///
  399    445   
    /// fn set_request_timeout(builder: &mut Builder) {
  400    446   
    ///     let timeout_config = TimeoutConfig::builder()
  401    447   
    ///         .operation_attempt_timeout(Duration::from_secs(1))
  402    448   
    ///         .build();
  403    449   
    ///     builder.set_timeout_config(Some(timeout_config));
  404    450   
    /// }
  405    451   
    ///
  406    452   
    /// let mut builder = Config::builder();
  407    453   
    /// set_request_timeout(&mut builder);
  408    454   
    /// let config = builder.build();
  409    455   
    /// ```
         456  +
    /* ResiliencyConfigCustomization.kt:248 */
  410    457   
    pub fn set_timeout_config(&mut self, timeout_config: ::std::option::Option<::aws_smithy_types::timeout::TimeoutConfig>) -> &mut Self {
  411    458   
        // passing None has no impact.
  412    459   
        let Some(mut timeout_config) = timeout_config else { return self };
  413    460   
  414    461   
        if let Some(base) = self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>() {
  415    462   
            timeout_config.take_defaults_from(base);
  416    463   
        }
  417    464   
        self.config.store_put(timeout_config);
  418    465   
        self
  419    466   
    }
         467  +
    /* ResiliencyConfigCustomization.kt:266 */
  420    468   
    /// Set the partition for retry-related state. When clients share a retry partition, they will
  421    469   
    /// also share things like token buckets and client rate limiters. By default, all clients
  422    470   
    /// for the same service will share a partition.
  423    471   
    pub fn retry_partition(mut self, retry_partition: ::aws_smithy_runtime::client::retries::RetryPartition) -> Self {
  424    472   
        self.set_retry_partition(Some(retry_partition));
  425    473   
        self
  426    474   
    }
         475  +
    /* ResiliencyConfigCustomization.kt:279 */
  427    476   
    /// Set the partition for retry-related state. When clients share a retry partition, they will
  428    477   
    /// also share things like token buckets and client rate limiters. By default, all clients
  429    478   
    /// for the same service will share a partition.
  430    479   
    pub fn set_retry_partition(
  431    480   
        &mut self,
  432    481   
        retry_partition: ::std::option::Option<::aws_smithy_runtime::client::retries::RetryPartition>,
  433    482   
    ) -> &mut Self {
  434    483   
        retry_partition.map(|r| self.config.store_put(r));
  435    484   
        self
  436    485   
    }
         486  +
    /* IdentityCacheDecorator.kt:77 */
  437    487   
    /// Set the identity cache for auth.
  438    488   
    ///
  439    489   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  440    490   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  441    491   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  442    492   
    /// the next request will result in refreshing the identity.
  443    493   
    ///
  444    494   
    /// This configuration allows you to disable or change the default caching mechanism.
  445    495   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  446    496   
    /// trait and pass that implementation into this function.
@@ -498,548 +557,608 @@
  518    568   
    ///     )
  519    569   
    ///     // ...
  520    570   
    ///     .build();
  521    571   
    /// let client = endpoint_rules::Client::from_conf(config);
  522    572   
    /// ```
  523    573   
  524    574   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  525    575   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  526    576   
        self
  527    577   
    }
         578  +
    /* InterceptorConfigCustomization.kt:41 */
  528    579   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  529    580   
    ///
  530    581   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  531    582   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  532    583   
    /// will run after those default interceptors.
  533    584   
    ///
  534    585   
    /// # Examples
  535    586   
    /// ```no_run
  536    587   
    /// # #[cfg(test)]
  537    588   
    /// # mod tests {
@@ -604,655 +675,729 @@
  624    675   
    pub fn push_interceptor(&mut self, interceptor: crate::config::SharedInterceptor) -> &mut Self {
  625    676   
        self.runtime_components.push_interceptor(interceptor);
  626    677   
        self
  627    678   
    }
  628    679   
  629    680   
    /// Set [`SharedInterceptor`](crate::config::SharedInterceptor)s for the builder.
  630    681   
    pub fn set_interceptors(&mut self, interceptors: impl IntoIterator<Item = crate::config::SharedInterceptor>) -> &mut Self {
  631    682   
        self.runtime_components.set_interceptors(interceptors.into_iter());
  632    683   
        self
  633    684   
    }
         685  +
    /* TimeSourceCustomization.kt:47 */
  634    686   
    /// Sets the time source used for this service
  635    687   
    pub fn time_source(mut self, time_source: impl ::aws_smithy_async::time::TimeSource + 'static) -> Self {
  636    688   
        self.set_time_source(::std::option::Option::Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(
  637    689   
            time_source,
  638    690   
        )));
  639    691   
        self
  640    692   
    }
         693  +
    /* TimeSourceCustomization.kt:61 */
  641    694   
    /// Sets the time source used for this service
  642    695   
    pub fn set_time_source(&mut self, time_source: ::std::option::Option<::aws_smithy_async::time::SharedTimeSource>) -> &mut Self {
  643    696   
        self.runtime_components.set_time_source(time_source);
  644    697   
        self
  645    698   
    }
         699  +
    /* RetryClassifierConfigCustomization.kt:50 */
  646    700   
    /// Add type implementing [`ClassifyRetry`](::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry) that will be used by the
  647    701   
    /// [`RetryStrategy`](::aws_smithy_runtime_api::client::retries::RetryStrategy) to determine what responses should be retried.
  648    702   
    ///
  649    703   
    /// A retry classifier configured by this method will run according to its [priority](::aws_smithy_runtime_api::client::retries::classifiers::RetryClassifierPriority).
  650    704   
    ///
  651    705   
    /// # Examples
  652    706   
    /// ```no_run
  653    707   
    /// # #[cfg(test)]
  654    708   
    /// # mod tests {
  655    709   
    /// # #[test]
@@ -810,864 +869,924 @@
  830    884   
  831    885   
    /// Set [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier)s for the builder, replacing any that
  832    886   
    /// were previously set.
  833    887   
    pub fn set_retry_classifiers(
  834    888   
        &mut self,
  835    889   
        retry_classifiers: impl IntoIterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier>,
  836    890   
    ) -> &mut Self {
  837    891   
        self.runtime_components.set_retry_classifiers(retry_classifiers.into_iter());
  838    892   
        self
  839    893   
    }
         894  +
    /* ServiceConfigGenerator.kt:375 */
  840    895   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  841    896   
    ///
  842    897   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  843    898   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  844    899   
    /// all operations might be the ideal behavior but could break existing applications.
  845    900   
    ///
  846    901   
    /// # Examples
  847    902   
    ///
  848    903   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  849    904   
    /// ```no_run
@@ -887,942 +1148,1247 @@
  907    962   
        self
  908    963   
    }
  909    964   
  910    965   
    /// Convenience method to set the latest behavior major version
  911    966   
    ///
  912    967   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  913    968   
    pub fn behavior_version_latest(mut self) -> Self {
  914    969   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
  915    970   
        self
  916    971   
    }
  917         -
    /// Adds a runtime plugin to the config.
         972  +
    /// /* ServiceConfigGenerator.kt:509 */Adds a runtime plugin to the config.
         973  +
    /* ServiceConfigGenerator.kt:513 */
  918    974   
    pub fn runtime_plugin(mut self, plugin: impl crate::config::RuntimePlugin + 'static) -> Self {
  919    975   
        self.push_runtime_plugin(crate::config::SharedRuntimePlugin::new(plugin));
  920    976   
        self
  921    977   
    }
  922         -
    /// Adds a runtime plugin to the config.
         978  +
    /// /* ServiceConfigGenerator.kt:522 */Adds a runtime plugin to the config.
         979  +
    /* ServiceConfigGenerator.kt:526 */
  923    980   
    pub fn push_runtime_plugin(&mut self, plugin: crate::config::SharedRuntimePlugin) -> &mut Self {
  924    981   
        self.runtime_plugins.push(plugin);
  925    982   
        self
  926    983   
    }
         984  +
    /* RustType.kt:516 */
  927    985   
    #[cfg(any(feature = "test-util", test))]
         986  +
    /* RustType.kt:516 */
  928    987   
    #[allow(unused_mut)]
  929         -
    /// Apply test defaults to the builder
         988  +
    /// /* ServiceConfigGenerator.kt:541 */Apply test defaults to the builder
         989  +
    /* ServiceConfigGenerator.kt:542 */
  930    990   
    pub fn apply_test_defaults(&mut self) -> &mut Self {
         991  +
        /* TimeSourceCustomization.kt:88 */
  931    992   
        self.set_time_source(::std::option::Option::Some(::aws_smithy_async::time::SharedTimeSource::new(
  932    993   
            ::aws_smithy_async::time::StaticTimeSource::new(::std::time::UNIX_EPOCH + ::std::time::Duration::from_secs(1234567890)),
  933    994   
        )));
         995  +
        /* ServiceConfigGenerator.kt:544 */
  934    996   
        self.behavior_version = ::std::option::Option::Some(crate::config::BehaviorVersion::latest());
         997  +
        /* ServiceConfigGenerator.kt:545 */
  935    998   
        self
         999  +
        /* ServiceConfigGenerator.kt:542 */
  936   1000   
    }
        1001  +
    /* RustType.kt:516 */
  937   1002   
    #[cfg(any(feature = "test-util", test))]
        1003  +
    /* RustType.kt:516 */
  938   1004   
    #[allow(unused_mut)]
  939         -
    /// Apply test defaults to the builder
        1005  +
    /// /* ServiceConfigGenerator.kt:550 */Apply test defaults to the builder
        1006  +
    /* ServiceConfigGenerator.kt:551 */
  940   1007   
    pub fn with_test_defaults(mut self) -> Self {
        1008  +
        /* ServiceConfigGenerator.kt:552 */
  941   1009   
        self.apply_test_defaults();
  942   1010   
        self
        1011  +
        /* ServiceConfigGenerator.kt:551 */
  943   1012   
    }
  944         -
    /// Builds a [`Config`].
        1013  +
    /// /* ServiceConfigGenerator.kt:555 */Builds a [`Config`].
        1014  +
    /* ServiceConfigGenerator.kt:556 */
  945   1015   
    #[allow(unused_mut)]
        1016  +
    /* ServiceConfigGenerator.kt:557 */
  946   1017   
    pub fn build(mut self) -> Config {
        1018  +
        /* ServiceConfigGenerator.kt:558 */
  947   1019   
        let mut layer = self.config;
        1020  +
        /* TimeSourceCustomization.kt:77 */
  948   1021   
        if self.runtime_components.time_source().is_none() {
  949   1022   
            self.runtime_components
  950   1023   
                .set_time_source(::std::option::Option::Some(::std::default::Default::default()));
  951   1024   
        }
        1025  +
        /* ServiceConfigGenerator.kt:567 */
  952   1026   
        Config {
        1027  +
            /* ServiceConfigGenerator.kt:568 */
  953   1028   
            config: crate::config::Layer::from(layer.clone())
  954   1029   
                .with_name("endpoint_rules::config::Config")
  955   1030   
                .freeze(),
  956   1031   
            cloneable: layer,
  957   1032   
            runtime_components: self.runtime_components,
  958   1033   
            runtime_plugins: self.runtime_plugins,
  959   1034   
            behavior_version: self.behavior_version,
        1035  +
            /* ServiceConfigGenerator.kt:567 */
  960   1036   
        }
        1037  +
        /* ServiceConfigGenerator.kt:557 */
  961   1038   
    }
        1039  +
    /* ServiceConfigGenerator.kt:492 */
  962   1040   
}
        1041  +
/* ServiceRuntimePluginGenerator.kt:116 */
  963   1042   
#[derive(::std::fmt::Debug)]
  964   1043   
pub(crate) struct ServiceRuntimePlugin {
  965   1044   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
  966   1045   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  967   1046   
}
  968   1047   
  969   1048   
impl ServiceRuntimePlugin {
  970   1049   
    pub fn new(_service_config: crate::config::Config) -> Self {
  971   1050   
        let config = {
  972   1051   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("TestService");
  973   1052   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
  974   1053   
            ::std::option::Option::Some(cfg.freeze())
  975   1054   
        };
  976   1055   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
  977   1056   
        runtime_components.set_endpoint_resolver(Some({
  978   1057   
            use crate::config::endpoint::ResolveEndpoint;
  979   1058   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
  980   1059   
        }));
  981   1060   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
  982   1061   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
  983   1062   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
  984   1063   
        Self { config, runtime_components }
  985   1064   
    }
  986   1065   
}
  987   1066   
  988   1067   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
  989   1068   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
  990   1069   
        self.config.clone()
  991   1070   
    }
  992   1071   
  993   1072   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {
  994   1073   
        ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults
  995   1074   
    }
  996   1075   
  997   1076   
    fn runtime_components(
  998   1077   
        &self,
  999   1078   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1000   1079   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1001   1080   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
 1002   1081   
    }
 1003   1082   
}
 1004   1083   
 1005   1084   
/// Cross-operation shared-state singletons
 1006   1085   
        1086  +
/* ConfigOverrideRuntimePluginGenerator.kt:42 */
 1007   1087   
/// A plugin that enables configuration for a single operation invocation
 1008   1088   
///
 1009   1089   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1010   1090   
/// In the case of default values requested, they will be obtained from `client_config`.
 1011   1091   
#[derive(Debug)]
 1012   1092   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1013   1093   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1014   1094   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1015   1095   
}
 1016   1096   
 1017   1097   
impl ConfigOverrideRuntimePlugin {
 1018   1098   
    #[allow(dead_code)] // unused when a service does not provide any operations
 1019   1099   
    pub(crate) fn new(
 1020   1100   
        config_override: Builder,
 1021   1101   
        initial_config: ::aws_smithy_types::config_bag::FrozenLayer,
 1022   1102   
        initial_components: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1023   1103   
    ) -> Self {
 1024   1104   
        let mut layer = config_override.config;
 1025   1105   
        let mut components = config_override.runtime_components;
 1026   1106   
        #[allow(unused_mut)]
 1027   1107   
        let mut resolver =
 1028   1108   
            ::aws_smithy_runtime::client::config_override::Resolver::overrid(initial_config, initial_components, &mut layer, &mut components);
 1029   1109   
 1030   1110   
        let _ = resolver;
 1031   1111   
        Self {
 1032   1112   
            config: ::aws_smithy_types::config_bag::Layer::from(layer)
 1033   1113   
                .with_name("endpoint_rules::config::ConfigOverrideRuntimePlugin")
 1034   1114   
                .freeze(),
 1035   1115   
            components,
 1036   1116   
        }
 1037   1117   
    }
 1038   1118   
}
 1039   1119   
 1040   1120   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ConfigOverrideRuntimePlugin {
 1041   1121   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1042   1122   
        Some(self.config.clone())
 1043   1123   
    }
 1044   1124   
 1045   1125   
    fn runtime_components(
 1046   1126   
        &self,
 1047   1127   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1048   1128   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1049   1129   
        ::std::borrow::Cow::Borrowed(&self.components)
 1050   1130   
    }
 1051   1131   
}
 1052   1132   
        1133  +
/* ClientRuntimeTypesReExportGenerator.kt:24 */
 1053   1134   
pub use ::aws_smithy_runtime::client::identity::IdentityCache;
 1054   1135   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1055   1136   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1056   1137   
        1138  +
/* ResiliencyConfigCustomization.kt:318 */
 1057   1139   
pub use ::aws_smithy_async::rt::sleep::Sleep;
 1058   1140   
        1141  +
/* FluentClientGenerator.kt:261 */
 1059   1142   
pub(crate) fn base_client_runtime_plugins(mut config: crate::Config) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
 1060   1143   
    let mut configured_plugins = ::std::vec::Vec::new();
 1061   1144   
    ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins);
 1062   1145   
    #[cfg(feature = "behavior-version-latest")]
 1063   1146   
    {
 1064   1147   
        if config.behavior_version.is_none() {
 1065   1148   
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
 1066   1149   
        }
 1067   1150   
    }
 1068   1151   
 1069   1152   
    let default_retry_partition = "testservice";
 1070   1153   
 1071   1154   
    let scope = "endpoint-rules";
 1072   1155   
 1073   1156   
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
 1074   1157   
                        // defaults
 1075   1158   
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
 1076   1159   
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
 1077   1160   
                                .with_retry_partition_name(default_retry_partition)
 1078   1161   
                                .with_behavior_version(config.behavior_version.expect("Invalid client configuration: A behavior major version must be set when sending a request or constructing a client. You must set it during client construction or by enabling the `behavior-version-latest` cargo feature."))
 1079   1162   
                        ))
 1080   1163   
                        // user config
 1081   1164   
                        .with_client_plugin(
 1082   1165   
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
 1083   1166   
                                .with_config(config.config.clone())
 1084   1167   
                                .with_runtime_components(config.runtime_components.clone())
 1085   1168   
                        )
 1086   1169   
                        // codegen config
 1087   1170   
                        .with_client_plugin(crate::config::ServiceRuntimePlugin::new(config.clone()))
 1088   1171   
                        .with_client_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePlugin::new())
 1089   1172   
                        .with_client_plugin(
 1090   1173   
                            ::aws_smithy_runtime::client::metrics::MetricsRuntimePlugin::builder()
 1091   1174   
                                .with_scope(scope)
 1092   1175   
                                .with_time_source(config.runtime_components.time_source().unwrap_or_default())
 1093   1176   
                                .build()
 1094   1177   
                                .expect("All required fields have been set")
 1095   1178   
                        );
 1096   1179   
 1097   1180   
    for plugin in configured_plugins {
 1098   1181   
        plugins = plugins.with_client_plugin(plugin);
 1099   1182   
    }
 1100   1183   
    plugins
 1101   1184   
}
 1102   1185   
        1186  +
/* ClientReExports.kt:17 */
 1103   1187   
pub use ::aws_smithy_types::config_bag::FrozenLayer;
 1104   1188   
        1189  +
/* ClientReExports.kt:17 */
 1105   1190   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
 1106   1191   
        1192  +
/* ClientReExports.kt:17 */
 1107   1193   
pub use ::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin;
 1108   1194   
        1195  +
/* ClientReExports.kt:17 */
 1109   1196   
pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
 1110   1197   
        1198  +
/* ClientReExports.kt:17 */
 1111   1199   
pub use ::aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
 1112   1200   
        1201  +
/* ClientReExports.kt:17 */
 1113   1202   
pub use ::aws_smithy_runtime_api::client::http::SharedHttpClient;
 1114   1203   
        1204  +
/* ClientReExports.kt:17 */
 1115   1205   
pub use ::aws_smithy_async::rt::sleep::SharedAsyncSleep;
 1116   1206   
        1207  +
/* ClientReExports.kt:17 */
 1117   1208   
pub use ::aws_smithy_runtime_api::client::identity::SharedIdentityCache;
 1118   1209   
        1210  +
/* ClientReExports.kt:17 */
 1119   1211   
pub use ::aws_smithy_runtime_api::client::interceptors::SharedInterceptor;
 1120   1212   
        1213  +
/* ClientReExports.kt:17 */
 1121   1214   
pub use ::aws_smithy_runtime_api::client::http::HttpClient;
 1122   1215   
        1216  +
/* ClientReExports.kt:17 */
 1123   1217   
pub use ::aws_smithy_runtime_api::shared::IntoShared;
 1124   1218   
        1219  +
/* ClientReExports.kt:17 */
 1125   1220   
pub use ::aws_smithy_async::rt::sleep::AsyncSleep;
 1126   1221   
        1222  +
/* ClientReExports.kt:17 */
 1127   1223   
pub use ::aws_smithy_runtime_api::client::identity::ResolveCachedIdentity;
 1128   1224   
        1225  +
/* ClientReExports.kt:17 */
 1129   1226   
pub use ::aws_smithy_runtime_api::client::interceptors::Intercept;
 1130   1227   
        1228  +
/* ClientReExports.kt:17 */
 1131   1229   
pub use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
 1132   1230   
        1231  +
/* ClientReExports.kt:17 */
 1133   1232   
pub use ::aws_smithy_types::config_bag::Layer;
 1134   1233   
 1135         -
/// Types needed to configure endpoint resolution.
        1234  +
/// /* ClientRustModule.kt:121 */Types needed to configure endpoint resolution.
 1136   1235   
pub mod endpoint;
 1137   1236   
 1138         -
/// HTTP request and response types.
        1237  +
/// /* ClientRustModule.kt:121 */HTTP request and response types.
 1139   1238   
pub mod http;
 1140   1239   
 1141         -
/// Types needed to implement [`Intercept`](crate::config::Intercept).
        1240  +
/// /* ClientRustModule.kt:121 */Types needed to implement [`Intercept`](crate::config::Intercept).
 1142   1241   
pub mod interceptors;
 1143   1242   
 1144         -
/// Retry configuration.
        1243  +
/// /* ClientRustModule.kt:121 */Retry configuration.
 1145   1244   
pub mod retry;
 1146   1245   
 1147         -
/// Timeout configuration.
        1246  +
/// /* ClientRustModule.kt:121 */Timeout configuration.
 1148   1247   
pub mod timeout;

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/config/endpoint.rs

@@ -1,1 +133,161 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:38 */
    2      3   
pub use ::aws_smithy_runtime_api::client::endpoint::EndpointFuture;
    3      4   
pub use ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver;
    4      5   
pub use ::aws_smithy_types::endpoint::Endpoint;
    5      6   
           7  +
/* RustType.kt:516 */
    6      8   
#[cfg(test)]
    7         -
mod test {}
           9  +
/* EndpointsDecorator.kt:175 */
          10  +
mod test {
    8     11   
          12  +
    /* EndpointsDecorator.kt:175 */
          13  +
}
          14  +
          15  +
/* EndpointResolverGenerator.kt:416 */
    9     16   
/// Endpoint resolver trait specific to this service
   10     17   
pub trait ResolveEndpoint: ::std::marker::Send + ::std::marker::Sync + ::std::fmt::Debug {
   11     18   
    /// Resolve an endpoint with the given parameters
   12     19   
    fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a>;
   13     20   
   14     21   
    /// Convert this service-specific resolver into a `SharedEndpointResolver`
   15     22   
    ///
   16     23   
    /// The resulting resolver will downcast `EndpointResolverParams` into `crate::config::endpoint::Params`.
   17     24   
    fn into_shared_resolver(self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver
   18     25   
    where
   19     26   
        Self: Sized + 'static,
   20     27   
    {
   21     28   
        ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver::new(DowncastParams(self))
   22     29   
    }
   23     30   
}
   24     31   
   25     32   
#[derive(Debug)]
   26     33   
struct DowncastParams<T>(T);
   27     34   
impl<T> ::aws_smithy_runtime_api::client::endpoint::ResolveEndpoint for DowncastParams<T>
   28     35   
where
   29     36   
    T: ResolveEndpoint,
   30     37   
{
   31     38   
    fn resolve_endpoint<'a>(
   32     39   
        &'a self,
   33     40   
        params: &'a ::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams,
   34     41   
    ) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
   35     42   
        let ep = match params.get::<crate::config::endpoint::Params>() {
   36     43   
            Some(params) => self.0.resolve_endpoint(params),
   37     44   
            None => ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(Err("params of expected type was not present".into())),
   38     45   
        };
   39     46   
        ep
   40     47   
    }
   41     48   
}
   42     49   
          50  +
/* EndpointResolverGenerator.kt:186 */
   43     51   
/// The default endpoint resolver
   44     52   
#[derive(Debug, Default)]
   45     53   
pub struct DefaultResolver {}
   46     54   
   47     55   
impl DefaultResolver {
   48     56   
    /// Create a new endpoint resolver with default settings
   49     57   
    pub fn new() -> Self {
   50     58   
        Self {}
   51     59   
    }
   52     60   
   53     61   
    fn resolve_endpoint(
   54     62   
        &self,
   55     63   
        params: &crate::config::endpoint::Params,
   56     64   
    ) -> ::std::result::Result<::aws_smithy_types::endpoint::Endpoint, ::aws_smithy_runtime_api::box_error::BoxError> {
   57     65   
        let mut diagnostic_collector = crate::endpoint_lib::diagnostic::DiagnosticCollector::new();
   58     66   
        Ok(crate::config::endpoint::internals::resolve_endpoint(params, &mut diagnostic_collector)
   59     67   
            .map_err(|err| err.with_source(diagnostic_collector.take_last_error()))?)
   60     68   
    }
   61     69   
}
   62     70   
   63     71   
impl crate::config::endpoint::ResolveEndpoint for DefaultResolver {
   64     72   
    fn resolve_endpoint(&self, params: &crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture {
   65     73   
        ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(self.resolve_endpoint(params))
   66     74   
    }
   67     75   
}
   68     76   
          77  +
/* RustType.kt:516 */
   69     78   
#[non_exhaustive]
          79  +
/* RustType.kt:516 */
   70     80   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   71         -
/// Configuration parameters for resolving the correct endpoint
          81  +
/// /* EndpointParamsGenerator.kt:178 */Configuration parameters for resolving the correct endpoint
          82  +
/* EndpointParamsGenerator.kt:179 */
   72     83   
pub struct Params {
          84  +
    /* EndpointParamsGenerator.kt:183 */
   73     85   
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
          86  +
    /* EndpointParamsGenerator.kt:179 */
   74     87   
}
          88  +
/* EndpointParamsGenerator.kt:188 */
   75     89   
impl Params {
          90  +
    /* EndpointParamsGenerator.kt:189 */
   76     91   
    /// Create a builder for [`Params`]
   77     92   
    pub fn builder() -> crate::config::endpoint::ParamsBuilder {
   78     93   
        crate::config::endpoint::ParamsBuilder::default()
   79     94   
    }
   80         -
    /// Gets the value for `bucket`
          95  +
    /// /* EndpointParamsGenerator.kt:202 */Gets the value for `bucket`
          96  +
    /* EndpointParamsGenerator.kt:203 */
   81     97   
    pub fn bucket(&self) -> ::std::option::Option<&str> {
   82     98   
        self.bucket.as_deref()
   83     99   
    }
         100  +
    /* EndpointParamsGenerator.kt:188 */
   84    101   
}
   85    102   
   86         -
/// Builder for [`Params`]
         103  +
/// /* EndpointParamsGenerator.kt:234 */Builder for [`Params`]
         104  +
/* RustType.kt:516 */
   87    105   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         106  +
/* EndpointParamsGenerator.kt:238 */
   88    107   
pub struct ParamsBuilder {
   89         -
    bucket: ::std::option::Option<::std::string::String>,
         108  +
    /* EndpointParamsGenerator.kt:242 */ bucket: ::std::option::Option<::std::string::String>,
         109  +
    /* EndpointParamsGenerator.kt:238 */
   90    110   
}
         111  +
/* EndpointParamsGenerator.kt:246 */
   91    112   
impl ParamsBuilder {
   92         -
    /// Consume this builder, creating [`Params`].
         113  +
    /// /* EndpointParamsGenerator.kt:247 */Consume this builder, creating [`Params`].
         114  +
    /* EndpointParamsGenerator.kt:248 */
   93    115   
    pub fn build(self) -> ::std::result::Result<crate::config::endpoint::Params, crate::config::endpoint::InvalidParams> {
         116  +
        /* EndpointParamsGenerator.kt:272 */
   94    117   
        Ok(
   95    118   
            #[allow(clippy::unnecessary_lazy_evaluations)]
   96    119   
            crate::config::endpoint::Params { bucket: self.bucket },
   97    120   
        )
         121  +
        /* EndpointParamsGenerator.kt:248 */
   98    122   
    }
         123  +
    /* EndpointParamsGenerator.kt:279 */
   99    124   
    /// Sets the value for bucket
  100    125   
    pub fn bucket(mut self, value: impl Into<::std::string::String>) -> Self {
  101    126   
        self.bucket = Some(value.into());
  102    127   
        self
  103    128   
    }
  104    129   
  105    130   
    /// Sets the value for bucket
  106    131   
    pub fn set_bucket(mut self, param: Option<::std::string::String>) -> Self {
  107    132   
        self.bucket = param;
  108    133   
        self
  109    134   
    }
         135  +
    /* EndpointParamsGenerator.kt:246 */
  110    136   
}
  111    137   
         138  +
/* EndpointParamsGenerator.kt:139 */
  112    139   
/// An error that occurred during endpoint resolution
  113    140   
#[derive(Debug)]
  114    141   
pub struct InvalidParams {
  115    142   
    field: std::borrow::Cow<'static, str>,
  116    143   
}
  117    144   
  118    145   
impl InvalidParams {
  119    146   
    #[allow(dead_code)]
  120    147   
    fn missing(field: &'static str) -> Self {
  121    148   
        Self { field: field.into() }
  122    149   
    }
  123    150   
}
  124    151   
  125    152   
impl std::fmt::Display for InvalidParams {
  126    153   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  127    154   
        write!(f, "a required field was missing: `{}`", self.field)
  128    155   
    }
  129    156   
}
  130    157   
  131    158   
impl std::error::Error for InvalidParams {}
  132    159   
         160  +
/* RustModule.kt:172 */
  133    161   
mod internals;

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/config/endpoint/internals.rs

@@ -1,1 +19,21 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(
    3      4   
    clippy::collapsible_if,
    4      5   
    clippy::bool_comparison,
    5      6   
    clippy::nonminimal_bool,
    6      7   
    clippy::comparison_to_empty,
    7      8   
    clippy::redundant_pattern_matching,
    8      9   
    clippy::useless_asref
    9     10   
)]
          11  +
/* EndpointResolverGenerator.kt:229 */
   10     12   
pub(super) fn resolve_endpoint(
   11     13   
    _params: &crate::config::endpoint::Params,
   12     14   
    _diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector,
   13     15   
) -> ::aws_smithy_http::endpoint::Result {
   14     16   
    #[allow(unused_variables)]
   15     17   
    let bucket = &_params.bucket;
   16     18   
    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
   17     19   
        .url("https://www.example.com".to_string())
   18     20   
        .build());
   19     21   
}

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/config/http.rs

@@ -1,1 +3,4 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:60 */
    2      3   
pub use ::aws_smithy_runtime_api::client::orchestrator::HttpRequest;
    3      4   
pub use ::aws_smithy_runtime_api::client::orchestrator::HttpResponse;

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/config/interceptors.rs

@@ -1,1 +11,12 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:70 */
    2      3   
pub use ::aws_smithy_runtime_api::client::interceptors::context::AfterDeserializationInterceptorContextRef;
    3      4   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextMut;
    4      5   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextRef;
    5      6   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextMut;
    6      7   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef;
    7      8   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut;
    8      9   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextRef;
    9     10   
pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextMut;
   10     11   
pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextRef;
   11     12   
pub use ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext;

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/src/config/retry.rs

@@ -1,1 +7,9 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:48 */
    2      3   
pub use ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry;
    3      4   
pub use ::aws_smithy_runtime_api::client::retries::classifiers::RetryAction;
    4      5   
pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt;
    5      6   
    6         -
pub use ::aws_smithy_runtime::client::retries::RetryPartition;
           7  +
/* ResiliencyConfigCustomization.kt:324 */
           8  +
/* ResiliencyConfigCustomization.kt:329 */ pub use ::aws_smithy_runtime::client::retries::RetryPartition;
    7      9   
pub use ::aws_smithy_types::retry::{ReconnectMode, RetryConfig, RetryConfigBuilder, RetryMode};