Skip to content

Commit 033e5c6

Browse files
ysaito1001jdisanti
authored andcommitted
[smithy-rs] Add skeleton for supporting operation level config (#2589)
## Motivation and Context This PR adds skeleton code for supporting operation level config behind `enableNewSmithyRuntime`. ## Description The approach is described in smithy-lang/smithy-rs#2527, where fluent builders now have a new method, `config_override`, that takes a service config builder. The builder implements the `RuntimePlugin` trait and once `TODO(RuntimePlugins)` is implemented, allows itself to put field values into a config bag within `send_v2`. ## Testing Added a line of code to an ignored test in `sra_test`, which, however, does check compilation. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <awsaito@amazon.com> Co-authored-by: John DiSanti <jdisanti@amazon.com>
1 parent 2d510ae commit 033e5c6

File tree

13,822 files changed

+137662
-122669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

13,822 files changed

+137662
-122669
lines changed

sdk/accessanalyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl Config {
9898
}
9999
}
100100
/// Builder for creating a `Config`.
101-
#[derive(Default)]pub struct Builder {
101+
#[derive(Clone, Debug, Default)]pub struct Builder {
102102
make_token: Option<crate::idempotency_token::IdempotencyTokenProvider>,
103103
endpoint_resolver: Option<std::sync::Arc<dyn aws_smithy_http::endpoint::ResolveEndpoint<crate::endpoint::Params>>>,
104104
retry_config: Option<aws_smithy_types::retry::RetryConfig>,

