Client Test

Client Test

rev. 27f5e8b60bf63675af6bf16e98290ebbb9e8b747 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/Cargo.lock

@@ -536,536 +624,624 @@
  556    556   
[[package]]
  557    557   
name = "aws-smithy-query"
  558    558   
version = "0.60.7"
  559    559   
dependencies = [
  560    560   
 "aws-smithy-types",
  561    561   
 "urlencoding",
  562    562   
]
  563    563   
  564    564   
[[package]]
  565    565   
name = "aws-smithy-runtime"
  566         -
version = "1.8.4"
         566  +
version = "1.8.5"
  567    567   
dependencies = [
  568    568   
 "approx",
  569    569   
 "aws-smithy-async",
  570    570   
 "aws-smithy-http",
  571    571   
 "aws-smithy-http-client",
  572    572   
 "aws-smithy-observability",
  573    573   
 "aws-smithy-runtime-api",
  574    574   
 "aws-smithy-types",
  575    575   
 "bytes",
  576    576   
 "fastrand",
  577    577   
 "futures-util",
  578    578   
 "http 0.2.12",
  579    579   
 "http 1.3.1",
  580    580   
 "http-body 0.4.6",
  581    581   
 "http-body 1.0.1",
  582    582   
 "hyper 0.14.32",
  583    583   
 "pin-project-lite",
  584    584   
 "pin-utils",
  585    585   
 "pretty_assertions",
  586    586   
 "tokio",
  587    587   
 "tracing",
  588    588   
 "tracing-subscriber",
  589    589   
 "tracing-test",
  590    590   
]
  591    591   
  592    592   
[[package]]
  593    593   
name = "aws-smithy-runtime-api"
  594         -
version = "1.8.3"
         594  +
version = "1.8.4"
  595    595   
