AWS SDK

AWS SDK

rev. a3a6276b037e8a64e0c017c95ff4f0d92bec1652

Files changed:

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/config/endpoint.rs

@@ -1,1 +35,57 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub use ::aws_smithy_runtime_api::client::endpoint::EndpointFuture;
    3      3   
pub use ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver;
    4      4   
pub use ::aws_smithy_types::endpoint::Endpoint;
    5      5   
           6  +
/// Interceptor that tracks endpoint override business metric.
           7  +
#[derive(Debug, Default)]
           8  +
pub(crate) struct EndpointOverrideFeatureTrackerInterceptor;
           9  +
          10  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EndpointOverrideFeatureTrackerInterceptor {
          11  +
    fn name(&self) -> &'static str {
          12  +
        "EndpointOverrideFeatureTrackerInterceptor"
          13  +
    }
          14  +
          15  +
    fn read_before_execution(
          16  +
        &self,
          17  +
        _context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<'_>,
          18  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
          19  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
          20  +
        if cfg.load::<::aws_types::endpoint_config::EndpointUrl>().is_some() {
          21  +
            cfg.interceptor_state()
          22  +
                .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::EndpointOverride);
          23  +
        }
          24  +
        ::std::result::Result::Ok(())
          25  +
    }
          26  +
}
          27  +
    6     28   
#[cfg(test)]
    7     29   
mod test {
    8     30   
    9     31   
    /// For region ap-northeast-1 with FIPS disabled and DualStack disabled
   10     32   
    #[test]
   11     33   
    fn test_1() {
   12     34   
        let params = crate::config::endpoint::Params::builder()
   13     35   
            .region("ap-northeast-1".to_string())
   14     36   
            .use_fips(false)
   15     37   
            .use_dual_stack(false)