Skip to content

Commit 50c8411

Browse files
authored
chore: remove bodyParams from json serializeStructure (#1176)
1 parent 16890ac commit 50c8411

File tree

181 files changed

+60693
-84595
lines changed

Some content is hidden

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

181 files changed

+60693
-84595
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,23 +2908,18 @@ const serializeAws_restJson1_1Criterion = (
29082908
input: Criterion,
29092909
context: __SerdeContext
29102910
): any => {
2911-
const bodyParams: any = {};
2912-
if (input.contains !== undefined) {
2913-
bodyParams["contains"] = serializeAws_restJson1_1ValueList(
2914-
input.contains,
2915-
context
2916-
);
2917-
}
2918-
if (input.eq !== undefined) {
2919-
bodyParams["eq"] = serializeAws_restJson1_1ValueList(input.eq, context);
2920-
}
2921-
if (input.exists !== undefined) {
2922-
bodyParams["exists"] = input.exists;
2923-
}
2924-
if (input.neq !== undefined) {
2925-
bodyParams["neq"] = serializeAws_restJson1_1ValueList(input.neq, context);
2926-
}
2927-
return bodyParams;
2911+
return {
2912+
...(input.contains !== undefined && {
2913+
contains: serializeAws_restJson1_1ValueList(input.contains, context)
2914+
}),
2915+
...(input.eq !== undefined && {
2916+
eq: serializeAws_restJson1_1ValueList(input.eq, context)
2917+
}),
2918+
...(input.exists !== undefined && { exists: input.exists }),
2919+
...(input.neq !== undefined && {
2920+
neq: serializeAws_restJson1_1ValueList(input.neq, context)
2921+
})
2922+
};
29282923
};
29292924

29302925
const serializeAws_restJson1_1FilterCriteriaMap = (
@@ -2948,17 +2943,12 @@ const serializeAws_restJson1_1InlineArchiveRule = (
29482943
input: InlineArchiveRule,
29492944
context: __SerdeContext
29502945
): any => {
2951-
const bodyParams: any = {};
2952-
if (input.filter !== undefined) {
2953-
bodyParams["filter"] = serializeAws_restJson1_1FilterCriteriaMap(
2954-
input.filter,
2955-
context
2956-
);
2957-
}
2958-
if (input.ruleName !== undefined) {
2959-
bodyParams["ruleName"] = input.ruleName;
2960-
}
2961-
return bodyParams;
2946+
return {
2947+
...(input.filter !== undefined && {
2948+
filter: serializeAws_restJson1_1FilterCriteriaMap(input.filter, context)
2949+
}),
2950+
...(input.ruleName !== undefined && { ruleName: input.ruleName })
2951+
};
29622952
};
29632953

29642954
const serializeAws_restJson1_1InlineArchiveRulesList = (
@@ -2974,14 +2964,12 @@ const serializeAws_restJson1_1SortCriteria = (
29742964
input: SortCriteria,
29752965
context: __SerdeContext
29762966
): any => {
2977-
const bodyParams: any = {};
2978-
if (input.attributeName !== undefined) {
2979-
bodyParams["attributeName"] = input.attributeName;
2980-
}
2981-
if (input.orderBy !== undefined) {
2982-
bodyParams["orderBy"] = input.orderBy;
2983-
}
2984-
return bodyParams;
2967+
return {
2968+
...(input.attributeName !== undefined && {
2969+
attributeName: input.attributeName
2970+
}),
2971+
...(input.orderBy !== undefined && { orderBy: input.orderBy })
2972+
};
29852973
};
29862974

29872975
const serializeAws_restJson1_1TagsMap = (

0 commit comments

Comments
 (0)