Client Test

Client Test

rev. 6f149fabf4cddbe8dcdce51f882ec9bdc2ae0647 (ignoring whitespace)

Files changed:

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = rest_json_extras::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use rest_json_extras::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = rest_json_extras::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = rest_json_extras::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use rest_json_extras::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = rest_json_extras::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = rest_json_extras::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use rest_json_extras::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = rest_json_extras::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = rest_json_extras::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use rest_json_extras::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = rest_json_extras::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = rest_json_extras::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use rest_json_extras::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = rest_json_extras::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = rest_json_extras::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -966,966 +1026,1026 @@
  986    986   
    }
  987    987   
  988    988   
    fn runtime_components(
  989    989   
        &self,
  990    990   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  991    991   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  992    992   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  993    993   
    }
  994    994   
}
  995    995   
  996         -
/// Cross-operation shared-state singletons
         996  +
// Cross-operation shared-state singletons
  997    997   
  998    998   
/// A plugin that enables configuration for a single operation invocation
  999    999   
///
 1000   1000   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1001   1001   
/// In the case of default values requested, they will be obtained from `client_config`.
 1002   1002   
#[derive(Debug)]
 1003   1003   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1004   1004   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1005   1005   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1006   1006   
}

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

@@ -458,458 +564,564 @@
  478    478   
    ///     .identity_cache(
  479    479   
    ///         IdentityCache::lazy()
  480    480   
    ///             // change the load timeout to 10 seconds
  481    481   
    ///             .load_timeout(Duration::from_secs(10))
  482    482   
    ///             .build()
  483    483   
    ///     )
  484    484   
    ///     // ...
  485    485   
    ///     .build();
  486    486   
    /// let client = rest_xml::Client::from_conf(config);
  487    487   
    /// ```
  488         -
         488  +
    ///
  489    489   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  490    490   
        self.set_identity_cache(identity_cache);
  491    491   
        self
  492    492   
    }
  493    493   
  494    494   
    /// Set the identity cache for auth.
  495    495   
    ///
  496    496   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  497    497   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  498    498   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  499    499   
    /// the next request will result in refreshing the identity.
  500    500   
    ///
  501    501   
    /// This configuration allows you to disable or change the default caching mechanism.
  502    502   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  503    503   
    /// trait and pass that implementation into this function.
  504    504   
    ///
  505    505   
    /// # Examples
  506    506   
    ///
  507    507   
    /// Disabling identity caching:
  508    508   
    /// ```no_run
  509    509   
    /// use rest_xml::config::IdentityCache;
  510    510   
    ///
  511    511   
    /// let config = rest_xml::Config::builder()
  512    512   
    ///     .identity_cache(IdentityCache::no_cache())
  513    513   
    ///     // ...
  514    514   
    ///     .build();
  515    515   
    /// let client = rest_xml::Client::from_conf(config);
  516    516   
    /// ```
  517    517   
    ///
  518    518   
    /// Customizing lazy caching:
  519    519   
    /// ```no_run
  520    520   
    /// use rest_xml::config::IdentityCache;
  521    521   
    /// use std::time::Duration;
  522    522   
    ///
  523    523   
    /// let config = rest_xml::Config::builder()
  524    524   
    ///     .identity_cache(
  525    525   
    ///         IdentityCache::lazy()
  526    526   
    ///             // change the load timeout to 10 seconds
  527    527   
    ///             .load_timeout(Duration::from_secs(10))
  528    528   
    ///             .build()
  529    529   
    ///     )
  530    530   
    ///     // ...
  531    531   
    ///     .build();
  532    532   
    /// let client = rest_xml::Client::from_conf(config);
  533    533   
    /// ```
  534         -
         534  +
    ///
  535    535   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  536    536   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  537    537   
        self
  538    538   
    }
  539    539   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  540    540   
    ///
  541    541   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  542    542   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  543    543   
    /// will run after those default interceptors.
  544    544   
    ///
