aws_sdk_transcribestreaming/config.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#![allow(clippy::empty_line_after_doc_comments)]
3/// Configuration for a aws_sdk_transcribestreaming service client.
4///
5/// Service configuration allows for customization of endpoints, region, credentials providers,
6/// and retry configuration. Generally, it is constructed automatically for you from a shared
7/// configuration loaded by the `aws-config` crate. For example:
8///
9/// ```ignore
10/// // Load a shared config from the environment
11/// let shared_config = aws_config::from_env().load().await;
12/// // The client constructor automatically converts the shared config into the service config
13/// let client = Client::new(&shared_config);
14/// ```
15///
16/// The service config can also be constructed manually using its builder.
17///
18#[derive(::std::clone::Clone, ::std::fmt::Debug)]
19pub struct Config {
20 // Both `config` and `cloneable` are the same config, but the cloneable one
21 // is kept around so that it is possible to convert back into a builder. This can be
22 // optimized in the future.
23 pub(crate) config: crate::config::FrozenLayer,
24 cloneable: ::aws_smithy_types::config_bag::CloneableLayer,
25 pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
26 pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
27 pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
28}
29impl Config {
30 ///
31 /// Constructs a config builder.
32 /// <div class="warning">
33 /// Note that a config created from this builder will not have the same safe defaults as one created by
34 /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
35 /// </div>
36 ///
37 pub fn builder() -> Builder { Builder::default() }
38 /// Converts this config back into a builder so that it can be tweaked.
39 pub fn to_builder(&self) -> Builder {
40 Builder {
41 config: self.cloneable.clone(),
42 runtime_components: self.runtime_components.clone(),
43 runtime_plugins: self.runtime_plugins.clone(),
44 behavior_version: self.behavior_version,
45 }
46 }
47 /// Return a reference to the stalled stream protection configuration contained in this config, if any.
48 pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
49 self.config.load::<crate::config::StalledStreamProtectionConfig>()
50 }
51 /// Returns the client protocol used for serialization and deserialization.
52 pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
53 self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
54 }
55 /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
56 pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
57 self.runtime_components.http_client()
58 }
59 /// Return the auth schemes configured on this service config
60 pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
61 self.runtime_components.auth_schemes()
62 }
63
64 /// Return the auth scheme resolver configured on this service config
65 pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
66 self.runtime_components.auth_scheme_option_resolver()
67 }
68 /// Returns the configured auth scheme preference
69 pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
70 self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
71 }
72 /// Returns the endpoint resolver.
73 pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
74 self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
75 }
76 /// Return a reference to the retry configuration contained in this config, if any.
77 pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
78 self.config.load::<::aws_smithy_types::retry::RetryConfig>()
79 }
80
81 /// Return a cloned shared async sleep implementation from this config, if any.
82 pub fn sleep_impl(&self) -> ::std::option::Option<crate::config::SharedAsyncSleep> {
83 self.runtime_components.sleep_impl()
84 }
85
86 /// Return a reference to the timeout configuration contained in this config, if any.
87 pub fn timeout_config(&self) -> ::std::option::Option<&::aws_smithy_types::timeout::TimeoutConfig> {
88 self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>()
89 }
90
91 /// Returns a reference to the retry partition contained in this config, if any.
92 ///
93 /// WARNING: This method is unstable and may be removed at any time. Do not rely on this
94 /// method for anything!
95 pub fn retry_partition(&self) -> ::std::option::Option<&::aws_smithy_runtime::client::retries::RetryPartition> {
96 self.config.load::<::aws_smithy_runtime::client::retries::RetryPartition>()
97 }
98 /// Returns the configured identity cache for auth.
99 pub fn identity_cache(&self) -> ::std::option::Option<crate::config::SharedIdentityCache> {
100 self.runtime_components.identity_cache()
101 }
102 /// Returns interceptors currently registered by the user.
103 pub fn interceptors(&self) -> impl Iterator<Item = crate::config::SharedInterceptor> + '_ {
104 self.runtime_components.interceptors()
105 }
106 /// Return time source used for this service.
107 pub fn time_source(&self) -> ::std::option::Option<::aws_smithy_async::time::SharedTimeSource> {
108 self.runtime_components.time_source()
109 }
110 /// Returns retry classifiers currently registered by the user.
111 pub fn retry_classifiers(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier> + '_ {
112 self.runtime_components.retry_classifiers()
113 }
114 /// Returns the name of the app that is using the client, if it was provided.
115 ///
116 /// This _optional_ name is used to identify the application in the user agent that
117 /// gets sent along with requests.
118 pub fn app_name(&self) -> ::std::option::Option<&::aws_types::app_name::AppName> {
119 self.config.load::<::aws_types::app_name::AppName>()
120 }
121 /// Returns the invocation ID generator if one was given in config.
122 ///
123 /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic.
124 pub fn invocation_id_generator(&self) -> ::std::option::Option<::aws_runtime::invocation_id::SharedInvocationIdGenerator> {
125 self.config.load::<::aws_runtime::invocation_id::SharedInvocationIdGenerator>().cloned()
126 }
127 /// Creates a new [service config](crate::Config) from a [shared `config`](::aws_types::sdk_config::SdkConfig).
128 pub fn new(config: &::aws_types::sdk_config::SdkConfig) -> Self {
129 Builder::from(config).build()
130 }
131 /// The signature version 4 service signing name to use in the credential scope when signing requests.
132 ///
133 /// The signing service may be overridden by the `Endpoint`, or by specifying a custom
134 /// [`SigningName`](aws_types::SigningName) during operation construction
135 pub fn signing_name(&self) -> &'static str {
136 "transcribe"
137 }
138 /// Returns the AWS region, if it was provided.
139 pub fn region(&self) -> ::std::option::Option<&crate::config::Region> {
140 self.config.load::<crate::config::Region>()
141 }
142 /// This function was intended to be removed, and has been broken since release-2023-11-15 as it always returns a `None`. Do not use.
143 #[deprecated(note = "This function was intended to be removed, and has been broken since release-2023-11-15 as it always returns a `None`. Do not use.")]
144 pub fn credentials_provider(&self) -> Option<crate::config::SharedCredentialsProvider> {
145 ::std::option::Option::None
146 }
147}
148/// Builder for creating a `Config`.
149#[derive(::std::clone::Clone, ::std::fmt::Debug)]
150pub struct Builder {
151 pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer,
152 pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
153 pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
154 pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
155}
156impl ::std::default::Default for Builder {
157 fn default() -> Self {
158 Self {
159 config: ::std::default::Default::default(),
160 runtime_components: crate::config::RuntimeComponentsBuilder::new("service config"),
161 runtime_plugins: ::std::default::Default::default(),
162 behavior_version: ::std::default::Default::default(),
163 }
164 }
165}
166impl Builder {
167 ///
168 /// Constructs a config builder.
169 /// <div class="warning">
170 /// Note that a config created from this builder will not have the same safe defaults as one created by
171 /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
172 /// </div>
173 ///
174 pub fn new() -> Self { Self::default() }
175 /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
176 /// but not those in runtime components.
177 #[allow(unused)]
178 pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
179 let mut builder = Self::new();
180 builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
181 if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
182 builder.set_protocol(::std::option::Option::Some(protocol));
183 }
184 builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
185 builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
186 builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
187 builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
188 builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
189 builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
190 builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
191 builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
192 builder.set_region(config_bag.load::<crate::config::Region>().cloned());
193 builder
194 }
195 /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
196 /// to configure protection for stalled streams.
197 pub fn stalled_stream_protection(
198 mut self,
199 stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig
200 ) -> Self {
201 self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
202 self
203 }
204 /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
205 /// to configure protection for stalled streams.
206 pub fn set_stalled_stream_protection(
207 &mut self,
208 stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>
209 ) -> &mut Self {
210 self.config.store_or_unset(stalled_stream_protection_config);
211 self
212 }
213 /// Sets the client protocol to use for serialization and deserialization.
214 ///
215 /// This overrides the default protocol determined by the service model,
216 /// enabling runtime protocol selection.
217 pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
218 self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(protocol)));
219 self
220 }
221
222 /// Sets the client protocol to use for serialization and deserialization.
223 pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
224 self.config.store_or_unset(protocol);
225 self
226 }
227 /// Sets the HTTP client to use when making requests.
228 ///
229 /// # Examples
230 /// ```no_run
231 /// # #[cfg(test)]
232 /// # mod tests {
233 /// # #[test]
234 /// # fn example() {
235 /// use std::time::Duration;
236 /// use aws_sdk_transcribestreaming::config::Config;
237 /// use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder;
238 ///
239 /// let https_connector = hyper_rustls::HttpsConnectorBuilder::new()
240 /// .with_webpki_roots()
241 /// .https_only()
242 /// .enable_http1()
243 /// .enable_http2()
244 /// .build();
245 /// let hyper_client = HyperClientBuilder::new().build(https_connector);
246 ///
247 /// // This connector can then be given to a generated service Config
248 /// let config = my_service_client::Config::builder()
249 /// .endpoint_url("https://example.com")
250 /// .http_client(hyper_client)
251 /// .build();
252 /// let client = my_service_client::Client::from_conf(config);
253 /// # }
254 /// # }
255 /// ```
256 pub fn http_client(mut self, http_client: impl crate::config::HttpClient + 'static) -> Self {
257 self.set_http_client(::std::option::Option::Some(crate::config::IntoShared::into_shared(http_client)));
258 self
259 }
260
261 /// Sets the HTTP client to use when making requests.
262 ///
263 /// # Examples
264 /// ```no_run
265 /// # #[cfg(test)]
266 /// # mod tests {
267 /// # #[test]
268 /// # fn example() {
269 /// use std::time::Duration;
270 /// use aws_sdk_transcribestreaming::config::{Builder, Config};
271 /// use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder;
272 ///
273 /// fn override_http_client(builder: &mut Builder) {
274 /// let https_connector = hyper_rustls::HttpsConnectorBuilder::new()
275 /// .with_webpki_roots()
276 /// .https_only()
277 /// .enable_http1()
278 /// .enable_http2()
279 /// .build();
280 /// let hyper_client = HyperClientBuilder::new().build(https_connector);
281 /// builder.set_http_client(Some(hyper_client));
282 /// }
283 ///
284 /// let mut builder = aws_sdk_transcribestreaming::Config::builder();
285 /// override_http_client(&mut builder);
286 /// let config = builder.build();
287 /// # }
288 /// # }
289 /// ```
290 pub fn set_http_client(&mut self, http_client: Option<crate::config::SharedHttpClient>) -> &mut Self {
291 self.runtime_components.set_http_client(http_client);
292 self
293 }
294 /// Adds an auth scheme to the builder
295 ///
296 /// If `auth_scheme` has an existing [AuthSchemeId](aws_smithy_runtime_api::client::auth::AuthSchemeId) in the runtime, the current identity
297 /// resolver and signer for that scheme will be replaced by those from `auth_scheme`.
298 ///
299 /// _Important:_ When introducing a custom auth scheme, ensure you override either
300 /// [`Self::auth_scheme_resolver`] or [`Self::set_auth_scheme_resolver`]
301 /// so that the custom auth scheme is included in the list of resolved auth scheme options.
302 /// [The default auth scheme resolver](crate::config::auth::DefaultAuthSchemeResolver) will not recognize your custom auth scheme.
303 ///
304 /// # Examples
305 /// ```no_run
306 /// # use aws_smithy_runtime_api::{
307 /// # box_error::BoxError,
308 /// # client::{
309 /// # auth::{
310 /// # AuthScheme, AuthSchemeEndpointConfig, AuthSchemeId, AuthSchemeOption,
311 /// # AuthSchemeOptionsFuture, Sign,
312 /// # },
313 /// # identity::{Identity, IdentityFuture, ResolveIdentity, SharedIdentityResolver},
314 /// # orchestrator::HttpRequest,
315 /// # runtime_components::{GetIdentityResolver, RuntimeComponents},
316 /// # },
317 /// # shared::IntoShared,
318 /// # };
319 /// # use aws_smithy_types::config_bag::ConfigBag;
320 /// // Auth scheme with customer identity resolver and signer
321 /// #[derive(Debug)]
322 /// struct CustomAuthScheme {
323 /// id: AuthSchemeId,
324 /// identity_resolver: SharedIdentityResolver,
325 /// signer: CustomSigner,
326 /// }
327 /// impl Default for CustomAuthScheme {
328 /// fn default() -> Self {
329 /// Self {
330 /// id: AuthSchemeId::new("custom"),
331 /// identity_resolver: CustomIdentityResolver.into_shared(),
332 /// signer: CustomSigner,
333 /// }
334 /// }
335 /// }
336 /// impl AuthScheme for CustomAuthScheme {
337 /// fn scheme_id(&self) -> AuthSchemeId {
338 /// self.id.clone()
339 /// }
340 /// fn identity_resolver(
341 /// &self,
342 /// _identity_resolvers: &dyn GetIdentityResolver,
343 /// ) -> Option<SharedIdentityResolver> {
344 /// Some(self.identity_resolver.clone())
345 /// }
346 /// fn signer(&self) -> &dyn Sign {
347 /// &self.signer
348 /// }
349 /// }
350 ///
351 /// #[derive(Debug, Default)]
352 /// struct CustomSigner;
353 /// impl Sign for CustomSigner {
354 /// fn sign_http_request(
355 /// &self,
356 /// _request: &mut HttpRequest,
357 /// _identity: &Identity,
358 /// _auth_scheme_endpoint_config: AuthSchemeEndpointConfig<'_>,
359 /// _runtime_components: &RuntimeComponents,
360 /// _config_bag: &ConfigBag,
361 /// ) -> Result<(), BoxError> {
362 /// // --snip--
363 /// # todo!()
364 /// }
365 /// }
366 ///
367 /// #[derive(Debug)]
368 /// struct CustomIdentityResolver;
369 /// impl ResolveIdentity for CustomIdentityResolver {
370 /// fn resolve_identity<'a>(
371 /// &'a self,
372 /// _runtime_components: &'a RuntimeComponents,
373 /// _config_bag: &'a ConfigBag,
374 /// ) -> IdentityFuture<'a> {
375 /// // --snip--
376 /// # todo!()
377 /// }
378 /// }
379 ///
380 /// // Auth scheme resolver that favors `CustomAuthScheme`
381 /// #[derive(Debug)]
382 /// struct CustomAuthSchemeResolver;
383 /// impl aws_sdk_transcribestreaming::config::auth::ResolveAuthScheme for CustomAuthSchemeResolver {
384 /// fn resolve_auth_scheme<'a>(
385 /// &'a self,
386 /// _params: &'a aws_sdk_transcribestreaming::config::auth::Params,
387 /// _cfg: &'a ConfigBag,
388 /// _runtime_components: &'a RuntimeComponents,
389 /// ) -> AuthSchemeOptionsFuture<'a> {
390 /// AuthSchemeOptionsFuture::ready(Ok(vec![AuthSchemeOption::from(AuthSchemeId::new(
391 /// "custom",
392 /// ))]))
393 /// }
394 /// }
395 ///
396 /// let config = aws_sdk_transcribestreaming::Config::builder()
397 /// .push_auth_scheme(CustomAuthScheme::default())
398 /// .auth_scheme_resolver(CustomAuthSchemeResolver)
399 /// // other configurations
400 /// .build();
401 /// ```
402 pub fn push_auth_scheme(mut self, auth_scheme: impl ::aws_smithy_runtime_api::client::auth::AuthScheme + 'static) -> Self {
403 self.runtime_components.push_auth_scheme(auth_scheme);
404 self
405 }
406
407 /// Set the auth scheme resolver for the builder
408 ///
409 /// # Examples
410 /// ```no_run
411 /// # use aws_smithy_runtime_api::{
412 /// # client::{
413 /// # auth::AuthSchemeOptionsFuture,
414 /// # runtime_components::RuntimeComponents,
415 /// # },
416 /// # };
417 /// # use aws_smithy_types::config_bag::ConfigBag;
418 /// #[derive(Debug)]
419 /// struct CustomAuthSchemeResolver;
420 /// impl aws_sdk_transcribestreaming::config::auth::ResolveAuthScheme for CustomAuthSchemeResolver {
421 /// fn resolve_auth_scheme<'a>(
422 /// &'a self,
423 /// _params: &'a aws_sdk_transcribestreaming::config::auth::Params,
424 /// _cfg: &'a ConfigBag,
425 /// _runtime_components: &'a RuntimeComponents,
426 /// ) -> AuthSchemeOptionsFuture<'a> {
427 /// // --snip--
428 /// # todo!()
429 /// }
430 /// }
431 ///
432 /// let config = aws_sdk_transcribestreaming::Config::builder()
433 /// .auth_scheme_resolver(CustomAuthSchemeResolver)
434 /// // other configurations
435 /// .build();
436 /// ```
437 pub fn auth_scheme_resolver(mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> Self {
438 self.set_auth_scheme_resolver(auth_scheme_resolver);
439 self
440 }
441
442 /// Set the auth scheme resolver for the builder
443 ///
444 /// # Examples
445 /// See an example for [`Self::auth_scheme_resolver`].
446 pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
447 self.runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
448 self
449 }
450
451 /// Enable no authentication regardless of what authentication mechanisms operations support
452 ///
453 /// This adds [NoAuthScheme](aws_smithy_runtime::client::auth::no_auth::NoAuthScheme) as a fallback
454 /// and the auth scheme resolver will use it when no other auth schemes are applicable.
455 pub fn allow_no_auth(mut self) -> Self {
456 self.set_allow_no_auth();
457 self
458 }
459
460 /// Enable no authentication regardless of what authentication mechanisms operations support
461 ///
462 /// This adds [NoAuthScheme](aws_smithy_runtime::client::auth::no_auth::NoAuthScheme) as a fallback
463 /// and the auth scheme resolver will use it when no other auth schemes are applicable.
464 pub fn set_allow_no_auth(&mut self) -> &mut Self {
465 self.push_runtime_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePluginV2::new().into_shared());
466 self
467 }
468 /// Set the auth scheme preference for an auth scheme resolver
469 /// (typically the default auth scheme resolver).
470 ///
471 /// Each operation has a predefined order of auth schemes, as determined by the service,
472 /// for auth scheme resolution. By using the auth scheme preference, customers
473 /// can reorder the schemes resolved by the auth scheme resolver.
474 ///
475 /// The preference list is intended as a hint rather than a strict override.
476 /// Any schemes not present in the originally resolved auth schemes will be ignored.
477 ///
478 /// # Examples
479 ///
480 /// ```no_run
481 /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
482 /// let config = aws_sdk_transcribestreaming::Config::builder()
483 /// .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
484 /// // ...
485 /// .build();
486 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
487 /// ```
488
489 pub fn auth_scheme_preference(mut self, preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>) -> Self {
490 self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
491 self
492 }
493
494
495 /// Set the auth scheme preference for an auth scheme resolver
496 /// (typically the default auth scheme resolver).
497 ///
498 /// Each operation has a predefined order of auth schemes, as determined by the service,
499 /// for auth scheme resolution. By using the auth scheme preference, customers
500 /// can reorder the schemes resolved by the auth scheme resolver.
501 ///
502 /// The preference list is intended as a hint rather than a strict override.
503 /// Any schemes not present in the originally resolved auth schemes will be ignored.
504 ///
505 /// # Examples
506 ///
507 /// ```no_run
508 /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
509 /// let config = aws_sdk_transcribestreaming::Config::builder()
510 /// .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
511 /// // ...
512 /// .build();
513 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
514 /// ```
515
516 pub fn set_auth_scheme_preference(&mut self, preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>) -> &mut Self {
517 self.config.store_or_unset(preference);
518 self
519 }
520 /// Sets the endpoint resolver to use when making requests.
521 ///
522 ///
523 /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
524 /// rules for `aws_sdk_transcribestreaming`.
525 ///
526 ///
527 /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
528 /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
529 /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
530 ///
531 /// # Examples
532 /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production.
533 /// ```no_run
534 /// use aws_sdk_transcribestreaming::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint};
535 /// #[derive(Debug)]
536 /// struct StageResolver { stage: String }
537 /// impl ResolveEndpoint for StageResolver {
538 /// fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> {
539 /// let stage = &self.stage;
540 /// EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build()))
541 /// }
542 /// }
543 /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() };
544 /// let config = aws_sdk_transcribestreaming::Config::builder().endpoint_resolver(resolver).build();
545 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
546 /// ```
547 pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self {
548 self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver()));
549 self
550 }
551
552 /// Sets the endpoint resolver to use when making requests.
553 ///
554 ///
555 /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
556 /// rules for `aws_sdk_transcribestreaming`.
557 ///
558 pub fn set_endpoint_resolver(&mut self, endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>) -> &mut Self {
559 self.runtime_components.set_endpoint_resolver(endpoint_resolver);
560 self
561 }
562 /// Set the retry_config for the builder
563 ///
564 /// # Examples
565 /// ```no_run
566 /// use aws_sdk_transcribestreaming::config::Config;
567 /// use aws_sdk_transcribestreaming::config::retry::RetryConfig;
568 ///
569 /// let retry_config = RetryConfig::standard().with_max_attempts(5);
570 /// let config = Config::builder().retry_config(retry_config).build();
571 /// ```
572 pub fn retry_config(mut self, retry_config: ::aws_smithy_types::retry::RetryConfig) -> Self {
573 self.set_retry_config(Some(retry_config));
574 self
575 }
576
577 /// Set the retry_config for the builder
578 ///
579 /// # Examples
580 /// ```no_run
581 /// use aws_sdk_transcribestreaming::config::{Builder, Config};
582 /// use aws_sdk_transcribestreaming::config::retry::RetryConfig;
583 ///
584 /// fn disable_retries(builder: &mut Builder) {
585 /// let retry_config = RetryConfig::standard().with_max_attempts(1);
586 /// builder.set_retry_config(Some(retry_config));
587 /// }
588 ///
589 /// let mut builder = Config::builder();
590 /// disable_retries(&mut builder);
591 /// let config = builder.build();
592 /// ```
593 pub fn set_retry_config(&mut self, retry_config: ::std::option::Option<::aws_smithy_types::retry::RetryConfig>) -> &mut Self {
594 retry_config.map(|r| self.config.store_put(r));
595 self
596 }
597 /// Set the sleep_impl for the builder
598 ///
599 /// # Examples
600 ///
601 /// ```no_run
602 /// use aws_sdk_transcribestreaming::config::{AsyncSleep, Config, SharedAsyncSleep, Sleep};
603 ///
604 /// #[derive(Debug)]
605 /// pub struct ForeverSleep;
606 ///
607 /// impl AsyncSleep for ForeverSleep {
608 /// fn sleep(&self, duration: std::time::Duration) -> Sleep {
609 /// Sleep::new(std::future::pending())
610 /// }
611 /// }
612 ///
613 /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
614 /// let config = Config::builder().sleep_impl(sleep_impl).build();
615 /// ```
616 pub fn sleep_impl(mut self, sleep_impl: impl crate::config::AsyncSleep + 'static) -> Self {
617 self.set_sleep_impl(Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(sleep_impl)));
618 self
619 }
620
621 /// Set the sleep_impl for the builder
622 ///
623 /// # Examples
624 ///
625 /// ```no_run
626 /// use aws_sdk_transcribestreaming::config::{AsyncSleep, Builder, Config, SharedAsyncSleep, Sleep};
627 ///
628 /// #[derive(Debug)]
629 /// pub struct ForeverSleep;
630 ///
631 /// impl AsyncSleep for ForeverSleep {
632 /// fn sleep(&self, duration: std::time::Duration) -> Sleep {
633 /// Sleep::new(std::future::pending())
634 /// }
635 /// }
636 ///
637 /// fn set_never_ending_sleep_impl(builder: &mut Builder) {
638 /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
639 /// builder.set_sleep_impl(Some(sleep_impl));
640 /// }
641 ///
642 /// let mut builder = Config::builder();
643 /// set_never_ending_sleep_impl(&mut builder);
644 /// let config = builder.build();
645 /// ```
646 pub fn set_sleep_impl(&mut self, sleep_impl: ::std::option::Option<crate::config::SharedAsyncSleep>) -> &mut Self {
647 self.runtime_components.set_sleep_impl(sleep_impl);
648 self
649 }
650 /// Set the timeout_config for the builder
651 ///
652 /// # Examples
653 ///
654 /// ```no_run
655 /// # use std::time::Duration;
656 /// use aws_sdk_transcribestreaming::config::Config;
657 /// use aws_sdk_transcribestreaming::config::timeout::TimeoutConfig;
658 ///
659 /// let timeout_config = TimeoutConfig::builder()
660 /// .operation_attempt_timeout(Duration::from_secs(1))
661 /// .build();
662 /// let config = Config::builder().timeout_config(timeout_config).build();
663 /// ```
664 pub fn timeout_config(mut self, timeout_config: ::aws_smithy_types::timeout::TimeoutConfig) -> Self {
665 self.set_timeout_config(Some(timeout_config));
666 self
667 }
668
669 /// Set the timeout_config for the builder.
670 ///
671 /// Setting this to `None` has no effect if another source of configuration has set timeouts. If you
672 /// are attempting to disable timeouts, use [`TimeoutConfig::disabled`](::aws_smithy_types::timeout::TimeoutConfig::disabled)
673 ///
674 ///
675 /// # Examples
676 ///
677 /// ```no_run
678 /// # use std::time::Duration;
679 /// use aws_sdk_transcribestreaming::config::{Builder, Config};
680 /// use aws_sdk_transcribestreaming::config::timeout::TimeoutConfig;
681 ///
682 /// fn set_request_timeout(builder: &mut Builder) {
683 /// let timeout_config = TimeoutConfig::builder()
684 /// .operation_attempt_timeout(Duration::from_secs(1))
685 /// .build();
686 /// builder.set_timeout_config(Some(timeout_config));
687 /// }
688 ///
689 /// let mut builder = Config::builder();
690 /// set_request_timeout(&mut builder);
691 /// let config = builder.build();
692 /// ```
693 pub fn set_timeout_config(&mut self, timeout_config: ::std::option::Option<::aws_smithy_types::timeout::TimeoutConfig>) -> &mut Self {
694 // passing None has no impact.
695 let Some(mut timeout_config) = timeout_config else {
696 return self
697 };
698
699 if let Some(base) = self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>() {
700 timeout_config.take_defaults_from(base);
701 }
702 self.config.store_put(timeout_config);
703 self
704 }
705 /// Set the partition for retry-related state. When clients share a retry partition, they will
706 /// also share components such as token buckets and client rate limiters.
707 /// See the [`RetryPartition`](::aws_smithy_runtime::client::retries::RetryPartition) documentation for more details.
708 ///
709 /// # Default Behavior
710 ///
711 /// When no retry partition is explicitly set, the SDK automatically creates a default retry partition named `transcribestreaming`
712 /// (or `transcribestreaming-<region>` if a region is configured).
713 /// All Transcribe Streaming clients without an explicit retry partition will share this default partition.
714 ///
715 /// # Notes
716 ///
717 /// - This is an advanced setting — most users won't need to modify it.
718 /// - A configured client rate limiter has no effect unless [`RetryConfig::adaptive`](::aws_smithy_types::retry::RetryConfig::adaptive) is used.
719 ///
720 /// # Examples
721 ///
722 /// Creating a custom retry partition with a token bucket:
723 /// ```no_run
724 /// use aws_sdk_transcribestreaming::config::Config;
725 /// use aws_sdk_transcribestreaming::config::retry::{RetryPartition, TokenBucket};
726 ///
727 /// let token_bucket = TokenBucket::new(10);
728 /// let config = Config::builder()
729 /// .retry_partition(RetryPartition::custom("custom")
730 /// .token_bucket(token_bucket)
731 /// .build()
732 /// )
733 /// .build();
734 /// ```
735 ///
736 /// Configuring a client rate limiter with adaptive retry mode:
737 /// ```no_run
738 /// use aws_sdk_transcribestreaming::config::Config;
739 /// use aws_sdk_transcribestreaming::config::retry::{ClientRateLimiter, RetryConfig, RetryPartition};
740 ///
741 /// let client_rate_limiter = ClientRateLimiter::new(10.0);
742 /// let config = Config::builder()
743 /// .retry_partition(RetryPartition::custom("custom")
744 /// .client_rate_limiter(client_rate_limiter)
745 /// .build()
746 /// )
747 /// .retry_config(RetryConfig::adaptive())
748 /// .build();
749 /// ```
750 pub fn retry_partition(mut self, retry_partition: ::aws_smithy_runtime::client::retries::RetryPartition) -> Self {
751 self.set_retry_partition(Some(retry_partition));
752 self
753 }
754 /// Like [`Self::retry_partition`], but takes a mutable reference to the builder and an optional `RetryPartition`
755 pub fn set_retry_partition(&mut self, retry_partition: ::std::option::Option<::aws_smithy_runtime::client::retries::RetryPartition>) -> &mut Self {
756 retry_partition.map(|r| self.config.store_put(r));
757 self
758 }
759 /// Set the identity cache for auth.
760 ///
761 /// The identity cache defaults to a lazy caching implementation that will resolve
762 /// an identity when it is requested, and place it in the cache thereafter. Subsequent
763 /// requests will take the value from the cache while it is still valid. Once it expires,
764 /// the next request will result in refreshing the identity.
765 ///
766 /// This configuration allows you to disable or change the default caching mechanism.
767 /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
768 /// trait and pass that implementation into this function.
769 ///
770 /// # Examples
771 ///
772 /// Disabling identity caching:
773 /// ```no_run
774 /// use aws_sdk_transcribestreaming::config::IdentityCache;
775 ///
776 /// let config = aws_sdk_transcribestreaming::Config::builder()
777 /// .identity_cache(IdentityCache::no_cache())
778 /// // ...
779 /// .build();
780 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
781 /// ```
782 ///
783 /// Customizing lazy caching:
784 /// ```no_run
785 /// use aws_sdk_transcribestreaming::config::IdentityCache;
786 /// use std::time::Duration;
787 ///
788 /// let config = aws_sdk_transcribestreaming::Config::builder()
789 /// .identity_cache(
790 /// IdentityCache::lazy()
791 /// // change the load timeout to 10 seconds
792 /// .load_timeout(Duration::from_secs(10))
793 /// .build()
794 /// )
795 /// // ...
796 /// .build();
797 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
798 /// ```
799 ///
800 pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
801 self.set_identity_cache(identity_cache);
802 self
803 }
804
805
806 /// Set the identity cache for auth.
807 ///
808 /// The identity cache defaults to a lazy caching implementation that will resolve
809 /// an identity when it is requested, and place it in the cache thereafter. Subsequent
810 /// requests will take the value from the cache while it is still valid. Once it expires,
811 /// the next request will result in refreshing the identity.
812 ///
813 /// This configuration allows you to disable or change the default caching mechanism.
814 /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
815 /// trait and pass that implementation into this function.
816 ///
817 /// # Examples
818 ///
819 /// Disabling identity caching:
820 /// ```no_run
821 /// use aws_sdk_transcribestreaming::config::IdentityCache;
822 ///
823 /// let config = aws_sdk_transcribestreaming::Config::builder()
824 /// .identity_cache(IdentityCache::no_cache())
825 /// // ...
826 /// .build();
827 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
828 /// ```
829 ///
830 /// Customizing lazy caching:
831 /// ```no_run
832 /// use aws_sdk_transcribestreaming::config::IdentityCache;
833 /// use std::time::Duration;
834 ///
835 /// let config = aws_sdk_transcribestreaming::Config::builder()
836 /// .identity_cache(
837 /// IdentityCache::lazy()
838 /// // change the load timeout to 10 seconds
839 /// .load_timeout(Duration::from_secs(10))
840 /// .build()
841 /// )
842 /// // ...
843 /// .build();
844 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
845 /// ```
846 ///
847 pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
848 self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
849 self
850 }
851 /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
852 ///
853 /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
854 /// The SDK provides a default set of interceptors. An interceptor configured by this method
855 /// will run after those default interceptors.
856 ///
857 /// # Examples
858 /// ```no_run
859 /// # fn example() {
860 /// use aws_smithy_runtime_api::box_error::BoxError;
861 /// use aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut;
862 /// use aws_smithy_runtime_api::client::interceptors::Intercept;
863 /// use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
864 /// use aws_smithy_types::config_bag::ConfigBag;
865 /// use aws_sdk_transcribestreaming::config::Config;
866 /// use ::http::uri::Uri;
867 ///
868 /// fn base_url() -> String {
869 /// // ...
870 /// # String::new()
871 /// }
872 ///
873 /// #[derive(Debug)]
874 /// pub struct UriModifierInterceptor;
875 /// impl Intercept for UriModifierInterceptor {
876 /// fn name(&self) -> &'static str {
877 /// "UriModifierInterceptor"
878 /// }
879 /// fn modify_before_signing(
880 /// &self,
881 /// context: &mut BeforeTransmitInterceptorContextMut<'_>,
882 /// _runtime_components: &RuntimeComponents,
883 /// _cfg: &mut ConfigBag,
884 /// ) -> Result<(), BoxError> {
885 /// let request = context.request_mut();
886 /// let uri = format!("{}{}", base_url(), request.uri());
887 /// *request.uri_mut() = uri.parse::<Uri>()?.into();
888 ///
889 /// Ok(())
890 /// }
891 /// }
892 ///
893 /// let config = Config::builder()
894 /// .interceptor(UriModifierInterceptor)
895 /// .build();
896 /// # }
897 /// ```
898 pub fn interceptor(mut self, interceptor: impl crate::config::Intercept + 'static) -> Self {
899 self.push_interceptor(crate::config::SharedInterceptor::new(interceptor));
900 self
901 }
902
903 /// Like [`Self::interceptor`], but takes a [`SharedInterceptor`](crate::config::SharedInterceptor).
904 pub fn push_interceptor(&mut self, interceptor: crate::config::SharedInterceptor) -> &mut Self {
905 self.runtime_components.push_interceptor(interceptor);
906 self
907 }
908
909 /// Set [`SharedInterceptor`](crate::config::SharedInterceptor)s for the builder.
910 pub fn set_interceptors(&mut self, interceptors: impl IntoIterator<Item = crate::config::SharedInterceptor>) -> &mut Self {
911 self.runtime_components.set_interceptors(interceptors.into_iter());
912 self
913 }
914 /// Sets the time source used for this service
915 pub fn time_source(
916 mut self,
917 time_source: impl ::aws_smithy_async::time::TimeSource + 'static,
918 ) -> Self {
919 self.set_time_source(::std::option::Option::Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(time_source)));
920 self
921 }
922 /// Sets the time source used for this service
923 pub fn set_time_source(
924 &mut self,
925 time_source: ::std::option::Option<::aws_smithy_async::time::SharedTimeSource>,
926 ) -> &mut Self {
927 self.runtime_components.set_time_source(time_source);
928 self
929 }
930 /// Add type implementing [`ClassifyRetry`](::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry) that will be used by the
931 /// [`RetryStrategy`](::aws_smithy_runtime_api::client::retries::RetryStrategy) to determine what responses should be retried.
932 ///
933 /// A retry classifier configured by this method will run according to its [priority](::aws_smithy_runtime_api::client::retries::classifiers::RetryClassifierPriority).
934 ///
935 /// # Examples
936 /// ```no_run
937 /// # fn example() {
938 /// use aws_smithy_runtime_api::client::interceptors::context::InterceptorContext;
939 /// use aws_smithy_runtime_api::client::orchestrator::OrchestratorError;
940 /// use aws_smithy_runtime_api::client::retries::classifiers::{
941 /// ClassifyRetry, RetryAction, RetryClassifierPriority,
942 /// };
943 /// use aws_smithy_types::error::metadata::ProvideErrorMetadata;
944 /// use aws_smithy_types::retry::ErrorKind;
945 /// use std::error::Error as StdError;
946 /// use std::marker::PhantomData;
947 /// use std::fmt;
948 /// use aws_sdk_transcribestreaming::config::Config;
949 /// # #[derive(Debug)]
950 /// # struct SomeOperationError {}
951 /// # impl StdError for SomeOperationError {}
952 /// # impl fmt::Display for SomeOperationError {
953 /// # fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { todo!() }
954 /// # }
955 /// # impl ProvideErrorMetadata for SomeOperationError {
956 /// # fn meta(&self) -> &aws_sdk_transcribestreaming::error::ErrorMetadata { todo!() }
957 /// # }
958 ///
959 /// const RETRYABLE_ERROR_CODES: &[&str] = &[
960 /// // List error codes to be retried here...
961 /// ];
962 ///
963 /// // When classifying at an operation's error type, classifiers require a generic parameter.
964 /// // When classifying the HTTP response alone, no generic is needed.
965 /// #[derive(Debug, Default)]
966 /// pub struct ExampleErrorCodeClassifier<E> {
967 /// _inner: PhantomData<E>,
968 /// }
969 ///
970 /// impl<E> ExampleErrorCodeClassifier<E> {
971 /// pub fn new() -> Self {
972 /// Self {
973 /// _inner: PhantomData,
974 /// }
975 /// }
976 /// }
977 ///
978 /// impl<E> ClassifyRetry for ExampleErrorCodeClassifier<E>
979 /// where
980 /// // Adding a trait bound for ProvideErrorMetadata allows us to inspect the error code.
981 /// E: StdError + ProvideErrorMetadata + Send + Sync + 'static,
982 /// {
983 /// fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction {
984 /// // Check for a result
985 /// let output_or_error = ctx.output_or_error();
986 /// // Check for an error
987 /// let error = match output_or_error {
988 /// Some(Ok(_)) | None => return RetryAction::NoActionIndicated,
989 /// Some(Err(err)) => err,
990 /// };
991 ///
992 /// // Downcast the generic error and extract the code
993 /// let error_code = OrchestratorError::as_operation_error(error)
994 /// .and_then(|err| err.downcast_ref::<E>())
995 /// .and_then(|err| err.code());
996 ///
997 /// // If this error's code is in our list, return an action that tells the RetryStrategy to retry this request.
998 /// if let Some(error_code) = error_code {
999 /// if RETRYABLE_ERROR_CODES.contains(&error_code) {
1000 /// return RetryAction::transient_error();
1001 /// }
1002 /// }
1003 ///
1004 /// // Otherwise, return that no action is indicated i.e. that this classifier doesn't require a retry.
1005 /// // Another classifier may still classify this response as retryable.
1006 /// RetryAction::NoActionIndicated
1007 /// }
1008 ///
1009 /// fn name(&self) -> &'static str { "Example Error Code Classifier" }
1010 /// }
1011 ///
1012 /// let config = Config::builder()
1013 /// .retry_classifier(ExampleErrorCodeClassifier::<SomeOperationError>::new())
1014 /// .build();
1015 /// # }
1016 /// ```
1017 pub fn retry_classifier(mut self, retry_classifier: impl ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry + 'static) -> Self {
1018 self.push_retry_classifier(::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier::new(retry_classifier));
1019 self
1020 }
1021
1022 /// Like [`Self::retry_classifier`], but takes a [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier).
1023 pub fn push_retry_classifier(&mut self, retry_classifier: ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier) -> &mut Self {
1024 self.runtime_components.push_retry_classifier(retry_classifier);
1025 self
1026 }
1027
1028 /// Set [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier)s for the builder, replacing any that
1029 /// were previously set.
1030 pub fn set_retry_classifiers(&mut self, retry_classifiers: impl IntoIterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier>) -> &mut Self {
1031 self.runtime_components.set_retry_classifiers(retry_classifiers.into_iter());
1032 self
1033 }
1034 /// Sets the name of the app that is using the client.
1035 ///
1036 /// This _optional_ name is used to identify the application in the user agent that
1037 /// gets sent along with requests.
1038 pub fn app_name(mut self, app_name: ::aws_types::app_name::AppName) -> Self {
1039 self.set_app_name(Some(app_name));
1040 self
1041 }
1042 /// Sets the name of the app that is using the client.
1043 ///
1044 /// This _optional_ name is used to identify the application in the user agent that
1045 /// gets sent along with requests.
1046 pub fn set_app_name(&mut self, app_name: ::std::option::Option<::aws_types::app_name::AppName>) -> &mut Self {
1047 self.config.store_or_unset(app_name);
1048 self
1049 }
1050 /// Overrides the default invocation ID generator.
1051 ///
1052 /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic.
1053 pub fn invocation_id_generator(mut self, gen: impl ::aws_runtime::invocation_id::InvocationIdGenerator + 'static) -> Self {
1054 self.set_invocation_id_generator(::std::option::Option::Some(::aws_runtime::invocation_id::SharedInvocationIdGenerator::new(gen)));
1055 self
1056 }
1057 /// Overrides the default invocation ID generator.
1058 ///
1059 /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic.
1060 pub fn set_invocation_id_generator(&mut self, gen: ::std::option::Option<::aws_runtime::invocation_id::SharedInvocationIdGenerator>) -> &mut Self {
1061 self.config.store_or_unset(gen);
1062 self
1063 }
1064 /// Sets the endpoint URL used to communicate with this service.
1065 ///
1066 /// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix
1067 /// will be prefixed onto this URL. To fully override the endpoint resolver, use
1068 /// [`Builder::endpoint_resolver`].
1069 pub fn endpoint_url(mut self, endpoint_url: impl Into<::std::string::String>) -> Self {
1070 self.set_endpoint_url(Some(endpoint_url.into()));
1071 self
1072 }
1073 /// Sets the endpoint URL used to communicate with this service.
1074 ///
1075 /// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix
1076 /// will be prefixed onto this URL. To fully override the endpoint resolver, use
1077 /// [`Builder::endpoint_resolver`].
1078 pub fn set_endpoint_url(&mut self, endpoint_url: Option<::std::string::String>) -> &mut Self {
1079 self.config.store_or_unset(endpoint_url.map(::aws_types::endpoint_config::EndpointUrl));
1080 self
1081 }
1082 /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
1083 pub fn use_dual_stack(mut self, use_dual_stack: impl Into<bool>) -> Self {
1084 self.set_use_dual_stack(Some(use_dual_stack.into()));
1085 self
1086 }
1087 /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
1088 pub fn set_use_dual_stack(&mut self, use_dual_stack: Option<bool>) -> &mut Self {
1089 self.config.store_or_unset(use_dual_stack.map(::aws_types::endpoint_config::UseDualStack));
1090 self
1091 }
1092 /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
1093 pub fn use_fips(mut self, use_fips: impl Into<bool>) -> Self {
1094 self.set_use_fips(Some(use_fips.into()));
1095 self
1096 }
1097 /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
1098 pub fn set_use_fips(&mut self, use_fips: Option<bool>) -> &mut Self {
1099 self.config.store_or_unset(use_fips.map(::aws_types::endpoint_config::UseFips));
1100 self
1101 }
1102 /// Sets the AWS region to use when making requests.
1103 ///
1104 /// # Examples
1105 /// ```no_run
1106 /// use aws_types::region::Region;
1107 /// use aws_sdk_transcribestreaming::config::{Builder, Config};
1108 ///
1109 /// let config = aws_sdk_transcribestreaming::Config::builder()
1110 /// .region(Region::new("us-east-1"))
1111 /// .build();
1112 /// ```
1113 pub fn region(mut self, region: impl ::std::convert::Into<::std::option::Option<crate::config::Region>>) -> Self {
1114 self.set_region(region.into());
1115 self
1116 }
1117 /// Sets the AWS region to use when making requests.
1118 pub fn set_region(&mut self, region: ::std::option::Option<crate::config::Region>) -> &mut Self {
1119 self.config.store_or_unset(region);
1120 self
1121 }
1122 /// Sets the credentials provider for this service
1123 pub fn credentials_provider(mut self, credentials_provider: impl crate::config::ProvideCredentials + 'static) -> Self {
1124 self.set_credentials_provider(::std::option::Option::Some(crate::config::SharedCredentialsProvider::new(credentials_provider)));
1125 self
1126 }
1127 /// Sets the credentials provider for this service
1128 pub fn set_credentials_provider(&mut self, credentials_provider: ::std::option::Option<crate::config::SharedCredentialsProvider>) -> &mut Self {
1129 if let Some(credentials_provider) = credentials_provider {
1130 self.runtime_components.set_identity_resolver(::aws_runtime::auth::sigv4::SCHEME_ID, credentials_provider);
1131 }
1132 self
1133 }
1134 /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
1135 ///
1136 /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
1137 /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
1138 /// all operations might be the ideal behavior but could break existing applications.
1139 ///
1140 /// # Examples
1141 ///
1142 /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
1143 /// ```no_run
1144 /// use aws_sdk_transcribestreaming::config::BehaviorVersion;
1145 ///
1146 /// let config = aws_sdk_transcribestreaming::Config::builder()
1147 /// .behavior_version(BehaviorVersion::latest())
1148 /// // ...
1149 /// .build();
1150 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
1151 /// ```
1152 ///
1153 /// Customizing behavior major version:
1154 /// ```no_run
1155 /// use aws_sdk_transcribestreaming::config::BehaviorVersion;
1156 ///
1157 /// let config = aws_sdk_transcribestreaming::Config::builder()
1158 /// .behavior_version(BehaviorVersion::v2023_11_09())
1159 /// // ...
1160 /// .build();
1161 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
1162 /// ```
1163 ///
1164 pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
1165 self.set_behavior_version(Some(behavior_version));
1166 self
1167 }
1168
1169
1170 /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
1171 ///
1172 /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
1173 /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
1174 /// all operations might be the ideal behavior but could break existing applications.
1175 ///
1176 /// # Examples
1177 ///
1178 /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
1179 /// ```no_run
1180 /// use aws_sdk_transcribestreaming::config::BehaviorVersion;
1181 ///
1182 /// let config = aws_sdk_transcribestreaming::Config::builder()
1183 /// .behavior_version(BehaviorVersion::latest())
1184 /// // ...
1185 /// .build();
1186 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
1187 /// ```
1188 ///
1189 /// Customizing behavior major version:
1190 /// ```no_run
1191 /// use aws_sdk_transcribestreaming::config::BehaviorVersion;
1192 ///
1193 /// let config = aws_sdk_transcribestreaming::Config::builder()
1194 /// .behavior_version(BehaviorVersion::v2023_11_09())
1195 /// // ...
1196 /// .build();
1197 /// let client = aws_sdk_transcribestreaming::Client::from_conf(config);
1198 /// ```
1199 ///
1200 pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
1201 self.behavior_version = behavior_version;
1202 self
1203 }
1204
1205 /// Convenience method to set the latest behavior major version
1206 ///
1207 /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
1208 pub fn behavior_version_latest(mut self) -> Self {
1209 self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
1210 self
1211 }
1212 /// Adds a runtime plugin to the config.
1213 #[allow(unused)]
1214 pub(crate) fn runtime_plugin(mut self, plugin: impl crate::config::RuntimePlugin + 'static) -> Self {
1215 self.push_runtime_plugin(crate::config::SharedRuntimePlugin::new(plugin));
1216 self
1217 }
1218 /// Adds a runtime plugin to the config.
1219 #[allow(unused)]
1220 pub(crate) fn push_runtime_plugin(&mut self, plugin: crate::config::SharedRuntimePlugin) -> &mut Self {
1221 self.runtime_plugins.push(plugin);
1222 self
1223 }
1224 #[cfg(any(feature = "test-util", test))]
1225 #[allow(unused_mut)]
1226 /// Apply test defaults to the builder. NOTE: Consider migrating to use `apply_test_defaults_v2` instead.
1227 pub fn apply_test_defaults(&mut self) -> &mut Self {
1228 self
1229 .set_time_source(::std::option::Option::Some(::aws_smithy_async::time::SharedTimeSource::new(
1230 ::aws_smithy_async::time::StaticTimeSource::new(::std::time::UNIX_EPOCH + ::std::time::Duration::from_secs(1234567890)))
1231 ));
1232 self.config.store_put(::aws_runtime::user_agent::AwsUserAgent::for_tests());
1233 self.set_credentials_provider(Some(crate::config::SharedCredentialsProvider::new(::aws_credential_types::Credentials::for_tests())));
1234 self.behavior_version = ::std::option::Option::Some(crate::config::BehaviorVersion::latest());
1235 self
1236 }
1237 #[cfg(any(feature = "test-util", test))]
1238 #[allow(unused_mut)]
1239 /// Apply test defaults to the builder. NOTE: Consider migrating to use `with_test_defaults_v2` instead.
1240 pub fn with_test_defaults(mut self) -> Self {
1241 self.apply_test_defaults(); self
1242 }
1243 #[cfg(any(feature = "test-util", test))]
1244 #[allow(unused_mut)]
1245 /// Apply test defaults to the builder. V2 of this function sets additional test defaults such as region configuration (if applicable).
1246 pub fn apply_test_defaults_v2(&mut self) -> &mut Self {
1247 self.apply_test_defaults();
1248 if self.config.load::<crate::config::Region>().is_none() {
1249 self.set_region(::std::option::Option::Some(crate::config::Region::new("us-east-1")));
1250 }
1251 self
1252 }
1253 #[cfg(any(feature = "test-util", test))]
1254 #[allow(unused_mut)]
1255 /// Apply test defaults to the builder. V2 of this function sets additional test defaults such as region configuration (if applicable).
1256 pub fn with_test_defaults_v2(mut self) -> Self {
1257 self.apply_test_defaults_v2(); self
1258 }
1259 /// Builds a [`Config`].
1260 #[allow(unused_mut)]
1261 pub fn build(mut self) -> Config {
1262 let mut layer = self.config;
1263 if self.runtime_components.time_source().is_none() {
1264 self.runtime_components.set_time_source(::std::option::Option::Some(::std::default::Default::default()));
1265 }
1266 layer.store_put(crate::meta::API_METADATA.clone());
1267 layer.store_put(::aws_types::SigningName::from_static("transcribe"));
1268 layer.load::<::aws_types::region::Region>().cloned().map(|r| layer.store_put(::aws_types::region::SigningRegion::from(r)));
1269 Config {
1270 config: crate::config::Layer::from(layer.clone()).with_name("aws_sdk_transcribestreaming::config::Config").freeze(),
1271 cloneable: layer,
1272 runtime_components: self.runtime_components,
1273 runtime_plugins: self.runtime_plugins,
1274 behavior_version: self.behavior_version,
1275 }
1276 }
1277}
1278#[derive(::std::fmt::Debug)]
1279 pub(crate) struct ServiceRuntimePlugin {
1280 config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
1281 runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
1282 }
1283
1284 impl ServiceRuntimePlugin {
1285 pub fn new(_service_config: crate::config::Config) -> Self {
1286 let config = { let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Transcribe");
1287 if _service_config.protocol().is_none() {
1288 cfg.store_put(
1289 ::aws_smithy_schema::protocol::SharedClientProtocol::new(::aws_smithy_json::protocol::aws_rest_json_1::AwsRestJsonProtocol::new())
1290 );
1291 }
1292cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
1293 ::std::option::Option::Some(cfg.freeze()) };
1294 let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
1295 runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
1296 use crate::config::auth::ResolveAuthScheme;
1297 crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
1298 }));
1299runtime_components.set_endpoint_resolver(::std::option::Option::Some({
1300 use crate::config::endpoint::ResolveEndpoint;
1301 crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
1302 }));
1303runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
1304runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
1305runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
1306runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
1307runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
1308runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
1309runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
1310runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
1311runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(::aws_runtime::auth::sigv4::SigV4AuthScheme::new()));
1312runtime_components.push_interceptor(crate::config::endpoint::EndpointOverrideFeatureTrackerInterceptor);
1313runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
1314 Self { config, runtime_components }
1315 }
1316 }
1317
1318 impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
1319 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
1320 self.config.clone()
1321 }
1322
1323 fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {
1324 ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults
1325 }
1326
1327 fn runtime_components(&self, _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
1328 ::std::borrow::Cow::Borrowed(&self.runtime_components)
1329 }
1330 }
1331
1332 // Cross-operation shared-state singletons
1333
1334/// A plugin that enables configuration for a single operation invocation
1335 ///
1336 /// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
1337 /// In the case of default values requested, they will be obtained from `client_config`.
1338 #[derive(Debug)]
1339 pub(crate) struct ConfigOverrideRuntimePlugin {
1340 pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
1341 pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
1342 }
1343
1344 impl ConfigOverrideRuntimePlugin {
1345 #[allow(dead_code)] // unused when a service does not provide any operations
1346 pub(crate) fn new(
1347 config_override: Builder,
1348 initial_config: ::aws_smithy_types::config_bag::FrozenLayer,
1349 initial_components: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder
1350 ) -> Self {
1351 let mut layer = config_override.config;
1352 let mut components = config_override.runtime_components;
1353 #[allow(unused_mut)]
1354 let mut resolver = ::aws_smithy_runtime::client::config_override::Resolver::overrid(initial_config, initial_components, &mut layer, &mut components);
1355
1356 resolver.config_mut()
1357 .load::<::aws_types::region::Region>()
1358 .cloned()
1359 .map(|r| resolver.config_mut().store_put(::aws_types::region::SigningRegion::from(r)));
1360
1361 let _ = resolver;
1362 Self {
1363 config: ::aws_smithy_types::config_bag::Layer::from(layer)
1364 .with_name("aws_sdk_transcribestreaming::config::ConfigOverrideRuntimePlugin").freeze(),
1365 components,
1366 }
1367 }
1368 }
1369
1370 impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ConfigOverrideRuntimePlugin {
1371 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
1372 Some(self.config.clone())
1373 }
1374
1375 fn runtime_components(&self, _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
1376 ::std::borrow::Cow::Borrowed(&self.components)
1377 }
1378 }
1379
1380pub use ::aws_smithy_types::config_bag::ConfigBag;
1381 pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
1382 pub use ::aws_smithy_runtime::client::identity::IdentityCache;
1383
1384pub use ::aws_credential_types::Credentials;
1385
1386impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
1387 fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
1388 let mut builder = Builder::default();
1389 builder.set_credentials_provider(input.credentials_provider());
1390builder =
1391 builder.region(input.region().cloned());
1392builder.set_use_fips(input.use_fips());
1393builder.set_use_dual_stack(input.use_dual_stack());
1394if input.get_origin("endpoint_url").is_client_config() {
1395 builder.set_endpoint_url(input.endpoint_url().map(|s|s.to_string()));
1396 } else {
1397 builder.set_endpoint_url(
1398 input
1399 .service_config()
1400 .and_then(|conf| conf.load_config(service_config_key("Transcribe Streaming", "AWS_ENDPOINT_URL", "endpoint_url")).map(|it| it.parse().unwrap()))
1401 .or_else(|| input.endpoint_url().map(|s|s.to_string()))
1402 );
1403 }
1404// resiliency
1405 builder.set_retry_config(input.retry_config().cloned());
1406 builder.set_timeout_config(input.timeout_config().cloned());
1407 builder.set_sleep_impl(input.sleep_impl());
1408
1409 builder.set_http_client(input.http_client());
1410 builder.set_time_source(input.time_source());
1411 builder.set_behavior_version(input.behavior_version());
1412 builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
1413if let Some(protocol) = input.protocol() {
1414 builder.set_protocol(Some(protocol.clone()));
1415 }
1416// setting `None` here removes the default
1417 if let Some(config) = input.stalled_stream_protection() {
1418 builder.set_stalled_stream_protection(Some(config));
1419 }
1420
1421 if let Some(cache) = input.identity_cache() {
1422 builder.set_identity_cache(cache);
1423 }
1424builder.set_app_name(input.app_name().cloned());
1425
1426 builder
1427 }
1428 }
1429
1430 impl From<&::aws_types::sdk_config::SdkConfig> for Config {
1431 fn from(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
1432 Builder::from(sdk_config).build()
1433 }
1434 }
1435
1436pub use ::aws_types::app_name::AppName;
1437
1438#[allow(dead_code)]
1439fn service_config_key<'a>(
1440 service_id: &'a str,
1441 env: &'a str,
1442 profile: &'a str,
1443 ) -> aws_types::service_config::ServiceConfigKey<'a> {
1444 ::aws_types::service_config::ServiceConfigKey::builder()
1445 .service_id(service_id)
1446 .env(env)
1447 .profile(profile)
1448 .build()
1449 .expect("all field sets explicitly, can't fail")
1450 }
1451
1452pub use ::aws_smithy_async::rt::sleep::{Sleep};
1453
1454pub(crate) fn base_client_runtime_plugins(
1455 mut config: crate::Config,
1456 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
1457 let mut configured_plugins = ::std::vec::Vec::new();
1458 ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins);
1459 #[cfg(feature = "behavior-version-latest")] {
1460 if config.behavior_version.is_none() {
1461 config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
1462 }
1463}
1464
1465 let default_retry_partition = "transcribestreaming";
1466 let default_retry_partition = match config.region() {
1467 Some(region) => ::std::borrow::Cow::from(format!("{default_retry_partition}-{region}")),
1468 None => ::std::borrow::Cow::from(default_retry_partition),
1469 };
1470
1471 let scope = "aws-sdk-transcribestreaming";
1472
1473 #[allow(deprecated)]
1474 let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
1475 // defaults
1476 .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
1477 ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
1478 .with_retry_partition_name(default_retry_partition)
1479 .with_behavior_version(config.behavior_version.expect("Invalid client configuration: A behavior major version must be set when sending a request or constructing a client. You must set it during client construction or by enabling the `behavior-version-latest` cargo feature."))
1480 .with_is_aws_sdk(true)
1481 ))
1482 // user config
1483 .with_client_plugin(
1484 ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
1485 .with_config(config.config.clone())
1486 .with_runtime_components(config.runtime_components.clone())
1487 )
1488 // codegen config
1489 .with_client_plugin(crate::config::ServiceRuntimePlugin::new(config.clone()))
1490 .with_client_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePlugin::new())
1491 .with_client_plugin(
1492 ::aws_smithy_runtime::client::metrics::MetricsRuntimePlugin::builder()
1493 .with_scope(scope)
1494 .with_time_source(config.runtime_components.time_source().unwrap_or_default())
1495 .build()
1496 .expect("All required fields have been set")
1497 );
1498
1499
1500
1501 for plugin in configured_plugins {
1502 plugins = plugins.with_client_plugin(plugin);
1503 }
1504 plugins
1505 }
1506
1507pub use ::aws_smithy_types::config_bag::FrozenLayer;
1508
1509pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
1510
1511pub use ::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin;
1512
1513pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
1514
1515pub use ::aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
1516
1517pub use ::aws_smithy_runtime_api::client::http::SharedHttpClient;
1518
1519pub use ::aws_smithy_async::rt::sleep::SharedAsyncSleep;
1520
1521pub use ::aws_smithy_runtime_api::client::identity::SharedIdentityCache;
1522
1523pub use ::aws_smithy_runtime_api::client::interceptors::SharedInterceptor;
1524
1525pub use ::aws_types::region::Region;
1526
1527pub use ::aws_credential_types::provider::SharedCredentialsProvider;
1528
1529pub use ::aws_smithy_runtime_api::client::http::HttpClient;
1530
1531pub use ::aws_smithy_runtime_api::shared::IntoShared;
1532
1533pub use ::aws_smithy_async::rt::sleep::AsyncSleep;
1534
1535pub use ::aws_smithy_runtime_api::client::identity::ResolveCachedIdentity;
1536
1537pub use ::aws_smithy_runtime_api::client::interceptors::Intercept;
1538
1539pub use ::aws_credential_types::provider::ProvideCredentials;
1540
1541pub use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
1542
1543pub use ::aws_smithy_types::config_bag::Layer;
1544
1545/// Types needed to configure endpoint resolution.
1546pub mod endpoint;
1547
1548/// HTTP request and response types.
1549pub mod http;
1550
1551/// Types needed to implement [`Intercept`](crate::config::Intercept).
1552pub mod interceptors;
1553
1554/// Retry configuration.
1555pub mod retry;
1556
1557/// Timeout configuration.
1558pub mod timeout;
1559
1560/// Types needed to configure auth scheme resolution.
1561pub mod auth;
1562