dependencies = [
  596    596   
 "aws-smithy-async",
  597    597   
 "aws-smithy-types",
  598    598   
 "bytes",
  599    599   
 "http 0.2.12",
  600    600   
 "http 1.3.1",
  601    601   
 "pin-project-lite",
  602    602   
 "proptest",
  603    603   
 "tokio",
  604    604   
 "tracing",

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -361,366 +420,482 @@
  381    386   
  382    387   
    /// Set the auth scheme resolver for the builder
  383    388   
    ///
  384    389   
    /// # Examples
  385    390   
    /// See an example for [`Self::auth_scheme_resolver`].
  386    391   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  387    392   
        self.runtime_components
  388    393   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  389    394   
        self
  390    395   
    }
         396  +
    /// Set the auth scheme preference for an auth scheme resolver
         397  +
    /// (typically the default auth scheme resolver).
         398  +
    ///
         399  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         400  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         401  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         402  +
    ///
         403  +
    /// The preference list is intended as a hint rather than a strict override.
         404  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         405  +
    ///
         406  +
    /// # Examples
         407  +
    ///
         408  +
    /// ```no_run
         409  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         410  +
    /// let config = aws_query::Config::builder()
         411  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         412  +
    ///     // ...
         413  +
    ///     .build();
         414  +
    /// let client = aws_query::Client::from_conf(config);
         415  +
    /// ```
         416  +
         417  +
    pub fn auth_scheme_preference(
         418  +
        mut self,
         419  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         420  +
    ) -> Self {
         421  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         422  +
        self
         423  +
    }
         424  +
         425  +
    /// Set the auth scheme preference for an auth scheme resolver
         426  +
    /// (typically the default auth scheme resolver).
         427  +
    ///
         428  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         429  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         430  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         431  +
    ///
         432  +
    /// The preference list is intended as a hint rather than a strict override.
         433  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         434  +
    ///
         435  +
    /// # Examples
         436  +
    ///
         437  +
    /// ```no_run
         438  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         439  +
    /// let config = aws_query::Config::builder()
         440  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         441  +
    ///     // ...
         442  +
    ///     .build();
         443  +
    /// let client = aws_query::Client::from_conf(config);
         444  +
    /// ```
         445  +
         446  +
    pub fn set_auth_scheme_preference(
         447  +
        &mut self,
         448  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         449  +
    ) -> &mut Self {
         450  +
        self.config.store_or_unset(preference);
         451  +
        self
         452  +
    }
  391    453   
    /// Set the endpoint URL to use when making requests.
  392    454   
    ///
  393    455   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  394    456   
    ///
  395    457   
    /// # Panics
  396    458   
    /// Panics if an invalid URL is given.
  397    459   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  398    460   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  399    461   
        self
  400    462   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -361,366 +420,482 @@
  381    386   
  382    387   
    /// Set the auth scheme resolver for the builder
  383    388   
    ///
  384    389   
    /// # Examples
  385    390   
    /// See an example for [`Self::auth_scheme_resolver`].
  386    391   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  387    392   
        self.runtime_components
  388    393   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  389    394   
        self
  390    395   
    }
         396  +
    /// Set the auth scheme preference for an auth scheme resolver
         397  +
    /// (typically the default auth scheme resolver).
         398  +
    ///
         399  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         400  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         401  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         402  +
    ///
         403  +
    /// The preference list is intended as a hint rather than a strict override.
         404  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         405  +
    ///
         406  +
    /// # Examples
         407  +
    ///
         408  +
    /// ```no_run
         409  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         410  +
    /// let config = dynamo::Config::builder()
         411  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         412  +
    ///     // ...
         413  +
    ///     .build();
         414  +
    /// let client = dynamo::Client::from_conf(config);
         415  +
    /// ```
         416  +
         417  +
    pub fn auth_scheme_preference(
         418  +
        mut self,
         419  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         420  +
    ) -> Self {
         421  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         422  +
        self
         423  +
    }
         424  +
         425  +
    /// Set the auth scheme preference for an auth scheme resolver
         426  +
    /// (typically the default auth scheme resolver).
         427  +
    ///
         428  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         429  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         430  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         431  +
    ///
         432  +
    /// The preference list is intended as a hint rather than a strict override.
         433  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         434  +
    ///
         435  +
    /// # Examples
         436  +
    ///
         437  +
    /// ```no_run
         438  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         439  +
    /// let config = dynamo::Config::builder()
         440  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         441  +
    ///     // ...
         442  +
    ///     .build();
         443  +
    /// let client = dynamo::Client::from_conf(config);
         444  +
    /// ```
         445  +
         446  +
    pub fn set_auth_scheme_preference(
         447  +
        &mut self,
         448  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         449  +
    ) -> &mut Self {
         450  +
        self.config.store_or_unset(preference);
         451  +
        self
         452  +
    }
  391    453   
    /// Set the endpoint URL to use when making requests.
  392    454   
    ///
  393    455   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  394    456   
    ///
  395    457   
    /// # Panics
  396    458   
    /// Panics if an invalid URL is given.
  397    459   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  398    460   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  399    461   
        self
  400    462   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -361,366 +420,482 @@
  381    386   
  382    387   
    /// Set the auth scheme resolver for the builder
  383    388   
    ///
  384    389   
    /// # Examples
  385    390   
    /// See an example for [`Self::auth_scheme_resolver`].
  386    391   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  387    392   
        self.runtime_components
  388    393   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  389    394   
        self
  390    395   
    }
         396  +
    /// Set the auth scheme preference for an auth scheme resolver
         397  +
    /// (typically the default auth scheme resolver).
         398  +
    ///
         399  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         400  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         401  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         402  +
    ///
         403  +
    /// The preference list is intended as a hint rather than a strict override.
         404  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         405  +
    ///
         406  +
    /// # Examples
         407  +
    ///
         408  +
    /// ```no_run
         409  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         410  +
    /// let config = ebs::Config::builder()
         411  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         412  +
    ///     // ...
         413  +
    ///     .build();
         414  +
    /// let client = ebs::Client::from_conf(config);
         415  +
    /// ```
         416  +
         417  +
    pub fn auth_scheme_preference(
         418  +
        mut self,
         419  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         420  +
    ) -> Self {
         421  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         422  +
        self
         423  +
    }
         424  +
         425  +
    /// Set the auth scheme preference for an auth scheme resolver
         426  +
    /// (typically the default auth scheme resolver).
         427  +
    ///
         428  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         429  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         430  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         431  +
    ///
         432  +
    /// The preference list is intended as a hint rather than a strict override.
         433  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         434  +
    ///
         435  +
    /// # Examples
         436  +
    ///
         437  +
    /// ```no_run
         438  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         439  +
    /// let config = ebs::Config::builder()
         440  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         441  +
    ///     // ...
         442  +
    ///     .build();
         443  +
    /// let client = ebs::Client::from_conf(config);
         444  +
    /// ```
         445  +
         446  +
    pub fn set_auth_scheme_preference(
         447  +
        &mut self,
         448  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         449  +
    ) -> &mut Self {
         450  +
        self.config.store_or_unset(preference);
         451  +
        self
         452  +
    }
  391    453   
    /// Set the endpoint URL to use when making requests.
  392    454   
    ///
  393    455   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  394    456   
    ///
  395    457   
    /// # Panics
  396    458   
    /// Panics if an invalid URL is given.
  397    459   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  398    460   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  399    461   
        self
  400    462   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -361,366 +420,482 @@
  381    386   
  382    387   
    /// Set the auth scheme resolver for the builder
  383    388   
    ///
  384    389   
    /// # Examples
  385    390   
    /// See an example for [`Self::auth_scheme_resolver`].
  386    391   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  387    392   
        self.runtime_components
  388    393   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  389    394   
        self
  390    395   
    }
         396  +
    /// Set the auth scheme preference for an auth scheme resolver
         397  +
    /// (typically the default auth scheme resolver).
         398  +
    ///
         399  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         400  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         401  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         402  +
    ///
         403  +
    /// The preference list is intended as a hint rather than a strict override.
         404  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         405  +
    ///
         406  +
    /// # Examples
         407  +
    ///
         408  +
    /// ```no_run
         409  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         410  +
    /// let config = ec2_query::Config::builder()
         411  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         412  +
    ///     // ...
         413  +
    ///     .build();
         414  +
    /// let client = ec2_query::Client::from_conf(config);
         415  +
    /// ```
         416  +
         417  +
    pub fn auth_scheme_preference(
         418  +
        mut self,
         419  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         420  +
    ) -> Self {
         421  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         422  +
        self
         423  +
    }
         424  +
         425  +
    /// Set the auth scheme preference for an auth scheme resolver
         426  +
    /// (typically the default auth scheme resolver).
         427  +
    ///
         428  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         429  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         430  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         431  +
    ///
         432  +
    /// The preference list is intended as a hint rather than a strict override.
         433  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         434  +
    ///
         435  +
    /// # Examples
         436  +
    ///
         437  +
    /// ```no_run
         438  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         439  +
    /// let config = ec2_query::Config::builder()
         440  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         441  +
    ///     // ...
         442  +
    ///     .build();
         443  +
    /// let client = ec2_query::Client::from_conf(config);
         444  +
    /// ```
         445  +
         446  +
    pub fn set_auth_scheme_preference(
         447  +
        &mut self,
         448  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         449  +
    ) -> &mut Self {
         450  +
        self.config.store_or_unset(preference);
         451  +
        self
         452  +
    }
  391    453   
    /// Set the endpoint URL to use when making requests.
  392    454   
    ///
  393    455   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  394    456   
    ///
  395    457   
    /// # Panics
  396    458   
    /// Panics if an invalid URL is given.
  397    459   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  398    460   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  399    461   
        self
  400    462   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = endpoint_rules::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = endpoint_rules::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = endpoint_rules::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = endpoint_rules::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = json_rpc10::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = json_rpc10::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = json_rpc10::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = json_rpc10::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = json_rpc11::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = json_rpc11::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = json_rpc11::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = json_rpc11::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = misc::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = misc::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = misc::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = misc::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = naming_test_casing::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = naming_test_casing::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = naming_test_casing::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = naming_test_casing::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = naming_test_ops::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = naming_test_ops::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = naming_test_ops::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = naming_test_ops::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = naming_test_structs::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = naming_test_structs::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = naming_test_structs::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = naming_test_structs::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/config.rs

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = pokemon_service_awsjson_client::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = pokemon_service_awsjson_client::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = pokemon_service_awsjson_client::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = pokemon_service_awsjson_client::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = pokemon_service_client::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = pokemon_service_client::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = pokemon_service_client::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = pokemon_service_client::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }

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

