@aws-sdk/client-inspector2 3.490.0 → 3.496.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist-cjs/Inspector2.js +1 -103
  2. package/dist-cjs/Inspector2Client.js +1 -43
  3. package/dist-cjs/commands/AssociateMemberCommand.js +1 -28
  4. package/dist-cjs/commands/BatchGetAccountStatusCommand.js +1 -28
  5. package/dist-cjs/commands/BatchGetCodeSnippetCommand.js +1 -28
  6. package/dist-cjs/commands/BatchGetFindingDetailsCommand.js +1 -28
  7. package/dist-cjs/commands/BatchGetFreeTrialInfoCommand.js +1 -28
  8. package/dist-cjs/commands/BatchGetMemberEc2DeepInspectionStatusCommand.js +1 -28
  9. package/dist-cjs/commands/BatchUpdateMemberEc2DeepInspectionStatusCommand.js +1 -28
  10. package/dist-cjs/commands/CancelFindingsReportCommand.js +1 -28
  11. package/dist-cjs/commands/CancelSbomExportCommand.js +1 -28
  12. package/dist-cjs/commands/CreateFilterCommand.js +1 -28
  13. package/dist-cjs/commands/CreateFindingsReportCommand.js +1 -28
  14. package/dist-cjs/commands/CreateSbomExportCommand.js +1 -28
  15. package/dist-cjs/commands/DeleteFilterCommand.js +1 -28
  16. package/dist-cjs/commands/DescribeOrganizationConfigurationCommand.js +1 -28
  17. package/dist-cjs/commands/DisableCommand.js +1 -28
  18. package/dist-cjs/commands/DisableDelegatedAdminAccountCommand.js +1 -28
  19. package/dist-cjs/commands/DisassociateMemberCommand.js +1 -28
  20. package/dist-cjs/commands/EnableCommand.js +1 -28
  21. package/dist-cjs/commands/EnableDelegatedAdminAccountCommand.js +1 -28
  22. package/dist-cjs/commands/GetConfigurationCommand.js +1 -28
  23. package/dist-cjs/commands/GetDelegatedAdminAccountCommand.js +1 -28
  24. package/dist-cjs/commands/GetEc2DeepInspectionConfigurationCommand.js +1 -28
  25. package/dist-cjs/commands/GetEncryptionKeyCommand.js +1 -28
  26. package/dist-cjs/commands/GetFindingsReportStatusCommand.js +1 -28
  27. package/dist-cjs/commands/GetMemberCommand.js +1 -28
  28. package/dist-cjs/commands/GetSbomExportCommand.js +1 -28
  29. package/dist-cjs/commands/ListAccountPermissionsCommand.js +1 -28
  30. package/dist-cjs/commands/ListCoverageCommand.js +1 -28
  31. package/dist-cjs/commands/ListCoverageStatisticsCommand.js +1 -28
  32. package/dist-cjs/commands/ListDelegatedAdminAccountsCommand.js +1 -28
  33. package/dist-cjs/commands/ListFiltersCommand.js +1 -28
  34. package/dist-cjs/commands/ListFindingAggregationsCommand.js +1 -28
  35. package/dist-cjs/commands/ListFindingsCommand.js +1 -28
  36. package/dist-cjs/commands/ListMembersCommand.js +1 -28
  37. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  38. package/dist-cjs/commands/ListUsageTotalsCommand.js +1 -28
  39. package/dist-cjs/commands/ResetEncryptionKeyCommand.js +1 -28
  40. package/dist-cjs/commands/SearchVulnerabilitiesCommand.js +1 -28
  41. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  42. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  43. package/dist-cjs/commands/UpdateConfigurationCommand.js +1 -28
  44. package/dist-cjs/commands/UpdateEc2DeepInspectionConfigurationCommand.js +1 -28
  45. package/dist-cjs/commands/UpdateEncryptionKeyCommand.js +1 -28
  46. package/dist-cjs/commands/UpdateFilterCommand.js +1 -28
  47. package/dist-cjs/commands/UpdateOrgEc2DeepInspectionConfigurationCommand.js +1 -28
  48. package/dist-cjs/commands/UpdateOrganizationConfigurationCommand.js +1 -28
  49. package/dist-cjs/commands/index.js +1 -49
  50. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  51. package/dist-cjs/extensionConfiguration.js +1 -2
  52. package/dist-cjs/index.js +5402 -11
  53. package/dist-cjs/models/Inspector2ServiceException.js +1 -12
  54. package/dist-cjs/models/index.js +1 -4
  55. package/dist-cjs/models/models_0.js +1 -587
  56. package/dist-cjs/pagination/Interfaces.js +1 -2
  57. package/dist-cjs/pagination/ListAccountPermissionsPaginator.js +1 -7
  58. package/dist-cjs/pagination/ListCoveragePaginator.js +1 -7
  59. package/dist-cjs/pagination/ListCoverageStatisticsPaginator.js +1 -7
  60. package/dist-cjs/pagination/ListDelegatedAdminAccountsPaginator.js +1 -7
  61. package/dist-cjs/pagination/ListFiltersPaginator.js +1 -7
  62. package/dist-cjs/pagination/ListFindingAggregationsPaginator.js +1 -7
  63. package/dist-cjs/pagination/ListFindingsPaginator.js +1 -7
  64. package/dist-cjs/pagination/ListMembersPaginator.js +1 -7
  65. package/dist-cjs/pagination/ListUsageTotalsPaginator.js +1 -7
  66. package/dist-cjs/pagination/SearchVulnerabilitiesPaginator.js +1 -7
  67. package/dist-cjs/pagination/index.js +1 -14
  68. package/dist-cjs/protocols/Aws_restJson1.js +1 -3566
  69. package/dist-cjs/runtimeExtensions.js +1 -22
  70. package/package.json +40 -40
