Skip to content

Commit 825a28a

Browse files
committed
chore: codegen to remove mapParams object
1 parent 17afaf5 commit 825a28a

File tree

11 files changed

+112
-142
lines changed

11 files changed

+112
-142
lines changed

clients/client-cloudsearch/protocols/Aws_query.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5013,14 +5013,13 @@ const deserializeAws_queryDomainNameMap = (
50135013
output: any,
50145014
context: __SerdeContext
50155015
): { [key: string]: string } => {
5016-
const mapParams: any = {};
5017-
output.forEach((pair: any) => {
5018-
mapParams[pair["key"]] =
5016+
return output.reduce((acc: any, pair: any) => {
5017+
acc[pair["key"]] =
50195018
pair["value"]["#text"] !== undefined
50205019
? pair["value"]["#text"]
50215020
: pair["value"];
5022-
});
5023-
return mapParams;
5021+
return acc;
5022+
}, {});
50245023
};
50255024

50265025
const deserializeAws_queryDomainStatus = (

clients/client-cloudwatch/protocols/Aws_query.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4726,15 +4726,14 @@ const deserializeAws_queryDatapointValueMap = (
47264726
output: any,
47274727
context: __SerdeContext
47284728
): { [key: string]: number } => {
4729-
const mapParams: any = {};
4730-
output.forEach((pair: any) => {
4731-
mapParams[pair["key"]] = parseFloat(
4729+
return output.reduce((acc: any, pair: any) => {
4730+
acc[pair["key"]] = parseFloat(
47324731
pair["value"]["#text"] !== undefined
47334732
? pair["value"]["#text"]
47344733
: pair["value"]
47354734
);
4736-
});
4737-
return mapParams;
4735+
return acc;
4736+
}, {});
47384737
};
47394738

47404739
const deserializeAws_queryDatapointValues = (

clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6706,14 +6706,13 @@ const deserializeAws_queryAuthenticateCognitoActionAuthenticationRequestExtraPar
67066706
output: any,
67076707
context: __SerdeContext
67086708
): { [key: string]: string } => {
6709-
const mapParams: any = {};
6710-
output.forEach((pair: any) => {
6711-
mapParams[pair["key"]] =
6709+
return output.reduce((acc: any, pair: any) => {
6710+
acc[pair["key"]] =
67126711
pair["value"]["#text"] !== undefined
67136712
? pair["value"]["#text"]
67146713
: pair["value"];
6715-
});
6716-
return mapParams;
6714+
return acc;
6715+
}, {});
67176716
};
67186717

67196718
const deserializeAws_queryAuthenticateCognitoActionConfig = (
@@ -6795,14 +6794,13 @@ const deserializeAws_queryAuthenticateOidcActionAuthenticationRequestExtraParams
67956794
output: any,
67966795
context: __SerdeContext
67976796
): { [key: string]: string } => {
6798-
const mapParams: any = {};
6799-
output.forEach((pair: any) => {
6800-
mapParams[pair["key"]] =
6797+
return output.reduce((acc: any, pair: any) => {
6798+
acc[pair["key"]] =
68016799
pair["value"]["#text"] !== undefined
68026800
? pair["value"]["#text"]
68036801
: pair["value"];
6804-
});
6805-
return mapParams;
6802+
return acc;
6803+
}, {});
68066804
};
68076805

68086806
const deserializeAws_queryAuthenticateOidcActionConfig = (

clients/client-iam/protocols/Aws_query.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18478,14 +18478,13 @@ const deserializeAws_queryEvalDecisionDetailsType = (
1847818478
output: any,
1847918479
context: __SerdeContext
1848018480
): { [key: string]: PolicyEvaluationDecisionType | string } => {
18481-
const mapParams: any = {};
18482-
output.forEach((pair: any) => {
18483-
mapParams[pair["key"]] =
18481+
return output.reduce((acc: any, pair: any) => {
18482+
acc[pair["key"]] =
1848418483
pair["value"]["#text"] !== undefined
1848518484
? pair["value"]["#text"]
1848618485
: pair["value"];
18487-
});
18488-
return mapParams;
18486+
return acc;
18487+
}, {});
1848918488
};
1849018489

1849118490
const deserializeAws_queryEvaluationResult = (
@@ -22839,15 +22838,14 @@ const deserializeAws_querysummaryMapType = (
2283922838
output: any,
2284022839
context: __SerdeContext
2284122840
): { [key: string]: number } => {
22842-
const mapParams: any = {};
22843-
output.forEach((pair: any) => {
22844-
mapParams[pair["key"]] = parseInt(
22841+
return output.reduce((acc: any, pair: any) => {
22842+
acc[pair["key"]] = parseInt(
2284522843
pair["value"]["#text"] !== undefined
2284622844
? pair["value"]["#text"]
2284722845
: pair["value"]
2284822846
);
22849-
});
22850-
return mapParams;
22847+
return acc;
22848+
}, {});
2285122849
};
2285222850

2285322851
const deserializeAws_querytagListType = (

clients/client-s3-control/protocols/Aws_restXml.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3736,14 +3736,13 @@ const deserializeAws_restXmlS3UserMetadata = (
37363736
output: any,
37373737
context: __SerdeContext
37383738
): { [key: string]: string } => {
3739-
const mapParams: any = {};
3740-
output.forEach((pair: any) => {
3741-
mapParams[pair["key"]] =
3739+
return output.reduce((acc: any, pair: any) => {
3740+
acc[pair["key"]] =
37423741
pair["value"]["#text"] !== undefined
37433742
? pair["value"]["#text"]
37443743
: pair["value"];
3745-
});
3746-
return mapParams;
3744+
return acc;
3745+
}, {});
37473746
};
37483747

37493748
const deserializeAws_restXmlVpcConfiguration = (

clients/client-ses/protocols/Aws_query.ts

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10072,14 +10072,13 @@ const deserializeAws_queryDkimAttributes = (
1007210072
output: any,
1007310073
context: __SerdeContext
1007410074
): { [key: string]: IdentityDkimAttributes } => {
10075-
const mapParams: any = {};
10076-
output.forEach((pair: any) => {
10077-
mapParams[pair["key"]] = deserializeAws_queryIdentityDkimAttributes(
10075+
return output.reduce((acc: any, pair: any) => {
10076+
acc[pair["key"]] = deserializeAws_queryIdentityDkimAttributes(
1007810077
pair["value"],
1007910078
context
1008010079
);
10081-
});
10082-
return mapParams;
10080+
return acc;
10081+
}, {});
1008310082
};
1008410083

1008510084
const deserializeAws_queryEventDestination = (
@@ -11240,16 +11239,13 @@ const deserializeAws_queryMailFromDomainAttributes = (
1124011239
output: any,
1124111240
context: __SerdeContext
1124211241
): { [key: string]: IdentityMailFromDomainAttributes } => {
11243-
const mapParams: any = {};
11244-
output.forEach((pair: any) => {
11245-
mapParams[
11246-
pair["key"]
11247-
] = deserializeAws_queryIdentityMailFromDomainAttributes(
11242+
return output.reduce((acc: any, pair: any) => {
11243+
acc[pair["key"]] = deserializeAws_queryIdentityMailFromDomainAttributes(
1124811244
pair["value"],
1124911245
context
1125011246
);
11251-
});
11252-
return mapParams;
11247+
return acc;
11248+
}, {});
1125311249
};
1125411250

1125511251
const deserializeAws_queryMailFromDomainNotVerifiedException = (
@@ -11314,28 +11310,26 @@ const deserializeAws_queryNotificationAttributes = (
1131411310
output: any,
1131511311
context: __SerdeContext
1131611312
): { [key: string]: IdentityNotificationAttributes } => {
11317-
const mapParams: any = {};
11318-
output.forEach((pair: any) => {
11319-
mapParams[pair["key"]] = deserializeAws_queryIdentityNotificationAttributes(
11313+
return output.reduce((acc: any, pair: any) => {
11314+
acc[pair["key"]] = deserializeAws_queryIdentityNotificationAttributes(
1132011315
pair["value"],
1132111316
context
1132211317
);
11323-
});
11324-
return mapParams;
11318+
return acc;
11319+
}, {});
1132511320
};
1132611321

1132711322
const deserializeAws_queryPolicyMap = (
1132811323
output: any,
1132911324
context: __SerdeContext
1133011325
): { [key: string]: string } => {
11331-
const mapParams: any = {};
11332-
output.forEach((pair: any) => {
11333-
mapParams[pair["key"]] =
11326+
return output.reduce((acc: any, pair: any) => {
11327+
acc[pair["key"]] =
1133411328
pair["value"]["#text"] !== undefined
1133511329
? pair["value"]["#text"]
1133611330
: pair["value"];
11337-
});
11338-
return mapParams;
11331+
return acc;
11332+
}, {});
1133911333
};
1134011334

1134111335
const deserializeAws_queryPolicyNameList = (
@@ -12261,14 +12255,13 @@ const deserializeAws_queryVerificationAttributes = (
1226112255
output: any,
1226212256
context: __SerdeContext
1226312257
): { [key: string]: IdentityVerificationAttributes } => {
12264-
const mapParams: any = {};
12265-
output.forEach((pair: any) => {
12266-
mapParams[pair["key"]] = deserializeAws_queryIdentityVerificationAttributes(
12258+
return output.reduce((acc: any, pair: any) => {
12259+
acc[pair["key"]] = deserializeAws_queryIdentityVerificationAttributes(
1226712260
pair["value"],
1226812261
context
1226912262
);
12270-
});
12271-
return mapParams;
12263+
return acc;
12264+
}, {});
1227212265
};
1227312266

1227412267
const deserializeAws_queryVerificationTokenList = (

clients/client-sns/protocols/Aws_query.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6021,14 +6021,13 @@ const deserializeAws_queryMapStringToString = (
60216021
output: any,
60226022
context: __SerdeContext
60236023
): { [key: string]: string } => {
6024-
const mapParams: any = {};
6025-
output.forEach((pair: any) => {
6026-
mapParams[pair["key"]] =
6024+
return output.reduce((acc: any, pair: any) => {
6025+
acc[pair["key"]] =
60276026
pair["value"]["#text"] !== undefined
60286027
? pair["value"]["#text"]
60296028
: pair["value"];
6030-
});
6031-
return mapParams;
6029+
return acc;
6030+
}, {});
60326031
};
60336032

60346033
const deserializeAws_queryNotFoundException = (
@@ -6241,14 +6240,13 @@ const deserializeAws_querySubscriptionAttributesMap = (
62416240
output: any,
62426241
context: __SerdeContext
62436242
): { [key: string]: string } => {
6244-
const mapParams: any = {};
6245-
output.forEach((pair: any) => {
6246-
mapParams[pair["key"]] =
6243+
return output.reduce((acc: any, pair: any) => {
6244+
acc[pair["key"]] =
62476245
pair["value"]["#text"] !== undefined
62486246
? pair["value"]["#text"]
62496247
: pair["value"];
6250-
});
6251-
return mapParams;
6248+
return acc;
6249+
}, {});
62526250
};
62536251

62546252
const deserializeAws_querySubscriptionLimitExceededException = (
@@ -6389,14 +6387,13 @@ const deserializeAws_queryTopicAttributesMap = (
63896387
output: any,
63906388
context: __SerdeContext
63916389
): { [key: string]: string } => {
6392-
const mapParams: any = {};
6393-
output.forEach((pair: any) => {
6394-
mapParams[pair["key"]] =
6390+
return output.reduce((acc: any, pair: any) => {
6391+
acc[pair["key"]] =
63956392
pair["value"]["#text"] !== undefined
63966393
? pair["value"]["#text"]
63976394
: pair["value"];
6398-
});
6399-
return mapParams;
6395+
return acc;
6396+
}, {});
64006397
};
64016398

64026399
const deserializeAws_queryTopicLimitExceededException = (

clients/client-sqs/protocols/Aws_query.ts

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,14 +3310,13 @@ const deserializeAws_queryMessageBodyAttributeMap = (
33103310
output: any,
33113311
context: __SerdeContext
33123312
): { [key: string]: MessageAttributeValue } => {
3313-
const mapParams: any = {};
3314-
output.forEach((pair: any) => {
3315-
mapParams[pair["Name"]] = deserializeAws_queryMessageAttributeValue(
3313+
return output.reduce((acc: any, pair: any) => {
3314+
acc[pair["Name"]] = deserializeAws_queryMessageAttributeValue(
33163315
pair["Value"],
33173316
context
33183317
);
3319-
});
3320-
return mapParams;
3318+
return acc;
3319+
}, {});
33213320
};
33223321

33233322
const deserializeAws_queryMessageList = (
@@ -3343,14 +3342,13 @@ const deserializeAws_queryMessageSystemAttributeMap = (
33433342
output: any,
33443343
context: __SerdeContext
33453344
): { [key: string]: string } => {
3346-
const mapParams: any = {};
3347-
output.forEach((pair: any) => {
3348-
mapParams[pair["Name"]] =
3345+
return output.reduce((acc: any, pair: any) => {
3346+
acc[pair["Name"]] =
33493347
pair["Value"]["#text"] !== undefined
33503348
? pair["Value"]["#text"]
33513349
: pair["Value"];
3352-
});
3353-
return mapParams;
3350+
return acc;
3351+
}, {});
33543352
};
33553353

33563354
const deserializeAws_queryOverLimit = (
@@ -3377,14 +3375,13 @@ const deserializeAws_queryQueueAttributeMap = (
33773375
output: any,
33783376
context: __SerdeContext
33793377
): { [key: string]: string } => {
3380-
const mapParams: any = {};
3381-
output.forEach((pair: any) => {
3382-
mapParams[pair["Name"]] =
3378+
return output.reduce((acc: any, pair: any) => {
3379+
acc[pair["Name"]] =
33833380
pair["Value"]["#text"] !== undefined
33843381
? pair["Value"]["#text"]
33853382
: pair["Value"];
3386-
});
3387-
return mapParams;
3383+
return acc;
3384+
}, {});
33883385
};
33893386

33903387
const deserializeAws_queryQueueDeletedRecently = (
@@ -3605,14 +3602,13 @@ const deserializeAws_queryTagMap = (
36053602
output: any,
36063603
context: __SerdeContext
36073604
): { [key: string]: string } => {
3608-
const mapParams: any = {};
3609-
output.forEach((pair: any) => {
3610-
mapParams[pair["Key"]] =
3605+
return output.reduce((acc: any, pair: any) => {
3606+
acc[pair["Key"]] =
36113607
pair["Value"]["#text"] !== undefined
36123608
? pair["Value"]["#text"]
36133609
: pair["Value"];
3614-
});
3615-
return mapParams;
3610+
return acc;
3611+
}, {});
36163612
};
36173613

36183614
const deserializeAws_queryTooManyEntriesInBatchRequest = (

protocol_tests/aws-ec2/protocols/Aws_ec2.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,14 +2099,13 @@ const deserializeAws_ec2FooEnumMap = (
20992099
output: any,
21002100
context: __SerdeContext
21012101
): { [key: string]: FooEnum | string } => {
2102-
const mapParams: any = {};
2103-
output.forEach((pair: any) => {
2104-
mapParams[pair["key"]] =
2102+
return output.reduce((acc: any, pair: any) => {
2103+
acc[pair["key"]] =
21052104
pair["value"]["#text"] !== undefined
21062105
? pair["value"]["#text"]
21072106
: pair["value"];
2108-
});
2109-
return mapParams;
2107+
return acc;
2108+
}, {});
21102109
};
21112110

21122111
const deserializeAws_ec2FooEnumSet = (

0 commit comments

Comments
 (0)