Client Test

Client Test

rev. 6f149fabf4cddbe8dcdce51f882ec9bdc2ae0647

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/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 = aws_query::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 aws_query::config::IdentityCache;
  510    510   
    ///
  511    511   
    /// let config = aws_query::Config::builder()
  512    512   
    ///     .identity_cache(IdentityCache::no_cache())
  513    513   
    ///     // ...
  514    514   
    ///     .build();
  515    515   
    /// let client = aws_query::Client::from_conf(config);
  516    516   
    /// ```
  517    517   
    ///
  518    518   
    /// Customizing lazy caching:
  519    519   
    /// ```no_run
  520    520   
    /// use aws_query::config::IdentityCache;
  521    521   
    /// use std::time::Duration;
  522    522   
    ///
  523    523   
    /// let config = aws_query::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 = aws_query::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 aws_query::config::BehaviorVersion;
  873    873   
    ///
  874    874   
    /// let config = aws_query::Config::builder()
  875    875   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  876    876   
    ///     // ...
  877    877   
    ///     .build();
  878    878   
    /// let client = aws_query::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 aws_query::config::BehaviorVersion;
  897    897   
    ///
  898    898   
    /// let config = aws_query::Config::builder()
  899    899   
    ///     .behavior_version(BehaviorVersion::latest())
  900    900   
    ///     // ...
  901    901   
    ///     .build();
  902    902   
    /// let client = aws_query::Client::from_conf(config);
  903    903   
    /// ```
  904    904   
    ///
  905    905   
    /// Customizing behavior major version:
  906    906   
    /// ```no_run
  907    907   
    /// use aws_query::config::BehaviorVersion;
  908    908   
    ///
  909    909   
    /// let config = aws_query::Config::builder()
  910    910   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  911    911   
    ///     // ...
  912    912   
    ///     .build();
  913    913   
    /// let client = aws_query::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/dynamo/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 = dynamo::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 dynamo::config::IdentityCache;
  510    510   
    ///
  511    511   
    /// let config = dynamo::Config::builder()
  512    512   
    ///     .identity_cache(IdentityCache::no_cache())
  513    513   
    ///     // ...
  514    514   
    ///     .build();
  515    515   
    /// let client = dynamo::Client::from_conf(config);
  516    516   
    /// ```
  517    517   
    ///
  518    518   
    /// Customizing lazy caching:
  519    519   
    /// ```no_run
  520    520   
    /// use dynamo::config::IdentityCache;
  521    521   
    /// use std::time::Duration;
  522    522   
    ///
  523    523   
    /// let config = dynamo::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 = dynamo::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 dynamo::config::BehaviorVersion;
  873    873   
    ///
  874    874   
    /// let config = dynamo::Config::builder()
  875    875   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  876    876   
    ///     // ...
  877    877   
    ///     .build();
  878    878   
    /// let client = dynamo::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 dynamo::config::BehaviorVersion;
  897    897   
    ///
  898    898   
    /// let config = dynamo::Config::builder()
  899    899   
    ///     .behavior_version(BehaviorVersion::latest())
  900    900   
    ///     // ...
  901    901   
    ///     .build();
  902    902   
    /// let client = dynamo::Client::from_conf(config);
  903    903   
    /// ```
  904    904   
    ///
  905    905   
    /// Customizing behavior major version:
  906    906   
    /// ```no_run
  907    907   
    /// use dynamo::config::BehaviorVersion;
  908    908   
    ///
  909    909   
    /// let config = dynamo::Config::builder()
  910    910   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  911    911   
    ///     // ...
  912    912   
    ///     .build();
  913    913   
    /// let client = dynamo::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/ebs/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 = ebs::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 ebs::config::IdentityCache;
  510    510   
    ///
  511    511   
    /// let config = ebs::Config::builder()
  512    512   
    ///     .identity_cache(IdentityCache::no_cache())
  513    513   
    ///     // ...
  514    514   
    ///     .build();
  515    515   
    /// let client = ebs::Client::from_conf(config);
  516    516   
    /// ```
  517    517   
    ///
  518    518   
    /// Customizing lazy caching:
  519    519   
    /// ```no_run
  520    520   
    /// use ebs::config::IdentityCache;
  521    521   
    /// use std::time::Duration;
  522    522   
    ///
  523    523   
    /// let config = ebs::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 = ebs::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 ebs::config::BehaviorVersion;
  873    873   
    ///
  874    874   
    /// let config = ebs::Config::builder()
  875    875   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  876    876   
    ///     // ...
  877    877   
    ///     .build();
  878    878   
    /// let client = ebs::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 ebs::config::BehaviorVersion;
  897    897   
    ///
  898    898   
    /// let config = ebs::Config::builder()
  899    899   
    ///     .behavior_version(BehaviorVersion::latest())
  900    900   
    ///     // ...
  901    901   
    ///     .build();
  902    902   
    /// let client = ebs::Client::from_conf(config);
  903    903   
    /// ```
  904    904   
    ///
  905    905   
    /// Customizing behavior major version:
  906    906   
    /// ```no_run
  907    907   
    /// use ebs::config::BehaviorVersion;
  908    908   
    ///
  909    909   
    /// let config = ebs::Config::builder()
  910    910   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  911    911   
    ///     // ...
  912    912   
    ///     .build();
  913    913   
    /// let client = ebs::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/ec2_query/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 = ec2_query::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 ec2_query::config::IdentityCache;
  510    510   
    ///
  511    511   
    /// let config = ec2_query::Config::builder()
  512    512   
    ///     .identity_cache(IdentityCache::no_cache())
  513    513   
    ///     // ...
  514    514   
    ///     .build();
  515    515   
    /// let client = ec2_query::Client::from_conf(config);
  516    516   
    /// ```
  517    517   
    ///
  518    518   
    /// Customizing lazy caching:
  519    519   
    /// ```no_run
  520    520   
    /// use ec2_query::config::IdentityCache;
  521    521   
    /// use std::time::Duration;
  522    522   
    ///
  523    523   
    /// let config = ec2_query::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 = ec2_query::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 ec2_query::config::BehaviorVersion;
  873    873   
    ///
  874    874   
    /// let config = ec2_query::Config::builder()
  875    875   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  876    876   
    ///     // ...
  877    877   
    ///     .build();
  878    878   
    /// let client = ec2_query::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 ec2_query::config::BehaviorVersion;
  897    897   
    ///
  898    898   
    /// let config = ec2_query::Config::builder()
  899    899   
    ///     .behavior_version(BehaviorVersion::latest())
  900    900   
    ///     // ...
  901    901   
    ///     .build();
  902    902   
    /// let client = ec2_query::Client::from_conf(config);
  903    903   
    /// ```
  904    904   
    ///
  905    905   
    /// Customizing behavior major version:
  906    906   
    /// ```no_run
  907    907   
    /// use ec2_query::config::BehaviorVersion;
  908    908   
    ///
  909    909   
    /// let config = ec2_query::Config::builder()
  910    910   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  911    911   
    ///     // ...
  912    912   
    ///     .build();
  913    913   
    /// let client = ec2_query::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/endpoint-rules/rust-client-codegen/src/config.rs