@@ -1,3566 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_BatchGetFindingDetailsCommand = exports.de_BatchGetCodeSnippetCommand = exports.de_BatchGetAccountStatusCommand = exports.de_AssociateMemberCommand = exports.se_UpdateOrgEc2DeepInspectionConfigurationCommand = exports.se_UpdateOrganizationConfigurationCommand = exports.se_UpdateFilterCommand = exports.se_UpdateEncryptionKeyCommand = exports.se_UpdateEc2DeepInspectionConfigurationCommand = exports.se_UpdateConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SearchVulnerabilitiesCommand = exports.se_ResetEncryptionKeyCommand = exports.se_ListUsageTotalsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListMembersCommand = exports.se_ListFindingsCommand = exports.se_ListFindingAggregationsCommand = exports.se_ListFiltersCommand = exports.se_ListDelegatedAdminAccountsCommand = exports.se_ListCoverageStatisticsCommand = exports.se_ListCoverageCommand = exports.se_ListAccountPermissionsCommand = exports.se_GetSbomExportCommand = exports.se_GetMemberCommand = exports.se_GetFindingsReportStatusCommand = exports.se_GetEncryptionKeyCommand = exports.se_GetEc2DeepInspectionConfigurationCommand = exports.se_GetDelegatedAdminAccountCommand = exports.se_GetConfigurationCommand = exports.se_EnableDelegatedAdminAccountCommand = exports.se_EnableCommand = exports.se_DisassociateMemberCommand = exports.se_DisableDelegatedAdminAccountCommand = exports.se_DisableCommand = exports.se_DescribeOrganizationConfigurationCommand = exports.se_DeleteFilterCommand = exports.se_CreateSbomExportCommand = exports.se_CreateFindingsReportCommand = exports.se_CreateFilterCommand = exports.se_CancelSbomExportCommand = exports.se_CancelFindingsReportCommand = exports.se_BatchUpdateMemberEc2DeepInspectionStatusCommand = exports.se_BatchGetMemberEc2DeepInspectionStatusCommand = exports.se_BatchGetFreeTrialInfoCommand = exports.se_BatchGetFindingDetailsCommand = exports.se_BatchGetCodeSnippetCommand = exports.se_BatchGetAccountStatusCommand = exports.se_AssociateMemberCommand = void 0;
4
- exports.de_UpdateOrgEc2DeepInspectionConfigurationCommand = exports.de_UpdateOrganizationConfigurationCommand = exports.de_UpdateFilterCommand = exports.de_UpdateEncryptionKeyCommand = exports.de_UpdateEc2DeepInspectionConfigurationCommand = exports.de_UpdateConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SearchVulnerabilitiesCommand = exports.de_ResetEncryptionKeyCommand = exports.de_ListUsageTotalsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListMembersCommand = exports.de_ListFindingsCommand = exports.de_ListFindingAggregationsCommand = exports.de_ListFiltersCommand = exports.de_ListDelegatedAdminAccountsCommand = exports.de_ListCoverageStatisticsCommand = exports.de_ListCoverageCommand = exports.de_ListAccountPermissionsCommand = exports.de_GetSbomExportCommand = exports.de_GetMemberCommand = exports.de_GetFindingsReportStatusCommand = exports.de_GetEncryptionKeyCommand = exports.de_GetEc2DeepInspectionConfigurationCommand = exports.de_GetDelegatedAdminAccountCommand = exports.de_GetConfigurationCommand = exports.de_EnableDelegatedAdminAccountCommand = exports.de_EnableCommand = exports.de_DisassociateMemberCommand = exports.de_DisableDelegatedAdminAccountCommand = exports.de_DisableCommand = exports.de_DescribeOrganizationConfigurationCommand = exports.de_DeleteFilterCommand = exports.de_CreateSbomExportCommand = exports.de_CreateFindingsReportCommand = exports.de_CreateFilterCommand = exports.de_CancelSbomExportCommand = exports.de_CancelFindingsReportCommand = exports.de_BatchUpdateMemberEc2DeepInspectionStatusCommand = exports.de_BatchGetMemberEc2DeepInspectionStatusCommand = exports.de_BatchGetFreeTrialInfoCommand = void 0;
5
- const core_1 = require("@aws-sdk/core");
6
- const core_2 = require("@smithy/core");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const uuid_1 = require("uuid");
9
- const Inspector2ServiceException_1 = require("../models/Inspector2ServiceException");
10
- const models_0_1 = require("../models/models_0");
11
- const se_AssociateMemberCommand = async (input, context) => {
12
- const b = (0, core_2.requestBuilder)(input, context);
13
- const headers = {
14
- "content-type": "application/json",
15
- };
16
- b.bp("/members/associate");
17
- let body;
18
- body = JSON.stringify((0, smithy_client_1.take)(input, {
19
- accountId: [],
20
- }));
21
- b.m("POST").h(headers).b(body);
22
- return b.build();
23
- };
24
- exports.se_AssociateMemberCommand = se_AssociateMemberCommand;
25
- const se_BatchGetAccountStatusCommand = async (input, context) => {
26
- const b = (0, core_2.requestBuilder)(input, context);
27
- const headers = {
28
- "content-type": "application/json",
29
- };
30
- b.bp("/status/batch/get");
31
- let body;
32
- body = JSON.stringify((0, smithy_client_1.take)(input, {
33
- accountIds: (_) => (0, smithy_client_1._json)(_),
34
- }));
35
- b.m("POST").h(headers).b(body);
36
- return b.build();
37
- };
38
- exports.se_BatchGetAccountStatusCommand = se_BatchGetAccountStatusCommand;
39
- const se_BatchGetCodeSnippetCommand = async (input, context) => {
40
- const b = (0, core_2.requestBuilder)(input, context);
41
- const headers = {
42
- "content-type": "application/json",
43
- };
44
- b.bp("/codesnippet/batchget");
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1.take)(input, {
47
- findingArns: (_) => (0, smithy_client_1._json)(_),
48
- }));
49
- b.m("POST").h(headers).b(body);
50
- return b.build();
51
- };
52
- exports.se_BatchGetCodeSnippetCommand = se_BatchGetCodeSnippetCommand;
53
- const se_BatchGetFindingDetailsCommand = async (input, context) => {
54
- const b = (0, core_2.requestBuilder)(input, context);
55
- const headers = {
56
- "content-type": "application/json",
57
- };
58
- b.bp("/findings/details/batch/get");
59
- let body;
60
- body = JSON.stringify((0, smithy_client_1.take)(input, {
61
- findingArns: (_) => (0, smithy_client_1._json)(_),
62
- }));
63
- b.m("POST").h(headers).b(body);
64
- return b.build();
65
- };
66
- exports.se_BatchGetFindingDetailsCommand = se_BatchGetFindingDetailsCommand;
67
- const se_BatchGetFreeTrialInfoCommand = async (input, context) => {
68
- const b = (0, core_2.requestBuilder)(input, context);
69
- const headers = {
70
- "content-type": "application/json",
71
- };
72
- b.bp("/freetrialinfo/batchget");
73
- let body;
74
- body = JSON.stringify((0, smithy_client_1.take)(input, {
75
- accountIds: (_) => (0, smithy_client_1._json)(_),
76
- }));
77
- b.m("POST").h(headers).b(body);
78
- return b.build();
79
- };
80
- exports.se_BatchGetFreeTrialInfoCommand = se_BatchGetFreeTrialInfoCommand;
81
- const se_BatchGetMemberEc2DeepInspectionStatusCommand = async (input, context) => {
82
- const b = (0, core_2.requestBuilder)(input, context);
83
- const headers = {
84
- "content-type": "application/json",
85
- };
86
- b.bp("/ec2deepinspectionstatus/member/batch/get");
87
- let body;
88
- body = JSON.stringify((0, smithy_client_1.take)(input, {
89
- accountIds: (_) => (0, smithy_client_1._json)(_),
90
- }));
91
- b.m("POST").h(headers).b(body);
92
- return b.build();
93
- };
94
- exports.se_BatchGetMemberEc2DeepInspectionStatusCommand = se_BatchGetMemberEc2DeepInspectionStatusCommand;
95
- const se_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (input, context) => {
96
- const b = (0, core_2.requestBuilder)(input, context);
97
- const headers = {
98
- "content-type": "application/json",
99
- };
100
- b.bp("/ec2deepinspectionstatus/member/batch/update");
101
- let body;
102
- body = JSON.stringify((0, smithy_client_1.take)(input, {
103
- accountIds: (_) => (0, smithy_client_1._json)(_),
104
- }));
105
- b.m("POST").h(headers).b(body);
106
- return b.build();
107
- };
108
- exports.se_BatchUpdateMemberEc2DeepInspectionStatusCommand = se_BatchUpdateMemberEc2DeepInspectionStatusCommand;
109
- const se_CancelFindingsReportCommand = async (input, context) => {
110
- const b = (0, core_2.requestBuilder)(input, context);
111
- const headers = {
112
- "content-type": "application/json",
113
- };
114
- b.bp("/reporting/cancel");
115
- let body;
116
- body = JSON.stringify((0, smithy_client_1.take)(input, {
117
- reportId: [],
118
- }));
119
- b.m("POST").h(headers).b(body);
120
- return b.build();
121
- };
122
- exports.se_CancelFindingsReportCommand = se_CancelFindingsReportCommand;
123
- const se_CancelSbomExportCommand = async (input, context) => {
124
- const b = (0, core_2.requestBuilder)(input, context);
125
- const headers = {
126
- "content-type": "application/json",
127
- };
128
- b.bp("/sbomexport/cancel");
129
- let body;
130
- body = JSON.stringify((0, smithy_client_1.take)(input, {
131
- reportId: [],
132
- }));
133
- b.m("POST").h(headers).b(body);
134
- return b.build();
135
- };
136
- exports.se_CancelSbomExportCommand = se_CancelSbomExportCommand;
137
- const se_CreateFilterCommand = async (input, context) => {
138
- const b = (0, core_2.requestBuilder)(input, context);
139
- const headers = {
140
- "content-type": "application/json",
141
- };
142
- b.bp("/filters/create");
143
- let body;
144
- body = JSON.stringify((0, smithy_client_1.take)(input, {
145
- action: [],
146
- description: [],
147
- filterCriteria: (_) => se_FilterCriteria(_, context),
148
- name: [],
149
- reason: [],
150
- tags: (_) => (0, smithy_client_1._json)(_),
151
- }));
152
- b.m("POST").h(headers).b(body);
153
- return b.build();
154
- };
155
- exports.se_CreateFilterCommand = se_CreateFilterCommand;
156
- const se_CreateFindingsReportCommand = async (input, context) => {
157
- const b = (0, core_2.requestBuilder)(input, context);
158
- const headers = {
159
- "content-type": "application/json",
160
- };
161
- b.bp("/reporting/create");
162
- let body;
163
- body = JSON.stringify((0, smithy_client_1.take)(input, {
164
- filterCriteria: (_) => se_FilterCriteria(_, context),
165
- reportFormat: [],
166
- s3Destination: (_) => (0, smithy_client_1._json)(_),
167
- }));
168
- b.m("POST").h(headers).b(body);
169
- return b.build();
170
- };
171
- exports.se_CreateFindingsReportCommand = se_CreateFindingsReportCommand;
172
- const se_CreateSbomExportCommand = async (input, context) => {
173
- const b = (0, core_2.requestBuilder)(input, context);
174
- const headers = {
175
- "content-type": "application/json",
176
- };
177
- b.bp("/sbomexport/create");
178
- let body;
179
- body = JSON.stringify((0, smithy_client_1.take)(input, {
180
- reportFormat: [],
181
- resourceFilterCriteria: (_) => (0, smithy_client_1._json)(_),
182
- s3Destination: (_) => (0, smithy_client_1._json)(_),
183
- }));
184
- b.m("POST").h(headers).b(body);
185
- return b.build();
186
- };
187
- exports.se_CreateSbomExportCommand = se_CreateSbomExportCommand;
188
- const se_DeleteFilterCommand = async (input, context) => {
189
- const b = (0, core_2.requestBuilder)(input, context);
190
- const headers = {
191
- "content-type": "application/json",
192
- };
193
- b.bp("/filters/delete");
194
- let body;
195
- body = JSON.stringify((0, smithy_client_1.take)(input, {
196
- arn: [],
197
- }));
198
- b.m("POST").h(headers).b(body);
199
- return b.build();
200
- };
201
- exports.se_DeleteFilterCommand = se_DeleteFilterCommand;
202
- const se_DescribeOrganizationConfigurationCommand = async (input, context) => {
203
- const b = (0, core_2.requestBuilder)(input, context);
204
- const headers = {
205
- "content-type": "application/json",
206
- };
207
- b.bp("/organizationconfiguration/describe");
208
- let body;
209
- body = "";
210
- b.m("POST").h(headers).b(body);
211
- return b.build();
212
- };
213
- exports.se_DescribeOrganizationConfigurationCommand = se_DescribeOrganizationConfigurationCommand;
214
- const se_DisableCommand = async (input, context) => {
215
- const b = (0, core_2.requestBuilder)(input, context);
216
- const headers = {
217
- "content-type": "application/json",
218
- };
219
- b.bp("/disable");
220
- let body;
221
- body = JSON.stringify((0, smithy_client_1.take)(input, {
222
- accountIds: (_) => (0, smithy_client_1._json)(_),
223
- resourceTypes: (_) => (0, smithy_client_1._json)(_),
224
- }));
225
- b.m("POST").h(headers).b(body);
226
- return b.build();
227
- };
228
- exports.se_DisableCommand = se_DisableCommand;
229
- const se_DisableDelegatedAdminAccountCommand = async (input, context) => {
230
- const b = (0, core_2.requestBuilder)(input, context);
231
- const headers = {
232
- "content-type": "application/json",
233
- };
234
- b.bp("/delegatedadminaccounts/disable");
235
- let body;
236
- body = JSON.stringify((0, smithy_client_1.take)(input, {
237
- delegatedAdminAccountId: [],
238
- }));
239
- b.m("POST").h(headers).b(body);
240
- return b.build();
241
- };
242
- exports.se_DisableDelegatedAdminAccountCommand = se_DisableDelegatedAdminAccountCommand;
243
- const se_DisassociateMemberCommand = async (input, context) => {
244
- const b = (0, core_2.requestBuilder)(input, context);
245
- const headers = {
246
- "content-type": "application/json",
247
- };
248
- b.bp("/members/disassociate");
249
- let body;
250
- body = JSON.stringify((0, smithy_client_1.take)(input, {
251
- accountId: [],
252
- }));
253
- b.m("POST").h(headers).b(body);
254
- return b.build();
255
- };
256
- exports.se_DisassociateMemberCommand = se_DisassociateMemberCommand;
257
- const se_EnableCommand = async (input, context) => {
258
- const b = (0, core_2.requestBuilder)(input, context);
259
- const headers = {
260
- "content-type": "application/json",
261
- };
262
- b.bp("/enable");
263
- let body;
264
- body = JSON.stringify((0, smithy_client_1.take)(input, {
265
- accountIds: (_) => (0, smithy_client_1._json)(_),
266
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
267
- resourceTypes: (_) => (0, smithy_client_1._json)(_),
268
- }));
269
- b.m("POST").h(headers).b(body);
270
- return b.build();
271
- };
272
- exports.se_EnableCommand = se_EnableCommand;
273
- const se_EnableDelegatedAdminAccountCommand = async (input, context) => {
274
- const b = (0, core_2.requestBuilder)(input, context);
275
- const headers = {
276
- "content-type": "application/json",
277
- };
278
- b.bp("/delegatedadminaccounts/enable");
279
- let body;
280
- body = JSON.stringify((0, smithy_client_1.take)(input, {
281
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
282
- delegatedAdminAccountId: [],
283
- }));
284
- b.m("POST").h(headers).b(body);
285
- return b.build();
286
- };
287
- exports.se_EnableDelegatedAdminAccountCommand = se_EnableDelegatedAdminAccountCommand;
288
- const se_GetConfigurationCommand = async (input, context) => {
289
- const b = (0, core_2.requestBuilder)(input, context);
290
- const headers = {
291
- "content-type": "application/json",
292
- };
293
- b.bp("/configuration/get");
294
- let body;
295
- body = "";
296
- b.m("POST").h(headers).b(body);
297
- return b.build();
298
- };
299
- exports.se_GetConfigurationCommand = se_GetConfigurationCommand;
300
- const se_GetDelegatedAdminAccountCommand = async (input, context) => {
301
- const b = (0, core_2.requestBuilder)(input, context);
302
- const headers = {
303
- "content-type": "application/json",
304
- };
305
- b.bp("/delegatedadminaccounts/get");
306
- let body;
307
- body = "";
308
- b.m("POST").h(headers).b(body);
309
- return b.build();
310
- };
311
- exports.se_GetDelegatedAdminAccountCommand = se_GetDelegatedAdminAccountCommand;
312
- const se_GetEc2DeepInspectionConfigurationCommand = async (input, context) => {
313
- const b = (0, core_2.requestBuilder)(input, context);
314
- const headers = {
315
- "content-type": "application/json",
316
- };
317
- b.bp("/ec2deepinspectionconfiguration/get");
318
- let body;
319
- body = "";
320
- b.m("POST").h(headers).b(body);
321
- return b.build();
322
- };
323
- exports.se_GetEc2DeepInspectionConfigurationCommand = se_GetEc2DeepInspectionConfigurationCommand;
324
- const se_GetEncryptionKeyCommand = async (input, context) => {
325
- const b = (0, core_2.requestBuilder)(input, context);
326
- const headers = {};
327
- b.bp("/encryptionkey/get");
328
- const query = (0, smithy_client_1.map)({
329
- [_sT]: [, (0, smithy_client_1.expectNonNull)(input[_sT], `scanType`)],
330
- [_rT]: [, (0, smithy_client_1.expectNonNull)(input[_rT], `resourceType`)],
331
- });
332
- let body;
333
- b.m("GET").h(headers).q(query).b(body);
334
- return b.build();
335
- };
336
- exports.se_GetEncryptionKeyCommand = se_GetEncryptionKeyCommand;
337
- const se_GetFindingsReportStatusCommand = async (input, context) => {
338
- const b = (0, core_2.requestBuilder)(input, context);
339
- const headers = {
340
- "content-type": "application/json",
341
- };
342
- b.bp("/reporting/status/get");
343
- let body;
344
- body = JSON.stringify((0, smithy_client_1.take)(input, {
345
- reportId: [],
346
- }));
347
- b.m("POST").h(headers).b(body);
348
- return b.build();
349
- };
350
- exports.se_GetFindingsReportStatusCommand = se_GetFindingsReportStatusCommand;
351
- const se_GetMemberCommand = async (input, context) => {
352
- const b = (0, core_2.requestBuilder)(input, context);
353
- const headers = {
354
- "content-type": "application/json",
355
- };
356
- b.bp("/members/get");
357
- let body;
358
- body = JSON.stringify((0, smithy_client_1.take)(input, {
359
- accountId: [],
360
- }));
361
- b.m("POST").h(headers).b(body);
362
- return b.build();
363
- };
364
- exports.se_GetMemberCommand = se_GetMemberCommand;
365
- const se_GetSbomExportCommand = async (input, context) => {
366
- const b = (0, core_2.requestBuilder)(input, context);
367
- const headers = {
368
- "content-type": "application/json",
369
- };
370
- b.bp("/sbomexport/get");
371
- let body;
372
- body = JSON.stringify((0, smithy_client_1.take)(input, {
373
- reportId: [],
374
- }));
375
- b.m("POST").h(headers).b(body);
376
- return b.build();
377
- };
378
- exports.se_GetSbomExportCommand = se_GetSbomExportCommand;
379
- const se_ListAccountPermissionsCommand = async (input, context) => {
380
- const b = (0, core_2.requestBuilder)(input, context);
381
- const headers = {
382
- "content-type": "application/json",
383
- };
384
- b.bp("/accountpermissions/list");
385
- let body;
386
- body = JSON.stringify((0, smithy_client_1.take)(input, {
387
- maxResults: [],
388
- nextToken: [],
389
- service: [],
390
- }));
391
- b.m("POST").h(headers).b(body);
392
- return b.build();
393
- };
394
- exports.se_ListAccountPermissionsCommand = se_ListAccountPermissionsCommand;
395
- const se_ListCoverageCommand = async (input, context) => {
396
- const b = (0, core_2.requestBuilder)(input, context);
397
- const headers = {
398
- "content-type": "application/json",
399
- };
400
- b.bp("/coverage/list");
401
- let body;
402
- body = JSON.stringify((0, smithy_client_1.take)(input, {
403
- filterCriteria: (_) => se_CoverageFilterCriteria(_, context),
404
- maxResults: [],
405
- nextToken: [],
406
- }));
407
- b.m("POST").h(headers).b(body);
408
- return b.build();
409
- };
410
- exports.se_ListCoverageCommand = se_ListCoverageCommand;
411
- const se_ListCoverageStatisticsCommand = async (input, context) => {
412
- const b = (0, core_2.requestBuilder)(input, context);
413
- const headers = {
414
- "content-type": "application/json",
415
- };
416
- b.bp("/coverage/statistics/list");
417
- let body;
418
- body = JSON.stringify((0, smithy_client_1.take)(input, {
419
- filterCriteria: (_) => se_CoverageFilterCriteria(_, context),
420
- groupBy: [],
421
- nextToken: [],
422
- }));
423
- b.m("POST").h(headers).b(body);
424
- return b.build();
425
- };
426
- exports.se_ListCoverageStatisticsCommand = se_ListCoverageStatisticsCommand;
427
- const se_ListDelegatedAdminAccountsCommand = async (input, context) => {
428
- const b = (0, core_2.requestBuilder)(input, context);
429
- const headers = {
430
- "content-type": "application/json",
431
- };
432
- b.bp("/delegatedadminaccounts/list");
433
- let body;
434
- body = JSON.stringify((0, smithy_client_1.take)(input, {
435
- maxResults: [],
436
- nextToken: [],
437
- }));
438
- b.m("POST").h(headers).b(body);
439
- return b.build();
440
- };
441
- exports.se_ListDelegatedAdminAccountsCommand = se_ListDelegatedAdminAccountsCommand;
442
- const se_ListFiltersCommand = async (input, context) => {
443
- const b = (0, core_2.requestBuilder)(input, context);
444
- const headers = {
445
- "content-type": "application/json",
446
- };
447
- b.bp("/filters/list");
448
- let body;
449
- body = JSON.stringify((0, smithy_client_1.take)(input, {
450
- action: [],
451
- arns: (_) => (0, smithy_client_1._json)(_),
452
- maxResults: [],
453
- nextToken: [],
454
- }));
455
- b.m("POST").h(headers).b(body);
456
- return b.build();
457
- };
458
- exports.se_ListFiltersCommand = se_ListFiltersCommand;
459
- const se_ListFindingAggregationsCommand = async (input, context) => {
460
- const b = (0, core_2.requestBuilder)(input, context);
461
- const headers = {
462
- "content-type": "application/json",
463
- };
464
- b.bp("/findings/aggregation/list");
465
- let body;
466
- body = JSON.stringify((0, smithy_client_1.take)(input, {
467
- accountIds: (_) => (0, smithy_client_1._json)(_),
468
- aggregationRequest: (_) => (0, smithy_client_1._json)(_),
469
- aggregationType: [],
470
- maxResults: [],
471
- nextToken: [],
472
- }));
473
- b.m("POST").h(headers).b(body);
474
- return b.build();
475
- };
476
- exports.se_ListFindingAggregationsCommand = se_ListFindingAggregationsCommand;
477
- const se_ListFindingsCommand = async (input, context) => {
478
- const b = (0, core_2.requestBuilder)(input, context);
479
- const headers = {
480
- "content-type": "application/json",
481
- };
482
- b.bp("/findings/list");
483
- let body;
484
- body = JSON.stringify((0, smithy_client_1.take)(input, {
485
- filterCriteria: (_) => se_FilterCriteria(_, context),
486
- maxResults: [],
487
- nextToken: [],
488
- sortCriteria: (_) => (0, smithy_client_1._json)(_),
489
- }));
490
- b.m("POST").h(headers).b(body);
491
- return b.build();
492
- };
493
- exports.se_ListFindingsCommand = se_ListFindingsCommand;
494
- const se_ListMembersCommand = async (input, context) => {
495
- const b = (0, core_2.requestBuilder)(input, context);
496
- const headers = {
497
- "content-type": "application/json",
498
- };
499
- b.bp("/members/list");
500
- let body;
501
- body = JSON.stringify((0, smithy_client_1.take)(input, {
502
- maxResults: [],
503
- nextToken: [],
504
- onlyAssociated: [],
505
- }));
506
- b.m("POST").h(headers).b(body);
507
- return b.build();
508
- };
509
- exports.se_ListMembersCommand = se_ListMembersCommand;
510
- const se_ListTagsForResourceCommand = async (input, context) => {
511
- const b = (0, core_2.requestBuilder)(input, context);
512
- const headers = {};
513
- b.bp("/tags/{resourceArn}");
514
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
515
- let body;
516
- b.m("GET").h(headers).b(body);
517
- return b.build();
518
- };
519
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
520
- const se_ListUsageTotalsCommand = async (input, context) => {
521
- const b = (0, core_2.requestBuilder)(input, context);
522
- const headers = {
523
- "content-type": "application/json",
524
- };
525
- b.bp("/usage/list");
526
- let body;
527
- body = JSON.stringify((0, smithy_client_1.take)(input, {
528
- accountIds: (_) => (0, smithy_client_1._json)(_),
529
- maxResults: [],
530
- nextToken: [],
531
- }));
532
- b.m("POST").h(headers).b(body);
533
- return b.build();
534
- };
535
- exports.se_ListUsageTotalsCommand = se_ListUsageTotalsCommand;
536
- const se_ResetEncryptionKeyCommand = async (input, context) => {
537
- const b = (0, core_2.requestBuilder)(input, context);
538
- const headers = {
539
- "content-type": "application/json",
540
- };
541
- b.bp("/encryptionkey/reset");
542
- let body;
543
- body = JSON.stringify((0, smithy_client_1.take)(input, {
544
- resourceType: [],
545
- scanType: [],
546
- }));
547
- b.m("PUT").h(headers).b(body);
548
- return b.build();
549
- };
550
- exports.se_ResetEncryptionKeyCommand = se_ResetEncryptionKeyCommand;
551
- const se_SearchVulnerabilitiesCommand = async (input, context) => {
552
- const b = (0, core_2.requestBuilder)(input, context);
553
- const headers = {
554
- "content-type": "application/json",
555
- };
556
- b.bp("/vulnerabilities/search");
557
- let body;
558
- body = JSON.stringify((0, smithy_client_1.take)(input, {
559
- filterCriteria: (_) => (0, smithy_client_1._json)(_),
560
- nextToken: [],
561
- }));
562
- b.m("POST").h(headers).b(body);
563
- return b.build();
564
- };
565
- exports.se_SearchVulnerabilitiesCommand = se_SearchVulnerabilitiesCommand;
566
- const se_TagResourceCommand = async (input, context) => {
567
- const b = (0, core_2.requestBuilder)(input, context);
568
- const headers = {
569
- "content-type": "application/json",
570
- };
571
- b.bp("/tags/{resourceArn}");
572
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
573
- let body;
574
- body = JSON.stringify((0, smithy_client_1.take)(input, {
575
- tags: (_) => (0, smithy_client_1._json)(_),
576
- }));
577
- b.m("POST").h(headers).b(body);
578
- return b.build();
579
- };
580
- exports.se_TagResourceCommand = se_TagResourceCommand;
581
- const se_UntagResourceCommand = async (input, context) => {
582
- const b = (0, core_2.requestBuilder)(input, context);
583
- const headers = {};
584
- b.bp("/tags/{resourceArn}");
585
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
586
- const query = (0, smithy_client_1.map)({
587
- [_tK]: [
588
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
589
- () => (input[_tK] || []).map((_entry) => _entry),
590
- ],
591
- });
592
- let body;
593
- b.m("DELETE").h(headers).q(query).b(body);
594
- return b.build();
595
- };
596
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
597
- const se_UpdateConfigurationCommand = async (input, context) => {
598
- const b = (0, core_2.requestBuilder)(input, context);
599
- const headers = {
600
- "content-type": "application/json",
601
- };
602
- b.bp("/configuration/update");
603
- let body;
604
- body = JSON.stringify((0, smithy_client_1.take)(input, {
605
- ecrConfiguration: (_) => (0, smithy_client_1._json)(_),
606
- }));
607
- b.m("POST").h(headers).b(body);
608
- return b.build();
609
- };
610
- exports.se_UpdateConfigurationCommand = se_UpdateConfigurationCommand;
611
- const se_UpdateEc2DeepInspectionConfigurationCommand = async (input, context) => {
612
- const b = (0, core_2.requestBuilder)(input, context);
613
- const headers = {
614
- "content-type": "application/json",
615
- };
616
- b.bp("/ec2deepinspectionconfiguration/update");
617
- let body;
618
- body = JSON.stringify((0, smithy_client_1.take)(input, {
619
- activateDeepInspection: [],
620
- packagePaths: (_) => (0, smithy_client_1._json)(_),
621
- }));
622
- b.m("POST").h(headers).b(body);
623
- return b.build();
624
- };
625
- exports.se_UpdateEc2DeepInspectionConfigurationCommand = se_UpdateEc2DeepInspectionConfigurationCommand;
626
- const se_UpdateEncryptionKeyCommand = async (input, context) => {
627
- const b = (0, core_2.requestBuilder)(input, context);
628
- const headers = {
629
- "content-type": "application/json",
630
- };
631
- b.bp("/encryptionkey/update");
632
- let body;
633
- body = JSON.stringify((0, smithy_client_1.take)(input, {
634
- kmsKeyId: [],
635
- resourceType: [],
636
- scanType: [],
637
- }));
638
- b.m("PUT").h(headers).b(body);
639
- return b.build();
640
- };
641
- exports.se_UpdateEncryptionKeyCommand = se_UpdateEncryptionKeyCommand;
642
- const se_UpdateFilterCommand = async (input, context) => {
643
- const b = (0, core_2.requestBuilder)(input, context);
644
- const headers = {
645
- "content-type": "application/json",
646
- };
647
- b.bp("/filters/update");
648
- let body;
649
- body = JSON.stringify((0, smithy_client_1.take)(input, {
650
- action: [],
651
- description: [],
652
- filterArn: [],
653
- filterCriteria: (_) => se_FilterCriteria(_, context),
654
- name: [],
655
- reason: [],
656
- }));
657
- b.m("POST").h(headers).b(body);
658
- return b.build();
659
- };
660
- exports.se_UpdateFilterCommand = se_UpdateFilterCommand;
661
- const se_UpdateOrganizationConfigurationCommand = async (input, context) => {
662
- const b = (0, core_2.requestBuilder)(input, context);
663
- const headers = {
664
- "content-type": "application/json",
665
- };
666
- b.bp("/organizationconfiguration/update");
667
- let body;
668
- body = JSON.stringify((0, smithy_client_1.take)(input, {
669
- autoEnable: (_) => (0, smithy_client_1._json)(_),
670
- }));
671
- b.m("POST").h(headers).b(body);
672
- return b.build();
673
- };
674
- exports.se_UpdateOrganizationConfigurationCommand = se_UpdateOrganizationConfigurationCommand;
675
- const se_UpdateOrgEc2DeepInspectionConfigurationCommand = async (input, context) => {
676
- const b = (0, core_2.requestBuilder)(input, context);
677
- const headers = {
678
- "content-type": "application/json",
679
- };
680
- b.bp("/ec2deepinspectionconfiguration/org/update");
681
- let body;
682
- body = JSON.stringify((0, smithy_client_1.take)(input, {
683
- orgPackagePaths: (_) => (0, smithy_client_1._json)(_),
684
- }));
685
- b.m("POST").h(headers).b(body);
686
- return b.build();
687
- };
688
- exports.se_UpdateOrgEc2DeepInspectionConfigurationCommand = se_UpdateOrgEc2DeepInspectionConfigurationCommand;
689
- const de_AssociateMemberCommand = async (output, context) => {
690
- if (output.statusCode !== 200 && output.statusCode >= 300) {
691
- return de_AssociateMemberCommandError(output, context);
692
- }
693
- const contents = (0, smithy_client_1.map)({
694
- $metadata: deserializeMetadata(output),
695
- });
696
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
697
- const doc = (0, smithy_client_1.take)(data, {
698
- accountId: smithy_client_1.expectString,
699
- });
700
- Object.assign(contents, doc);
701
- return contents;
702
- };
703
- exports.de_AssociateMemberCommand = de_AssociateMemberCommand;
704
- const de_AssociateMemberCommandError = async (output, context) => {
705
- const parsedOutput = {
706
- ...output,
707
- body: await parseErrorBody(output.body, context),
708
- };
709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
710
- switch (errorCode) {
711
- case "AccessDeniedException":
712
- case "com.amazonaws.inspector2#AccessDeniedException":
713
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
714
- case "InternalServerException":
715
- case "com.amazonaws.inspector2#InternalServerException":
716
- throw await de_InternalServerExceptionRes(parsedOutput, context);
717
- case "ThrottlingException":
718
- case "com.amazonaws.inspector2#ThrottlingException":
719
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
720
- case "ValidationException":
721
- case "com.amazonaws.inspector2#ValidationException":
722
- throw await de_ValidationExceptionRes(parsedOutput, context);
723
- default:
724
- const parsedBody = parsedOutput.body;
725
- return throwDefaultError({
726
- output,
727
- parsedBody,
728
- errorCode,
729
- });
730
- }
731
- };
732
- const de_BatchGetAccountStatusCommand = async (output, context) => {
733
- if (output.statusCode !== 200 && output.statusCode >= 300) {
734
- return de_BatchGetAccountStatusCommandError(output, context);
735
- }
736
- const contents = (0, smithy_client_1.map)({
737
- $metadata: deserializeMetadata(output),
738
- });
739
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
740
- const doc = (0, smithy_client_1.take)(data, {
741
- accounts: smithy_client_1._json,
742
- failedAccounts: smithy_client_1._json,
743
- });
744
- Object.assign(contents, doc);
745
- return contents;
746
- };
747
- exports.de_BatchGetAccountStatusCommand = de_BatchGetAccountStatusCommand;
748
- const de_BatchGetAccountStatusCommandError = async (output, context) => {
749
- const parsedOutput = {
750
- ...output,
751
- body: await parseErrorBody(output.body, context),
752
- };
753
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
754
- switch (errorCode) {
755
- case "AccessDeniedException":
756
- case "com.amazonaws.inspector2#AccessDeniedException":
757
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
758
- case "InternalServerException":
759
- case "com.amazonaws.inspector2#InternalServerException":
760
- throw await de_InternalServerExceptionRes(parsedOutput, context);
761
- case "ResourceNotFoundException":
762
- case "com.amazonaws.inspector2#ResourceNotFoundException":
763
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
764
- case "ThrottlingException":
765
- case "com.amazonaws.inspector2#ThrottlingException":
766
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
767
- case "ValidationException":
768
- case "com.amazonaws.inspector2#ValidationException":
769
- throw await de_ValidationExceptionRes(parsedOutput, context);
770
- default:
771
- const parsedBody = parsedOutput.body;
772
- return throwDefaultError({
773
- output,
774
- parsedBody,
775
- errorCode,
776
- });
777
- }
778
- };
779
- const de_BatchGetCodeSnippetCommand = async (output, context) => {
780
- if (output.statusCode !== 200 && output.statusCode >= 300) {
781
- return de_BatchGetCodeSnippetCommandError(output, context);
782
- }
783
- const contents = (0, smithy_client_1.map)({
784
- $metadata: deserializeMetadata(output),
785
- });
786
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
787
- const doc = (0, smithy_client_1.take)(data, {
788
- codeSnippetResults: smithy_client_1._json,
789
- errors: smithy_client_1._json,
790
- });
791
- Object.assign(contents, doc);
792
- return contents;
793
- };
794
- exports.de_BatchGetCodeSnippetCommand = de_BatchGetCodeSnippetCommand;
795
- const de_BatchGetCodeSnippetCommandError = async (output, context) => {
796
- const parsedOutput = {
797
- ...output,
798
- body: await parseErrorBody(output.body, context),
799
- };
800
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
- switch (errorCode) {
802
- case "AccessDeniedException":
803
- case "com.amazonaws.inspector2#AccessDeniedException":
804
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
805
- case "InternalServerException":
806
- case "com.amazonaws.inspector2#InternalServerException":
807
- throw await de_InternalServerExceptionRes(parsedOutput, context);
808
- case "ThrottlingException":
809
- case "com.amazonaws.inspector2#ThrottlingException":
810
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
811
- case "ValidationException":
812
- case "com.amazonaws.inspector2#ValidationException":
813
- throw await de_ValidationExceptionRes(parsedOutput, context);
814
- default:
815
- const parsedBody = parsedOutput.body;
816
- return throwDefaultError({
817
- output,
818
- parsedBody,
819
- errorCode,
820
- });
821
- }
822
- };
823
- const de_BatchGetFindingDetailsCommand = async (output, context) => {
824
- if (output.statusCode !== 200 && output.statusCode >= 300) {
825
- return de_BatchGetFindingDetailsCommandError(output, context);
826
- }
827
- const contents = (0, smithy_client_1.map)({
828
- $metadata: deserializeMetadata(output),
829
- });
830
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
831
- const doc = (0, smithy_client_1.take)(data, {
832
- errors: smithy_client_1._json,
833
- findingDetails: (_) => de_FindingDetails(_, context),
834
- });
835
- Object.assign(contents, doc);
836
- return contents;
837
- };
838
- exports.de_BatchGetFindingDetailsCommand = de_BatchGetFindingDetailsCommand;
839
- const de_BatchGetFindingDetailsCommandError = async (output, context) => {
840
- const parsedOutput = {
841
- ...output,
842
- body: await parseErrorBody(output.body, context),
843
- };
844
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
- switch (errorCode) {
846
- case "AccessDeniedException":
847
- case "com.amazonaws.inspector2#AccessDeniedException":
848
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
849
- case "InternalServerException":
850
- case "com.amazonaws.inspector2#InternalServerException":
851
- throw await de_InternalServerExceptionRes(parsedOutput, context);
852
- case "ThrottlingException":
853
- case "com.amazonaws.inspector2#ThrottlingException":
854
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
855
- case "ValidationException":
856
- case "com.amazonaws.inspector2#ValidationException":
857
- throw await de_ValidationExceptionRes(parsedOutput, context);
858
- default:
859
- const parsedBody = parsedOutput.body;
860
- return throwDefaultError({
861
- output,
862
- parsedBody,
863
- errorCode,
864
- });
865
- }
866
- };
867
- const de_BatchGetFreeTrialInfoCommand = async (output, context) => {
868
- if (output.statusCode !== 200 && output.statusCode >= 300) {
869
- return de_BatchGetFreeTrialInfoCommandError(output, context);
870
- }
871
- const contents = (0, smithy_client_1.map)({
872
- $metadata: deserializeMetadata(output),
873
- });
874
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
875
- const doc = (0, smithy_client_1.take)(data, {
876
- accounts: (_) => de_FreeTrialAccountInfoList(_, context),
877
- failedAccounts: smithy_client_1._json,
878
- });
879
- Object.assign(contents, doc);
880
- return contents;
881
- };
882
- exports.de_BatchGetFreeTrialInfoCommand = de_BatchGetFreeTrialInfoCommand;
883
- const de_BatchGetFreeTrialInfoCommandError = async (output, context) => {
884
- const parsedOutput = {
885
- ...output,
886
- body: await parseErrorBody(output.body, context),
887
- };
888
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
889
- switch (errorCode) {
890
- case "AccessDeniedException":
891
- case "com.amazonaws.inspector2#AccessDeniedException":
892
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
893
- case "InternalServerException":
894
- case "com.amazonaws.inspector2#InternalServerException":
895
- throw await de_InternalServerExceptionRes(parsedOutput, context);
896
- case "ThrottlingException":
897
- case "com.amazonaws.inspector2#ThrottlingException":
898
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
899
- case "ValidationException":
900
- case "com.amazonaws.inspector2#ValidationException":
901
- throw await de_ValidationExceptionRes(parsedOutput, context);
902
- default:
903
- const parsedBody = parsedOutput.body;
904
- return throwDefaultError({
905
- output,
906
- parsedBody,
907
- errorCode,
908
- });
909
- }
910
- };
911
- const de_BatchGetMemberEc2DeepInspectionStatusCommand = async (output, context) => {
912
- if (output.statusCode !== 200 && output.statusCode >= 300) {
913
- return de_BatchGetMemberEc2DeepInspectionStatusCommandError(output, context);
914
- }
915
- const contents = (0, smithy_client_1.map)({
916
- $metadata: deserializeMetadata(output),
917
- });
918
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
919
- const doc = (0, smithy_client_1.take)(data, {
920
- accountIds: smithy_client_1._json,
921
- failedAccountIds: smithy_client_1._json,
922
- });
923
- Object.assign(contents, doc);
924
- return contents;
925
- };
926
- exports.de_BatchGetMemberEc2DeepInspectionStatusCommand = de_BatchGetMemberEc2DeepInspectionStatusCommand;
927
- const de_BatchGetMemberEc2DeepInspectionStatusCommandError = async (output, context) => {
928
- const parsedOutput = {
929
- ...output,
930
- body: await parseErrorBody(output.body, context),
931
- };
932
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
933
- switch (errorCode) {
934
- case "AccessDeniedException":
935
- case "com.amazonaws.inspector2#AccessDeniedException":
936
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
937
- case "InternalServerException":
938
- case "com.amazonaws.inspector2#InternalServerException":
939
- throw await de_InternalServerExceptionRes(parsedOutput, context);
940
- case "ThrottlingException":
941
- case "com.amazonaws.inspector2#ThrottlingException":
942
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
943
- case "ValidationException":
944
- case "com.amazonaws.inspector2#ValidationException":
945
- throw await de_ValidationExceptionRes(parsedOutput, context);
946
- default:
947
- const parsedBody = parsedOutput.body;
948
- return throwDefaultError({
949
- output,
950
- parsedBody,
951
- errorCode,
952
- });
953
- }
954
- };
955
- const de_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (output, context) => {
956
- if (output.statusCode !== 200 && output.statusCode >= 300) {
957
- return de_BatchUpdateMemberEc2DeepInspectionStatusCommandError(output, context);
958
- }
959
- const contents = (0, smithy_client_1.map)({
960
- $metadata: deserializeMetadata(output),
961
- });
962
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
963
- const doc = (0, smithy_client_1.take)(data, {
964
- accountIds: smithy_client_1._json,
965
- failedAccountIds: smithy_client_1._json,
966
- });
967
- Object.assign(contents, doc);
968
- return contents;
969
- };
970
- exports.de_BatchUpdateMemberEc2DeepInspectionStatusCommand = de_BatchUpdateMemberEc2DeepInspectionStatusCommand;
971
- const de_BatchUpdateMemberEc2DeepInspectionStatusCommandError = async (output, context) => {
972
- const parsedOutput = {
973
- ...output,
974
- body: await parseErrorBody(output.body, context),
975
- };
976
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
977
- switch (errorCode) {
978
- case "AccessDeniedException":
979
- case "com.amazonaws.inspector2#AccessDeniedException":
980
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
981
- case "InternalServerException":
982
- case "com.amazonaws.inspector2#InternalServerException":
983
- throw await de_InternalServerExceptionRes(parsedOutput, context);
984
- case "ThrottlingException":
985
- case "com.amazonaws.inspector2#ThrottlingException":
986
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
987
- case "ValidationException":
988
- case "com.amazonaws.inspector2#ValidationException":
989
- throw await de_ValidationExceptionRes(parsedOutput, context);
990
- default:
991
- const parsedBody = parsedOutput.body;
992
- return throwDefaultError({
993
- output,
994
- parsedBody,
995
- errorCode,
996
- });
997
- }
998
- };
999
- const de_CancelFindingsReportCommand = async (output, context) => {
1000
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1001
- return de_CancelFindingsReportCommandError(output, context);
1002
- }
1003
- const contents = (0, smithy_client_1.map)({
1004
- $metadata: deserializeMetadata(output),
1005
- });
1006
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1007
- const doc = (0, smithy_client_1.take)(data, {
1008
- reportId: smithy_client_1.expectString,
1009
- });
1010
- Object.assign(contents, doc);
1011
- return contents;
1012
- };
1013
- exports.de_CancelFindingsReportCommand = de_CancelFindingsReportCommand;
1014
- const de_CancelFindingsReportCommandError = async (output, context) => {
1015
- const parsedOutput = {
1016
- ...output,
1017
- body: await parseErrorBody(output.body, context),
1018
- };
1019
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1020
- switch (errorCode) {
1021
- case "AccessDeniedException":
1022
- case "com.amazonaws.inspector2#AccessDeniedException":
1023
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1024
- case "InternalServerException":
1025
- case "com.amazonaws.inspector2#InternalServerException":
1026
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1027
- case "ResourceNotFoundException":
1028
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1029
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1030
- case "ThrottlingException":
1031
- case "com.amazonaws.inspector2#ThrottlingException":
1032
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1033
- case "ValidationException":
1034
- case "com.amazonaws.inspector2#ValidationException":
1035
- throw await de_ValidationExceptionRes(parsedOutput, context);
1036
- default:
1037
- const parsedBody = parsedOutput.body;
1038
- return throwDefaultError({
1039
- output,
1040
- parsedBody,
1041
- errorCode,
1042
- });
1043
- }
1044
- };
1045
- const de_CancelSbomExportCommand = async (output, context) => {
1046
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1047
- return de_CancelSbomExportCommandError(output, context);
1048
- }
1049
- const contents = (0, smithy_client_1.map)({
1050
- $metadata: deserializeMetadata(output),
1051
- });
1052
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1053
- const doc = (0, smithy_client_1.take)(data, {
1054
- reportId: smithy_client_1.expectString,
1055
- });
1056
- Object.assign(contents, doc);
1057
- return contents;
1058
- };
1059
- exports.de_CancelSbomExportCommand = de_CancelSbomExportCommand;
1060
- const de_CancelSbomExportCommandError = async (output, context) => {
1061
- const parsedOutput = {
1062
- ...output,
1063
- body: await parseErrorBody(output.body, context),
1064
- };
1065
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1066
- switch (errorCode) {
1067
- case "AccessDeniedException":
1068
- case "com.amazonaws.inspector2#AccessDeniedException":
1069
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1070
- case "InternalServerException":
1071
- case "com.amazonaws.inspector2#InternalServerException":
1072
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1073
- case "ResourceNotFoundException":
1074
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1075
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1076
- case "ThrottlingException":
1077
- case "com.amazonaws.inspector2#ThrottlingException":
1078
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1079
- case "ValidationException":
1080
- case "com.amazonaws.inspector2#ValidationException":
1081
- throw await de_ValidationExceptionRes(parsedOutput, context);
1082
- default:
1083
- const parsedBody = parsedOutput.body;
1084
- return throwDefaultError({
1085
- output,
1086
- parsedBody,
1087
- errorCode,
1088
- });
1089
- }
1090
- };
1091
- const de_CreateFilterCommand = async (output, context) => {
1092
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1093
- return de_CreateFilterCommandError(output, context);
1094
- }
1095
- const contents = (0, smithy_client_1.map)({
1096
- $metadata: deserializeMetadata(output),
1097
- });
1098
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1099
- const doc = (0, smithy_client_1.take)(data, {
1100
- arn: smithy_client_1.expectString,
1101
- });
1102
- Object.assign(contents, doc);
1103
- return contents;
1104
- };
1105
- exports.de_CreateFilterCommand = de_CreateFilterCommand;
1106
- const de_CreateFilterCommandError = async (output, context) => {
1107
- const parsedOutput = {
1108
- ...output,
1109
- body: await parseErrorBody(output.body, context),
1110
- };
1111
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1112
- switch (errorCode) {
1113
- case "AccessDeniedException":
1114
- case "com.amazonaws.inspector2#AccessDeniedException":
1115
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1116
- case "BadRequestException":
1117
- case "com.amazonaws.inspector2#BadRequestException":
1118
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1119
- case "InternalServerException":
1120
- case "com.amazonaws.inspector2#InternalServerException":
1121
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1122
- case "ServiceQuotaExceededException":
1123
- case "com.amazonaws.inspector2#ServiceQuotaExceededException":
1124
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1125
- case "ThrottlingException":
1126
- case "com.amazonaws.inspector2#ThrottlingException":
1127
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1128
- case "ValidationException":
1129
- case "com.amazonaws.inspector2#ValidationException":
1130
- throw await de_ValidationExceptionRes(parsedOutput, context);
1131
- default:
1132
- const parsedBody = parsedOutput.body;
1133
- return throwDefaultError({
1134
- output,
1135
- parsedBody,
1136
- errorCode,
1137
- });
1138
- }
1139
- };
1140
- const de_CreateFindingsReportCommand = async (output, context) => {
1141
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1142
- return de_CreateFindingsReportCommandError(output, context);
1143
- }
1144
- const contents = (0, smithy_client_1.map)({
1145
- $metadata: deserializeMetadata(output),
1146
- });
1147
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1148
- const doc = (0, smithy_client_1.take)(data, {
1149
- reportId: smithy_client_1.expectString,
1150
- });
1151
- Object.assign(contents, doc);
1152
- return contents;
1153
- };
1154
- exports.de_CreateFindingsReportCommand = de_CreateFindingsReportCommand;
1155
- const de_CreateFindingsReportCommandError = async (output, context) => {
1156
- const parsedOutput = {
1157
- ...output,
1158
- body: await parseErrorBody(output.body, context),
1159
- };
1160
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1161
- switch (errorCode) {
1162
- case "AccessDeniedException":
1163
- case "com.amazonaws.inspector2#AccessDeniedException":
1164
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1165
- case "InternalServerException":
1166
- case "com.amazonaws.inspector2#InternalServerException":
1167
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1168
- case "ResourceNotFoundException":
1169
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1170
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1171
- case "ThrottlingException":
1172
- case "com.amazonaws.inspector2#ThrottlingException":
1173
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1174
- case "ValidationException":
1175
- case "com.amazonaws.inspector2#ValidationException":
1176
- throw await de_ValidationExceptionRes(parsedOutput, context);
1177
- default:
1178
- const parsedBody = parsedOutput.body;
1179
- return throwDefaultError({
1180
- output,
1181
- parsedBody,
1182
- errorCode,
1183
- });
1184
- }
1185
- };
1186
- const de_CreateSbomExportCommand = async (output, context) => {
1187
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1188
- return de_CreateSbomExportCommandError(output, context);
1189
- }
1190
- const contents = (0, smithy_client_1.map)({
1191
- $metadata: deserializeMetadata(output),
1192
- });
1193
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1194
- const doc = (0, smithy_client_1.take)(data, {
1195
- reportId: smithy_client_1.expectString,
1196
- });
1197
- Object.assign(contents, doc);
1198
- return contents;
1199
- };
1200
- exports.de_CreateSbomExportCommand = de_CreateSbomExportCommand;
1201
- const de_CreateSbomExportCommandError = async (output, context) => {
1202
- const parsedOutput = {
1203
- ...output,
1204
- body: await parseErrorBody(output.body, context),
1205
- };
1206
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1207
- switch (errorCode) {
1208
- case "AccessDeniedException":
1209
- case "com.amazonaws.inspector2#AccessDeniedException":
1210
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1211
- case "InternalServerException":
1212
- case "com.amazonaws.inspector2#InternalServerException":
1213
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1214
- case "ResourceNotFoundException":
1215
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1216
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1217
- case "ThrottlingException":
1218
- case "com.amazonaws.inspector2#ThrottlingException":
1219
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1220
- case "ValidationException":
1221
- case "com.amazonaws.inspector2#ValidationException":
1222
- throw await de_ValidationExceptionRes(parsedOutput, context);
1223
- default:
1224
- const parsedBody = parsedOutput.body;
1225
- return throwDefaultError({
1226
- output,
1227
- parsedBody,
1228
- errorCode,
1229
- });
1230
- }
1231
- };
1232
- const de_DeleteFilterCommand = async (output, context) => {
1233
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1234
- return de_DeleteFilterCommandError(output, context);
1235
- }
1236
- const contents = (0, smithy_client_1.map)({
1237
- $metadata: deserializeMetadata(output),
1238
- });
1239
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1240
- const doc = (0, smithy_client_1.take)(data, {
1241
- arn: smithy_client_1.expectString,
1242
- });
1243
- Object.assign(contents, doc);
1244
- return contents;
1245
- };
1246
- exports.de_DeleteFilterCommand = de_DeleteFilterCommand;
1247
- const de_DeleteFilterCommandError = async (output, context) => {
1248
- const parsedOutput = {
1249
- ...output,
1250
- body: await parseErrorBody(output.body, context),
1251
- };
1252
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1253
- switch (errorCode) {
1254
- case "AccessDeniedException":
1255
- case "com.amazonaws.inspector2#AccessDeniedException":
1256
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1257
- case "InternalServerException":
1258
- case "com.amazonaws.inspector2#InternalServerException":
1259
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1260
- case "ResourceNotFoundException":
1261
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1262
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1263
- case "ThrottlingException":
1264
- case "com.amazonaws.inspector2#ThrottlingException":
1265
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1266
- case "ValidationException":
1267
- case "com.amazonaws.inspector2#ValidationException":
1268
- throw await de_ValidationExceptionRes(parsedOutput, context);
1269
- default:
1270
- const parsedBody = parsedOutput.body;
1271
- return throwDefaultError({
1272
- output,
1273
- parsedBody,
1274
- errorCode,
1275
- });
1276
- }
1277
- };
1278
- const de_DescribeOrganizationConfigurationCommand = async (output, context) => {
1279
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1280
- return de_DescribeOrganizationConfigurationCommandError(output, context);
1281
- }
1282
- const contents = (0, smithy_client_1.map)({
1283
- $metadata: deserializeMetadata(output),
1284
- });
1285
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1286
- const doc = (0, smithy_client_1.take)(data, {
1287
- autoEnable: smithy_client_1._json,
1288
- maxAccountLimitReached: smithy_client_1.expectBoolean,
1289
- });
1290
- Object.assign(contents, doc);
1291
- return contents;
1292
- };
1293
- exports.de_DescribeOrganizationConfigurationCommand = de_DescribeOrganizationConfigurationCommand;
1294
- const de_DescribeOrganizationConfigurationCommandError = async (output, context) => {
1295
- const parsedOutput = {
1296
- ...output,
1297
- body: await parseErrorBody(output.body, context),
1298
- };
1299
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1300
- switch (errorCode) {
1301
- case "AccessDeniedException":
1302
- case "com.amazonaws.inspector2#AccessDeniedException":
1303
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1304
- case "InternalServerException":
1305
- case "com.amazonaws.inspector2#InternalServerException":
1306
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1307
- case "ThrottlingException":
1308
- case "com.amazonaws.inspector2#ThrottlingException":
1309
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1310
- case "ValidationException":
1311
- case "com.amazonaws.inspector2#ValidationException":
1312
- throw await de_ValidationExceptionRes(parsedOutput, context);
1313
- default:
1314
- const parsedBody = parsedOutput.body;
1315
- return throwDefaultError({
1316
- output,
1317
- parsedBody,
1318
- errorCode,
1319
- });
1320
- }
1321
- };
1322
- const de_DisableCommand = async (output, context) => {
1323
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1324
- return de_DisableCommandError(output, context);
1325
- }
1326
- const contents = (0, smithy_client_1.map)({
1327
- $metadata: deserializeMetadata(output),
1328
- });
1329
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1330
- const doc = (0, smithy_client_1.take)(data, {
1331
- accounts: smithy_client_1._json,
1332
- failedAccounts: smithy_client_1._json,
1333
- });
1334
- Object.assign(contents, doc);
1335
- return contents;
1336
- };
1337
- exports.de_DisableCommand = de_DisableCommand;
1338
- const de_DisableCommandError = async (output, context) => {
1339
- const parsedOutput = {
1340
- ...output,
1341
- body: await parseErrorBody(output.body, context),
1342
- };
1343
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1344
- switch (errorCode) {
1345
- case "AccessDeniedException":
1346
- case "com.amazonaws.inspector2#AccessDeniedException":
1347
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1348
- case "InternalServerException":
1349
- case "com.amazonaws.inspector2#InternalServerException":
1350
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1351
- case "ResourceNotFoundException":
1352
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1353
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1354
- case "ThrottlingException":
1355
- case "com.amazonaws.inspector2#ThrottlingException":
1356
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1357
- case "ValidationException":
1358
- case "com.amazonaws.inspector2#ValidationException":
1359
- throw await de_ValidationExceptionRes(parsedOutput, context);
1360
- default:
1361
- const parsedBody = parsedOutput.body;
1362
- return throwDefaultError({
1363
- output,
1364
- parsedBody,
1365
- errorCode,
1366
- });
1367
- }
1368
- };
1369
- const de_DisableDelegatedAdminAccountCommand = async (output, context) => {
1370
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1371
- return de_DisableDelegatedAdminAccountCommandError(output, context);
1372
- }
1373
- const contents = (0, smithy_client_1.map)({
1374
- $metadata: deserializeMetadata(output),
1375
- });
1376
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1377
- const doc = (0, smithy_client_1.take)(data, {
1378
- delegatedAdminAccountId: smithy_client_1.expectString,
1379
- });
1380
- Object.assign(contents, doc);
1381
- return contents;
1382
- };
1383
- exports.de_DisableDelegatedAdminAccountCommand = de_DisableDelegatedAdminAccountCommand;
1384
- const de_DisableDelegatedAdminAccountCommandError = async (output, context) => {
1385
- const parsedOutput = {
1386
- ...output,
1387
- body: await parseErrorBody(output.body, context),
1388
- };
1389
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1390
- switch (errorCode) {
1391
- case "AccessDeniedException":
1392
- case "com.amazonaws.inspector2#AccessDeniedException":
1393
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1394
- case "ConflictException":
1395
- case "com.amazonaws.inspector2#ConflictException":
1396
- throw await de_ConflictExceptionRes(parsedOutput, context);
1397
- case "InternalServerException":
1398
- case "com.amazonaws.inspector2#InternalServerException":
1399
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1400
- case "ResourceNotFoundException":
1401
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1402
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1403
- case "ThrottlingException":
1404
- case "com.amazonaws.inspector2#ThrottlingException":
1405
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1406
- case "ValidationException":
1407
- case "com.amazonaws.inspector2#ValidationException":
1408
- throw await de_ValidationExceptionRes(parsedOutput, context);
1409
- default:
1410
- const parsedBody = parsedOutput.body;
1411
- return throwDefaultError({
1412
- output,
1413
- parsedBody,
1414
- errorCode,
1415
- });
1416
- }
1417
- };
1418
- const de_DisassociateMemberCommand = async (output, context) => {
1419
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1420
- return de_DisassociateMemberCommandError(output, context);
1421
- }
1422
- const contents = (0, smithy_client_1.map)({
1423
- $metadata: deserializeMetadata(output),
1424
- });
1425
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1426
- const doc = (0, smithy_client_1.take)(data, {
1427
- accountId: smithy_client_1.expectString,
1428
- });
1429
- Object.assign(contents, doc);
1430
- return contents;
1431
- };
1432
- exports.de_DisassociateMemberCommand = de_DisassociateMemberCommand;
1433
- const de_DisassociateMemberCommandError = async (output, context) => {
1434
- const parsedOutput = {
1435
- ...output,
1436
- body: await parseErrorBody(output.body, context),
1437
- };
1438
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1439
- switch (errorCode) {
1440
- case "AccessDeniedException":
1441
- case "com.amazonaws.inspector2#AccessDeniedException":
1442
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1443
- case "InternalServerException":
1444
- case "com.amazonaws.inspector2#InternalServerException":
1445
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1446
- case "ThrottlingException":
1447
- case "com.amazonaws.inspector2#ThrottlingException":
1448
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1449
- case "ValidationException":
1450
- case "com.amazonaws.inspector2#ValidationException":
1451
- throw await de_ValidationExceptionRes(parsedOutput, context);
1452
- default:
1453
- const parsedBody = parsedOutput.body;
1454
- return throwDefaultError({
1455
- output,
1456
- parsedBody,
1457
- errorCode,
1458
- });
1459
- }
1460
- };
1461
- const de_EnableCommand = async (output, context) => {
1462
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1463
- return de_EnableCommandError(output, context);
1464
- }
1465
- const contents = (0, smithy_client_1.map)({
1466
- $metadata: deserializeMetadata(output),
1467
- });
1468
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1469
- const doc = (0, smithy_client_1.take)(data, {
1470
- accounts: smithy_client_1._json,
1471
- failedAccounts: smithy_client_1._json,
1472
- });
1473
- Object.assign(contents, doc);
1474
- return contents;
1475
- };
1476
- exports.de_EnableCommand = de_EnableCommand;
1477
- const de_EnableCommandError = async (output, context) => {
1478
- const parsedOutput = {
1479
- ...output,
1480
- body: await parseErrorBody(output.body, context),
1481
- };
1482
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1483
- switch (errorCode) {
1484
- case "AccessDeniedException":
1485
- case "com.amazonaws.inspector2#AccessDeniedException":
1486
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1487
- case "InternalServerException":
1488
- case "com.amazonaws.inspector2#InternalServerException":
1489
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1490
- case "ResourceNotFoundException":
1491
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1492
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1493
- case "ThrottlingException":
1494
- case "com.amazonaws.inspector2#ThrottlingException":
1495
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1496
- case "ValidationException":
1497
- case "com.amazonaws.inspector2#ValidationException":
1498
- throw await de_ValidationExceptionRes(parsedOutput, context);
1499
- default:
1500
- const parsedBody = parsedOutput.body;
1501
- return throwDefaultError({
1502
- output,
1503
- parsedBody,
1504
- errorCode,
1505
- });
1506
- }
1507
- };
1508
- const de_EnableDelegatedAdminAccountCommand = async (output, context) => {
1509
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1510
- return de_EnableDelegatedAdminAccountCommandError(output, context);
1511
- }
1512
- const contents = (0, smithy_client_1.map)({
1513
- $metadata: deserializeMetadata(output),
1514
- });
1515
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1516
- const doc = (0, smithy_client_1.take)(data, {
1517
- delegatedAdminAccountId: smithy_client_1.expectString,
1518
- });
1519
- Object.assign(contents, doc);
1520
- return contents;
1521
- };
1522
- exports.de_EnableDelegatedAdminAccountCommand = de_EnableDelegatedAdminAccountCommand;
1523
- const de_EnableDelegatedAdminAccountCommandError = async (output, context) => {
1524
- const parsedOutput = {
1525
- ...output,
1526
- body: await parseErrorBody(output.body, context),
1527
- };
1528
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1529
- switch (errorCode) {
1530
- case "AccessDeniedException":
1531
- case "com.amazonaws.inspector2#AccessDeniedException":
1532
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1533
- case "ConflictException":
1534
- case "com.amazonaws.inspector2#ConflictException":
1535
- throw await de_ConflictExceptionRes(parsedOutput, context);
1536
- case "InternalServerException":
1537
- case "com.amazonaws.inspector2#InternalServerException":
1538
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1539
- case "ResourceNotFoundException":
1540
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1541
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1542
- case "ThrottlingException":
1543
- case "com.amazonaws.inspector2#ThrottlingException":
1544
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1545
- case "ValidationException":
1546
- case "com.amazonaws.inspector2#ValidationException":
1547
- throw await de_ValidationExceptionRes(parsedOutput, context);
1548
- default:
1549
- const parsedBody = parsedOutput.body;
1550
- return throwDefaultError({
1551
- output,
1552
- parsedBody,
1553
- errorCode,
1554
- });
1555
- }
1556
- };
1557
- const de_GetConfigurationCommand = async (output, context) => {
1558
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1559
- return de_GetConfigurationCommandError(output, context);
1560
- }
1561
- const contents = (0, smithy_client_1.map)({
1562
- $metadata: deserializeMetadata(output),
1563
- });
1564
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1565
- const doc = (0, smithy_client_1.take)(data, {
1566
- ecrConfiguration: (_) => de_EcrConfigurationState(_, context),
1567
- });
1568
- Object.assign(contents, doc);
1569
- return contents;
1570
- };
1571
- exports.de_GetConfigurationCommand = de_GetConfigurationCommand;
1572
- const de_GetConfigurationCommandError = async (output, context) => {
1573
- const parsedOutput = {
1574
- ...output,
1575
- body: await parseErrorBody(output.body, context),
1576
- };
1577
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1578
- switch (errorCode) {
1579
- case "InternalServerException":
1580
- case "com.amazonaws.inspector2#InternalServerException":
1581
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1582
- case "ResourceNotFoundException":
1583
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1584
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1585
- case "ThrottlingException":
1586
- case "com.amazonaws.inspector2#ThrottlingException":
1587
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1588
- default:
1589
- const parsedBody = parsedOutput.body;
1590
- return throwDefaultError({
1591
- output,
1592
- parsedBody,
1593
- errorCode,
1594
- });
1595
- }
1596
- };
1597
- const de_GetDelegatedAdminAccountCommand = async (output, context) => {
1598
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1599
- return de_GetDelegatedAdminAccountCommandError(output, context);
1600
- }
1601
- const contents = (0, smithy_client_1.map)({
1602
- $metadata: deserializeMetadata(output),
1603
- });
1604
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1605
- const doc = (0, smithy_client_1.take)(data, {
1606
- delegatedAdmin: smithy_client_1._json,
1607
- });
1608
- Object.assign(contents, doc);
1609
- return contents;
1610
- };
1611
- exports.de_GetDelegatedAdminAccountCommand = de_GetDelegatedAdminAccountCommand;
1612
- const de_GetDelegatedAdminAccountCommandError = async (output, context) => {
1613
- const parsedOutput = {
1614
- ...output,
1615
- body: await parseErrorBody(output.body, context),
1616
- };
1617
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1618
- switch (errorCode) {
1619
- case "AccessDeniedException":
1620
- case "com.amazonaws.inspector2#AccessDeniedException":
1621
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1622
- case "InternalServerException":
1623
- case "com.amazonaws.inspector2#InternalServerException":
1624
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1625
- case "ResourceNotFoundException":
1626
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1627
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1628
- case "ThrottlingException":
1629
- case "com.amazonaws.inspector2#ThrottlingException":
1630
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1631
- case "ValidationException":
1632
- case "com.amazonaws.inspector2#ValidationException":
1633
- throw await de_ValidationExceptionRes(parsedOutput, context);
1634
- default:
1635
- const parsedBody = parsedOutput.body;
1636
- return throwDefaultError({
1637
- output,
1638
- parsedBody,
1639
- errorCode,
1640
- });
1641
- }
1642
- };
1643
- const de_GetEc2DeepInspectionConfigurationCommand = async (output, context) => {
1644
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1645
- return de_GetEc2DeepInspectionConfigurationCommandError(output, context);
1646
- }
1647
- const contents = (0, smithy_client_1.map)({
1648
- $metadata: deserializeMetadata(output),
1649
- });
1650
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1651
- const doc = (0, smithy_client_1.take)(data, {
1652
- errorMessage: smithy_client_1.expectString,
1653
- orgPackagePaths: smithy_client_1._json,
1654
- packagePaths: smithy_client_1._json,
1655
- status: smithy_client_1.expectString,
1656
- });
1657
- Object.assign(contents, doc);
1658
- return contents;
1659
- };
1660
- exports.de_GetEc2DeepInspectionConfigurationCommand = de_GetEc2DeepInspectionConfigurationCommand;
1661
- const de_GetEc2DeepInspectionConfigurationCommandError = async (output, context) => {
1662
- const parsedOutput = {
1663
- ...output,
1664
- body: await parseErrorBody(output.body, context),
1665
- };
1666
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1667
- switch (errorCode) {
1668
- case "AccessDeniedException":
1669
- case "com.amazonaws.inspector2#AccessDeniedException":
1670
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1671
- case "InternalServerException":
1672
- case "com.amazonaws.inspector2#InternalServerException":
1673
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1674
- case "ResourceNotFoundException":
1675
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1676
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1677
- case "ThrottlingException":
1678
- case "com.amazonaws.inspector2#ThrottlingException":
1679
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1680
- default:
1681
- const parsedBody = parsedOutput.body;
1682
- return throwDefaultError({
1683
- output,
1684
- parsedBody,
1685
- errorCode,
1686
- });
1687
- }
1688
- };
1689
- const de_GetEncryptionKeyCommand = async (output, context) => {
1690
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1691
- return de_GetEncryptionKeyCommandError(output, context);
1692
- }
1693
- const contents = (0, smithy_client_1.map)({
1694
- $metadata: deserializeMetadata(output),
1695
- });
1696
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1697
- const doc = (0, smithy_client_1.take)(data, {
1698
- kmsKeyId: smithy_client_1.expectString,
1699
- });
1700
- Object.assign(contents, doc);
1701
- return contents;
1702
- };
1703
- exports.de_GetEncryptionKeyCommand = de_GetEncryptionKeyCommand;
1704
- const de_GetEncryptionKeyCommandError = async (output, context) => {
1705
- const parsedOutput = {
1706
- ...output,
1707
- body: await parseErrorBody(output.body, context),
1708
- };
1709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1710
- switch (errorCode) {
1711
- case "AccessDeniedException":
1712
- case "com.amazonaws.inspector2#AccessDeniedException":
1713
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1714
- case "InternalServerException":
1715
- case "com.amazonaws.inspector2#InternalServerException":
1716
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1717
- case "ResourceNotFoundException":
1718
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1719
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1720
- case "ThrottlingException":
1721
- case "com.amazonaws.inspector2#ThrottlingException":
1722
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1723
- case "ValidationException":
1724
- case "com.amazonaws.inspector2#ValidationException":
1725
- throw await de_ValidationExceptionRes(parsedOutput, context);
1726
- default:
1727
- const parsedBody = parsedOutput.body;
1728
- return throwDefaultError({
1729
- output,
1730
- parsedBody,
1731
- errorCode,
1732
- });
1733
- }
1734
- };
1735
- const de_GetFindingsReportStatusCommand = async (output, context) => {
1736
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1737
- return de_GetFindingsReportStatusCommandError(output, context);
1738
- }
1739
- const contents = (0, smithy_client_1.map)({
1740
- $metadata: deserializeMetadata(output),
1741
- });
1742
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1743
- const doc = (0, smithy_client_1.take)(data, {
1744
- destination: smithy_client_1._json,
1745
- errorCode: smithy_client_1.expectString,
1746
- errorMessage: smithy_client_1.expectString,
1747
- filterCriteria: (_) => de_FilterCriteria(_, context),
1748
- reportId: smithy_client_1.expectString,
1749
- status: smithy_client_1.expectString,
1750
- });
1751
- Object.assign(contents, doc);
1752
- return contents;
1753
- };
1754
- exports.de_GetFindingsReportStatusCommand = de_GetFindingsReportStatusCommand;
1755
- const de_GetFindingsReportStatusCommandError = async (output, context) => {
1756
- const parsedOutput = {
1757
- ...output,
1758
- body: await parseErrorBody(output.body, context),
1759
- };
1760
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1761
- switch (errorCode) {
1762
- case "AccessDeniedException":
1763
- case "com.amazonaws.inspector2#AccessDeniedException":
1764
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1765
- case "InternalServerException":
1766
- case "com.amazonaws.inspector2#InternalServerException":
1767
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1768
- case "ResourceNotFoundException":
1769
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1770
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1771
- case "ThrottlingException":
1772
- case "com.amazonaws.inspector2#ThrottlingException":
1773
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1774
- case "ValidationException":
1775
- case "com.amazonaws.inspector2#ValidationException":
1776
- throw await de_ValidationExceptionRes(parsedOutput, context);
1777
- default:
1778
- const parsedBody = parsedOutput.body;
1779
- return throwDefaultError({
1780
- output,
1781
- parsedBody,
1782
- errorCode,
1783
- });
1784
- }
1785
- };
1786
- const de_GetMemberCommand = async (output, context) => {
1787
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1788
- return de_GetMemberCommandError(output, context);
1789
- }
1790
- const contents = (0, smithy_client_1.map)({
1791
- $metadata: deserializeMetadata(output),
1792
- });
1793
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1794
- const doc = (0, smithy_client_1.take)(data, {
1795
- member: (_) => de_Member(_, context),
1796
- });
1797
- Object.assign(contents, doc);
1798
- return contents;
1799
- };
1800
- exports.de_GetMemberCommand = de_GetMemberCommand;
1801
- const de_GetMemberCommandError = async (output, context) => {
1802
- const parsedOutput = {
1803
- ...output,
1804
- body: await parseErrorBody(output.body, context),
1805
- };
1806
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1807
- switch (errorCode) {
1808
- case "AccessDeniedException":
1809
- case "com.amazonaws.inspector2#AccessDeniedException":
1810
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1811
- case "InternalServerException":
1812
- case "com.amazonaws.inspector2#InternalServerException":
1813
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1814
- case "ResourceNotFoundException":
1815
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1816
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1817
- case "ThrottlingException":
1818
- case "com.amazonaws.inspector2#ThrottlingException":
1819
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1820
- case "ValidationException":
1821
- case "com.amazonaws.inspector2#ValidationException":
1822
- throw await de_ValidationExceptionRes(parsedOutput, context);
1823
- default:
1824
- const parsedBody = parsedOutput.body;
1825
- return throwDefaultError({
1826
- output,
1827
- parsedBody,
1828
- errorCode,
1829
- });
1830
- }
1831
- };
1832
- const de_GetSbomExportCommand = async (output, context) => {
1833
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1834
- return de_GetSbomExportCommandError(output, context);
1835
- }
1836
- const contents = (0, smithy_client_1.map)({
1837
- $metadata: deserializeMetadata(output),
1838
- });
1839
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1840
- const doc = (0, smithy_client_1.take)(data, {
1841
- errorCode: smithy_client_1.expectString,
1842
- errorMessage: smithy_client_1.expectString,
1843
- filterCriteria: smithy_client_1._json,
1844
- format: smithy_client_1.expectString,
1845
- reportId: smithy_client_1.expectString,
1846
- s3Destination: smithy_client_1._json,
1847
- status: smithy_client_1.expectString,
1848
- });
1849
- Object.assign(contents, doc);
1850
- return contents;
1851
- };
1852
- exports.de_GetSbomExportCommand = de_GetSbomExportCommand;
1853
- const de_GetSbomExportCommandError = async (output, context) => {
1854
- const parsedOutput = {
1855
- ...output,
1856
- body: await parseErrorBody(output.body, context),
1857
- };
1858
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1859
- switch (errorCode) {
1860
- case "AccessDeniedException":
1861
- case "com.amazonaws.inspector2#AccessDeniedException":
1862
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1863
- case "InternalServerException":
1864
- case "com.amazonaws.inspector2#InternalServerException":
1865
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1866
- case "ResourceNotFoundException":
1867
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1868
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1869
- case "ThrottlingException":
1870
- case "com.amazonaws.inspector2#ThrottlingException":
1871
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1872
- case "ValidationException":
1873
- case "com.amazonaws.inspector2#ValidationException":
1874
- throw await de_ValidationExceptionRes(parsedOutput, context);
1875
- default:
1876
- const parsedBody = parsedOutput.body;
1877
- return throwDefaultError({
1878
- output,
1879
- parsedBody,
1880
- errorCode,
1881
- });
1882
- }
1883
- };
1884
- const de_ListAccountPermissionsCommand = async (output, context) => {
1885
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1886
- return de_ListAccountPermissionsCommandError(output, context);
1887
- }
1888
- const contents = (0, smithy_client_1.map)({
1889
- $metadata: deserializeMetadata(output),
1890
- });
1891
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1892
- const doc = (0, smithy_client_1.take)(data, {
1893
- nextToken: smithy_client_1.expectString,
1894
- permissions: smithy_client_1._json,
1895
- });
1896
- Object.assign(contents, doc);
1897
- return contents;
1898
- };
1899
- exports.de_ListAccountPermissionsCommand = de_ListAccountPermissionsCommand;
1900
- const de_ListAccountPermissionsCommandError = async (output, context) => {
1901
- const parsedOutput = {
1902
- ...output,
1903
- body: await parseErrorBody(output.body, context),
1904
- };
1905
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1906
- switch (errorCode) {
1907
- case "AccessDeniedException":
1908
- case "com.amazonaws.inspector2#AccessDeniedException":
1909
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1910
- case "InternalServerException":
1911
- case "com.amazonaws.inspector2#InternalServerException":
1912
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1913
- case "ThrottlingException":
1914
- case "com.amazonaws.inspector2#ThrottlingException":
1915
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1916
- case "ValidationException":
1917
- case "com.amazonaws.inspector2#ValidationException":
1918
- throw await de_ValidationExceptionRes(parsedOutput, context);
1919
- default:
1920
- const parsedBody = parsedOutput.body;
1921
- return throwDefaultError({
1922
- output,
1923
- parsedBody,
1924
- errorCode,
1925
- });
1926
- }
1927
- };
1928
- const de_ListCoverageCommand = async (output, context) => {
1929
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1930
- return de_ListCoverageCommandError(output, context);
1931
- }
1932
- const contents = (0, smithy_client_1.map)({
1933
- $metadata: deserializeMetadata(output),
1934
- });
1935
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1936
- const doc = (0, smithy_client_1.take)(data, {
1937
- coveredResources: (_) => de_CoveredResources(_, context),
1938
- nextToken: smithy_client_1.expectString,
1939
- });
1940
- Object.assign(contents, doc);
1941
- return contents;
1942
- };
1943
- exports.de_ListCoverageCommand = de_ListCoverageCommand;
1944
- const de_ListCoverageCommandError = async (output, context) => {
1945
- const parsedOutput = {
1946
- ...output,
1947
- body: await parseErrorBody(output.body, context),
1948
- };
1949
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1950
- switch (errorCode) {
1951
- case "InternalServerException":
1952
- case "com.amazonaws.inspector2#InternalServerException":
1953
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1954
- case "ThrottlingException":
1955
- case "com.amazonaws.inspector2#ThrottlingException":
1956
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1957
- case "ValidationException":
1958
- case "com.amazonaws.inspector2#ValidationException":
1959
- throw await de_ValidationExceptionRes(parsedOutput, context);
1960
- default:
1961
- const parsedBody = parsedOutput.body;
1962
- return throwDefaultError({
1963
- output,
1964
- parsedBody,
1965
- errorCode,
1966
- });
1967
- }
1968
- };
1969
- const de_ListCoverageStatisticsCommand = async (output, context) => {
1970
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1971
- return de_ListCoverageStatisticsCommandError(output, context);
1972
- }
1973
- const contents = (0, smithy_client_1.map)({
1974
- $metadata: deserializeMetadata(output),
1975
- });
1976
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1977
- const doc = (0, smithy_client_1.take)(data, {
1978
- countsByGroup: smithy_client_1._json,
1979
- nextToken: smithy_client_1.expectString,
1980
- totalCounts: smithy_client_1.expectLong,
1981
- });
1982
- Object.assign(contents, doc);
1983
- return contents;
1984
- };
1985
- exports.de_ListCoverageStatisticsCommand = de_ListCoverageStatisticsCommand;
1986
- const de_ListCoverageStatisticsCommandError = async (output, context) => {
1987
- const parsedOutput = {
1988
- ...output,
1989
- body: await parseErrorBody(output.body, context),
1990
- };
1991
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1992
- switch (errorCode) {
1993
- case "InternalServerException":
1994
- case "com.amazonaws.inspector2#InternalServerException":
1995
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1996
- case "ThrottlingException":
1997
- case "com.amazonaws.inspector2#ThrottlingException":
1998
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1999
- case "ValidationException":
2000
- case "com.amazonaws.inspector2#ValidationException":
2001
- throw await de_ValidationExceptionRes(parsedOutput, context);
2002
- default:
2003
- const parsedBody = parsedOutput.body;
2004
- return throwDefaultError({
2005
- output,
2006
- parsedBody,
2007
- errorCode,
2008
- });
2009
- }
2010
- };
2011
- const de_ListDelegatedAdminAccountsCommand = async (output, context) => {
2012
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2013
- return de_ListDelegatedAdminAccountsCommandError(output, context);
2014
- }
2015
- const contents = (0, smithy_client_1.map)({
2016
- $metadata: deserializeMetadata(output),
2017
- });
2018
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2019
- const doc = (0, smithy_client_1.take)(data, {
2020
- delegatedAdminAccounts: smithy_client_1._json,
2021
- nextToken: smithy_client_1.expectString,
2022
- });
2023
- Object.assign(contents, doc);
2024
- return contents;
2025
- };
2026
- exports.de_ListDelegatedAdminAccountsCommand = de_ListDelegatedAdminAccountsCommand;
2027
- const de_ListDelegatedAdminAccountsCommandError = async (output, context) => {
2028
- const parsedOutput = {
2029
- ...output,
2030
- body: await parseErrorBody(output.body, context),
2031
- };
2032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2033
- switch (errorCode) {
2034
- case "AccessDeniedException":
2035
- case "com.amazonaws.inspector2#AccessDeniedException":
2036
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2037
- case "InternalServerException":
2038
- case "com.amazonaws.inspector2#InternalServerException":
2039
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2040
- case "ThrottlingException":
2041
- case "com.amazonaws.inspector2#ThrottlingException":
2042
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2043
- case "ValidationException":
2044
- case "com.amazonaws.inspector2#ValidationException":
2045
- throw await de_ValidationExceptionRes(parsedOutput, context);
2046
- default:
2047
- const parsedBody = parsedOutput.body;
2048
- return throwDefaultError({
2049
- output,
2050
- parsedBody,
2051
- errorCode,
2052
- });
2053
- }
2054
- };
2055
- const de_ListFiltersCommand = async (output, context) => {
2056
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2057
- return de_ListFiltersCommandError(output, context);
2058
- }
2059
- const contents = (0, smithy_client_1.map)({
2060
- $metadata: deserializeMetadata(output),
2061
- });
2062
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2063
- const doc = (0, smithy_client_1.take)(data, {
2064
- filters: (_) => de_FilterList(_, context),
2065
- nextToken: smithy_client_1.expectString,
2066
- });
2067
- Object.assign(contents, doc);
2068
- return contents;
2069
- };
2070
- exports.de_ListFiltersCommand = de_ListFiltersCommand;
2071
- const de_ListFiltersCommandError = async (output, context) => {
2072
- const parsedOutput = {
2073
- ...output,
2074
- body: await parseErrorBody(output.body, context),
2075
- };
2076
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2077
- switch (errorCode) {
2078
- case "AccessDeniedException":
2079
- case "com.amazonaws.inspector2#AccessDeniedException":
2080
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2081
- case "InternalServerException":
2082
- case "com.amazonaws.inspector2#InternalServerException":
2083
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2084
- case "ThrottlingException":
2085
- case "com.amazonaws.inspector2#ThrottlingException":
2086
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2087
- case "ValidationException":
2088
- case "com.amazonaws.inspector2#ValidationException":
2089
- throw await de_ValidationExceptionRes(parsedOutput, context);
2090
- default:
2091
- const parsedBody = parsedOutput.body;
2092
- return throwDefaultError({
2093
- output,
2094
- parsedBody,
2095
- errorCode,
2096
- });
2097
- }
2098
- };
2099
- const de_ListFindingAggregationsCommand = async (output, context) => {
2100
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2101
- return de_ListFindingAggregationsCommandError(output, context);
2102
- }
2103
- const contents = (0, smithy_client_1.map)({
2104
- $metadata: deserializeMetadata(output),
2105
- });
2106
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2107
- const doc = (0, smithy_client_1.take)(data, {
2108
- aggregationType: smithy_client_1.expectString,
2109
- nextToken: smithy_client_1.expectString,
2110
- responses: (_) => de_AggregationResponseList(_, context),
2111
- });
2112
- Object.assign(contents, doc);
2113
- return contents;
2114
- };
2115
- exports.de_ListFindingAggregationsCommand = de_ListFindingAggregationsCommand;
2116
- const de_ListFindingAggregationsCommandError = async (output, context) => {
2117
- const parsedOutput = {
2118
- ...output,
2119
- body: await parseErrorBody(output.body, context),
2120
- };
2121
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2122
- switch (errorCode) {
2123
- case "InternalServerException":
2124
- case "com.amazonaws.inspector2#InternalServerException":
2125
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2126
- case "ThrottlingException":
2127
- case "com.amazonaws.inspector2#ThrottlingException":
2128
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2129
- case "ValidationException":
2130
- case "com.amazonaws.inspector2#ValidationException":
2131
- throw await de_ValidationExceptionRes(parsedOutput, context);
2132
- default:
2133
- const parsedBody = parsedOutput.body;
2134
- return throwDefaultError({
2135
- output,
2136
- parsedBody,
2137
- errorCode,
2138
- });
2139
- }
2140
- };
2141
- const de_ListFindingsCommand = async (output, context) => {
2142
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2143
- return de_ListFindingsCommandError(output, context);
2144
- }
2145
- const contents = (0, smithy_client_1.map)({
2146
- $metadata: deserializeMetadata(output),
2147
- });
2148
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2149
- const doc = (0, smithy_client_1.take)(data, {
2150
- findings: (_) => de_FindingList(_, context),
2151
- nextToken: smithy_client_1.expectString,
2152
- });
2153
- Object.assign(contents, doc);
2154
- return contents;
2155
- };
2156
- exports.de_ListFindingsCommand = de_ListFindingsCommand;
2157
- const de_ListFindingsCommandError = async (output, context) => {
2158
- const parsedOutput = {
2159
- ...output,
2160
- body: await parseErrorBody(output.body, context),
2161
- };
2162
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2163
- switch (errorCode) {
2164
- case "InternalServerException":
2165
- case "com.amazonaws.inspector2#InternalServerException":
2166
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2167
- case "ThrottlingException":
2168
- case "com.amazonaws.inspector2#ThrottlingException":
2169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2170
- case "ValidationException":
2171
- case "com.amazonaws.inspector2#ValidationException":
2172
- throw await de_ValidationExceptionRes(parsedOutput, context);
2173
- default:
2174
- const parsedBody = parsedOutput.body;
2175
- return throwDefaultError({
2176
- output,
2177
- parsedBody,
2178
- errorCode,
2179
- });
2180
- }
2181
- };
2182
- const de_ListMembersCommand = async (output, context) => {
2183
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2184
- return de_ListMembersCommandError(output, context);
2185
- }
2186
- const contents = (0, smithy_client_1.map)({
2187
- $metadata: deserializeMetadata(output),
2188
- });
2189
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2190
- const doc = (0, smithy_client_1.take)(data, {
2191
- members: (_) => de_MemberList(_, context),
2192
- nextToken: smithy_client_1.expectString,
2193
- });
2194
- Object.assign(contents, doc);
2195
- return contents;
2196
- };
2197
- exports.de_ListMembersCommand = de_ListMembersCommand;
2198
- const de_ListMembersCommandError = async (output, context) => {
2199
- const parsedOutput = {
2200
- ...output,
2201
- body: await parseErrorBody(output.body, context),
2202
- };
2203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2204
- switch (errorCode) {
2205
- case "AccessDeniedException":
2206
- case "com.amazonaws.inspector2#AccessDeniedException":
2207
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2208
- case "InternalServerException":
2209
- case "com.amazonaws.inspector2#InternalServerException":
2210
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2211
- case "ThrottlingException":
2212
- case "com.amazonaws.inspector2#ThrottlingException":
2213
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2214
- case "ValidationException":
2215
- case "com.amazonaws.inspector2#ValidationException":
2216
- throw await de_ValidationExceptionRes(parsedOutput, context);
2217
- default:
2218
- const parsedBody = parsedOutput.body;
2219
- return throwDefaultError({
2220
- output,
2221
- parsedBody,
2222
- errorCode,
2223
- });
2224
- }
2225
- };
2226
- const de_ListTagsForResourceCommand = async (output, context) => {
2227
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2228
- return de_ListTagsForResourceCommandError(output, context);
2229
- }
2230
- const contents = (0, smithy_client_1.map)({
2231
- $metadata: deserializeMetadata(output),
2232
- });
2233
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2234
- const doc = (0, smithy_client_1.take)(data, {
2235
- tags: smithy_client_1._json,
2236
- });
2237
- Object.assign(contents, doc);
2238
- return contents;
2239
- };
2240
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
2241
- const de_ListTagsForResourceCommandError = async (output, context) => {
2242
- const parsedOutput = {
2243
- ...output,
2244
- body: await parseErrorBody(output.body, context),
2245
- };
2246
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2247
- switch (errorCode) {
2248
- case "InternalServerException":
2249
- case "com.amazonaws.inspector2#InternalServerException":
2250
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2251
- case "ResourceNotFoundException":
2252
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2253
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2254
- case "ThrottlingException":
2255
- case "com.amazonaws.inspector2#ThrottlingException":
2256
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2257
- case "ValidationException":
2258
- case "com.amazonaws.inspector2#ValidationException":
2259
- throw await de_ValidationExceptionRes(parsedOutput, context);
2260
- default:
2261
- const parsedBody = parsedOutput.body;
2262
- return throwDefaultError({
2263
- output,
2264
- parsedBody,
2265
- errorCode,
2266
- });
2267
- }
2268
- };
2269
- const de_ListUsageTotalsCommand = async (output, context) => {
2270
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2271
- return de_ListUsageTotalsCommandError(output, context);
2272
- }
2273
- const contents = (0, smithy_client_1.map)({
2274
- $metadata: deserializeMetadata(output),
2275
- });
2276
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2277
- const doc = (0, smithy_client_1.take)(data, {
2278
- nextToken: smithy_client_1.expectString,
2279
- totals: (_) => de_UsageTotalList(_, context),
2280
- });
2281
- Object.assign(contents, doc);
2282
- return contents;
2283
- };
2284
- exports.de_ListUsageTotalsCommand = de_ListUsageTotalsCommand;
2285
- const de_ListUsageTotalsCommandError = async (output, context) => {
2286
- const parsedOutput = {
2287
- ...output,
2288
- body: await parseErrorBody(output.body, context),
2289
- };
2290
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2291
- switch (errorCode) {
2292
- case "AccessDeniedException":
2293
- case "com.amazonaws.inspector2#AccessDeniedException":
2294
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2295
- case "InternalServerException":
2296
- case "com.amazonaws.inspector2#InternalServerException":
2297
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2298
- case "ThrottlingException":
2299
- case "com.amazonaws.inspector2#ThrottlingException":
2300
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2301
- case "ValidationException":
2302
- case "com.amazonaws.inspector2#ValidationException":
2303
- throw await de_ValidationExceptionRes(parsedOutput, context);
2304
- default:
2305
- const parsedBody = parsedOutput.body;
2306
- return throwDefaultError({
2307
- output,
2308
- parsedBody,
2309
- errorCode,
2310
- });
2311
- }
2312
- };
2313
- const de_ResetEncryptionKeyCommand = async (output, context) => {
2314
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2315
- return de_ResetEncryptionKeyCommandError(output, context);
2316
- }
2317
- const contents = (0, smithy_client_1.map)({
2318
- $metadata: deserializeMetadata(output),
2319
- });
2320
- await (0, smithy_client_1.collectBody)(output.body, context);
2321
- return contents;
2322
- };
2323
- exports.de_ResetEncryptionKeyCommand = de_ResetEncryptionKeyCommand;
2324
- const de_ResetEncryptionKeyCommandError = async (output, context) => {
2325
- const parsedOutput = {
2326
- ...output,
2327
- body: await parseErrorBody(output.body, context),
2328
- };
2329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2330
- switch (errorCode) {
2331
- case "AccessDeniedException":
2332
- case "com.amazonaws.inspector2#AccessDeniedException":
2333
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2334
- case "InternalServerException":
2335
- case "com.amazonaws.inspector2#InternalServerException":
2336
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2337
- case "ResourceNotFoundException":
2338
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2339
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2340
- case "ThrottlingException":
2341
- case "com.amazonaws.inspector2#ThrottlingException":
2342
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2343
- case "ValidationException":
2344
- case "com.amazonaws.inspector2#ValidationException":
2345
- throw await de_ValidationExceptionRes(parsedOutput, context);
2346
- default:
2347
- const parsedBody = parsedOutput.body;
2348
- return throwDefaultError({
2349
- output,
2350
- parsedBody,
2351
- errorCode,
2352
- });
2353
- }
2354
- };
2355
- const de_SearchVulnerabilitiesCommand = async (output, context) => {
2356
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2357
- return de_SearchVulnerabilitiesCommandError(output, context);
2358
- }
2359
- const contents = (0, smithy_client_1.map)({
2360
- $metadata: deserializeMetadata(output),
2361
- });
2362
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2363
- const doc = (0, smithy_client_1.take)(data, {
2364
- nextToken: smithy_client_1.expectString,
2365
- vulnerabilities: (_) => de_Vulnerabilities(_, context),
2366
- });
2367
- Object.assign(contents, doc);
2368
- return contents;
2369
- };
2370
- exports.de_SearchVulnerabilitiesCommand = de_SearchVulnerabilitiesCommand;
2371
- const de_SearchVulnerabilitiesCommandError = async (output, context) => {
2372
- const parsedOutput = {
2373
- ...output,
2374
- body: await parseErrorBody(output.body, context),
2375
- };
2376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2377
- switch (errorCode) {
2378
- case "AccessDeniedException":
2379
- case "com.amazonaws.inspector2#AccessDeniedException":
2380
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2381
- case "InternalServerException":
2382
- case "com.amazonaws.inspector2#InternalServerException":
2383
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2384
- case "ThrottlingException":
2385
- case "com.amazonaws.inspector2#ThrottlingException":
2386
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2387
- case "ValidationException":
2388
- case "com.amazonaws.inspector2#ValidationException":
2389
- throw await de_ValidationExceptionRes(parsedOutput, context);
2390
- default:
2391
- const parsedBody = parsedOutput.body;
2392
- return throwDefaultError({
2393
- output,
2394
- parsedBody,
2395
- errorCode,
2396
- });
2397
- }
2398
- };
2399
- const de_TagResourceCommand = async (output, context) => {
2400
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2401
- return de_TagResourceCommandError(output, context);
2402
- }
2403
- const contents = (0, smithy_client_1.map)({
2404
- $metadata: deserializeMetadata(output),
2405
- });
2406
- await (0, smithy_client_1.collectBody)(output.body, context);
2407
- return contents;
2408
- };
2409
- exports.de_TagResourceCommand = de_TagResourceCommand;
2410
- const de_TagResourceCommandError = async (output, context) => {
2411
- const parsedOutput = {
2412
- ...output,
2413
- body: await parseErrorBody(output.body, context),
2414
- };
2415
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2416
- switch (errorCode) {
2417
- case "BadRequestException":
2418
- case "com.amazonaws.inspector2#BadRequestException":
2419
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2420
- case "InternalServerException":
2421
- case "com.amazonaws.inspector2#InternalServerException":
2422
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2423
- case "ResourceNotFoundException":
2424
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2426
- case "ThrottlingException":
2427
- case "com.amazonaws.inspector2#ThrottlingException":
2428
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2429
- case "ValidationException":
2430
- case "com.amazonaws.inspector2#ValidationException":
2431
- throw await de_ValidationExceptionRes(parsedOutput, context);
2432
- default:
2433
- const parsedBody = parsedOutput.body;
2434
- return throwDefaultError({
2435
- output,
2436
- parsedBody,
2437
- errorCode,
2438
- });
2439
- }
2440
- };
2441
- const de_UntagResourceCommand = async (output, context) => {
2442
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2443
- return de_UntagResourceCommandError(output, context);
2444
- }
2445
- const contents = (0, smithy_client_1.map)({
2446
- $metadata: deserializeMetadata(output),
2447
- });
2448
- await (0, smithy_client_1.collectBody)(output.body, context);
2449
- return contents;
2450
- };
2451
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2452
- const de_UntagResourceCommandError = async (output, context) => {
2453
- const parsedOutput = {
2454
- ...output,
2455
- body: await parseErrorBody(output.body, context),
2456
- };
2457
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2458
- switch (errorCode) {
2459
- case "InternalServerException":
2460
- case "com.amazonaws.inspector2#InternalServerException":
2461
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2462
- case "ResourceNotFoundException":
2463
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2464
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2465
- case "ThrottlingException":
2466
- case "com.amazonaws.inspector2#ThrottlingException":
2467
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2468
- case "ValidationException":
2469
- case "com.amazonaws.inspector2#ValidationException":
2470
- throw await de_ValidationExceptionRes(parsedOutput, context);
2471
- default:
2472
- const parsedBody = parsedOutput.body;
2473
- return throwDefaultError({
2474
- output,
2475
- parsedBody,
2476
- errorCode,
2477
- });
2478
- }
2479
- };
2480
- const de_UpdateConfigurationCommand = async (output, context) => {
2481
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2482
- return de_UpdateConfigurationCommandError(output, context);
2483
- }
2484
- const contents = (0, smithy_client_1.map)({
2485
- $metadata: deserializeMetadata(output),
2486
- });
2487
- await (0, smithy_client_1.collectBody)(output.body, context);
2488
- return contents;
2489
- };
2490
- exports.de_UpdateConfigurationCommand = de_UpdateConfigurationCommand;
2491
- const de_UpdateConfigurationCommandError = async (output, context) => {
2492
- const parsedOutput = {
2493
- ...output,
2494
- body: await parseErrorBody(output.body, context),
2495
- };
2496
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2497
- switch (errorCode) {
2498
- case "AccessDeniedException":
2499
- case "com.amazonaws.inspector2#AccessDeniedException":
2500
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2501
- case "InternalServerException":
2502
- case "com.amazonaws.inspector2#InternalServerException":
2503
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2504
- case "ThrottlingException":
2505
- case "com.amazonaws.inspector2#ThrottlingException":
2506
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2507
- case "ValidationException":
2508
- case "com.amazonaws.inspector2#ValidationException":
2509
- throw await de_ValidationExceptionRes(parsedOutput, context);
2510
- default:
2511
- const parsedBody = parsedOutput.body;
2512
- return throwDefaultError({
2513
- output,
2514
- parsedBody,
2515
- errorCode,
2516
- });
2517
- }
2518
- };
2519
- const de_UpdateEc2DeepInspectionConfigurationCommand = async (output, context) => {
2520
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2521
- return de_UpdateEc2DeepInspectionConfigurationCommandError(output, context);
2522
- }
2523
- const contents = (0, smithy_client_1.map)({
2524
- $metadata: deserializeMetadata(output),
2525
- });
2526
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2527
- const doc = (0, smithy_client_1.take)(data, {
2528
- errorMessage: smithy_client_1.expectString,
2529
- orgPackagePaths: smithy_client_1._json,
2530
- packagePaths: smithy_client_1._json,
2531
- status: smithy_client_1.expectString,
2532
- });
2533
- Object.assign(contents, doc);
2534
- return contents;
2535
- };
2536
- exports.de_UpdateEc2DeepInspectionConfigurationCommand = de_UpdateEc2DeepInspectionConfigurationCommand;
2537
- const de_UpdateEc2DeepInspectionConfigurationCommandError = async (output, context) => {
2538
- const parsedOutput = {
2539
- ...output,
2540
- body: await parseErrorBody(output.body, context),
2541
- };
2542
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2543
- switch (errorCode) {
2544
- case "AccessDeniedException":
2545
- case "com.amazonaws.inspector2#AccessDeniedException":
2546
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2547
- case "InternalServerException":
2548
- case "com.amazonaws.inspector2#InternalServerException":
2549
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2550
- case "ThrottlingException":
2551
- case "com.amazonaws.inspector2#ThrottlingException":
2552
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2553
- case "ValidationException":
2554
- case "com.amazonaws.inspector2#ValidationException":
2555
- throw await de_ValidationExceptionRes(parsedOutput, context);
2556
- default:
2557
- const parsedBody = parsedOutput.body;
2558
- return throwDefaultError({
2559
- output,
2560
- parsedBody,
2561
- errorCode,
2562
- });
2563
- }
2564
- };
2565
- const de_UpdateEncryptionKeyCommand = async (output, context) => {
2566
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2567
- return de_UpdateEncryptionKeyCommandError(output, context);
2568
- }
2569
- const contents = (0, smithy_client_1.map)({
2570
- $metadata: deserializeMetadata(output),
2571
- });
2572
- await (0, smithy_client_1.collectBody)(output.body, context);
2573
- return contents;
2574
- };
2575
- exports.de_UpdateEncryptionKeyCommand = de_UpdateEncryptionKeyCommand;
2576
- const de_UpdateEncryptionKeyCommandError = async (output, context) => {
2577
- const parsedOutput = {
2578
- ...output,
2579
- body: await parseErrorBody(output.body, context),
2580
- };
2581
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2582
- switch (errorCode) {
2583
- case "AccessDeniedException":
2584
- case "com.amazonaws.inspector2#AccessDeniedException":
2585
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2586
- case "InternalServerException":
2587
- case "com.amazonaws.inspector2#InternalServerException":
2588
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2589
- case "ResourceNotFoundException":
2590
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2591
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2592
- case "ThrottlingException":
2593
- case "com.amazonaws.inspector2#ThrottlingException":
2594
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2595
- case "ValidationException":
2596
- case "com.amazonaws.inspector2#ValidationException":
2597
- throw await de_ValidationExceptionRes(parsedOutput, context);
2598
- default:
2599
- const parsedBody = parsedOutput.body;
2600
- return throwDefaultError({
2601
- output,
2602
- parsedBody,
2603
- errorCode,
2604
- });
2605
- }
2606
- };
2607
- const de_UpdateFilterCommand = async (output, context) => {
2608
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2609
- return de_UpdateFilterCommandError(output, context);
2610
- }
2611
- const contents = (0, smithy_client_1.map)({
2612
- $metadata: deserializeMetadata(output),
2613
- });
2614
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2615
- const doc = (0, smithy_client_1.take)(data, {
2616
- arn: smithy_client_1.expectString,
2617
- });
2618
- Object.assign(contents, doc);
2619
- return contents;
2620
- };
2621
- exports.de_UpdateFilterCommand = de_UpdateFilterCommand;
2622
- const de_UpdateFilterCommandError = async (output, context) => {
2623
- const parsedOutput = {
2624
- ...output,
2625
- body: await parseErrorBody(output.body, context),
2626
- };
2627
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2628
- switch (errorCode) {
2629
- case "AccessDeniedException":
2630
- case "com.amazonaws.inspector2#AccessDeniedException":
2631
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2632
- case "InternalServerException":
2633
- case "com.amazonaws.inspector2#InternalServerException":
2634
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2635
- case "ResourceNotFoundException":
2636
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2637
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2638
- case "ThrottlingException":
2639
- case "com.amazonaws.inspector2#ThrottlingException":
2640
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2641
- case "ValidationException":
2642
- case "com.amazonaws.inspector2#ValidationException":
2643
- throw await de_ValidationExceptionRes(parsedOutput, context);
2644
- default:
2645
- const parsedBody = parsedOutput.body;
2646
- return throwDefaultError({
2647
- output,
2648
- parsedBody,
2649
- errorCode,
2650
- });
2651
- }
2652
- };
2653
- const de_UpdateOrganizationConfigurationCommand = async (output, context) => {
2654
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2655
- return de_UpdateOrganizationConfigurationCommandError(output, context);
2656
- }
2657
- const contents = (0, smithy_client_1.map)({
2658
- $metadata: deserializeMetadata(output),
2659
- });
2660
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2661
- const doc = (0, smithy_client_1.take)(data, {
2662
- autoEnable: smithy_client_1._json,
2663
- });
2664
- Object.assign(contents, doc);
2665
- return contents;
2666
- };
2667
- exports.de_UpdateOrganizationConfigurationCommand = de_UpdateOrganizationConfigurationCommand;
2668
- const de_UpdateOrganizationConfigurationCommandError = async (output, context) => {
2669
- const parsedOutput = {
2670
- ...output,
2671
- body: await parseErrorBody(output.body, context),
2672
- };
2673
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2674
- switch (errorCode) {
2675
- case "AccessDeniedException":
2676
- case "com.amazonaws.inspector2#AccessDeniedException":
2677
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2678
- case "InternalServerException":
2679
- case "com.amazonaws.inspector2#InternalServerException":
2680
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2681
- case "ThrottlingException":
2682
- case "com.amazonaws.inspector2#ThrottlingException":
2683
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2684
- case "ValidationException":
2685
- case "com.amazonaws.inspector2#ValidationException":
2686
- throw await de_ValidationExceptionRes(parsedOutput, context);
2687
- default:
2688
- const parsedBody = parsedOutput.body;
2689
- return throwDefaultError({
2690
- output,
2691
- parsedBody,
2692
- errorCode,
2693
- });
2694
- }
2695
- };
2696
- const de_UpdateOrgEc2DeepInspectionConfigurationCommand = async (output, context) => {
2697
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2698
- return de_UpdateOrgEc2DeepInspectionConfigurationCommandError(output, context);
2699
- }
2700
- const contents = (0, smithy_client_1.map)({
2701
- $metadata: deserializeMetadata(output),
2702
- });
2703
- await (0, smithy_client_1.collectBody)(output.body, context);
2704
- return contents;
2705
- };
2706
- exports.de_UpdateOrgEc2DeepInspectionConfigurationCommand = de_UpdateOrgEc2DeepInspectionConfigurationCommand;
2707
- const de_UpdateOrgEc2DeepInspectionConfigurationCommandError = async (output, context) => {
2708
- const parsedOutput = {
2709
- ...output,
2710
- body: await parseErrorBody(output.body, context),
2711
- };
2712
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2713
- switch (errorCode) {
2714
- case "AccessDeniedException":
2715
- case "com.amazonaws.inspector2#AccessDeniedException":
2716
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2717
- case "InternalServerException":
2718
- case "com.amazonaws.inspector2#InternalServerException":
2719
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2720
- case "ThrottlingException":
2721
- case "com.amazonaws.inspector2#ThrottlingException":
2722
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2723
- case "ValidationException":
2724
- case "com.amazonaws.inspector2#ValidationException":
2725
- throw await de_ValidationExceptionRes(parsedOutput, context);
2726
- default:
2727
- const parsedBody = parsedOutput.body;
2728
- return throwDefaultError({
2729
- output,
2730
- parsedBody,
2731
- errorCode,
2732
- });
2733
- }
2734
- };
2735
- const throwDefaultError = (0, smithy_client_1.withBaseException)(Inspector2ServiceException_1.Inspector2ServiceException);
2736
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2737
- const contents = (0, smithy_client_1.map)({});
2738
- const data = parsedOutput.body;
2739
- const doc = (0, smithy_client_1.take)(data, {
2740
- message: smithy_client_1.expectString,
2741
- });
2742
- Object.assign(contents, doc);
2743
- const exception = new models_0_1.AccessDeniedException({
2744
- $metadata: deserializeMetadata(parsedOutput),
2745
- ...contents,
2746
- });
2747
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2748
- };
2749
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2750
- const contents = (0, smithy_client_1.map)({});
2751
- const data = parsedOutput.body;
2752
- const doc = (0, smithy_client_1.take)(data, {
2753
- message: smithy_client_1.expectString,
2754
- });
2755
- Object.assign(contents, doc);
2756
- const exception = new models_0_1.BadRequestException({
2757
- $metadata: deserializeMetadata(parsedOutput),
2758
- ...contents,
2759
- });
2760
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2761
- };
2762
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2763
- const contents = (0, smithy_client_1.map)({});
2764
- const data = parsedOutput.body;
2765
- const doc = (0, smithy_client_1.take)(data, {
2766
- message: smithy_client_1.expectString,
2767
- resourceId: smithy_client_1.expectString,
2768
- resourceType: smithy_client_1.expectString,
2769
- });
2770
- Object.assign(contents, doc);
2771
- const exception = new models_0_1.ConflictException({
2772
- $metadata: deserializeMetadata(parsedOutput),
2773
- ...contents,
2774
- });
2775
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2776
- };
2777
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2778
- const contents = (0, smithy_client_1.map)({
2779
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2780
- });
2781
- const data = parsedOutput.body;
2782
- const doc = (0, smithy_client_1.take)(data, {
2783
- message: smithy_client_1.expectString,
2784
- });
2785
- Object.assign(contents, doc);
2786
- const exception = new models_0_1.InternalServerException({
2787
- $metadata: deserializeMetadata(parsedOutput),
2788
- ...contents,
2789
- });
2790
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2791
- };
2792
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2793
- const contents = (0, smithy_client_1.map)({});
2794
- const data = parsedOutput.body;
2795
- const doc = (0, smithy_client_1.take)(data, {
2796
- message: smithy_client_1.expectString,
2797
- });
2798
- Object.assign(contents, doc);
2799
- const exception = new models_0_1.ResourceNotFoundException({
2800
- $metadata: deserializeMetadata(parsedOutput),
2801
- ...contents,
2802
- });
2803
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2804
- };
2805
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2806
- const contents = (0, smithy_client_1.map)({});
2807
- const data = parsedOutput.body;
2808
- const doc = (0, smithy_client_1.take)(data, {
2809
- message: smithy_client_1.expectString,
2810
- resourceId: smithy_client_1.expectString,
2811
- });
2812
- Object.assign(contents, doc);
2813
- const exception = new models_0_1.ServiceQuotaExceededException({
2814
- $metadata: deserializeMetadata(parsedOutput),
2815
- ...contents,
2816
- });
2817
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2818
- };
2819
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2820
- const contents = (0, smithy_client_1.map)({
2821
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2822
- });
2823
- const data = parsedOutput.body;
2824
- const doc = (0, smithy_client_1.take)(data, {
2825
- message: smithy_client_1.expectString,
2826
- });
2827
- Object.assign(contents, doc);
2828
- const exception = new models_0_1.ThrottlingException({
2829
- $metadata: deserializeMetadata(parsedOutput),
2830
- ...contents,
2831
- });
2832
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2833
- };
2834
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2835
- const contents = (0, smithy_client_1.map)({});
2836
- const data = parsedOutput.body;
2837
- const doc = (0, smithy_client_1.take)(data, {
2838
- fields: smithy_client_1._json,
2839
- message: smithy_client_1.expectString,
2840
- reason: smithy_client_1.expectString,
2841
- });
2842
- Object.assign(contents, doc);
2843
- const exception = new models_0_1.ValidationException({
2844
- $metadata: deserializeMetadata(parsedOutput),
2845
- ...contents,
2846
- });
2847
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2848
- };
2849
- const se_CoverageDateFilter = (input, context) => {
2850
- return (0, smithy_client_1.take)(input, {
2851
- endInclusive: (_) => Math.round(_.getTime() / 1000),
2852
- startInclusive: (_) => Math.round(_.getTime() / 1000),
2853
- });
2854
- };
2855
- const se_CoverageDateFilterList = (input, context) => {
2856
- return input
2857
- .filter((e) => e != null)
2858
- .map((entry) => {
2859
- return se_CoverageDateFilter(entry, context);
2860
- });
2861
- };
2862
- const se_CoverageFilterCriteria = (input, context) => {
2863
- return (0, smithy_client_1.take)(input, {
2864
- accountId: smithy_client_1._json,
2865
- ec2InstanceTags: smithy_client_1._json,
2866
- ecrImageTags: smithy_client_1._json,
2867
- ecrRepositoryName: smithy_client_1._json,
2868
- lambdaFunctionName: smithy_client_1._json,
2869
- lambdaFunctionRuntime: smithy_client_1._json,
2870
- lambdaFunctionTags: smithy_client_1._json,
2871
- lastScannedAt: (_) => se_CoverageDateFilterList(_, context),
2872
- resourceId: smithy_client_1._json,
2873
- resourceType: smithy_client_1._json,
2874
- scanStatusCode: smithy_client_1._json,
2875
- scanStatusReason: smithy_client_1._json,
2876
- scanType: smithy_client_1._json,
2877
- });
2878
- };
2879
- const se_DateFilter = (input, context) => {
2880
- return (0, smithy_client_1.take)(input, {
2881
- endInclusive: (_) => Math.round(_.getTime() / 1000),
2882
- startInclusive: (_) => Math.round(_.getTime() / 1000),
2883
- });
2884
- };
2885
- const se_DateFilterList = (input, context) => {
2886
- return input
2887
- .filter((e) => e != null)
2888
- .map((entry) => {
2889
- return se_DateFilter(entry, context);
2890
- });
2891
- };
2892
- const se_FilterCriteria = (input, context) => {
2893
- return (0, smithy_client_1.take)(input, {
2894
- awsAccountId: smithy_client_1._json,
2895
- codeVulnerabilityDetectorName: smithy_client_1._json,
2896
- codeVulnerabilityDetectorTags: smithy_client_1._json,
2897
- codeVulnerabilityFilePath: smithy_client_1._json,
2898
- componentId: smithy_client_1._json,
2899
- componentType: smithy_client_1._json,
2900
- ec2InstanceImageId: smithy_client_1._json,
2901
- ec2InstanceSubnetId: smithy_client_1._json,
2902
- ec2InstanceVpcId: smithy_client_1._json,
2903
- ecrImageArchitecture: smithy_client_1._json,
2904
- ecrImageHash: smithy_client_1._json,
2905
- ecrImagePushedAt: (_) => se_DateFilterList(_, context),
2906
- ecrImageRegistry: smithy_client_1._json,
2907
- ecrImageRepositoryName: smithy_client_1._json,
2908
- ecrImageTags: smithy_client_1._json,
2909
- epssScore: (_) => se_NumberFilterList(_, context),
2910
- exploitAvailable: smithy_client_1._json,
2911
- findingArn: smithy_client_1._json,
2912
- findingStatus: smithy_client_1._json,
2913
- findingType: smithy_client_1._json,
2914
- firstObservedAt: (_) => se_DateFilterList(_, context),
2915
- fixAvailable: smithy_client_1._json,
2916
- inspectorScore: (_) => se_NumberFilterList(_, context),
2917
- lambdaFunctionExecutionRoleArn: smithy_client_1._json,
2918
- lambdaFunctionLastModifiedAt: (_) => se_DateFilterList(_, context),
2919
- lambdaFunctionLayers: smithy_client_1._json,
2920
- lambdaFunctionName: smithy_client_1._json,
2921
- lambdaFunctionRuntime: smithy_client_1._json,
2922
- lastObservedAt: (_) => se_DateFilterList(_, context),
2923
- networkProtocol: smithy_client_1._json,
2924
- portRange: smithy_client_1._json,
2925
- relatedVulnerabilities: smithy_client_1._json,
2926
- resourceId: smithy_client_1._json,
2927
- resourceTags: smithy_client_1._json,
2928
- resourceType: smithy_client_1._json,
2929
- severity: smithy_client_1._json,
2930
- title: smithy_client_1._json,
2931
- updatedAt: (_) => se_DateFilterList(_, context),
2932
- vendorSeverity: smithy_client_1._json,
2933
- vulnerabilityId: smithy_client_1._json,
2934
- vulnerabilitySource: smithy_client_1._json,
2935
- vulnerablePackages: (_) => se_PackageFilterList(_, context),
2936
- });
2937
- };
2938
- const se_NumberFilter = (input, context) => {
2939
- return (0, smithy_client_1.take)(input, {
2940
- lowerInclusive: smithy_client_1.serializeFloat,
2941
- upperInclusive: smithy_client_1.serializeFloat,
2942
- });
2943
- };
2944
- const se_NumberFilterList = (input, context) => {
2945
- return input
2946
- .filter((e) => e != null)
2947
- .map((entry) => {
2948
- return se_NumberFilter(entry, context);
2949
- });
2950
- };
2951
- const se_PackageFilter = (input, context) => {
2952
- return (0, smithy_client_1.take)(input, {
2953
- architecture: smithy_client_1._json,
2954
- epoch: (_) => se_NumberFilter(_, context),
2955
- name: smithy_client_1._json,
2956
- release: smithy_client_1._json,
2957
- sourceLambdaLayerArn: smithy_client_1._json,
2958
- sourceLayerHash: smithy_client_1._json,
2959
- version: smithy_client_1._json,
2960
- });
2961
- };
2962
- const se_PackageFilterList = (input, context) => {
2963
- return input
2964
- .filter((e) => e != null)
2965
- .map((entry) => {
2966
- return se_PackageFilter(entry, context);
2967
- });
2968
- };
2969
- const de_AggregationResponse = (output, context) => {
2970
- if (output.accountAggregation != null) {
2971
- return {
2972
- accountAggregation: (0, smithy_client_1._json)(output.accountAggregation),
2973
- };
2974
- }
2975
- if (output.amiAggregation != null) {
2976
- return {
2977
- amiAggregation: (0, smithy_client_1._json)(output.amiAggregation),
2978
- };
2979
- }
2980
- if (output.awsEcrContainerAggregation != null) {
2981
- return {
2982
- awsEcrContainerAggregation: (0, smithy_client_1._json)(output.awsEcrContainerAggregation),
2983
- };
2984
- }
2985
- if (output.ec2InstanceAggregation != null) {
2986
- return {
2987
- ec2InstanceAggregation: (0, smithy_client_1._json)(output.ec2InstanceAggregation),
2988
- };
2989
- }
2990
- if (output.findingTypeAggregation != null) {
2991
- return {
2992
- findingTypeAggregation: (0, smithy_client_1._json)(output.findingTypeAggregation),
2993
- };
2994
- }
2995
- if (output.imageLayerAggregation != null) {
2996
- return {
2997
- imageLayerAggregation: (0, smithy_client_1._json)(output.imageLayerAggregation),
2998
- };
2999
- }
3000
- if (output.lambdaFunctionAggregation != null) {
3001
- return {
3002
- lambdaFunctionAggregation: de_LambdaFunctionAggregationResponse(output.lambdaFunctionAggregation, context),
3003
- };
3004
- }
3005
- if (output.lambdaLayerAggregation != null) {
3006
- return {
3007
- lambdaLayerAggregation: (0, smithy_client_1._json)(output.lambdaLayerAggregation),
3008
- };
3009
- }
3010
- if (output.packageAggregation != null) {
3011
- return {
3012
- packageAggregation: (0, smithy_client_1._json)(output.packageAggregation),
3013
- };
3014
- }
3015
- if (output.repositoryAggregation != null) {
3016
- return {
3017
- repositoryAggregation: (0, smithy_client_1._json)(output.repositoryAggregation),
3018
- };
3019
- }
3020
- if (output.titleAggregation != null) {
3021
- return {
3022
- titleAggregation: (0, smithy_client_1._json)(output.titleAggregation),
3023
- };
3024
- }
3025
- return { $unknown: Object.entries(output)[0] };
3026
- };
3027
- const de_AggregationResponseList = (output, context) => {
3028
- const retVal = (output || [])
3029
- .filter((e) => e != null)
3030
- .map((entry) => {
3031
- return de_AggregationResponse((0, core_1.awsExpectUnion)(entry), context);
3032
- });
3033
- return retVal;
3034
- };
3035
- const de_AtigData = (output, context) => {
3036
- return (0, smithy_client_1.take)(output, {
3037
- firstSeen: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3038
- lastSeen: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3039
- targets: smithy_client_1._json,
3040
- ttps: smithy_client_1._json,
3041
- });
3042
- };
3043
- const de_AwsEc2InstanceDetails = (output, context) => {
3044
- return (0, smithy_client_1.take)(output, {
3045
- iamInstanceProfileArn: smithy_client_1.expectString,
3046
- imageId: smithy_client_1.expectString,
3047
- ipV4Addresses: smithy_client_1._json,
3048
- ipV6Addresses: smithy_client_1._json,
3049
- keyName: smithy_client_1.expectString,
3050
- launchedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3051
- platform: smithy_client_1.expectString,
3052
- subnetId: smithy_client_1.expectString,
3053
- type: smithy_client_1.expectString,
3054
- vpcId: smithy_client_1.expectString,
3055
- });
3056
- };
3057
- const de_AwsEcrContainerImageDetails = (output, context) => {
3058
- return (0, smithy_client_1.take)(output, {
3059
- architecture: smithy_client_1.expectString,
3060
- author: smithy_client_1.expectString,
3061
- imageHash: smithy_client_1.expectString,
3062
- imageTags: smithy_client_1._json,
3063
- platform: smithy_client_1.expectString,
3064
- pushedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3065
- registry: smithy_client_1.expectString,
3066
- repositoryName: smithy_client_1.expectString,
3067
- });
3068
- };
3069
- const de_AwsLambdaFunctionDetails = (output, context) => {
3070
- return (0, smithy_client_1.take)(output, {
3071
- architectures: smithy_client_1._json,
3072
- codeSha256: smithy_client_1.expectString,
3073
- executionRoleArn: smithy_client_1.expectString,
3074
- functionName: smithy_client_1.expectString,
3075
- lastModifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3076
- layers: smithy_client_1._json,
3077
- packageType: smithy_client_1.expectString,
3078
- runtime: smithy_client_1.expectString,
3079
- version: smithy_client_1.expectString,
3080
- vpcConfig: smithy_client_1._json,
3081
- });
3082
- };
3083
- const de_CisaData = (output, context) => {
3084
- return (0, smithy_client_1.take)(output, {
3085
- action: smithy_client_1.expectString,
3086
- dateAdded: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3087
- dateDue: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3088
- });
3089
- };
3090
- const de_CoveredResource = (output, context) => {
3091
- return (0, smithy_client_1.take)(output, {
3092
- accountId: smithy_client_1.expectString,
3093
- lastScannedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3094
- resourceId: smithy_client_1.expectString,
3095
- resourceMetadata: smithy_client_1._json,
3096
- resourceType: smithy_client_1.expectString,
3097
- scanStatus: smithy_client_1._json,
3098
- scanType: smithy_client_1.expectString,
3099
- });
3100
- };
3101
- const de_CoveredResources = (output, context) => {
3102
- const retVal = (output || [])
3103
- .filter((e) => e != null)
3104
- .map((entry) => {
3105
- return de_CoveredResource(entry, context);
3106
- });
3107
- return retVal;
3108
- };
3109
- const de_Cvss2 = (output, context) => {
3110
- return (0, smithy_client_1.take)(output, {
3111
- baseScore: smithy_client_1.limitedParseDouble,
3112
- scoringVector: smithy_client_1.expectString,
3113
- });
3114
- };
3115
- const de_Cvss3 = (output, context) => {
3116
- return (0, smithy_client_1.take)(output, {
3117
- baseScore: smithy_client_1.limitedParseDouble,
3118
- scoringVector: smithy_client_1.expectString,
3119
- });
3120
- };
3121
- const de_CvssScore = (output, context) => {
3122
- return (0, smithy_client_1.take)(output, {
3123
- baseScore: smithy_client_1.limitedParseDouble,
3124
- scoringVector: smithy_client_1.expectString,
3125
- source: smithy_client_1.expectString,
3126
- version: smithy_client_1.expectString,
3127
- });
3128
- };
3129
- const de_CvssScoreDetails = (output, context) => {
3130
- return (0, smithy_client_1.take)(output, {
3131
- adjustments: smithy_client_1._json,
3132
- cvssSource: smithy_client_1.expectString,
3133
- score: smithy_client_1.limitedParseDouble,
3134
- scoreSource: smithy_client_1.expectString,
3135
- scoringVector: smithy_client_1.expectString,
3136
- version: smithy_client_1.expectString,
3137
- });
3138
- };
3139
- const de_CvssScoreList = (output, context) => {
3140
- const retVal = (output || [])
3141
- .filter((e) => e != null)
3142
- .map((entry) => {
3143
- return de_CvssScore(entry, context);
3144
- });
3145
- return retVal;
3146
- };
3147
- const de_DateFilter = (output, context) => {
3148
- return (0, smithy_client_1.take)(output, {
3149
- endInclusive: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3150
- startInclusive: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3151
- });
3152
- };
3153
- const de_DateFilterList = (output, context) => {
3154
- const retVal = (output || [])
3155
- .filter((e) => e != null)
3156
- .map((entry) => {
3157
- return de_DateFilter(entry, context);
3158
- });
3159
- return retVal;
3160
- };
3161
- const de_EcrConfigurationState = (output, context) => {
3162
- return (0, smithy_client_1.take)(output, {
3163
- rescanDurationState: (_) => de_EcrRescanDurationState(_, context),
3164
- });
3165
- };
3166
- const de_EcrRescanDurationState = (output, context) => {
3167
- return (0, smithy_client_1.take)(output, {
3168
- rescanDuration: smithy_client_1.expectString,
3169
- status: smithy_client_1.expectString,
3170
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3171
- });
3172
- };
3173
- const de_Epss = (output, context) => {
3174
- return (0, smithy_client_1.take)(output, {
3175
- score: smithy_client_1.limitedParseDouble,
3176
- });
3177
- };
3178
- const de_EpssDetails = (output, context) => {
3179
- return (0, smithy_client_1.take)(output, {
3180
- score: smithy_client_1.limitedParseDouble,
3181
- });
3182
- };
3183
- const de_ExploitabilityDetails = (output, context) => {
3184
- return (0, smithy_client_1.take)(output, {
3185
- lastKnownExploitAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3186
- });
3187
- };
3188
- const de_ExploitObserved = (output, context) => {
3189
- return (0, smithy_client_1.take)(output, {
3190
- firstSeen: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3191
- lastSeen: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3192
- });
3193
- };
3194
- const de_Filter = (output, context) => {
3195
- return (0, smithy_client_1.take)(output, {
3196
- action: smithy_client_1.expectString,
3197
- arn: smithy_client_1.expectString,
3198
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3199
- criteria: (_) => de_FilterCriteria(_, context),
3200
- description: smithy_client_1.expectString,
3201
- name: smithy_client_1.expectString,
3202
- ownerId: smithy_client_1.expectString,
3203
- reason: smithy_client_1.expectString,
3204
- tags: smithy_client_1._json,
3205
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3206
- });
3207
- };
3208
- const de_FilterCriteria = (output, context) => {
3209
- return (0, smithy_client_1.take)(output, {
3210
- awsAccountId: smithy_client_1._json,
3211
- codeVulnerabilityDetectorName: smithy_client_1._json,
3212
- codeVulnerabilityDetectorTags: smithy_client_1._json,
3213
- codeVulnerabilityFilePath: smithy_client_1._json,
3214
- componentId: smithy_client_1._json,
3215
- componentType: smithy_client_1._json,
3216
- ec2InstanceImageId: smithy_client_1._json,
3217
- ec2InstanceSubnetId: smithy_client_1._json,
3218
- ec2InstanceVpcId: smithy_client_1._json,
3219
- ecrImageArchitecture: smithy_client_1._json,
3220
- ecrImageHash: smithy_client_1._json,
3221
- ecrImagePushedAt: (_) => de_DateFilterList(_, context),
3222
- ecrImageRegistry: smithy_client_1._json,
3223
- ecrImageRepositoryName: smithy_client_1._json,
3224
- ecrImageTags: smithy_client_1._json,
3225
- epssScore: (_) => de_NumberFilterList(_, context),
3226
- exploitAvailable: smithy_client_1._json,
3227
- findingArn: smithy_client_1._json,
3228
- findingStatus: smithy_client_1._json,
3229
- findingType: smithy_client_1._json,
3230
- firstObservedAt: (_) => de_DateFilterList(_, context),
3231
- fixAvailable: smithy_client_1._json,
3232
- inspectorScore: (_) => de_NumberFilterList(_, context),
3233
- lambdaFunctionExecutionRoleArn: smithy_client_1._json,
3234
- lambdaFunctionLastModifiedAt: (_) => de_DateFilterList(_, context),
3235
- lambdaFunctionLayers: smithy_client_1._json,
3236
- lambdaFunctionName: smithy_client_1._json,
3237
- lambdaFunctionRuntime: smithy_client_1._json,
3238
- lastObservedAt: (_) => de_DateFilterList(_, context),
3239
- networkProtocol: smithy_client_1._json,
3240
- portRange: smithy_client_1._json,
3241
- relatedVulnerabilities: smithy_client_1._json,
3242
- resourceId: smithy_client_1._json,
3243
- resourceTags: smithy_client_1._json,
3244
- resourceType: smithy_client_1._json,
3245
- severity: smithy_client_1._json,
3246
- title: smithy_client_1._json,
3247
- updatedAt: (_) => de_DateFilterList(_, context),
3248
- vendorSeverity: smithy_client_1._json,
3249
- vulnerabilityId: smithy_client_1._json,
3250
- vulnerabilitySource: smithy_client_1._json,
3251
- vulnerablePackages: (_) => de_PackageFilterList(_, context),
3252
- });
3253
- };
3254
- const de_FilterList = (output, context) => {
3255
- const retVal = (output || [])
3256
- .filter((e) => e != null)
3257
- .map((entry) => {
3258
- return de_Filter(entry, context);
3259
- });
3260
- return retVal;
3261
- };
3262
- const de_Finding = (output, context) => {
3263
- return (0, smithy_client_1.take)(output, {
3264
- awsAccountId: smithy_client_1.expectString,
3265
- codeVulnerabilityDetails: smithy_client_1._json,
3266
- description: smithy_client_1.expectString,
3267
- epss: (_) => de_EpssDetails(_, context),
3268
- exploitAvailable: smithy_client_1.expectString,
3269
- exploitabilityDetails: (_) => de_ExploitabilityDetails(_, context),
3270
- findingArn: smithy_client_1.expectString,
3271
- firstObservedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3272
- fixAvailable: smithy_client_1.expectString,
3273
- inspectorScore: smithy_client_1.limitedParseDouble,
3274
- inspectorScoreDetails: (_) => de_InspectorScoreDetails(_, context),
3275
- lastObservedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3276
- networkReachabilityDetails: smithy_client_1._json,
3277
- packageVulnerabilityDetails: (_) => de_PackageVulnerabilityDetails(_, context),
3278
- remediation: smithy_client_1._json,
3279
- resources: (_) => de_ResourceList(_, context),
3280
- severity: smithy_client_1.expectString,
3281
- status: smithy_client_1.expectString,
3282
- title: smithy_client_1.expectString,
3283
- type: smithy_client_1.expectString,
3284
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3285
- });
3286
- };
3287
- const de_FindingDetail = (output, context) => {
3288
- return (0, smithy_client_1.take)(output, {
3289
- cisaData: (_) => de_CisaData(_, context),
3290
- cwes: smithy_client_1._json,
3291
- epssScore: smithy_client_1.limitedParseDouble,
3292
- evidences: smithy_client_1._json,
3293
- exploitObserved: (_) => de_ExploitObserved(_, context),
3294
- findingArn: smithy_client_1.expectString,
3295
- referenceUrls: smithy_client_1._json,
3296
- riskScore: smithy_client_1.expectInt32,
3297
- tools: smithy_client_1._json,
3298
- ttps: smithy_client_1._json,
3299
- });
3300
- };
3301
- const de_FindingDetails = (output, context) => {
3302
- const retVal = (output || [])
3303
- .filter((e) => e != null)
3304
- .map((entry) => {
3305
- return de_FindingDetail(entry, context);
3306
- });
3307
- return retVal;
3308
- };
3309
- const de_FindingList = (output, context) => {
3310
- const retVal = (output || [])
3311
- .filter((e) => e != null)
3312
- .map((entry) => {
3313
- return de_Finding(entry, context);
3314
- });
3315
- return retVal;
3316
- };
3317
- const de_FreeTrialAccountInfo = (output, context) => {
3318
- return (0, smithy_client_1.take)(output, {
3319
- accountId: smithy_client_1.expectString,
3320
- freeTrialInfo: (_) => de_FreeTrialInfoList(_, context),
3321
- });
3322
- };
3323
- const de_FreeTrialAccountInfoList = (output, context) => {
3324
- const retVal = (output || [])
3325
- .filter((e) => e != null)
3326
- .map((entry) => {
3327
- return de_FreeTrialAccountInfo(entry, context);
3328
- });
3329
- return retVal;
3330
- };
3331
- const de_FreeTrialInfo = (output, context) => {
3332
- return (0, smithy_client_1.take)(output, {
3333
- end: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3334
- start: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3335
- status: smithy_client_1.expectString,
3336
- type: smithy_client_1.expectString,
3337
- });
3338
- };
3339
- const de_FreeTrialInfoList = (output, context) => {
3340
- const retVal = (output || [])
3341
- .filter((e) => e != null)
3342
- .map((entry) => {
3343
- return de_FreeTrialInfo(entry, context);
3344
- });
3345
- return retVal;
3346
- };
3347
- const de_InspectorScoreDetails = (output, context) => {
3348
- return (0, smithy_client_1.take)(output, {
3349
- adjustedCvss: (_) => de_CvssScoreDetails(_, context),
3350
- });
3351
- };
3352
- const de_LambdaFunctionAggregationResponse = (output, context) => {
3353
- return (0, smithy_client_1.take)(output, {
3354
- accountId: smithy_client_1.expectString,
3355
- functionName: smithy_client_1.expectString,
3356
- lambdaTags: smithy_client_1._json,
3357
- lastModifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3358
- resourceId: smithy_client_1.expectString,
3359
- runtime: smithy_client_1.expectString,
3360
- severityCounts: smithy_client_1._json,
3361
- });
3362
- };
3363
- const de_Member = (output, context) => {
3364
- return (0, smithy_client_1.take)(output, {
3365
- accountId: smithy_client_1.expectString,
3366
- delegatedAdminAccountId: smithy_client_1.expectString,
3367
- relationshipStatus: smithy_client_1.expectString,
3368
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3369
- });
3370
- };
3371
- const de_MemberList = (output, context) => {
3372
- const retVal = (output || [])
3373
- .filter((e) => e != null)
3374
- .map((entry) => {
3375
- return de_Member(entry, context);
3376
- });
3377
- return retVal;
3378
- };
3379
- const de_NumberFilter = (output, context) => {
3380
- return (0, smithy_client_1.take)(output, {
3381
- lowerInclusive: smithy_client_1.limitedParseDouble,
3382
- upperInclusive: smithy_client_1.limitedParseDouble,
3383
- });
3384
- };
3385
- const de_NumberFilterList = (output, context) => {
3386
- const retVal = (output || [])
3387
- .filter((e) => e != null)
3388
- .map((entry) => {
3389
- return de_NumberFilter(entry, context);
3390
- });
3391
- return retVal;
3392
- };
3393
- const de_PackageFilter = (output, context) => {
3394
- return (0, smithy_client_1.take)(output, {
3395
- architecture: smithy_client_1._json,
3396
- epoch: (_) => de_NumberFilter(_, context),
3397
- name: smithy_client_1._json,
3398
- release: smithy_client_1._json,
3399
- sourceLambdaLayerArn: smithy_client_1._json,
3400
- sourceLayerHash: smithy_client_1._json,
3401
- version: smithy_client_1._json,
3402
- });
3403
- };
3404
- const de_PackageFilterList = (output, context) => {
3405
- const retVal = (output || [])
3406
- .filter((e) => e != null)
3407
- .map((entry) => {
3408
- return de_PackageFilter(entry, context);
3409
- });
3410
- return retVal;
3411
- };
3412
- const de_PackageVulnerabilityDetails = (output, context) => {
3413
- return (0, smithy_client_1.take)(output, {
3414
- cvss: (_) => de_CvssScoreList(_, context),
3415
- referenceUrls: smithy_client_1._json,
3416
- relatedVulnerabilities: smithy_client_1._json,
3417
- source: smithy_client_1.expectString,
3418
- sourceUrl: smithy_client_1.expectString,
3419
- vendorCreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3420
- vendorSeverity: smithy_client_1.expectString,
3421
- vendorUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3422
- vulnerabilityId: smithy_client_1.expectString,
3423
- vulnerablePackages: smithy_client_1._json,
3424
- });
3425
- };
3426
- const de_Resource = (output, context) => {
3427
- return (0, smithy_client_1.take)(output, {
3428
- details: (_) => de_ResourceDetails(_, context),
3429
- id: smithy_client_1.expectString,
3430
- partition: smithy_client_1.expectString,
3431
- region: smithy_client_1.expectString,
3432
- tags: smithy_client_1._json,
3433
- type: smithy_client_1.expectString,
3434
- });
3435
- };
3436
- const de_ResourceDetails = (output, context) => {
3437
- return (0, smithy_client_1.take)(output, {
3438
- awsEc2Instance: (_) => de_AwsEc2InstanceDetails(_, context),
3439
- awsEcrContainerImage: (_) => de_AwsEcrContainerImageDetails(_, context),
3440
- awsLambdaFunction: (_) => de_AwsLambdaFunctionDetails(_, context),
3441
- });
3442
- };
3443
- const de_ResourceList = (output, context) => {
3444
- const retVal = (output || [])
3445
- .filter((e) => e != null)
3446
- .map((entry) => {
3447
- return de_Resource(entry, context);
3448
- });
3449
- return retVal;
3450
- };
3451
- const de_Usage = (output, context) => {
3452
- return (0, smithy_client_1.take)(output, {
3453
- currency: smithy_client_1.expectString,
3454
- estimatedMonthlyCost: smithy_client_1.limitedParseDouble,
3455
- total: smithy_client_1.limitedParseDouble,
3456
- type: smithy_client_1.expectString,
3457
- });
3458
- };
3459
- const de_UsageList = (output, context) => {
3460
- const retVal = (output || [])
3461
- .filter((e) => e != null)
3462
- .map((entry) => {
3463
- return de_Usage(entry, context);
3464
- });
3465
- return retVal;
3466
- };
3467
- const de_UsageTotal = (output, context) => {
3468
- return (0, smithy_client_1.take)(output, {
3469
- accountId: smithy_client_1.expectString,
3470
- usage: (_) => de_UsageList(_, context),
3471
- });
3472
- };
3473
- const de_UsageTotalList = (output, context) => {
3474
- const retVal = (output || [])
3475
- .filter((e) => e != null)
3476
- .map((entry) => {
3477
- return de_UsageTotal(entry, context);
3478
- });
3479
- return retVal;
3480
- };
3481
- const de_Vulnerabilities = (output, context) => {
3482
- const retVal = (output || [])
3483
- .filter((e) => e != null)
3484
- .map((entry) => {
3485
- return de_Vulnerability(entry, context);
3486
- });
3487
- return retVal;
3488
- };
3489
- const de_Vulnerability = (output, context) => {
3490
- return (0, smithy_client_1.take)(output, {
3491
- atigData: (_) => de_AtigData(_, context),
3492
- cisaData: (_) => de_CisaData(_, context),
3493
- cvss2: (_) => de_Cvss2(_, context),
3494
- cvss3: (_) => de_Cvss3(_, context),
3495
- cwes: smithy_client_1._json,
3496
- description: smithy_client_1.expectString,
3497
- detectionPlatforms: smithy_client_1._json,
3498
- epss: (_) => de_Epss(_, context),
3499
- exploitObserved: (_) => de_ExploitObserved(_, context),
3500
- id: smithy_client_1.expectString,
3501
- referenceUrls: smithy_client_1._json,
3502
- relatedVulnerabilities: smithy_client_1._json,
3503
- source: smithy_client_1.expectString,
3504
- sourceUrl: smithy_client_1.expectString,
3505
- vendorCreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3506
- vendorSeverity: smithy_client_1.expectString,
3507
- vendorUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3508
- });
3509
- };
3510
- const deserializeMetadata = (output) => ({
3511
- httpStatusCode: output.statusCode,
3512
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3513
- extendedRequestId: output.headers["x-amz-id-2"],
3514
- cfId: output.headers["x-amz-cf-id"],
3515
- });
3516
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
3517
- const isSerializableHeaderValue = (value) => value !== undefined &&
3518
- value !== null &&
3519
- value !== "" &&
3520
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3521
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3522
- const _rAS = "retryAfterSeconds";
3523
- const _rT = "resourceType";
3524
- const _ra = "retry-after";
3525
- const _sT = "scanType";
3526
- const _tK = "tagKeys";
3527
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3528
- if (encoded.length) {
3529
- return JSON.parse(encoded);
3530
- }
3531
- return {};
3532
- });
3533
- const parseErrorBody = async (errorBody, context) => {
3534
- const value = await parseBody(errorBody, context);
3535
- value.message = value.message ?? value.Message;
3536
- return value;
3537
- };
3538
- const loadRestJsonErrorCode = (output, data) => {
3539
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3540
- const sanitizeErrorCode = (rawValue) => {
3541
- let cleanValue = rawValue;
3542
- if (typeof cleanValue === "number") {
3543
- cleanValue = cleanValue.toString();
3544
- }
3545
- if (cleanValue.indexOf(",") >= 0) {
3546
- cleanValue = cleanValue.split(",")[0];
3547
- }
3548
- if (cleanValue.indexOf(":") >= 0) {
3549
- cleanValue = cleanValue.split(":")[0];
3550
- }
3551
- if (cleanValue.indexOf("#") >= 0) {
3552
- cleanValue = cleanValue.split("#")[1];
3553
- }
3554
- return cleanValue;
3555
- };
3556
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3557
- if (headerKey !== undefined) {
3558
- return sanitizeErrorCode(output.headers[headerKey]);
3559
- }
3560
- if (data.code !== undefined) {
3561
- return sanitizeErrorCode(data.code);
3562
- }
3563
- if (data["__type"] !== undefined) {
3564
- return sanitizeErrorCode(data["__type"]);
3565
- }
3566
- };
1
+ module.exports = require("../index.js");