@@ -850,850 +945,945 @@
  870    870   
    /// Customizing behavior major version:
  871    871   
    /// ```no_run
  872    872   
    /// use rest_xml::config::BehaviorVersion;
  873    873   
    ///
  874    874   
    /// let config = rest_xml::Config::builder()
  875    875   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  876    876   
    ///     // ...
  877    877   
    ///     .build();
  878    878   
    /// let client = rest_xml::Client::from_conf(config);
  879    879   
    /// ```
  880         -
         880  +
    ///
  881    881   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  882    882   
        self.set_behavior_version(Some(behavior_version));
  883    883   
        self
  884    884   
    }
  885    885   
  886    886   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  887    887   
    ///
  888    888   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  889    889   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  890    890   
    /// all operations might be the ideal behavior but could break existing applications.
  891    891   
    ///
  892    892   
    /// # Examples
  893    893   
    ///
  894    894   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  895    895   
    /// ```no_run
  896    896   
    /// use rest_xml::config::BehaviorVersion;
  897    897   
    ///
  898    898   
    /// let config = rest_xml::Config::builder()
  899    899   
    ///     .behavior_version(BehaviorVersion::latest())
  900    900   
    ///     // ...
  901    901   
    ///     .build();
  902    902   
    /// let client = rest_xml::Client::from_conf(config);
  903    903   
    /// ```
  904    904   
    ///
  905    905   
    /// Customizing behavior major version:
  906    906   
    /// ```no_run
  907    907   
    /// use rest_xml::config::BehaviorVersion;
  908    908   
    ///
  909    909   
    /// let config = rest_xml::Config::builder()
  910    910   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  911    911   
    ///     // ...
  912    912   
    ///     .build();
  913    913   
    /// let client = rest_xml::Client::from_conf(config);
  914    914   
    /// ```
  915         -
         915  +
    ///
  916    916   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  917    917   
        self.behavior_version = behavior_version;
  918    918   
        self
  919    919   
    }
  920    920   
  921    921   
    /// Convenience method to set the latest behavior major version
  922    922   
    ///
  923    923   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  924    924   
    pub fn behavior_version_latest(mut self) -> Self {
  925    925   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -982,982 +1042,1042 @@
 1002   1002   
    }
 1003   1003   
 1004   1004   
    fn runtime_components(
 1005   1005   
        &self,
 1006   1006   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1007   1007   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1008   1008   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
 1009   1009   
    }
 1010   1010   
}
 1011   1011   
 1012         -
/// Cross-operation shared-state singletons
        1012  +
// Cross-operation shared-state singletons
 1013   1013   
 1014   1014   
/// A plugin that enables configuration for a single operation invocation
 1015   1015   
///
 1016   1016   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1017   1017   
/// In the case of default values requested, they will be obtained from `client_config`.
 1018   1018   
#[derive(Debug)]
 1019   1019   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1020   1020   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1021   1021   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1022   1022   
}

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = rest_xml_extras::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use rest_xml_extras::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = rest_xml_extras::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = rest_xml_extras::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use rest_xml_extras::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = rest_xml_extras::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = rest_xml_extras::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use rest_xml_extras::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = rest_xml_extras::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = rest_xml_extras::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use rest_xml_extras::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = rest_xml_extras::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = rest_xml_extras::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use rest_xml_extras::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = rest_xml_extras::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = rest_xml_extras::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -966,966 +1026,1026 @@
  986    986   
    }
  987    987   
  988    988   
    fn runtime_components(
  989    989   
        &self,
  990    990   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  991    991   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  992    992   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  993    993   
    }
  994    994   
}
  995    995   
  996         -
/// Cross-operation shared-state singletons
         996  +
// Cross-operation shared-state singletons
  997    997   
  998    998   
/// A plugin that enables configuration for a single operation invocation
  999    999   
///
 1000   1000   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1001   1001   
/// In the case of default values requested, they will be obtained from `client_config`.
 1002   1002   
#[derive(Debug)]
 1003   1003   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1004   1004   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1005   1005   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1006   1006   
}

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = rest_xml_extras_unwrapped::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use rest_xml_extras_unwrapped::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = rest_xml_extras_unwrapped::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = rest_xml_extras_unwrapped::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use rest_xml_extras_unwrapped::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = rest_xml_extras_unwrapped::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = rest_xml_extras_unwrapped::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use rest_xml_extras_unwrapped::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = rest_xml_extras_unwrapped::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = rest_xml_extras_unwrapped::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use rest_xml_extras_unwrapped::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = rest_xml_extras_unwrapped::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = rest_xml_extras_unwrapped::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use rest_xml_extras_unwrapped::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = rest_xml_extras_unwrapped::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = rest_xml_extras_unwrapped::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -966,966 +1026,1026 @@
  986    986   
    }
  987    987   
  988    988   
    fn runtime_components(
  989    989   
        &self,
  990    990   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  991    991   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  992    992   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  993    993   
    }
  994    994   
}
  995    995   
  996         -
