AWS SDK

AWS SDK

rev. ded3fc0811120daa67f842ba97a9bade66a73475

Files changed:

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

@@ -1,1 +57,35 @@
    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         -
   28      6   
#[cfg(test)]
   29      7   
mod test {
   30      8   
   31      9   
    /// For region ap-northeast-1 with FIPS disabled and DualStack disabled
   32     10   
    #[test]
   33     11   
    fn test_1() {
   34     12   
        let params = crate::config::endpoint::Params::builder()
   35     13   
            .region("ap-northeast-1".to_string())
   36     14   
            .use_fips(false)
   37     15   
            .use_dual_stack(false)