Skip to content

Commit 2a55fec

Browse files
committed
chore: codegen for return empty instead of undefined (aws#914)
1 parent 3f0bb87 commit 2a55fec

File tree

21 files changed

+4712
-0
lines changed

21 files changed

+4712
-0
lines changed

clients/client-auto-scaling/protocols/Aws_query.ts

Lines changed: 156 additions & 0 deletions
Large diffs are not rendered by default.

clients/client-cloudformation/protocols/Aws_query.ts

Lines changed: 196 additions & 0 deletions
Large diffs are not rendered by default.

clients/client-cloudfront/protocols/Aws_restXml.ts

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9458,6 +9458,10 @@ const deserializeAws_restXmlActiveTrustedSigners = (
94589458
if (output["Enabled"] !== undefined) {
94599459
contents.Enabled = output["Enabled"] == "true";
94609460
}
9461+
if (output.Items === "") {
9462+
contents.Items = [];
9463+
return contents;
9464+
}
94619465
if (
94629466
output["Items"] !== undefined &&
94639467
output["Items"]["Signer"] !== undefined
@@ -9517,6 +9521,10 @@ const deserializeAws_restXmlAliases = (
95179521
Items: undefined,
95189522
Quantity: undefined
95199523
};
9524+
if (output.Items === "") {
9525+
contents.Items = [];
9526+
return contents;
9527+
}
95209528
if (output["Items"] !== undefined && output["Items"]["CNAME"] !== undefined) {
95219529
const wrappedItem =
95229530
output["Items"]["CNAME"] instanceof Array
@@ -9546,6 +9554,10 @@ const deserializeAws_restXmlAllowedMethods = (
95469554
context
95479555
);
95489556
}
9557+
if (output.Items === "") {
9558+
contents.Items = [];
9559+
return contents;
9560+
}
95499561
if (
95509562
output["Items"] !== undefined &&
95519563
output["Items"]["Method"] !== undefined
@@ -9661,6 +9673,10 @@ const deserializeAws_restXmlCacheBehaviors = (
96619673
Items: undefined,
96629674
Quantity: undefined
96639675
};
9676+
if (output.Items === "") {
9677+
contents.Items = [];
9678+
return contents;
9679+
}
96649680
if (
96659681
output["Items"] !== undefined &&
96669682
output["Items"]["CacheBehavior"] !== undefined
@@ -9689,6 +9705,10 @@ const deserializeAws_restXmlCachedMethods = (
96899705
Items: undefined,
96909706
Quantity: undefined
96919707
};
9708+
if (output.Items === "") {
9709+
contents.Items = [];
9710+
return contents;
9711+
}
96929712
if (
96939713
output["Items"] !== undefined &&
96949714
output["Items"]["Method"] !== undefined
@@ -9764,6 +9784,10 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentityList = (
97649784
if (output["IsTruncated"] !== undefined) {
97659785
contents.IsTruncated = output["IsTruncated"] == "true";
97669786
}
9787+
if (output.Items === "") {
9788+
contents.Items = [];
9789+
return contents;
9790+
}
97679791
if (
97689792
output["Items"] !== undefined &&
97699793
output["Items"]["CloudFrontOriginAccessIdentitySummary"] !== undefined
@@ -9885,6 +9909,10 @@ const deserializeAws_restXmlContentTypeProfiles = (
98859909
Items: undefined,
98869910
Quantity: undefined
98879911
};
9912+
if (output.Items === "") {
9913+
contents.Items = [];
9914+
return contents;
9915+
}
98889916
if (
98899917
output["Items"] !== undefined &&
98909918
output["Items"]["ContentTypeProfile"] !== undefined
@@ -9920,6 +9948,10 @@ const deserializeAws_restXmlCookieNames = (
99209948
Items: undefined,
99219949
Quantity: undefined
99229950
};
9951+
if (output.Items === "") {
9952+
contents.Items = [];
9953+
return contents;
9954+
}
99239955
if (output["Items"] !== undefined && output["Items"]["Name"] !== undefined) {
99249956
const wrappedItem =
99259957
output["Items"]["Name"] instanceof Array
@@ -9998,6 +10030,10 @@ const deserializeAws_restXmlCustomErrorResponses = (
999810030
Items: undefined,
999910031
Quantity: undefined
1000010032
};
10033+
if (output.Items === "") {
10034+
contents.Items = [];
10035+
return contents;
10036+
}
1000110037
if (
1000210038
output["Items"] !== undefined &&
1000310039
output["Items"]["CustomErrorResponse"] !== undefined
@@ -10026,6 +10062,10 @@ const deserializeAws_restXmlCustomHeaders = (
1002610062
Items: undefined,
1002710063
Quantity: undefined
1002810064
};
10065+
if (output.Items === "") {
10066+
contents.Items = [];
10067+
return contents;
10068+
}
1002910069
if (
1003010070
output["Items"] !== undefined &&
1003110071
output["Items"]["OriginCustomHeader"] !== undefined
@@ -10179,6 +10219,10 @@ const deserializeAws_restXmlDistribution = (
1017910219
context
1018010220
);
1018110221
}
10222+
if (output.AliasICPRecordals === "") {
10223+
contents.AliasICPRecordals = [];
10224+
return contents;
10225+
}
1018210226
if (
1018310227
output["AliasICPRecordals"] !== undefined &&
1018410228
output["AliasICPRecordals"]["AliasICPRecordal"] !== undefined
@@ -10339,6 +10383,10 @@ const deserializeAws_restXmlDistributionList = (
1033910383
if (output["IsTruncated"] !== undefined) {
1034010384
contents.IsTruncated = output["IsTruncated"] == "true";
1034110385
}
10386+
if (output.Items === "") {
10387+
contents.Items = [];
10388+
return contents;
10389+
}
1034210390
if (
1034310391
output["Items"] !== undefined &&
1034410392
output["Items"]["DistributionSummary"] !== undefined
@@ -10397,6 +10445,10 @@ const deserializeAws_restXmlDistributionSummary = (
1039710445
if (output["ARN"] !== undefined) {
1039810446
contents.ARN = output["ARN"];
1039910447
}
10448+
if (output.AliasICPRecordals === "") {
10449+
contents.AliasICPRecordals = [];
10450+
return contents;
10451+
}
1040010452
if (
1040110453
output["AliasICPRecordals"] !== undefined &&
1040210454
output["AliasICPRecordals"]["AliasICPRecordal"] !== undefined
@@ -10509,6 +10561,10 @@ const deserializeAws_restXmlEncryptionEntities = (
1050910561
Items: undefined,
1051010562
Quantity: undefined
1051110563
};
10564+
if (output.Items === "") {
10565+
contents.Items = [];
10566+
return contents;
10567+
}
1051210568
if (
1051310569
output["Items"] !== undefined &&
1051410570
output["Items"]["EncryptionEntity"] !== undefined
@@ -10630,6 +10686,10 @@ const deserializeAws_restXmlFieldLevelEncryptionList = (
1063010686
NextMarker: undefined,
1063110687
Quantity: undefined
1063210688
};
10689+
if (output.Items === "") {
10690+
contents.Items = [];
10691+
return contents;
10692+
}
1063310693
if (
1063410694
output["Items"] !== undefined &&
1063510695
output["Items"]["FieldLevelEncryptionSummary"] !== undefined
@@ -10720,6 +10780,10 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileList = (
1072010780
NextMarker: undefined,
1072110781
Quantity: undefined
1072210782
};
10783+
if (output.Items === "") {
10784+
contents.Items = [];
10785+
return contents;
10786+
}
1072310787
if (
1072410788
output["Items"] !== undefined &&
1072510789
output["Items"]["FieldLevelEncryptionProfileSummary"] !== undefined
@@ -10848,6 +10912,10 @@ const deserializeAws_restXmlFieldPatterns = (
1084810912
Items: undefined,
1084910913
Quantity: undefined
1085010914
};
10915+
if (output.Items === "") {
10916+
contents.Items = [];
10917+
return contents;
10918+
}
1085110919
if (
1085210920
output["Items"] !== undefined &&
1085310921
output["Items"]["FieldPattern"] !== undefined
@@ -10912,6 +10980,10 @@ const deserializeAws_restXmlGeoRestriction = (
1091210980
Quantity: undefined,
1091310981
RestrictionType: undefined
1091410982
};
10983+
if (output.Items === "") {
10984+
contents.Items = [];
10985+
return contents;
10986+
}
1091510987
if (
1091610988
output["Items"] !== undefined &&
1091710989
output["Items"]["Location"] !== undefined
@@ -10947,6 +11019,10 @@ const deserializeAws_restXmlHeaders = (
1094711019
Items: undefined,
1094811020
Quantity: undefined
1094911021
};
11022+
if (output.Items === "") {
11023+
contents.Items = [];
11024+
return contents;
11025+
}
1095011026
if (output["Items"] !== undefined && output["Items"]["Name"] !== undefined) {
1095111027
const wrappedItem =
1095211028
output["Items"]["Name"] instanceof Array
@@ -11023,6 +11099,10 @@ const deserializeAws_restXmlInvalidationList = (
1102311099
if (output["IsTruncated"] !== undefined) {
1102411100
contents.IsTruncated = output["IsTruncated"] == "true";
1102511101
}
11102+
if (output.Items === "") {
11103+
contents.Items = [];
11104+
return contents;
11105+
}
1102611106
if (
1102711107
output["Items"] !== undefined &&
1102811108
output["Items"]["InvalidationSummary"] !== undefined
@@ -11098,6 +11178,10 @@ const deserializeAws_restXmlKeyPairIds = (
1109811178
Items: undefined,
1109911179
Quantity: undefined
1110011180
};
11181+
if (output.Items === "") {
11182+
contents.Items = [];
11183+
return contents;
11184+
}
1110111185
if (
1110211186
output["Items"] !== undefined &&
1110311187
output["Items"]["KeyPairId"] !== undefined
@@ -11154,6 +11238,10 @@ const deserializeAws_restXmlLambdaFunctionAssociations = (
1115411238
Items: undefined,
1115511239
Quantity: undefined
1115611240
};
11241+
if (output.Items === "") {
11242+
contents.Items = [];
11243+
return contents;
11244+
}
1115711245
if (
1115811246
output["Items"] !== undefined &&
1115911247
output["Items"]["LambdaFunctionAssociation"] !== undefined
@@ -11369,6 +11457,10 @@ const deserializeAws_restXmlOriginGroupMembers = (
1136911457
Items: undefined,
1137011458
Quantity: undefined
1137111459
};
11460+
if (output.Items === "") {
11461+
contents.Items = [];
11462+
return contents;
11463+
}
1137211464
if (
1137311465
output["Items"] !== undefined &&
1137411466
output["Items"]["OriginGroupMember"] !== undefined
@@ -11397,6 +11489,10 @@ const deserializeAws_restXmlOriginGroups = (
1139711489
Items: undefined,
1139811490
Quantity: undefined
1139911491
};
11492+
if (output.Items === "") {
11493+
contents.Items = [];
11494+
return contents;
11495+
}
1140011496
if (
1140111497
output["Items"] !== undefined &&
1140211498
output["Items"]["OriginGroup"] !== undefined
@@ -11434,6 +11530,10 @@ const deserializeAws_restXmlOriginSslProtocols = (
1143411530
Items: undefined,
1143511531
Quantity: undefined
1143611532
};
11533+
if (output.Items === "") {
11534+
contents.Items = [];
11535+
return contents;
11536+
}
1143711537
if (
1143811538
output["Items"] !== undefined &&
1143911539
output["Items"]["SslProtocol"] !== undefined
@@ -11462,6 +11562,10 @@ const deserializeAws_restXmlOrigins = (
1146211562
Items: undefined,
1146311563
Quantity: undefined
1146411564
};
11565+
if (output.Items === "") {
11566+
contents.Items = [];
11567+
return contents;
11568+
}
1146511569
if (
1146611570
output["Items"] !== undefined &&
1146711571
output["Items"]["Origin"] !== undefined
@@ -11494,6 +11598,10 @@ const deserializeAws_restXmlPaths = (
1149411598
Items: undefined,
1149511599
Quantity: undefined
1149611600
};
11601+
if (output.Items === "") {
11602+
contents.Items = [];
11603+
return contents;
11604+
}
1149711605
if (output["Items"] !== undefined && output["Items"]["Path"] !== undefined) {
1149811606
const wrappedItem =
1149911607
output["Items"]["Path"] instanceof Array
@@ -11569,6 +11677,10 @@ const deserializeAws_restXmlPublicKeyList = (
1156911677
NextMarker: undefined,
1157011678
Quantity: undefined
1157111679
};
11680+
if (output.Items === "") {
11681+
contents.Items = [];
11682+
return contents;
11683+
}
1157211684
if (
1157311685
output["Items"] !== undefined &&
1157411686
output["Items"]["PublicKeySummary"] !== undefined
@@ -11691,6 +11803,10 @@ const deserializeAws_restXmlQueryArgProfiles = (
1169111803
Items: undefined,
1169211804
Quantity: undefined
1169311805
};
11806+
if (output.Items === "") {
11807+
contents.Items = [];
11808+
return contents;
11809+
}
1169411810
if (
1169511811
output["Items"] !== undefined &&
1169611812
output["Items"]["QueryArgProfile"] !== undefined
@@ -11719,6 +11835,10 @@ const deserializeAws_restXmlQueryStringCacheKeys = (
1171911835
Items: undefined,
1172011836
Quantity: undefined
1172111837
};
11838+
if (output.Items === "") {
11839+
contents.Items = [];
11840+
return contents;
11841+
}
1172211842
if (output["Items"] !== undefined && output["Items"]["Name"] !== undefined) {
1172311843
const wrappedItem =
1172411844
output["Items"]["Name"] instanceof Array
@@ -11844,6 +11964,10 @@ const deserializeAws_restXmlStatusCodes = (
1184411964
Items: undefined,
1184511965
Quantity: undefined
1184611966
};
11967+
if (output.Items === "") {
11968+
contents.Items = [];
11969+
return contents;
11970+
}
1184711971
if (
1184811972
output["Items"] !== undefined &&
1184911973
output["Items"]["StatusCode"] !== undefined
@@ -11974,6 +12098,10 @@ const deserializeAws_restXmlStreamingDistributionList = (
1197412098
if (output["IsTruncated"] !== undefined) {
1197512099
contents.IsTruncated = output["IsTruncated"] == "true";
1197612100
}
12101+
if (output.Items === "") {
12102+
contents.Items = [];
12103+
return contents;
12104+
}
1197712105
if (
1197812106
output["Items"] !== undefined &&
1197912107
output["Items"]["StreamingDistributionSummary"] !== undefined
@@ -12131,6 +12259,10 @@ const deserializeAws_restXmlTags = (
1213112259
__type: "Tags",
1213212260
Items: undefined
1213312261
};
12262+
if (output.Items === "") {
12263+
contents.Items = [];
12264+
return contents;
12265+
}
1213412266
if (output["Items"] !== undefined && output["Items"]["Tag"] !== undefined) {
1213512267
const wrappedItem =
1213612268
output["Items"]["Tag"] instanceof Array
@@ -12154,6 +12286,10 @@ const deserializeAws_restXmlTrustedSigners = (
1215412286
if (output["Enabled"] !== undefined) {
1215512287
contents.Enabled = output["Enabled"] == "true";
1215612288
}
12289+
if (output.Items === "") {
12290+
contents.Items = [];
12291+
return contents;
12292+
}
1215712293
if (
1215812294
output["Items"] !== undefined &&
1215912295
output["Items"]["AwsAccountNumber"] !== undefined

0 commit comments

Comments
 (0)