@@ -207,207 +301,302 @@
  227    227   
        #[allow(deprecated)]
  228    228   
        self.set_endpoint_resolver(endpoint_url.map(|url| {
  229    229   
            ::aws_smithy_runtime_api::shared::IntoShared::into_shared(
  230    230   
                ::aws_smithy_runtime::client::orchestrator::endpoints::StaticUriEndpointResolver::uri(url),
  231    231   
            )
  232    232   
        }));
  233    233   
        self
  234    234   
    }
  235    235   
    /// Sets the endpoint resolver to use when making requests.
  236    236   
    ///
  237         -
         237  +
    ///
  238    238   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  239    239   
    /// rules for `endpoint_rules`.
  240         -
         240  +
    ///
  241    241   
    ///
  242    242   
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
  243    243   
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
  244    244   
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
  245    245   
    ///
  246    246   
    /// # Examples
  247    247   
    /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production.
  248    248   
    /// ```no_run
  249    249   
    /// use endpoint_rules::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint};
  250    250   
    /// #[derive(Debug)]
  251    251   
    /// struct StageResolver { stage: String }
  252    252   
    /// impl ResolveEndpoint for StageResolver {
  253    253   
    ///     fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> {
  254    254   
    ///         let stage = &self.stage;
  255    255   
    ///         EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build()))
  256    256   
    ///     }
  257    257   
    /// }
  258    258   
    /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() };
  259    259   
    /// let config = endpoint_rules::Config::builder().endpoint_resolver(resolver).build();
  260    260   
    /// let client = endpoint_rules::Client::from_conf(config);
  261    261   
    /// ```
  262    262   
    pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self {
  263    263   
        self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver()));
  264    264   
        self
  265    265   
    }
  266    266   
  267    267   
    /// Sets the endpoint resolver to use when making requests.
  268    268   
    ///
  269         -
         269  +
    ///
  270    270   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  271    271   
    /// rules for `endpoint_rules`.
         272  +
    ///
  272    273   
    pub fn set_endpoint_resolver(
  273    274   
        &mut self,
  274    275   
        endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>,
  275    276   
    ) -> &mut Self {
  276    277   
        self.runtime_components.set_endpoint_resolver(endpoint_resolver);
  277    278   
        self
  278    279   
    }
  279    280   
    /// Set the retry_config for the builder
  280    281   
    ///
  281    282   
    /// # Examples