/// Cross-operation shared-state singletons
         996  +
// Cross-operation shared-state singletons
  997    997   
  998    998   
/// A plugin that enables configuration for a single operation invocation
  999    999   
///
 1000   1000   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1001   1001   
/// In the case of default values requested, they will be obtained from `client_config`.
 1002   1002   
#[derive(Debug)]
 1003   1003   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1004   1004   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1005   1005   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1006   1006   
}

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = rest_xml_namespace::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use rest_xml_namespace::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = rest_xml_namespace::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = rest_xml_namespace::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use rest_xml_namespace::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = rest_xml_namespace::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = rest_xml_namespace::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use rest_xml_namespace::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = rest_xml_namespace::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = rest_xml_namespace::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use rest_xml_namespace::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = rest_xml_namespace::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = rest_xml_namespace::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use rest_xml_namespace::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = rest_xml_namespace::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = rest_xml_namespace::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -966,966 +1026,1026 @@
  986    986   
    }
  987    987   
  988    988   
    fn runtime_components(
  989    989   
        &self,
  990    990   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  991    991   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  992    992   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  993    993   
    }
  994    994   
}
  995    995   
  996         -
/// Cross-operation shared-state singletons
         996  +
// Cross-operation shared-state singletons
  997    997   
  998    998   
/// A plugin that enables configuration for a single operation invocation
  999    999   
///
 1000   1000   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1001   1001   
/// In the case of default values requested, they will be obtained from `client_config`.
 1002   1002   
#[derive(Debug)]
 1003   1003   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1004   1004   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1005   1005   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1006   1006   
}

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = rpcv2cbor::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use rpcv2cbor::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = rpcv2cbor::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = rpcv2cbor::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use rpcv2cbor::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = rpcv2cbor::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = rpcv2cbor::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use rpcv2cbor::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = rpcv2cbor::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = rpcv2cbor::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use rpcv2cbor::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = rpcv2cbor::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = rpcv2cbor::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use rpcv2cbor::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = rpcv2cbor::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = rpcv2cbor::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -965,965 +1025,1025 @@
  985    985   
    }
  986    986   
  987    987   
    fn runtime_components(
  988    988   
        &self,
  989    989   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  990    990   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  991    991   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  992    992   
    }
  993    993   
}
  994    994   
  995         -
/// Cross-operation shared-state singletons
         995  +
// Cross-operation shared-state singletons
  996    996   
  997    997   
/// A plugin that enables configuration for a single operation invocation
  998    998   
///
  999    999   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1000   1000   
/// In the case of default values requested, they will be obtained from `client_config`.
 1001   1001   
#[derive(Debug)]
 1002   1002   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1003   1003   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1004   1004   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1005   1005   
}

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = rpcv2cbor_extras::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use rpcv2cbor_extras::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = rpcv2cbor_extras::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = rpcv2cbor_extras::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use rpcv2cbor_extras::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = rpcv2cbor_extras::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = rpcv2cbor_extras::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use rpcv2cbor_extras::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = rpcv2cbor_extras::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = rpcv2cbor_extras::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use rpcv2cbor_extras::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = rpcv2cbor_extras::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = rpcv2cbor_extras::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use rpcv2cbor_extras::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = rpcv2cbor_extras::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = rpcv2cbor_extras::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -967,967 +1027,1027 @@
  987    987   
    }
  988    988   
  989    989   
    fn runtime_components(
  990    990   
        &self,
  991    991   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  992    992   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  993    993   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  994    994   
    }
  995    995   
}
  996    996   
  997         -
/// Cross-operation shared-state singletons
         997  +
// Cross-operation shared-state singletons
  998    998   
  999    999   
