Skip to content

Commit

Permalink
chore: codegen for delete textNodeName if present
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Mar 11, 2020
1 parent 4c3d0ee commit 55e686e
Show file tree
Hide file tree
Showing 22 changed files with 154 additions and 22 deletions.
8 changes: 7 additions & 1 deletion clients/client-auto-scaling/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9544,8 +9544,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-cloudformation/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10730,8 +10730,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-cloudfront/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13650,8 +13650,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-cloudsearch/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5856,8 +5856,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-cloudwatch/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6066,8 +6066,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-docdb/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10102,8 +10102,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-ec2/protocols/Aws_ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73139,8 +73139,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-elastic-beanstalk/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8918,8 +8918,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9164,8 +9164,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-elastic-load-balancing/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6334,8 +6334,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-elasticache/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12805,8 +12805,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-iam/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21920,8 +21920,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-neptune/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13923,8 +13923,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-rds/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29806,8 +29806,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-redshift/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20549,8 +20549,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-route-53/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10089,8 +10089,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-s3-control/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3465,8 +3465,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-s3/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14965,8 +14965,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-ses/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11913,8 +11913,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-sns/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6245,8 +6245,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-sqs/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3625,8 +3625,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down
8 changes: 7 additions & 1 deletion clients/client-sts/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1712,8 +1712,14 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => {
parseNodeValue: false,
tagValueProcessor: (val, tagName) => decodeEscapedXML(val)
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
return { [key]: parsedObj[key]["#text"], ...parsedObj[key] };
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return parsedObjToReturn;
}
return {};
});
Expand Down

0 comments on commit 55e686e

Please sign in to comment.