Skip to content

chore: remove mapParams from serialize/deserialize #1163

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 8, 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
54 changes: 24 additions & 30 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2922,11 +2922,10 @@ const serializeAws_restJson1_1FilterCriteriaMap = (
input: { [key: string]: Criterion },
context: __SerdeContext
): any => {
const mapParams: any = {};
Object.keys(input).forEach(key => {
mapParams[key] = serializeAws_restJson1_1Criterion(input[key], context);
});
return mapParams;
return Object.keys(input).reduce((acc: any, key: string) => {
acc[key] = serializeAws_restJson1_1Criterion(input[key], context);
return acc;
}, {});
};

const serializeAws_restJson1_1FindingIdList = (
Expand Down Expand Up @@ -2986,11 +2985,10 @@ const serializeAws_restJson1_1TagsMap = (
input: { [key: string]: string },
context: __SerdeContext
): any => {
const mapParams: any = {};
Object.keys(input).forEach(key => {
mapParams[key] = input[key];
});
return mapParams;
return Object.keys(input).reduce((acc: any, key: string) => {
acc[key] = input[key];
return acc;
}, {});
};

const serializeAws_restJson1_1ValueList = (
Expand Down Expand Up @@ -3189,11 +3187,10 @@ const deserializeAws_restJson1_1ConditionKeyMap = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1Criterion = (
Expand Down Expand Up @@ -3229,11 +3226,10 @@ const deserializeAws_restJson1_1FilterCriteriaMap = (
output: any,
context: __SerdeContext
): { [key: string]: Criterion } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = deserializeAws_restJson1_1Criterion(output[key], context);
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = deserializeAws_restJson1_1Criterion(output[key], context);
return acc;
}, {});
};

const deserializeAws_restJson1_1Finding = (
Expand Down Expand Up @@ -3383,11 +3379,10 @@ const deserializeAws_restJson1_1PrincipalMap = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1SharedViaList = (
Expand All @@ -3401,11 +3396,10 @@ const deserializeAws_restJson1_1TagsMap = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1ValidationExceptionField = (
Expand Down
18 changes: 8 additions & 10 deletions clients/client-alexa-for-business/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8873,11 +8873,10 @@ const serializeAws_json1_1AuthorizationResult = (
input: { [key: string]: string },
context: __SerdeContext
): any => {
const mapParams: any = {};
Object.keys(input).forEach(key => {
mapParams[key] = input[key];
});
return mapParams;
return Object.keys(input).reduce((acc: any, key: string) => {
acc[key] = input[key];
return acc;
}, {});
};

const serializeAws_json1_1BusinessReportContentRange = (
Expand Down Expand Up @@ -13277,11 +13276,10 @@ const deserializeAws_json1_1Reviews = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_json1_1RevokeInvitationResponse = (
Expand Down
63 changes: 28 additions & 35 deletions clients/client-amplify/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5940,22 +5940,20 @@ const serializeAws_restJson1_1EnvironmentVariables = (
input: { [key: string]: string },
context: __SerdeContext
): any => {
const mapParams: any = {};
Object.keys(input).forEach(key => {
mapParams[key] = input[key];
});
return mapParams;
return Object.keys(input).reduce((acc: any, key: string) => {
acc[key] = input[key];
return acc;
}, {});
};

const serializeAws_restJson1_1FileMap = (
input: { [key: string]: string },
context: __SerdeContext
): any => {
const mapParams: any = {};
Object.keys(input).forEach(key => {
mapParams[key] = input[key];
});
return mapParams;
return Object.keys(input).reduce((acc: any, key: string) => {
acc[key] = input[key];
return acc;
}, {});
};

const serializeAws_restJson1_1SubDomainSetting = (
Expand Down Expand Up @@ -5987,11 +5985,10 @@ const serializeAws_restJson1_1TagMap = (
input: { [key: string]: string },
context: __SerdeContext
): any => {
const mapParams: any = {};
Object.keys(input).forEach(key => {
mapParams[key] = input[key];
});
return mapParams;
return Object.keys(input).reduce((acc: any, key: string) => {
acc[key] = input[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1App = (
Expand Down Expand Up @@ -6555,22 +6552,20 @@ const deserializeAws_restJson1_1EnvironmentVariables = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1FileUploadUrls = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1Job = (
Expand Down Expand Up @@ -6681,11 +6676,10 @@ const deserializeAws_restJson1_1Screenshots = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1Step = (
Expand Down Expand Up @@ -6816,11 +6810,10 @@ const deserializeAws_restJson1_1TagMap = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
const mapParams: any = {};
Object.keys(output).forEach(key => {
mapParams[key] = output[key];
});
return mapParams;
return Object.keys(output).reduce((acc: any, key: string) => {
acc[key] = output[key];
return acc;
}, {});
};

const deserializeAws_restJson1_1Webhook = (
Expand Down
Loading