@@ -447,448 +553,554 @@
  467    468   
    ///     .identity_cache(
  468    469   
    ///         IdentityCache::lazy()
  469    470   
    ///             // change the load timeout to 10 seconds
  470    471   
    ///             .load_timeout(Duration::from_secs(10))
  471    472   
    ///             .build()
  472    473   
    ///     )
  473    474   
    ///     // ...
  474    475   
    ///     .build();
  475    476   
    /// let client = endpoint_rules::Client::from_conf(config);
  476    477   
    /// ```
  477         -
         478  +
    ///
  478    479   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  479    480   
        self.set_identity_cache(identity_cache);
  480    481   
        self
  481    482   
    }
  482    483   
  483    484   
    /// Set the identity cache for auth.
  484    485   
    ///
  485    486   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  486    487   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  487    488   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  488    489   
    /// the next request will result in refreshing the identity.
  489    490   
    ///
  490    491   
    /// This configuration allows you to disable or change the default caching mechanism.
  491    492   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  492    493   
    /// trait and pass that implementation into this function.
  493    494   
    ///
  494    495   
    /// # Examples
  495    496   
    ///
  496    497   
    /// Disabling identity caching:
  497    498   
    /// ```no_run
  498    499   
    /// use endpoint_rules::config::IdentityCache;
  499    500   
    ///
  500    501   
    /// let config = endpoint_rules::Config::builder()
  501    502   
    ///     .identity_cache(IdentityCache::no_cache())
  502    503   
    ///     // ...
  503    504   
    ///     .build();
  504    505   
    /// let client = endpoint_rules::Client::from_conf(config);
  505    506   
    /// ```
  506    507   
    ///
  507    508   
    /// Customizing lazy caching:
  508    509   
    /// ```no_run
  509    510   
    /// use endpoint_rules::config::IdentityCache;
  510    511   
    /// use std::time::Duration;
  511    512   
    ///
  512    513   
    /// let config = endpoint_rules::Config::builder()
  513    514   
    ///     .identity_cache(
  514    515   
    ///         IdentityCache::lazy()
  515    516   
    ///             // change the load timeout to 10 seconds
  516    517   
    ///             .load_timeout(Duration::from_secs(10))
  517    518   
    ///             .build()
  518    519   
    ///     )
  519    520   
    ///     // ...
  520    521   
    ///     .build();
  521    522   
    /// let client = endpoint_rules::Client::from_conf(config);
  522    523   
    /// ```
  523         -
         524  +
    ///
  524    525   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  525    526   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  526    527   
        self
  527    528   
    }
  528    529   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  529    530   
    ///
  530    531   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  531    532   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  532    533   
    /// will run after those default interceptors.
  533    534   
    ///
