Skip to content

Commit b987a88

Browse files
authored
chore(clients): use Record type in HttpBindingProtocolGenerator (#3679)
1 parent ab05a29 commit b987a88

File tree

161 files changed

+3676
-3676
lines changed

Some content is hidden

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

161 files changed

+3676
-3676
lines changed

clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ export const deserializeAws_restJson1CreateAccessPreviewCommand = async (
11301130
$metadata: deserializeMetadata(output),
11311131
id: undefined,
11321132
};
1133-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1133+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
11341134
if (data.id !== undefined && data.id !== null) {
11351135
contents.id = __expectString(data.id);
11361136
}
@@ -1192,7 +1192,7 @@ export const deserializeAws_restJson1CreateAnalyzerCommand = async (
11921192
$metadata: deserializeMetadata(output),
11931193
arn: undefined,
11941194
};
1195-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1195+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
11961196
if (data.arn !== undefined && data.arn !== null) {
11971197
contents.arn = __expectString(data.arn);
11981198
}
@@ -1413,7 +1413,7 @@ export const deserializeAws_restJson1GetAccessPreviewCommand = async (
14131413
$metadata: deserializeMetadata(output),
14141414
accessPreview: undefined,
14151415
};
1416-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1416+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
14171417
if (data.accessPreview !== undefined && data.accessPreview !== null) {
14181418
contents.accessPreview = deserializeAws_restJson1AccessPreview(data.accessPreview, context);
14191419
}
@@ -1469,7 +1469,7 @@ export const deserializeAws_restJson1GetAnalyzedResourceCommand = async (
14691469
$metadata: deserializeMetadata(output),
14701470
resource: undefined,
14711471
};
1472-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1472+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
14731473
if (data.resource !== undefined && data.resource !== null) {
14741474
contents.resource = deserializeAws_restJson1AnalyzedResource(data.resource, context);
14751475
}
@@ -1525,7 +1525,7 @@ export const deserializeAws_restJson1GetAnalyzerCommand = async (
15251525
$metadata: deserializeMetadata(output),
15261526
analyzer: undefined,
15271527
};
1528-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1528+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
15291529
if (data.analyzer !== undefined && data.analyzer !== null) {
15301530
contents.analyzer = deserializeAws_restJson1AnalyzerSummary(data.analyzer, context);
15311531
}
@@ -1581,7 +1581,7 @@ export const deserializeAws_restJson1GetArchiveRuleCommand = async (
15811581
$metadata: deserializeMetadata(output),
15821582
archiveRule: undefined,
15831583
};
1584-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1584+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
15851585
if (data.archiveRule !== undefined && data.archiveRule !== null) {
15861586
contents.archiveRule = deserializeAws_restJson1ArchiveRuleSummary(data.archiveRule, context);
15871587
}
@@ -1637,7 +1637,7 @@ export const deserializeAws_restJson1GetFindingCommand = async (
16371637
$metadata: deserializeMetadata(output),
16381638
finding: undefined,
16391639
};
1640-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1640+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
16411641
if (data.finding !== undefined && data.finding !== null) {
16421642
contents.finding = deserializeAws_restJson1Finding(data.finding, context);
16431643
}
@@ -1694,7 +1694,7 @@ export const deserializeAws_restJson1GetGeneratedPolicyCommand = async (
16941694
generatedPolicyResult: undefined,
16951695
jobDetails: undefined,
16961696
};
1697-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1697+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
16981698
if (data.generatedPolicyResult !== undefined && data.generatedPolicyResult !== null) {
16991699
contents.generatedPolicyResult = deserializeAws_restJson1GeneratedPolicyResult(data.generatedPolicyResult, context);
17001700
}
@@ -1751,7 +1751,7 @@ export const deserializeAws_restJson1ListAccessPreviewFindingsCommand = async (
17511751
findings: undefined,
17521752
nextToken: undefined,
17531753
};
1754-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1754+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
17551755
if (data.findings !== undefined && data.findings !== null) {
17561756
contents.findings = deserializeAws_restJson1AccessPreviewFindingsList(data.findings, context);
17571757
}
@@ -1814,7 +1814,7 @@ export const deserializeAws_restJson1ListAccessPreviewsCommand = async (
18141814
accessPreviews: undefined,
18151815
nextToken: undefined,
18161816
};
1817-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1817+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
18181818
if (data.accessPreviews !== undefined && data.accessPreviews !== null) {
18191819
contents.accessPreviews = deserializeAws_restJson1AccessPreviewsList(data.accessPreviews, context);
18201820
}
@@ -1874,7 +1874,7 @@ export const deserializeAws_restJson1ListAnalyzedResourcesCommand = async (
18741874
analyzedResources: undefined,
18751875
nextToken: undefined,
18761876
};
1877-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1877+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
18781878
if (data.analyzedResources !== undefined && data.analyzedResources !== null) {
18791879
contents.analyzedResources = deserializeAws_restJson1AnalyzedResourcesList(data.analyzedResources, context);
18801880
}
@@ -1934,7 +1934,7 @@ export const deserializeAws_restJson1ListAnalyzersCommand = async (
19341934
analyzers: undefined,
19351935
nextToken: undefined,
19361936
};
1937-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1937+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
19381938
if (data.analyzers !== undefined && data.analyzers !== null) {
19391939
contents.analyzers = deserializeAws_restJson1AnalyzersList(data.analyzers, context);
19401940
}
@@ -1991,7 +1991,7 @@ export const deserializeAws_restJson1ListArchiveRulesCommand = async (
19911991
archiveRules: undefined,
19921992
nextToken: undefined,
19931993
};
1994-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1994+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
19951995
if (data.archiveRules !== undefined && data.archiveRules !== null) {
19961996
contents.archiveRules = deserializeAws_restJson1ArchiveRulesList(data.archiveRules, context);
19971997
}
@@ -2048,7 +2048,7 @@ export const deserializeAws_restJson1ListFindingsCommand = async (
20482048
findings: undefined,
20492049
nextToken: undefined,
20502050
};
2051-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2051+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
20522052
if (data.findings !== undefined && data.findings !== null) {
20532053
contents.findings = deserializeAws_restJson1FindingsList(data.findings, context);
20542054
}
@@ -2108,7 +2108,7 @@ export const deserializeAws_restJson1ListPolicyGenerationsCommand = async (
21082108
nextToken: undefined,
21092109
policyGenerations: undefined,
21102110
};
2111-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2111+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
21122112
if (data.nextToken !== undefined && data.nextToken !== null) {
21132113
contents.nextToken = __expectString(data.nextToken);
21142114
}
@@ -2164,7 +2164,7 @@ export const deserializeAws_restJson1ListTagsForResourceCommand = async (
21642164
$metadata: deserializeMetadata(output),
21652165
tags: undefined,
21662166
};
2167-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2167+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
21682168
if (data.tags !== undefined && data.tags !== null) {
21692169
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
21702170
}
@@ -2220,7 +2220,7 @@ export const deserializeAws_restJson1StartPolicyGenerationCommand = async (
22202220
$metadata: deserializeMetadata(output),
22212221
jobId: undefined,
22222222
};
2223-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2223+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
22242224
if (data.jobId !== undefined && data.jobId !== null) {
22252225
contents.jobId = __expectString(data.jobId);
22262226
}
@@ -2540,7 +2540,7 @@ export const deserializeAws_restJson1ValidatePolicyCommand = async (
25402540
findings: undefined,
25412541
nextToken: undefined,
25422542
};
2543-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2543+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
25442544
if (data.findings !== undefined && data.findings !== null) {
25452545
contents.findings = deserializeAws_restJson1ValidatePolicyFindingList(data.findings, context);
25462546
}

clients/client-account/src/protocols/Aws_restJson1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const deserializeAws_restJson1GetAlternateContactCommand = async (
180180
$metadata: deserializeMetadata(output),
181181
AlternateContact: undefined,
182182
};
183-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
183+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
184184
if (data.AlternateContact !== undefined && data.AlternateContact !== null) {
185185
contents.AlternateContact = deserializeAws_restJson1AlternateContact(data.AlternateContact, context);
186186
}

clients/client-amp/src/protocols/Aws_restJson1.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export const deserializeAws_restJson1CreateAlertManagerDefinitionCommand = async
676676
$metadata: deserializeMetadata(output),
677677
status: undefined,
678678
};
679-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
679+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
680680
if (data.status !== undefined && data.status !== null) {
681681
contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context);
682682
}
@@ -741,7 +741,7 @@ export const deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (
741741
status: undefined,
742742
tags: undefined,
743743
};
744-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
744+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
745745
if (data.arn !== undefined && data.arn !== null) {
746746
contents.arn = __expectString(data.arn);
747747
}
@@ -815,7 +815,7 @@ export const deserializeAws_restJson1CreateWorkspaceCommand = async (
815815
tags: undefined,
816816
workspaceId: undefined,
817817
};
818-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
818+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
819819
if (data.arn !== undefined && data.arn !== null) {
820820
contents.arn = __expectString(data.arn);
821821
}
@@ -1048,7 +1048,7 @@ export const deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = asy
10481048
$metadata: deserializeMetadata(output),
10491049
alertManagerDefinition: undefined,
10501050
};
1051-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1051+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
10521052
if (data.alertManagerDefinition !== undefined && data.alertManagerDefinition !== null) {
10531053
contents.alertManagerDefinition = deserializeAws_restJson1AlertManagerDefinitionDescription(
10541054
data.alertManagerDefinition,
@@ -1107,7 +1107,7 @@ export const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async
11071107
$metadata: deserializeMetadata(output),
11081108
ruleGroupsNamespace: undefined,
11091109
};
1110-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1110+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
11111111
if (data.ruleGroupsNamespace !== undefined && data.ruleGroupsNamespace !== null) {
11121112
contents.ruleGroupsNamespace = deserializeAws_restJson1RuleGroupsNamespaceDescription(
11131113
data.ruleGroupsNamespace,
@@ -1166,7 +1166,7 @@ export const deserializeAws_restJson1DescribeWorkspaceCommand = async (
11661166
$metadata: deserializeMetadata(output),
11671167
workspace: undefined,
11681168
};
1169-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1169+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
11701170
if (data.workspace !== undefined && data.workspace !== null) {
11711171
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
11721172
}
@@ -1223,7 +1223,7 @@ export const deserializeAws_restJson1ListRuleGroupsNamespacesCommand = async (
12231223
nextToken: undefined,
12241224
ruleGroupsNamespaces: undefined,
12251225
};
1226-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1226+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
12271227
if (data.nextToken !== undefined && data.nextToken !== null) {
12281228
contents.nextToken = __expectString(data.nextToken);
12291229
}
@@ -1285,7 +1285,7 @@ export const deserializeAws_restJson1ListTagsForResourceCommand = async (
12851285
$metadata: deserializeMetadata(output),
12861286
tags: undefined,
12871287
};
1288-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1288+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
12891289
if (data.tags !== undefined && data.tags !== null) {
12901290
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
12911291
}
@@ -1342,7 +1342,7 @@ export const deserializeAws_restJson1ListWorkspacesCommand = async (
13421342
nextToken: undefined,
13431343
workspaces: undefined,
13441344
};
1345-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1345+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
13461346
if (data.nextToken !== undefined && data.nextToken !== null) {
13471347
contents.nextToken = __expectString(data.nextToken);
13481348
}
@@ -1398,7 +1398,7 @@ export const deserializeAws_restJson1PutAlertManagerDefinitionCommand = async (
13981398
$metadata: deserializeMetadata(output),
13991399
status: undefined,
14001400
};
1401-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1401+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
14021402
if (data.status !== undefined && data.status !== null) {
14031403
contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context);
14041404
}
@@ -1463,7 +1463,7 @@ export const deserializeAws_restJson1PutRuleGroupsNamespaceCommand = async (
14631463
status: undefined,
14641464
tags: undefined,
14651465
};
1466-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1466+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
14671467
if (data.arn !== undefined && data.arn !== null) {
14681468
contents.arn = __expectString(data.arn);
14691469
}

0 commit comments

Comments
 (0)