Skip to content

chore: remove bodyParams from json serializeStructure #1176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 24 additions & 36 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2908,23 +2908,18 @@ const serializeAws_restJson1_1Criterion = (
input: Criterion,
context: __SerdeContext
): any => {
const bodyParams: any = {};
if (input.contains !== undefined) {
bodyParams["contains"] = serializeAws_restJson1_1ValueList(
input.contains,
context
);
}
if (input.eq !== undefined) {
bodyParams["eq"] = serializeAws_restJson1_1ValueList(input.eq, context);
}
if (input.exists !== undefined) {
bodyParams["exists"] = input.exists;
}
if (input.neq !== undefined) {
bodyParams["neq"] = serializeAws_restJson1_1ValueList(input.neq, context);
}
return bodyParams;
return {
...(input.contains !== undefined && {
contains: serializeAws_restJson1_1ValueList(input.contains, context)
}),
...(input.eq !== undefined && {
eq: serializeAws_restJson1_1ValueList(input.eq, context)
}),
...(input.exists !== undefined && { exists: input.exists }),
...(input.neq !== undefined && {
neq: serializeAws_restJson1_1ValueList(input.neq, context)
})
};
};

const serializeAws_restJson1_1FilterCriteriaMap = (
Expand All @@ -2948,17 +2943,12 @@ const serializeAws_restJson1_1InlineArchiveRule = (
input: InlineArchiveRule,
context: __SerdeContext
): any => {
const bodyParams: any = {};
if (input.filter !== undefined) {
bodyParams["filter"] = serializeAws_restJson1_1FilterCriteriaMap(
input.filter,
context
);
}
if (input.ruleName !== undefined) {
bodyParams["ruleName"] = input.ruleName;
}
return bodyParams;
return {
...(input.filter !== undefined && {
filter: serializeAws_restJson1_1FilterCriteriaMap(input.filter, context)
}),
...(input.ruleName !== undefined && { ruleName: input.ruleName })
};
};

const serializeAws_restJson1_1InlineArchiveRulesList = (
Expand All @@ -2974,14 +2964,12 @@ const serializeAws_restJson1_1SortCriteria = (
input: SortCriteria,
context: __SerdeContext
): any => {
const bodyParams: any = {};
if (input.attributeName !== undefined) {
bodyParams["attributeName"] = input.attributeName;
}
if (input.orderBy !== undefined) {
bodyParams["orderBy"] = input.orderBy;
}
return bodyParams;
return {
...(input.attributeName !== undefined && {
attributeName: input.attributeName
}),
...(input.orderBy !== undefined && { orderBy: input.orderBy })
};
};

const serializeAws_restJson1_1TagsMap = (
Expand Down
Loading