sdk/accessanalyzer/src/idempotency_token.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ pub(crate) fn uuid_v4(input: u128) -> String {
3838
/// for testing, two options are available:
3939
/// 1. Utilize the From<&'static str>` implementation to hard code an idempotency token
4040
/// 2. Seed the token provider with [`IdempotencyTokenProvider::with_seed`](IdempotencyTokenProvider::with_seed)
41+
#[derive(Debug)]
4142
pub struct IdempotencyTokenProvider {
4243
inner: Inner,
4344
}
4445

46+
#[derive(Debug)]
4547
enum Inner {
4648
Static(&'static str),
4749
Random(Mutex<fastrand::Rng>),

sdk/accessanalyzer/src/operation/apply_archive_rule/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::apply_archive_rule::_apply_archive_rule_input::ApplyAr
88
/// <p>Retroactively applies the archive rule to existing findings that meet the archive rule criteria.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct ApplyArchiveRuleFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder,
13+
}
1414
impl ApplyArchiveRuleFluentBuilder {
1515
/// Creates a new `ApplyArchiveRule`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::apply_archive_rule::ApplyArchiveRule, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/cancel_policy_generation/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::cancel_policy_generation::_cancel_policy_generation_in
88
/// <p>Cancels the requested policy generation.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct CancelPolicyGenerationFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::cancel_policy_generation::builders::CancelPolicyGenerationInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::cancel_policy_generation::builders::CancelPolicyGenerationInputBuilder,
13+
}
1414
impl CancelPolicyGenerationFluentBuilder {
1515
/// Creates a new `CancelPolicyGeneration`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::cancel_policy_generation::CancelPolicyGeneration, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/create_access_preview/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::create_access_preview::_create_access_preview_input::C
88
/// <p>Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct CreateAccessPreviewFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::create_access_preview::builders::CreateAccessPreviewInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::create_access_preview::builders::CreateAccessPreviewInputBuilder,
13+
}
1414
impl CreateAccessPreviewFluentBuilder {
1515
/// Creates a new `CreateAccessPreview`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::create_access_preview::CreateAccessPreview, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/create_analyzer/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::create_analyzer::_create_analyzer_input::CreateAnalyze
88
/// <p>Creates an analyzer for your account.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct CreateAnalyzerFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::create_analyzer::builders::CreateAnalyzerInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::create_analyzer::builders::CreateAnalyzerInputBuilder,
13+
}
1414
impl CreateAnalyzerFluentBuilder {
1515
/// Creates a new `CreateAnalyzer`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::create_analyzer::CreateAnalyzer, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/create_archive_rule/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ pub use crate::operation::create_archive_rule::_create_archive_rule_input::Creat
99
/// <p>To learn about filter keys that you can use to create an archive rule, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html">IAM Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>
1010
#[derive(std::clone::Clone, std::fmt::Debug)]
1111
pub struct CreateArchiveRuleFluentBuilder {
12-
handle: std::sync::Arc<crate::client::Handle>,
13-
inner: crate::operation::create_archive_rule::builders::CreateArchiveRuleInputBuilder
14-
}
12+
handle: std::sync::Arc<crate::client::Handle>,
13+
inner: crate::operation::create_archive_rule::builders::CreateArchiveRuleInputBuilder,
14+
}
1515
impl CreateArchiveRuleFluentBuilder {
1616
/// Creates a new `CreateArchiveRule`.
17-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
18-
Self { handle, inner: Default::default() }
19-
}
20-
21-
/// Consume this builder, creating a customizable operation that can be modified before being
17+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
18+
Self {
19+
handle, inner: Default::default(),
20+
}
21+
}
22+
/// Consume this builder, creating a customizable operation that can be modified before being
2223
/// sent. The operation's inner [http::Request] can be modified as well.
2324
pub async fn customize(self) -> std::result::Result<
2425
crate::client::customize::CustomizableOperation<crate::operation::create_archive_rule::CreateArchiveRule, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/delete_analyzer/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::delete_analyzer::_delete_analyzer_input::DeleteAnalyze
88
/// <p>Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct DeleteAnalyzerFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::delete_analyzer::builders::DeleteAnalyzerInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::delete_analyzer::builders::DeleteAnalyzerInputBuilder,
13+
}
1414
impl DeleteAnalyzerFluentBuilder {
1515
/// Creates a new `DeleteAnalyzer`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::delete_analyzer::DeleteAnalyzer, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/delete_archive_rule/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::delete_archive_rule::_delete_archive_rule_input::Delet
88
/// <p>Deletes the specified archive rule.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct DeleteArchiveRuleFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::delete_archive_rule::builders::DeleteArchiveRuleInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::delete_archive_rule::builders::DeleteArchiveRuleInputBuilder,
13+
}
1414
impl DeleteArchiveRuleFluentBuilder {
1515
/// Creates a new `DeleteArchiveRule`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::delete_archive_rule::DeleteArchiveRule, aws_http::retry::AwsResponseRetryClassifier,>,

sdk/accessanalyzer/src/operation/get_access_preview/builders.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ pub use crate::operation::get_access_preview::_get_access_preview_input::GetAcce
88
/// <p>Retrieves information about an access preview for the specified analyzer.</p>
99
#[derive(std::clone::Clone, std::fmt::Debug)]
1010
pub struct GetAccessPreviewFluentBuilder {
11-
handle: std::sync::Arc<crate::client::Handle>,
12-
inner: crate::operation::get_access_preview::builders::GetAccessPreviewInputBuilder
13-
}
11+
handle: std::sync::Arc<crate::client::Handle>,
12+
inner: crate::operation::get_access_preview::builders::GetAccessPreviewInputBuilder,
13+
}
1414
impl GetAccessPreviewFluentBuilder {
1515
/// Creates a new `GetAccessPreview`.
16-
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17-
Self { handle, inner: Default::default() }
18-
}
19-
20-
/// Consume this builder, creating a customizable operation that can be modified before being
16+
pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
17+
Self {
18+
handle, inner: Default::default(),
19+
}
20+
}
21+
/// Consume this builder, creating a customizable operation that can be modified before being
2122
/// sent. The operation's inner [http::Request] can be modified as well.
2223
pub async fn customize(self) -> std::result::Result<
2324
crate::client::customize::CustomizableOperation<crate::operation::get_access_preview::GetAccessPreview, aws_http::retry::AwsResponseRetryClassifier,>,

0 commit comments

Comments
 (0)