1273 1273 | }
|
1274 1274 | #[derive(::std::fmt::Debug)]
|
1275 1275 | pub(crate) struct ServiceRuntimePlugin {
|
1276 1276 | config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
|
1277 1277 | runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
1278 1278 | }
|
1279 1279 |
|
1280 1280 | impl ServiceRuntimePlugin {
|
1281 1281 | pub fn new(_service_config: crate::config::Config) -> Self {
|
1282 1282 | let config = {
|
1283 1283 | let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Transcribe");
|
1284 1284 | cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
|
1285 1285 | ::std::option::Option::Some(cfg.freeze())
|
1286 1286 | };
|
1287 1287 | let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
|
1288 1288 | runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
|
1289 1289 | use crate::config::auth::ResolveAuthScheme;
|
1290 1290 | crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
|
1291 1291 | }));
|
1292 1292 | runtime_components.set_endpoint_resolver(::std::option::Option::Some({
|
1293 1293 | use crate::config::endpoint::ResolveEndpoint;
|
1294 1294 | crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
|
1295 1295 | }));
|
1296 1296 | runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
|
1297 1297 | runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
|
1298 1298 | runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
|
1299 1299 | runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
|
1300 1300 | runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
|
1301 1301 | runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
|
1302 1302 | runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
|
1303 + | runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
|
1303 1304 | runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
|
1304 1305 | runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
|
1305 1306 | ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
|
1306 1307 | ));
|
1308 + | runtime_components.push_interceptor(::aws_runtime::endpoint_override::EndpointOverrideInterceptor::new());
|
1307 1309 | Self { config, runtime_components }
|
1308 1310 | }
|
1309 1311 | }
|
1310 1312 |
|
1311 1313 | impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
|
1312 1314 | fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
|
1313 1315 | self.config.clone()
|
1314 1316 | }
|
1315 1317 |
|
1316 1318 | fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {
|
1317 1319 | ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults
|
1318 1320 | }
|
1319 1321 |
|
1320 1322 | fn runtime_components(
|
1321 1323 | &self,
|
1322 1324 | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
1323 1325 | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
1324 1326 | ::std::borrow::Cow::Borrowed(&self.runtime_components)
|
1325 1327 | }
|
1326 1328 | }
|
1327 1329 |
|
1328 1330 | // Cross-operation shared-state singletons
|
1329 1331 |
|
1330 1332 | /// A plugin that enables configuration for a single operation invocation
|
1331 1333 | ///
|
1332 1334 | /// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
|
1333 1335 | /// In the case of default values requested, they will be obtained from `client_config`.
|
1334 1336 | #[derive(Debug)]
|
1335 1337 | pub(crate) struct ConfigOverrideRuntimePlugin {
|
1336 1338 | pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
|