Skip to content

Commit 27c6a86

Browse files
committed
feat: use desctructuring in array.reduce
1 parent 0d4cc5e commit 27c6a86

File tree

41 files changed

+874
-835
lines changed

Some content is hidden

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

41 files changed

+874
-835
lines changed

clients/client-accessanalyzer/models/index.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ export namespace ArchiveRuleSummary {
195195
...obj,
196196
...(obj.filter && {
197197
filter: Object.entries(obj.filter).reduce(
198-
(acc: any, [key, value]: [string, Criterion]) => {
199-
acc[key] = Criterion.filterSensitiveLog(value);
200-
return acc;
201-
},
198+
(acc: any, [key, value]: [string, Criterion]) => ({
199+
...acc,
200+
[key]: Criterion.filterSensitiveLog(value)
201+
}),
202202
{}
203203
)
204204
})
@@ -326,10 +326,10 @@ export namespace CreateArchiveRuleRequest {
326326
...obj,
327327
...(obj.filter && {
328328
filter: Object.entries(obj.filter).reduce(
329-
(acc: any, [key, value]: [string, Criterion]) => {
330-
acc[key] = Criterion.filterSensitiveLog(value);
331-
return acc;
332-
},
329+
(acc: any, [key, value]: [string, Criterion]) => ({
330+
...acc,
331+
[key]: Criterion.filterSensitiveLog(value)
332+
}),
333333
{}
334334
)
335335
})
@@ -783,10 +783,10 @@ export namespace InlineArchiveRule {
783783
...obj,
784784
...(obj.filter && {
785785
filter: Object.entries(obj.filter).reduce(
786-
(acc: any, [key, value]: [string, Criterion]) => {
787-
acc[key] = Criterion.filterSensitiveLog(value);
788-
return acc;
789-
},
786+
(acc: any, [key, value]: [string, Criterion]) => ({
787+
...acc,
788+
[key]: Criterion.filterSensitiveLog(value)
789+
}),
790790
{}
791791
)
792792
})
@@ -1033,10 +1033,10 @@ export namespace ListFindingsRequest {
10331033
...obj,
10341034
...(obj.filter && {
10351035
filter: Object.entries(obj.filter).reduce(
1036-
(acc: any, [key, value]: [string, Criterion]) => {
1037-
acc[key] = Criterion.filterSensitiveLog(value);
1038-
return acc;
1039-
},
1036+
(acc: any, [key, value]: [string, Criterion]) => ({
1037+
...acc,
1038+
[key]: Criterion.filterSensitiveLog(value)
1039+
}),
10401040
{}
10411041
)
10421042
}),
@@ -1365,10 +1365,10 @@ export namespace UpdateArchiveRuleRequest {
13651365
...obj,
13661366
...(obj.filter && {
13671367
filter: Object.entries(obj.filter).reduce(
1368-
(acc: any, [key, value]: [string, Criterion]) => {
1369-
acc[key] = Criterion.filterSensitiveLog(value);
1370-
return acc;
1371-
},
1368+
(acc: any, [key, value]: [string, Criterion]) => ({
1369+
...acc,
1370+
[key]: Criterion.filterSensitiveLog(value)
1371+
}),
13721372
{}
13731373
)
13741374
})

clients/client-api-gateway/models/index.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ export namespace ApiStage {
271271
...obj,
272272
...(obj.throttle && {
273273
throttle: Object.entries(obj.throttle).reduce(
274-
(acc: any, [key, value]: [string, ThrottleSettings]) => {
275-
acc[key] = ThrottleSettings.filterSensitiveLog(value);
276-
return acc;
277-
},
274+
(acc: any, [key, value]: [string, ThrottleSettings]) => ({
275+
...acc,
276+
[key]: ThrottleSettings.filterSensitiveLog(value)
277+
}),
278278
{}
279279
)
280280
})
@@ -2039,16 +2039,16 @@ export namespace Deployment {
20392039
(
20402040
acc: any,
20412041
[key, value]: [string, { [key: string]: MethodSnapshot }]
2042-
) => {
2043-
acc[key] = Object.entries(value).reduce(
2044-
(acc: any, [key, value]: [string, MethodSnapshot]) => {
2045-
acc[key] = MethodSnapshot.filterSensitiveLog(value);
2046-
return acc;
2047-
},
2042+
) => ({
2043+
...acc,
2044+
[key]: Object.entries(value).reduce(
2045+
(acc: any, [key, value]: [string, MethodSnapshot]) => ({
2046+
...acc,
2047+
[key]: MethodSnapshot.filterSensitiveLog(value)
2048+
}),
20482049
{}
2049-
);
2050-
return acc;
2051-
},
2050+
)
2051+
}),
20522052
{}
20532053
)
20542054
})
@@ -5046,10 +5046,10 @@ export namespace Integration {
50465046
...obj,
50475047
...(obj.integrationResponses && {
50485048
integrationResponses: Object.entries(obj.integrationResponses).reduce(
5049-
(acc: any, [key, value]: [string, IntegrationResponse]) => {
5050-
acc[key] = IntegrationResponse.filterSensitiveLog(value);
5051-
return acc;
5052-
},
5049+
(acc: any, [key, value]: [string, IntegrationResponse]) => ({
5050+
...acc,
5051+
[key]: IntegrationResponse.filterSensitiveLog(value)
5052+
}),
50535053
{}
50545054
)
50555055
})
@@ -5485,10 +5485,10 @@ export namespace Method {
54855485
}),
54865486
...(obj.methodResponses && {
54875487
methodResponses: Object.entries(obj.methodResponses).reduce(
5488-
(acc: any, [key, value]: [string, MethodResponse]) => {
5489-
acc[key] = MethodResponse.filterSensitiveLog(value);
5490-
return acc;
5491-
},
5488+
(acc: any, [key, value]: [string, MethodResponse]) => ({
5489+
...acc,
5490+
[key]: MethodResponse.filterSensitiveLog(value)
5491+
}),
54925492
{}
54935493
)
54945494
})
@@ -6418,10 +6418,10 @@ export namespace Resource {
64186418
...obj,
64196419
...(obj.resourceMethods && {
64206420
resourceMethods: Object.entries(obj.resourceMethods).reduce(
6421-
(acc: any, [key, value]: [string, Method]) => {
6422-
acc[key] = Method.filterSensitiveLog(value);
6423-
return acc;
6424-
},
6421+
(acc: any, [key, value]: [string, Method]) => ({
6422+
...acc,
6423+
[key]: Method.filterSensitiveLog(value)
6424+
}),
64256425
{}
64266426
)
64276427
})
@@ -6798,10 +6798,10 @@ export namespace Stage {
67986798
}),
67996799
...(obj.methodSettings && {
68006800
methodSettings: Object.entries(obj.methodSettings).reduce(
6801-
(acc: any, [key, value]: [string, MethodSetting]) => {
6802-
acc[key] = MethodSetting.filterSensitiveLog(value);
6803-
return acc;
6804-
},
6801+
(acc: any, [key, value]: [string, MethodSetting]) => ({
6802+
...acc,
6803+
[key]: MethodSetting.filterSensitiveLog(value)
6804+
}),
68056805
{}
68066806
)
68076807
})

0 commit comments

Comments
 (0)