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