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