1315 1315 | }
|
1316 1316 |
|
1317 1317 | fn runtime_components(
|
1318 1318 | &self,
|
1319 1319 | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
1320 1320 | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
1321 1321 | ::std::borrow::Cow::Borrowed(&self.components)
|
1322 1322 | }
|
1323 1323 | }
|
1324 1324 |
|
1325 1325 | pub use ::aws_smithy_runtime::client::identity::IdentityCache;
|
1326 1326 | pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
|
1327 1327 | pub use ::aws_smithy_types::config_bag::ConfigBag;
|
1328 1328 |
|
1329 1329 | pub use ::aws_credential_types::Credentials;
|
1330 1330 |
|
1331 1331 | impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
|
1332 1332 | fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
|
1333 1333 | let mut builder = Builder::default();
|
1334 1334 | builder.set_credentials_provider(input.credentials_provider());
|
1335 1335 | builder = builder.region(input.region().cloned());
|
1336 1336 | builder.set_use_fips(input.use_fips());
|
1337 1337 | builder.set_use_dual_stack(input.use_dual_stack());
|
1338 1338 | if input.get_origin("endpoint_url").is_client_config() {
|
1339 1339 | builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
|
1340 1340 | } else {
|
1341 1341 | builder.set_endpoint_url(
|
1342 1342 | input
|
1343 1343 | .service_config()
|
1344 1344 | .and_then(|conf| {
|
1345 - | conf.load_config(service_config_key("AWS_ENDPOINT_URL", "endpoint_url"))
|
1345 + | conf.load_config(service_config_key("Transcribe Streaming", "AWS_ENDPOINT_URL", "endpoint_url"))
|
1346 1346 | .map(|it| it.parse().unwrap())
|
1347 1347 | })
|
1348 1348 | .or_else(|| input.endpoint_url().map(|s| s.to_string())),
|
1349 1349 | );
|
1350 1350 | }
|
1351 1351 | // resiliency
|
1352 1352 | builder.set_retry_config(input.retry_config().cloned());
|
1353 1353 | builder.set_timeout_config(input.timeout_config().cloned());
|
1354 1354 | builder.set_sleep_impl(input.sleep_impl());
|
1355 1355 |
|
1356 1356 | builder.set_http_client(input.http_client());
|
1357 1357 | builder.set_time_source(input.time_source());
|
1358 1358 | builder.set_behavior_version(input.behavior_version());
|
1359 1359 | builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
|
1360 1360 | // setting `None` here removes the default
|
1361 1361 | if let Some(config) = input.stalled_stream_protection() {
|
1362 1362 | builder.set_stalled_stream_protection(Some(config));
|
1363 1363 | }
|
1364 1364 |
|
1365 1365 | if let Some(cache) = input.identity_cache() {
|
1366 1366 | builder.set_identity_cache(cache);
|
1367 1367 | }
|
1368 1368 | builder.set_app_name(input.app_name().cloned());
|
1369 1369 |
|
1370 1370 | builder
|
1371 1371 | }
|
1372 1372 | }
|
1373 1373 |
|
1374 1374 | impl From<&::aws_types::sdk_config::SdkConfig> for Config {
|
1375 1375 | fn from(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
|
1376 1376 | Builder::from(sdk_config).build()
|
1377 1377 | }
|
1378 1378 | }
|
1379 1379 |
|
1380 1380 | pub use ::aws_types::app_name::AppName;
|
1381 1381 |
|
1382 1382 | #[allow(dead_code)]
|
1383 - | fn service_config_key<'a>(env: &'a str, profile: &'a str) -> aws_types::service_config::ServiceConfigKey<'a> {
|
1383 + | fn service_config_key<'a>(service_id: &'a str, env: &'a str, profile: &'a str) -> aws_types::service_config::ServiceConfigKey<'a> {
|
1384 1384 | ::aws_types::service_config::ServiceConfigKey::builder()
|
1385 - | .service_id("Transcribe Streaming")
|
1385 + | .service_id(service_id)
|
1386 1386 | .env(env)
|
1387 1387 | .profile(profile)
|
1388 1388 | .build()
|
1389 1389 | .expect("all field sets explicitly, can't fail")
|
1390 1390 | }
|
1391 1391 |
|
1392 1392 | pub use ::aws_smithy_async::rt::sleep::Sleep;
|
1393 1393 |
|
1394 1394 | pub(crate) fn base_client_runtime_plugins(mut config: crate::Config) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
|
1395 1395 | let mut configured_plugins = ::std::vec::Vec::new();
|
1396 1396 | ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins);
|
1397 1397 | #[cfg(feature = "behavior-version-latest")]
|
1398 1398 | {
|
1399 1399 | if config.behavior_version.is_none() {
|
1400 1400 | config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
|
1401 1401 | }
|
1402 1402 | }
|
1403 1403 |
|
1404 1404 | let default_retry_partition = "transcribestreaming";
|
1405 1405 | let default_retry_partition = match config.region() {
|
1406 1406 | Some(region) => ::std::borrow::Cow::from(format!("{default_retry_partition}-{}", region)),
|
1407 1407 | None => ::std::borrow::Cow::from(default_retry_partition),
|
1408 1408 | };
|
1409 1409 |
|
1410 1410 | let scope = "aws-sdk-transcribestreaming";
|
1411 1411 |
|
1412 1412 | let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
|
1413 1413 | // defaults
|
1414 1414 | .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
|
1415 1415 | ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
|