Skip to content

chore(clients): use Record type in HttpBindingProtocolGenerator #3679

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 1 commit into from
Jun 13, 2022
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
36 changes: 18 additions & 18 deletions clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ export const deserializeAws_restJson1CreateAccessPreviewCommand = async (
$metadata: deserializeMetadata(output),
id: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.id !== undefined && data.id !== null) {
contents.id = __expectString(data.id);
}
Expand Down Expand Up @@ -1192,7 +1192,7 @@ export const deserializeAws_restJson1CreateAnalyzerCommand = async (
$metadata: deserializeMetadata(output),
arn: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.arn !== undefined && data.arn !== null) {
contents.arn = __expectString(data.arn);
}
Expand Down Expand Up @@ -1413,7 +1413,7 @@ export const deserializeAws_restJson1GetAccessPreviewCommand = async (
$metadata: deserializeMetadata(output),
accessPreview: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.accessPreview !== undefined && data.accessPreview !== null) {
contents.accessPreview = deserializeAws_restJson1AccessPreview(data.accessPreview, context);
}
Expand Down Expand Up @@ -1469,7 +1469,7 @@ export const deserializeAws_restJson1GetAnalyzedResourceCommand = async (
$metadata: deserializeMetadata(output),
resource: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.resource !== undefined && data.resource !== null) {
contents.resource = deserializeAws_restJson1AnalyzedResource(data.resource, context);
}
Expand Down Expand Up @@ -1525,7 +1525,7 @@ export const deserializeAws_restJson1GetAnalyzerCommand = async (
$metadata: deserializeMetadata(output),
analyzer: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.analyzer !== undefined && data.analyzer !== null) {
contents.analyzer = deserializeAws_restJson1AnalyzerSummary(data.analyzer, context);
}
Expand Down Expand Up @@ -1581,7 +1581,7 @@ export const deserializeAws_restJson1GetArchiveRuleCommand = async (
$metadata: deserializeMetadata(output),
archiveRule: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.archiveRule !== undefined && data.archiveRule !== null) {
contents.archiveRule = deserializeAws_restJson1ArchiveRuleSummary(data.archiveRule, context);
}
Expand Down Expand Up @@ -1637,7 +1637,7 @@ export const deserializeAws_restJson1GetFindingCommand = async (
$metadata: deserializeMetadata(output),
finding: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.finding !== undefined && data.finding !== null) {
contents.finding = deserializeAws_restJson1Finding(data.finding, context);
}
Expand Down Expand Up @@ -1694,7 +1694,7 @@ export const deserializeAws_restJson1GetGeneratedPolicyCommand = async (
generatedPolicyResult: undefined,
jobDetails: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.generatedPolicyResult !== undefined && data.generatedPolicyResult !== null) {
contents.generatedPolicyResult = deserializeAws_restJson1GeneratedPolicyResult(data.generatedPolicyResult, context);
}
Expand Down Expand Up @@ -1751,7 +1751,7 @@ export const deserializeAws_restJson1ListAccessPreviewFindingsCommand = async (
findings: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.findings !== undefined && data.findings !== null) {
contents.findings = deserializeAws_restJson1AccessPreviewFindingsList(data.findings, context);
}
Expand Down Expand Up @@ -1814,7 +1814,7 @@ export const deserializeAws_restJson1ListAccessPreviewsCommand = async (
accessPreviews: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.accessPreviews !== undefined && data.accessPreviews !== null) {
contents.accessPreviews = deserializeAws_restJson1AccessPreviewsList(data.accessPreviews, context);
}
Expand Down Expand Up @@ -1874,7 +1874,7 @@ export const deserializeAws_restJson1ListAnalyzedResourcesCommand = async (
analyzedResources: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.analyzedResources !== undefined && data.analyzedResources !== null) {
contents.analyzedResources = deserializeAws_restJson1AnalyzedResourcesList(data.analyzedResources, context);
}
Expand Down Expand Up @@ -1934,7 +1934,7 @@ export const deserializeAws_restJson1ListAnalyzersCommand = async (
analyzers: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.analyzers !== undefined && data.analyzers !== null) {
contents.analyzers = deserializeAws_restJson1AnalyzersList(data.analyzers, context);
}
Expand Down Expand Up @@ -1991,7 +1991,7 @@ export const deserializeAws_restJson1ListArchiveRulesCommand = async (
archiveRules: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.archiveRules !== undefined && data.archiveRules !== null) {
contents.archiveRules = deserializeAws_restJson1ArchiveRulesList(data.archiveRules, context);
}
Expand Down Expand Up @@ -2048,7 +2048,7 @@ export const deserializeAws_restJson1ListFindingsCommand = async (
findings: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.findings !== undefined && data.findings !== null) {
contents.findings = deserializeAws_restJson1FindingsList(data.findings, context);
}
Expand Down Expand Up @@ -2108,7 +2108,7 @@ export const deserializeAws_restJson1ListPolicyGenerationsCommand = async (
nextToken: undefined,
policyGenerations: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.nextToken !== undefined && data.nextToken !== null) {
contents.nextToken = __expectString(data.nextToken);
}
Expand Down Expand Up @@ -2164,7 +2164,7 @@ export const deserializeAws_restJson1ListTagsForResourceCommand = async (
$metadata: deserializeMetadata(output),
tags: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.tags !== undefined && data.tags !== null) {
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
}
Expand Down Expand Up @@ -2220,7 +2220,7 @@ export const deserializeAws_restJson1StartPolicyGenerationCommand = async (
$metadata: deserializeMetadata(output),
jobId: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.jobId !== undefined && data.jobId !== null) {
contents.jobId = __expectString(data.jobId);
}
Expand Down Expand Up @@ -2540,7 +2540,7 @@ export const deserializeAws_restJson1ValidatePolicyCommand = async (
findings: undefined,
nextToken: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.findings !== undefined && data.findings !== null) {
contents.findings = deserializeAws_restJson1ValidatePolicyFindingList(data.findings, context);
}
Expand Down
2 changes: 1 addition & 1 deletion clients/client-account/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const deserializeAws_restJson1GetAlternateContactCommand = async (
$metadata: deserializeMetadata(output),
AlternateContact: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.AlternateContact !== undefined && data.AlternateContact !== null) {
contents.AlternateContact = deserializeAws_restJson1AlternateContact(data.AlternateContact, context);
}
Expand Down
22 changes: 11 additions & 11 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ export const deserializeAws_restJson1CreateAlertManagerDefinitionCommand = async
$metadata: deserializeMetadata(output),
status: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.status !== undefined && data.status !== null) {
contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context);
}
Expand Down Expand Up @@ -741,7 +741,7 @@ export const deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (
status: undefined,
tags: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.arn !== undefined && data.arn !== null) {
contents.arn = __expectString(data.arn);
}
Expand Down Expand Up @@ -815,7 +815,7 @@ export const deserializeAws_restJson1CreateWorkspaceCommand = async (
tags: undefined,
workspaceId: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.arn !== undefined && data.arn !== null) {
contents.arn = __expectString(data.arn);
}
Expand Down Expand Up @@ -1048,7 +1048,7 @@ export const deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = asy
$metadata: deserializeMetadata(output),
alertManagerDefinition: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.alertManagerDefinition !== undefined && data.alertManagerDefinition !== null) {
contents.alertManagerDefinition = deserializeAws_restJson1AlertManagerDefinitionDescription(
data.alertManagerDefinition,
Expand Down Expand Up @@ -1107,7 +1107,7 @@ export const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async
$metadata: deserializeMetadata(output),
ruleGroupsNamespace: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.ruleGroupsNamespace !== undefined && data.ruleGroupsNamespace !== null) {
contents.ruleGroupsNamespace = deserializeAws_restJson1RuleGroupsNamespaceDescription(
data.ruleGroupsNamespace,
Expand Down Expand Up @@ -1166,7 +1166,7 @@ export const deserializeAws_restJson1DescribeWorkspaceCommand = async (
$metadata: deserializeMetadata(output),
workspace: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.workspace !== undefined && data.workspace !== null) {
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
}
Expand Down Expand Up @@ -1223,7 +1223,7 @@ export const deserializeAws_restJson1ListRuleGroupsNamespacesCommand = async (
nextToken: undefined,
ruleGroupsNamespaces: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.nextToken !== undefined && data.nextToken !== null) {
contents.nextToken = __expectString(data.nextToken);
}
Expand Down Expand Up @@ -1285,7 +1285,7 @@ export const deserializeAws_restJson1ListTagsForResourceCommand = async (
$metadata: deserializeMetadata(output),
tags: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.tags !== undefined && data.tags !== null) {
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
}
Expand Down Expand Up @@ -1342,7 +1342,7 @@ export const deserializeAws_restJson1ListWorkspacesCommand = async (
nextToken: undefined,
workspaces: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.nextToken !== undefined && data.nextToken !== null) {
contents.nextToken = __expectString(data.nextToken);
}
Expand Down Expand Up @@ -1398,7 +1398,7 @@ export const deserializeAws_restJson1PutAlertManagerDefinitionCommand = async (
$metadata: deserializeMetadata(output),
status: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.status !== undefined && data.status !== null) {
contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context);
}
Expand Down Expand Up @@ -1463,7 +1463,7 @@ export const deserializeAws_restJson1PutRuleGroupsNamespaceCommand = async (
status: undefined,
tags: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.arn !== undefined && data.arn !== null) {
contents.arn = __expectString(data.arn);
}
Expand Down
Loading