@@ -23,23 +82,86 @@
   43     43   
    }
   44     44   
    /// Return the auth schemes configured on this service config
   45     45   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     46   
        self.runtime_components.auth_schemes()
   47     47   
    }
   48     48   
   49     49   
    /// Return the auth scheme resolver configured on this service config
   50     50   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   51     51   
        self.runtime_components.auth_scheme_option_resolver()
   52     52   
    }
          53  +
    /// Returns the configured auth scheme preference
          54  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          55  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          56  +
    }
   53     57   
    /// Returns the endpoint resolver.
   54     58   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   55     59   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   56     60   
    }
   57     61   
    /// Return a reference to the retry configuration contained in this config, if any.
   58     62   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   59     63   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   60     64   
    }
   61     65   
   62     66   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -101,105 +160,165 @@
  121    125   
    ///
  122    126   
    pub fn new() -> Self {
  123    127   
        Self::default()
  124    128   
    }
  125    129   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  126    130   
    /// but not those in runtime components.
  127    131   
    #[allow(unused)]
  128    132   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  129    133   
        let mut builder = Self::new();
  130    134   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         135  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  131    136   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  132    137   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  133    138   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  134    139   
        builder
  135    140   
    }
  136    141   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  137    142   
    /// to configure protection for stalled streams.
  138    143   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  139    144   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  140    145   
        self
