Skip to content

Commit 9c21f14

Browse files
authored
feat(middleware-stack): allow adding middleware to override an existing one (#1964)
* feat(middleware-stack): allow adding middleware to override an existing one * fix: add override config to all native middleware * fix: remove resolved flag in commands(revert #1883) This reverts commit d4c302b.
1 parent ea93d22 commit 9c21f14

File tree

8,982 files changed

+9382
-45041
lines changed

Some content is hidden

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

8,982 files changed

+9382
-45041
lines changed

clients/client-accessanalyzer/commands/CreateAnalyzerCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class CreateAnalyzerCommand extends $Command<
2828
CreateAnalyzerCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class CreateAnalyzerCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<CreateAnalyzerCommandInput, CreateAnalyzerCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

clients/client-accessanalyzer/commands/CreateArchiveRuleCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class CreateArchiveRuleCommand extends $Command<
2929
CreateArchiveRuleCommandOutput,
3030
AccessAnalyzerClientResolvedConfig
3131
> {
32-
private resolved = false;
3332
// Start section: command_properties
3433
// End section: command_properties
3534

@@ -47,10 +46,7 @@ export class CreateArchiveRuleCommand extends $Command<
4746
configuration: AccessAnalyzerClientResolvedConfig,
4847
options?: __HttpHandlerOptions
4948
): Handler<CreateArchiveRuleCommandInput, CreateArchiveRuleCommandOutput> {
50-
if (!this.resolved) {
51-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
52-
this.resolved = true;
53-
}
49+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5450

5551
const stack = clientStack.concat(this.middlewareStack);
5652

clients/client-accessanalyzer/commands/DeleteAnalyzerCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export class DeleteAnalyzerCommand extends $Command<
3030
DeleteAnalyzerCommandOutput,
3131
AccessAnalyzerClientResolvedConfig
3232
> {
33-
private resolved = false;
3433
// Start section: command_properties
3534
// End section: command_properties
3635

@@ -48,10 +47,7 @@ export class DeleteAnalyzerCommand extends $Command<
4847
configuration: AccessAnalyzerClientResolvedConfig,
4948
options?: __HttpHandlerOptions
5049
): Handler<DeleteAnalyzerCommandInput, DeleteAnalyzerCommandOutput> {
51-
if (!this.resolved) {
52-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
53-
this.resolved = true;
54-
}
50+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5551

5652
const stack = clientStack.concat(this.middlewareStack);
5753

clients/client-accessanalyzer/commands/DeleteArchiveRuleCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class DeleteArchiveRuleCommand extends $Command<
2828
DeleteArchiveRuleCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class DeleteArchiveRuleCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<DeleteArchiveRuleCommandInput, DeleteArchiveRuleCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

clients/client-accessanalyzer/commands/GetAnalyzedResourceCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetAnalyzedResourceCommand extends $Command<
2828
GetAnalyzedResourceCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetAnalyzedResourceCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetAnalyzedResourceCommandInput, GetAnalyzedResourceCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

clients/client-accessanalyzer/commands/GetAnalyzerCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetAnalyzerCommand extends $Command<
2828
GetAnalyzerCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetAnalyzerCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetAnalyzerCommandInput, GetAnalyzerCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

clients/client-accessanalyzer/commands/GetArchiveRuleCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetArchiveRuleCommand extends $Command<
2828
GetArchiveRuleCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetArchiveRuleCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetArchiveRuleCommandInput, GetArchiveRuleCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

clients/client-accessanalyzer/commands/GetFindingCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetFindingCommand extends $Command<
2828
GetFindingCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetFindingCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetFindingCommandInput, GetFindingCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

clients/client-accessanalyzer/commands/ListAnalyzedResourcesCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class ListAnalyzedResourcesCommand extends $Command<
2929
ListAnalyzedResourcesCommandOutput,
3030
AccessAnalyzerClientResolvedConfig
3131
> {
32-
private resolved = false;
3332
// Start section: command_properties
3433
// End section: command_properties
3534

@@ -47,10 +46,7 @@ export class ListAnalyzedResourcesCommand extends $Command<
4746
configuration: AccessAnalyzerClientResolvedConfig,
4847
options?: __HttpHandlerOptions
4948
): Handler<ListAnalyzedResourcesCommandInput, ListAnalyzedResourcesCommandOutput> {
50-
if (!this.resolved) {
51-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
52-
this.resolved = true;
53-
}
49+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5450

5551
const stack = clientStack.concat(this.middlewareStack);
5652

clients/client-accessanalyzer/commands/ListAnalyzersCommand.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class ListAnalyzersCommand extends $Command<
2828
ListAnalyzersCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class ListAnalyzersCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<ListAnalyzersCommandInput, ListAnalyzersCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

0 commit comments

Comments
 (0)