/// A plugin that enables configuration for a single operation invocation
 1000   1000   
///
 1001   1001   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1002   1002   
/// In the case of default values requested, they will be obtained from `client_config`.
 1003   1003   
#[derive(Debug)]
 1004   1004   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1005   1005   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1006   1006   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1007   1007   
}

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

@@ -442,442 +548,548 @@
  462    462   
    ///     .identity_cache(
  463    463   
    ///         IdentityCache::lazy()
  464    464   
    ///             // change the load timeout to 10 seconds
  465    465   
    ///             .load_timeout(Duration::from_secs(10))
  466    466   
    ///             .build()
  467    467   
    ///     )
  468    468   
    ///     // ...
  469    469   
    ///     .build();
  470    470   
    /// let client = simple::Client::from_conf(config);
  471    471   
    /// ```
  472         -
         472  +
    ///
  473    473   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  474    474   
        self.set_identity_cache(identity_cache);
  475    475   
        self
  476    476   
    }
  477    477   
  478    478   
    /// Set the identity cache for auth.
  479    479   
    ///
  480    480   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  481    481   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  482    482   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  483    483   
    /// the next request will result in refreshing the identity.
  484    484   
    ///
  485    485   
    /// This configuration allows you to disable or change the default caching mechanism.
  486    486   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  487    487   
    /// trait and pass that implementation into this function.
  488    488   
    ///
  489    489   
    /// # Examples
  490    490   
    ///
  491    491   
    /// Disabling identity caching:
  492    492   
    /// ```no_run
  493    493   
    /// use simple::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = simple::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = simple::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use simple::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = simple::Config::builder()
  508    508   
    ///     .identity_cache(
  509    509   
    ///         IdentityCache::lazy()
  510    510   
    ///             // change the load timeout to 10 seconds
  511    511   
    ///             .load_timeout(Duration::from_secs(10))
  512    512   
    ///             .build()
  513    513   
    ///     )
  514    514   
    ///     // ...
  515    515   
    ///     .build();
  516    516   
    /// let client = simple::Client::from_conf(config);
  517    517   
    /// ```
  518         -
         518  +
    ///
  519    519   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    520   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    521   
        self
  522    522   
    }
  523    523   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    524   
    ///
  525    525   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    526   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    527   
    /// will run after those default interceptors.
  528    528   
    ///
@@ -834,834 +929,929 @@
  854    854   
    /// Customizing behavior major version:
  855    855   
    /// ```no_run
  856    856   
    /// use simple::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = simple::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = simple::Client::from_conf(config);
  863    863   
    /// ```
  864         -
         864  +
    ///
  865    865   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  866    866   
        self.set_behavior_version(Some(behavior_version));
  867    867   
        self
  868    868   
    }
  869    869   
  870    870   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  871    871   
    ///
  872    872   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  873    873   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  874    874   
    /// all operations might be the ideal behavior but could break existing applications.
  875    875   
    ///
  876    876   
    /// # Examples
  877    877   
    ///
  878    878   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  879    879   
    /// ```no_run
  880    880   
    /// use simple::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = simple::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = simple::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use simple::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = simple::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = simple::Client::from_conf(config);
  898    898   
    /// ```
  899         -
         899  +
    ///
  900    900   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  901    901   
        self.behavior_version = behavior_version;
  902    902   
        self
  903    903   
    }
  904    904   
  905    905   
    /// Convenience method to set the latest behavior major version
  906    906   
    ///
  907    907   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    908   
    pub fn behavior_version_latest(mut self) -> Self {
  909    909   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -964,964 +1024,1024 @@
  984    984   
    }
  985    985   
  986    986   
    fn runtime_components(
  987    987   
        &self,
  988    988   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  989    989   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  990    990   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  991    991   
    }
  992    992   
}
  993    993   
  994         -
/// Cross-operation shared-state singletons
         994  +
// Cross-operation shared-state singletons
  995    995   
  996    996   
/// A plugin that enables configuration for a single operation invocation
  997    997   
///
  998    998   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
  999    999   
/// In the case of default values requested, they will be obtained from `client_config`.
 1000   1000   
#[derive(Debug)]
 1001   1001   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1002   1002   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1003   1003   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1004   1004   
}