@@ -839,840 +934,935 @@
  859    860   
    /// Customizing behavior major version:
  860    861   
    /// ```no_run
  861    862   
    /// use endpoint_rules::config::BehaviorVersion;
  862    863   
    ///
  863    864   
    /// let config = endpoint_rules::Config::builder()
  864    865   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  865    866   
    ///     // ...
  866    867   
    ///     .build();
  867    868   
    /// let client = endpoint_rules::Client::from_conf(config);
  868    869   
    /// ```
  869         -
         870  +
    ///
  870    871   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
  871    872   
        self.set_behavior_version(Some(behavior_version));
  872    873   
        self
  873    874   
    }
  874    875   
  875    876   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  876    877   
    ///
  877    878   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  878    879   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  879    880   
    /// all operations might be the ideal behavior but could break existing applications.
  880    881   
    ///
  881    882   
    /// # Examples
  882    883   
    ///
  883    884   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  884    885   
    /// ```no_run
  885    886   
    /// use endpoint_rules::config::BehaviorVersion;
  886    887   
    ///
  887    888   
    /// let config = endpoint_rules::Config::builder()
  888    889   
    ///     .behavior_version(BehaviorVersion::latest())
  889    890   
    ///     // ...
  890    891   
    ///     .build();
  891    892   
    /// let client = endpoint_rules::Client::from_conf(config);
  892    893   
    /// ```
  893    894   
    ///
  894    895   
    /// Customizing behavior major version:
  895    896   
    /// ```no_run
  896    897   
    /// use endpoint_rules::config::BehaviorVersion;
  897    898   
    ///
  898    899   
    /// let config = endpoint_rules::Config::builder()
  899    900   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  900    901   
    ///     // ...
  901    902   
    ///     .build();
  902    903   
    /// let client = endpoint_rules::Client::from_conf(config);
  903    904   
    /// ```
  904         -
         905  +
    ///
  905    906   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
  906    907   
        self.behavior_version = behavior_version;
  907    908   
        self
  908    909   
    }
  909    910   
  910    911   
    /// Convenience method to set the latest behavior major version
  911    912   
    ///
  912    913   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  913    914   
    pub fn behavior_version_latest(mut self) -> Self {
  914    915   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -975,976 +1035,1036 @@
  995    996   
    }
  996    997   
  997    998   
    fn runtime_components(
  998    999   
        &self,
  999   1000   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1000   1001   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1001   1002   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
 1002   1003   
    }
 1003   1004   
}
 1004   1005   
 1005         -
/// Cross-operation shared-state singletons
        1006  +
// Cross-operation shared-state singletons
 1006   1007   
 1007   1008   
/// A plugin that enables configuration for a single operation invocation
 1008   1009   
///
 1009   1010   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1010   1011   
/// In the case of default values requested, they will be obtained from `client_config`.
 1011   1012   
#[derive(Debug)]
 1012   1013   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1013   1014   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1014   1015   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1015   1016   
}

tmp-codegen-diff/codegen-client-test/json_rpc10/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 = json_rpc10::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 json_rpc10::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = json_rpc10::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = json_rpc10::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use json_rpc10::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = json_rpc10::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 = json_rpc10::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 json_rpc10::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = json_rpc10::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = json_rpc10::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 json_rpc10::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = json_rpc10::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = json_rpc10::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use json_rpc10::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = json_rpc10::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = json_rpc10::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   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/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 = json_rpc11::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 json_rpc11::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = json_rpc11::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = json_rpc11::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use json_rpc11::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = json_rpc11::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 = json_rpc11::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 json_rpc11::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = json_rpc11::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = json_rpc11::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 json_rpc11::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = json_rpc11::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = json_rpc11::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use json_rpc11::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = json_rpc11::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = json_rpc11::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   
}

tmp-codegen-diff/codegen-client-test/misc/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 = misc::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 misc::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = misc::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = misc::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use misc::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = misc::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 = misc::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 misc::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = misc::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = misc::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 misc::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = misc::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = misc::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use misc::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = misc::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = misc::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   
}