@@ -345,350 +404,466 @@
  365    370   
  366    371   
    /// Set the auth scheme resolver for the builder
  367    372   
    ///
  368    373   
    /// # Examples
  369    374   
    /// See an example for [`Self::auth_scheme_resolver`].
  370    375   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  371    376   
        self.runtime_components
  372    377   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  373    378   
        self
  374    379   
    }
         380  +
    /// Set the auth scheme preference for an auth scheme resolver
         381  +
    /// (typically the default auth scheme resolver).
         382  +
    ///
         383  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         384  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         385  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         386  +
    ///
         387  +
    /// The preference list is intended as a hint rather than a strict override.
         388  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         389  +
    ///
         390  +
    /// # Examples
         391  +
    ///
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         394  +
    /// let config = query_compat_test::Config::builder()
         395  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         396  +
    ///     // ...
         397  +
    ///     .build();
         398  +
    /// let client = query_compat_test::Client::from_conf(config);
         399  +
    /// ```
         400  +
         401  +
    pub fn auth_scheme_preference(
         402  +
        mut self,
         403  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         404  +
    ) -> Self {
         405  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         406  +
        self
         407  +
    }
         408  +
         409  +
    /// Set the auth scheme preference for an auth scheme resolver
         410  +
    /// (typically the default auth scheme resolver).
         411  +
    ///
         412  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         413  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         414  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         415  +
    ///
         416  +
    /// The preference list is intended as a hint rather than a strict override.
         417  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         418  +
    ///
         419  +
    /// # Examples
         420  +
    ///
         421  +
    /// ```no_run
         422  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         423  +
    /// let config = query_compat_test::Config::builder()
         424  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         425  +
    ///     // ...
         426  +
    ///     .build();
         427  +
    /// let client = query_compat_test::Client::from_conf(config);
         428  +
    /// ```
         429  +
         430  +
    pub fn set_auth_scheme_preference(
         431  +
        &mut self,
         432  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         433  +
    ) -> &mut Self {
         434  +
        self.config.store_or_unset(preference);
         435  +
        self
         436  +
    }
  375    437   
    /// Set the endpoint URL to use when making requests.
  376    438   
    ///
  377    439   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  378    440   
    ///
  379    441   
    /// # Panics
  380    442   
    /// Panics if an invalid URL is given.
  381    443   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  382    444   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  383    445   
        self
  384    446   
    }