tmp-codegen-diff/codegen-client-test/naming_test_casing/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 = naming_test_casing::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 naming_test_casing::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = naming_test_casing::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = naming_test_casing::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use naming_test_casing::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = naming_test_casing::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 = naming_test_casing::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 naming_test_casing::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = naming_test_casing::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = naming_test_casing::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 naming_test_casing::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = naming_test_casing::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = naming_test_casing::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use naming_test_casing::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = naming_test_casing::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = naming_test_casing::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/naming_test_ops/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 = naming_test_ops::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 naming_test_ops::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = naming_test_ops::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = naming_test_ops::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use naming_test_ops::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = naming_test_ops::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 = naming_test_ops::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 naming_test_ops::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = naming_test_ops::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = naming_test_ops::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 naming_test_ops::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = naming_test_ops::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = naming_test_ops::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use naming_test_ops::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = naming_test_ops::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = naming_test_ops::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/naming_test_structs/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 = naming_test_structs::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 naming_test_structs::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = naming_test_structs::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = naming_test_structs::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use naming_test_structs::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = naming_test_structs::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 = naming_test_structs::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 naming_test_structs::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = naming_test_structs::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = naming_test_structs::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 naming_test_structs::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = naming_test_structs::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = naming_test_structs::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use naming_test_structs::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = naming_test_structs::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = naming_test_structs::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/pokemon-service-awsjson-client/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 = pokemon_service_awsjson_client::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 pokemon_service_awsjson_client::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = pokemon_service_awsjson_client::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = pokemon_service_awsjson_client::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use pokemon_service_awsjson_client::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = pokemon_service_awsjson_client::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 = pokemon_service_awsjson_client::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 pokemon_service_awsjson_client::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = pokemon_service_awsjson_client::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = pokemon_service_awsjson_client::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 pokemon_service_awsjson_client::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = pokemon_service_awsjson_client::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = pokemon_service_awsjson_client::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use pokemon_service_awsjson_client::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = pokemon_service_awsjson_client::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = pokemon_service_awsjson_client::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/pokemon-service-client/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 = pokemon_service_client::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 pokemon_service_client::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = pokemon_service_client::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = pokemon_service_client::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use pokemon_service_client::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = pokemon_service_client::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 = pokemon_service_client::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 pokemon_service_client::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = pokemon_service_client::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = pokemon_service_client::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 pokemon_service_client::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = pokemon_service_client::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = pokemon_service_client::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use pokemon_service_client::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = pokemon_service_client::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = pokemon_service_client::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/query-compat-test/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 = query_compat_test::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 query_compat_test::config::IdentityCache;
  494    494   
    ///
  495    495   
    /// let config = query_compat_test::Config::builder()
  496    496   
    ///     .identity_cache(IdentityCache::no_cache())
  497    497   
    ///     // ...
  498    498   
    ///     .build();
  499    499   
    /// let client = query_compat_test::Client::from_conf(config);
  500    500   
    /// ```
  501    501   
    ///
  502    502   
    /// Customizing lazy caching:
  503    503   
    /// ```no_run
  504    504   
    /// use query_compat_test::config::IdentityCache;
  505    505   
    /// use std::time::Duration;
  506    506   
    ///
  507    507   
    /// let config = query_compat_test::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 = query_compat_test::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 query_compat_test::config::BehaviorVersion;
  857    857   
    ///
  858    858   
    /// let config = query_compat_test::Config::builder()
  859    859   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  860    860   
    ///     // ...
  861    861   
    ///     .build();
  862    862   
    /// let client = query_compat_test::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 query_compat_test::config::BehaviorVersion;
  881    881   
    ///
  882    882   
    /// let config = query_compat_test::Config::builder()
  883    883   
    ///     .behavior_version(BehaviorVersion::latest())
  884    884   
    ///     // ...
  885    885   
    ///     .build();
  886    886   
    /// let client = query_compat_test::Client::from_conf(config);
  887    887   
    /// ```
  888    888   
    ///
  889    889   
    /// Customizing behavior major version:
  890    890   
    /// ```no_run
  891    891   
    /// use query_compat_test::config::BehaviorVersion;
  892    892   
    ///
  893    893   
    /// let config = query_compat_test::Config::builder()
  894    894   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  895    895   
    ///     // ...
  896    896   
    ///     .build();
  897    897   
    /// let client = query_compat_test::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_json/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_json::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_json::config::IdentityCache;
  510    510   
    ///
  511    511   
    /// let config = rest_json::Config::builder()
  512    512   
    ///     .identity_cache(IdentityCache::no_cache())
  513    513   
    ///     // ...
  514    514   
    ///     .build();
  515    515   
    /// let client = rest_json::Client::from_conf(config);
  516    516   
    /// ```
  517    517   
    ///
  518    518   
    /// Customizing lazy caching:
  519    519   
    /// ```no_run
  520    520   
    /// use rest_json::config::IdentityCache;
  521    521   
    /// use std::time::Duration;
  522    522   
    ///
  523    523   
    /// let config = rest_json::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_json::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_json::config::BehaviorVersion;
  873    873   
    ///
  874    874   
    /// let config = rest_json::Config::builder()
  875    875   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  876    876   
    ///     // ...
  877    877   
    ///     .build();
  878    878   
    /// let client = rest_json::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_json::config::BehaviorVersion;
  897    897   
    ///
  898    898   
    /// let config = rest_json::Config::builder()
  899    899   
    ///     .behavior_version(BehaviorVersion::latest())
  900    900   
    ///     // ...
  901    901   
    ///     .build();
  902    902   
    /// let client = rest_json::Client::from_conf(config);
  903    903   
    /// ```
  904    904   
    ///
  905    905   
    /// Customizing behavior major version:
  906    906   
    /// ```no_run
  907    907   
    /// use rest_json::config::BehaviorVersion;
  908    908   
    ///
  909    909   
    /// let config = rest_json::Config::builder()
  910    910   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
  911    911   
    ///     // ...
  912    912   
    ///     .build();
  913    913   
    /// let client = rest_json::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   
}