@aws-sdk/client-codeguru-security 3.489.0 → 3.495.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 (30) hide show
  1. package/dist-cjs/CodeGuruSecurity.js +1 -37
  2. package/dist-cjs/CodeGuruSecurityClient.js +1 -43
  3. package/dist-cjs/commands/BatchGetFindingsCommand.js +1 -28
  4. package/dist-cjs/commands/CreateScanCommand.js +1 -28
  5. package/dist-cjs/commands/CreateUploadUrlCommand.js +1 -29
  6. package/dist-cjs/commands/GetAccountConfigurationCommand.js +1 -28
  7. package/dist-cjs/commands/GetFindingsCommand.js +1 -28
  8. package/dist-cjs/commands/GetMetricsSummaryCommand.js +1 -28
  9. package/dist-cjs/commands/GetScanCommand.js +1 -28
  10. package/dist-cjs/commands/ListFindingsMetricsCommand.js +1 -28
  11. package/dist-cjs/commands/ListScansCommand.js +1 -28
  12. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  13. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  14. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  15. package/dist-cjs/commands/UpdateAccountConfigurationCommand.js +1 -28
  16. package/dist-cjs/commands/index.js +1 -16
  17. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  18. package/dist-cjs/extensionConfiguration.js +1 -2
  19. package/dist-cjs/index.js +1645 -11
  20. package/dist-cjs/models/CodeGuruSecurityServiceException.js +1 -12
  21. package/dist-cjs/models/index.js +1 -4
  22. package/dist-cjs/models/models_0.js +1 -156
  23. package/dist-cjs/pagination/GetFindingsPaginator.js +1 -7
  24. package/dist-cjs/pagination/Interfaces.js +1 -2
  25. package/dist-cjs/pagination/ListFindingsMetricsPaginator.js +1 -7
  26. package/dist-cjs/pagination/ListScansPaginator.js +1 -7
  27. package/dist-cjs/pagination/index.js +1 -7
  28. package/dist-cjs/protocols/Aws_restJson1.js +1 -1037
  29. package/dist-cjs/runtimeExtensions.js +1 -22
  30. package/package.json +40 -40
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,1646 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CodeGuruSecurityServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./CodeGuruSecurityClient"), exports);
6
- tslib_1.__exportStar(require("./CodeGuruSecurity"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var CodeGuruSecurityServiceException_1 = require("./models/CodeGuruSecurityServiceException");
12
- Object.defineProperty(exports, "CodeGuruSecurityServiceException", { enumerable: true, get: function () { return CodeGuruSecurityServiceException_1.CodeGuruSecurityServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ AnalysisType: () => AnalysisType,
26
+ BatchGetFindingsCommand: () => BatchGetFindingsCommand,
27
+ CodeGuruSecurity: () => CodeGuruSecurity,
28
+ CodeGuruSecurityClient: () => CodeGuruSecurityClient,
29
+ CodeGuruSecurityServiceException: () => CodeGuruSecurityServiceException,
30
+ ConflictException: () => ConflictException,
31
+ CreateScanCommand: () => CreateScanCommand,
32
+ CreateUploadUrlCommand: () => CreateUploadUrlCommand,
33
+ CreateUploadUrlResponseFilterSensitiveLog: () => CreateUploadUrlResponseFilterSensitiveLog,
34
+ ErrorCode: () => ErrorCode,
35
+ GetAccountConfigurationCommand: () => GetAccountConfigurationCommand,
36
+ GetFindingsCommand: () => GetFindingsCommand,
37
+ GetMetricsSummaryCommand: () => GetMetricsSummaryCommand,
38
+ GetScanCommand: () => GetScanCommand,
39
+ InternalServerException: () => InternalServerException,
40
+ ListFindingsMetricsCommand: () => ListFindingsMetricsCommand,
41
+ ListScansCommand: () => ListScansCommand,
42
+ ListTagsForResourceCommand: () => ListTagsForResourceCommand,
43
+ ResourceId: () => ResourceId,
44
+ ResourceNotFoundException: () => ResourceNotFoundException,
45
+ ScanState: () => ScanState,
46
+ ScanType: () => ScanType,
47
+ Severity: () => Severity,
48
+ Status: () => Status,
49
+ TagResourceCommand: () => TagResourceCommand,
50
+ ThrottlingException: () => ThrottlingException,
51
+ UntagResourceCommand: () => UntagResourceCommand,
52
+ UpdateAccountConfigurationCommand: () => UpdateAccountConfigurationCommand,
53
+ ValidationException: () => ValidationException,
54
+ ValidationExceptionReason: () => ValidationExceptionReason,
55
+ __Client: () => import_smithy_client.Client,
56
+ paginateGetFindings: () => paginateGetFindings,
57
+ paginateListFindingsMetrics: () => paginateListFindingsMetrics,
58
+ paginateListScans: () => paginateListScans
59
+ });
60
+ module.exports = __toCommonJS(src_exports);
61
+
62
+ // src/CodeGuruSecurityClient.ts
63
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
64
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
65
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
66
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
67
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
68
+ var import_config_resolver = require("@smithy/config-resolver");
69
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
70
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
71
+ var import_middleware_retry = require("@smithy/middleware-retry");
72
+
73
+
74
+ // src/endpoint/EndpointParameters.ts
75
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
76
+ return {
77
+ ...options,
78
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
79
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
80
+ defaultSigningName: "codeguru-security"
81
+ };
82
+ }, "resolveClientEndpointParameters");
83
+ var commonParams = {
84
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
85
+ Endpoint: { type: "builtInParams", name: "endpoint" },
86
+ Region: { type: "builtInParams", name: "region" },
87
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
88
+ };
89
+
90
+ // src/CodeGuruSecurityClient.ts
91
+ var import_runtimeConfig = require("././runtimeConfig");
92
+
93
+ // src/runtimeExtensions.ts
94
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
95
+ var import_protocol_http = require("@smithy/protocol-http");
96
+ var import_smithy_client = require("@smithy/smithy-client");
97
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
98
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
99
+ const extensionConfiguration = {
100
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
101
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
102
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
103
+ };
104
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
105
+ return {
106
+ ...runtimeConfig,
107
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
108
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
109
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
110
+ };
111
+ }, "resolveRuntimeExtensions");
112
+
113
+ // src/CodeGuruSecurityClient.ts
114
+ var _CodeGuruSecurityClient = class _CodeGuruSecurityClient extends import_smithy_client.Client {
115
+ constructor(...[configuration]) {
116
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
117
+ const _config_1 = resolveClientEndpointParameters(_config_0);
118
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
119
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
120
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
121
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
122
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
123
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
124
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
125
+ super(_config_8);
126
+ this.config = _config_8;
127
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
128
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
129
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
130
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
131
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
132
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
133
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
134
+ }
135
+ /**
136
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
137
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
138
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
139
+ */
140
+ destroy() {
141
+ super.destroy();
142
+ }
143
+ };
144
+ __name(_CodeGuruSecurityClient, "CodeGuruSecurityClient");
145
+ var CodeGuruSecurityClient = _CodeGuruSecurityClient;
146
+
147
+ // src/CodeGuruSecurity.ts
148
+
149
+
150
+ // src/commands/BatchGetFindingsCommand.ts
151
+
152
+ var import_middleware_serde = require("@smithy/middleware-serde");
153
+
154
+ var import_types = require("@smithy/types");
155
+
156
+ // src/protocols/Aws_restJson1.ts
157
+ var import_core = require("@aws-sdk/core");
158
+ var import_core2 = require("@smithy/core");
159
+
160
+ var import_uuid = require("uuid");
161
+
162
+ // src/models/CodeGuruSecurityServiceException.ts
163
+
164
+ var _CodeGuruSecurityServiceException = class _CodeGuruSecurityServiceException extends import_smithy_client.ServiceException {
165
+ /**
166
+ * @internal
167
+ */
168
+ constructor(options) {
169
+ super(options);
170
+ Object.setPrototypeOf(this, _CodeGuruSecurityServiceException.prototype);
171
+ }
172
+ };
173
+ __name(_CodeGuruSecurityServiceException, "CodeGuruSecurityServiceException");
174
+ var CodeGuruSecurityServiceException = _CodeGuruSecurityServiceException;
175
+
176
+ // src/models/models_0.ts
177
+
178
+ var _AccessDeniedException = class _AccessDeniedException extends CodeGuruSecurityServiceException {
179
+ /**
180
+ * @internal
181
+ */
182
+ constructor(opts) {
183
+ super({
184
+ name: "AccessDeniedException",
185
+ $fault: "client",
186
+ ...opts
187
+ });
188
+ this.name = "AccessDeniedException";
189
+ this.$fault = "client";
190
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
191
+ this.errorCode = opts.errorCode;
192
+ this.resourceId = opts.resourceId;
193
+ this.resourceType = opts.resourceType;
194
+ }
195
+ };
196
+ __name(_AccessDeniedException, "AccessDeniedException");
197
+ var AccessDeniedException = _AccessDeniedException;
198
+ var AnalysisType = {
199
+ ALL: "All",
200
+ SECURITY: "Security"
201
+ };
202
+ var ErrorCode = {
203
+ DUPLICATE_IDENTIFIER: "DUPLICATE_IDENTIFIER",
204
+ INTERNAL_ERROR: "INTERNAL_ERROR",
205
+ INVALID_FINDING_ID: "INVALID_FINDING_ID",
206
+ INVALID_SCAN_NAME: "INVALID_SCAN_NAME",
207
+ ITEM_DOES_NOT_EXIST: "ITEM_DOES_NOT_EXIST"
208
+ };
209
+ var Severity = {
210
+ CRITICAL: "Critical",
211
+ HIGH: "High",
212
+ INFO: "Info",
213
+ LOW: "Low",
214
+ MEDIUM: "Medium"
215
+ };
216
+ var Status = {
217
+ ALL: "All",
218
+ CLOSED: "Closed",
219
+ OPEN: "Open"
220
+ };
221
+ var _InternalServerException = class _InternalServerException extends CodeGuruSecurityServiceException {
222
+ /**
223
+ * @internal
224
+ */
225
+ constructor(opts) {
226
+ super({
227
+ name: "InternalServerException",
228
+ $fault: "server",
229
+ ...opts
230
+ });
231
+ this.name = "InternalServerException";
232
+ this.$fault = "server";
233
+ this.$retryable = {};
234
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
235
+ this.error = opts.error;
236
+ }
237
+ };
238
+ __name(_InternalServerException, "InternalServerException");
239
+ var InternalServerException = _InternalServerException;
240
+ var _ThrottlingException = class _ThrottlingException extends CodeGuruSecurityServiceException {
241
+ /**
242
+ * @internal
243
+ */
244
+ constructor(opts) {
245
+ super({
246
+ name: "ThrottlingException",
247
+ $fault: "client",
248
+ ...opts
249
+ });
250
+ this.name = "ThrottlingException";
251
+ this.$fault = "client";
252
+ this.$retryable = {
253
+ throttling: true
254
+ };
255
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
256
+ this.errorCode = opts.errorCode;
257
+ this.serviceCode = opts.serviceCode;
258
+ this.quotaCode = opts.quotaCode;
259
+ }
260
+ };
261
+ __name(_ThrottlingException, "ThrottlingException");
262
+ var ThrottlingException = _ThrottlingException;
263
+ var ValidationExceptionReason = {
264
+ CANNOT_PARSE: "cannotParse",
265
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
266
+ LAMBDA_CODE_SHA_MISMATCH: "lambdaCodeShaMisMatch",
267
+ OTHER: "other",
268
+ UNKNOWN_OPERATION: "unknownOperation"
269
+ };
270
+ var _ValidationException = class _ValidationException extends CodeGuruSecurityServiceException {
271
+ /**
272
+ * @internal
273
+ */
274
+ constructor(opts) {
275
+ super({
276
+ name: "ValidationException",
277
+ $fault: "client",
278
+ ...opts
279
+ });
280
+ this.name = "ValidationException";
281
+ this.$fault = "client";
282
+ Object.setPrototypeOf(this, _ValidationException.prototype);
283
+ this.errorCode = opts.errorCode;
284
+ this.reason = opts.reason;
285
+ this.fieldList = opts.fieldList;
286
+ }
287
+ };
288
+ __name(_ValidationException, "ValidationException");
289
+ var ValidationException = _ValidationException;
290
+ var _ConflictException = class _ConflictException extends CodeGuruSecurityServiceException {
291
+ /**
292
+ * @internal
293
+ */
294
+ constructor(opts) {
295
+ super({
296
+ name: "ConflictException",
297
+ $fault: "client",
298
+ ...opts
299
+ });
300
+ this.name = "ConflictException";
301
+ this.$fault = "client";
302
+ Object.setPrototypeOf(this, _ConflictException.prototype);
303
+ this.errorCode = opts.errorCode;
304
+ this.resourceId = opts.resourceId;
305
+ this.resourceType = opts.resourceType;
306
+ }
307
+ };
308
+ __name(_ConflictException, "ConflictException");
309
+ var ConflictException = _ConflictException;
310
+ var ResourceId;
311
+ ((ResourceId3) => {
312
+ ResourceId3.visit = /* @__PURE__ */ __name((value, visitor) => {
313
+ if (value.codeArtifactId !== void 0)
314
+ return visitor.codeArtifactId(value.codeArtifactId);
315
+ return visitor._(value.$unknown[0], value.$unknown[1]);
316
+ }, "visit");
317
+ })(ResourceId || (ResourceId = {}));
318
+ var ScanType = {
319
+ EXPRESS: "Express",
320
+ STANDARD: "Standard"
321
+ };
322
+ var ScanState = {
323
+ FAILED: "Failed",
324
+ IN_PROGRESS: "InProgress",
325
+ SUCCESSFUL: "Successful"
326
+ };
327
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends CodeGuruSecurityServiceException {
328
+ /**
329
+ * @internal
330
+ */
331
+ constructor(opts) {
332
+ super({
333
+ name: "ResourceNotFoundException",
334
+ $fault: "client",
335
+ ...opts
336
+ });
337
+ this.name = "ResourceNotFoundException";
338
+ this.$fault = "client";
339
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
340
+ this.errorCode = opts.errorCode;
341
+ this.resourceId = opts.resourceId;
342
+ this.resourceType = opts.resourceType;
343
+ }
344
+ };
345
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
346
+ var ResourceNotFoundException = _ResourceNotFoundException;
347
+ var CreateUploadUrlResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
348
+ ...obj,
349
+ ...obj.s3Url && { s3Url: import_smithy_client.SENSITIVE_STRING },
350
+ ...obj.requestHeaders && { requestHeaders: import_smithy_client.SENSITIVE_STRING }
351
+ }), "CreateUploadUrlResponseFilterSensitiveLog");
352
+
353
+ // src/protocols/Aws_restJson1.ts
354
+ var se_BatchGetFindingsCommand = /* @__PURE__ */ __name(async (input, context) => {
355
+ const b = (0, import_core2.requestBuilder)(input, context);
356
+ const headers = {
357
+ "content-type": "application/json"
358
+ };
359
+ b.bp("/batchGetFindings");
360
+ let body;
361
+ body = JSON.stringify(
362
+ (0, import_smithy_client.take)(input, {
363
+ findingIdentifiers: (_) => (0, import_smithy_client._json)(_)
364
+ })
365
+ );
366
+ b.m("POST").h(headers).b(body);
367
+ return b.build();
368
+ }, "se_BatchGetFindingsCommand");
369
+ var se_CreateScanCommand = /* @__PURE__ */ __name(async (input, context) => {
370
+ const b = (0, import_core2.requestBuilder)(input, context);
371
+ const headers = {
372
+ "content-type": "application/json"
373
+ };
374
+ b.bp("/scans");
375
+ let body;
376
+ body = JSON.stringify(
377
+ (0, import_smithy_client.take)(input, {
378
+ analysisType: [],
379
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
380
+ resourceId: (_) => (0, import_smithy_client._json)(_),
381
+ scanName: [],
382
+ scanType: [],
383
+ tags: (_) => (0, import_smithy_client._json)(_)
384
+ })
385
+ );
386
+ b.m("POST").h(headers).b(body);
387
+ return b.build();
388
+ }, "se_CreateScanCommand");
389
+ var se_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (input, context) => {
390
+ const b = (0, import_core2.requestBuilder)(input, context);
391
+ const headers = {
392
+ "content-type": "application/json"
393
+ };
394
+ b.bp("/uploadUrl");
395
+ let body;
396
+ body = JSON.stringify(
397
+ (0, import_smithy_client.take)(input, {
398
+ scanName: []
399
+ })
400
+ );
401
+ b.m("POST").h(headers).b(body);
402
+ return b.build();
403
+ }, "se_CreateUploadUrlCommand");
404
+ var se_GetAccountConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
405
+ const b = (0, import_core2.requestBuilder)(input, context);
406
+ const headers = {
407
+ "content-type": "application/json"
408
+ };
409
+ b.bp("/accountConfiguration/get");
410
+ let body;
411
+ body = "";
412
+ b.m("GET").h(headers).b(body);
413
+ return b.build();
414
+ }, "se_GetAccountConfigurationCommand");
415
+ var se_GetFindingsCommand = /* @__PURE__ */ __name(async (input, context) => {
416
+ const b = (0, import_core2.requestBuilder)(input, context);
417
+ const headers = {};
418
+ b.bp("/findings/{scanName}");
419
+ b.p("scanName", () => input.scanName, "{scanName}", false);
420
+ const query = (0, import_smithy_client.map)({
421
+ [_nT]: [, input[_nT]],
422
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
423
+ [_s]: [, input[_s]]
424
+ });
425
+ let body;
426
+ b.m("GET").h(headers).q(query).b(body);
427
+ return b.build();
428
+ }, "se_GetFindingsCommand");
429
+ var se_GetMetricsSummaryCommand = /* @__PURE__ */ __name(async (input, context) => {
430
+ const b = (0, import_core2.requestBuilder)(input, context);
431
+ const headers = {};
432
+ b.bp("/metrics/summary");
433
+ const query = (0, import_smithy_client.map)({
434
+ [_d]: [
435
+ (0, import_smithy_client.expectNonNull)(input.date, `date`) != null,
436
+ () => (input[_d].toISOString().split(".")[0] + "Z").toString()
437
+ ]
438
+ });
439
+ let body;
440
+ b.m("GET").h(headers).q(query).b(body);
441
+ return b.build();
442
+ }, "se_GetMetricsSummaryCommand");
443
+ var se_GetScanCommand = /* @__PURE__ */ __name(async (input, context) => {
444
+ const b = (0, import_core2.requestBuilder)(input, context);
445
+ const headers = {};
446
+ b.bp("/scans/{scanName}");
447
+ b.p("scanName", () => input.scanName, "{scanName}", false);
448
+ const query = (0, import_smithy_client.map)({
449
+ [_rI]: [, input[_rI]]
450
+ });
451
+ let body;
452
+ b.m("GET").h(headers).q(query).b(body);
453
+ return b.build();
454
+ }, "se_GetScanCommand");
455
+ var se_ListFindingsMetricsCommand = /* @__PURE__ */ __name(async (input, context) => {
456
+ const b = (0, import_core2.requestBuilder)(input, context);
457
+ const headers = {};
458
+ b.bp("/metrics/findings");
459
+ const query = (0, import_smithy_client.map)({
460
+ [_nT]: [, input[_nT]],
461
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
462
+ [_sD]: [
463
+ (0, import_smithy_client.expectNonNull)(input.startDate, `startDate`) != null,
464
+ () => (input[_sD].toISOString().split(".")[0] + "Z").toString()
465
+ ],
466
+ [_eD]: [
467
+ (0, import_smithy_client.expectNonNull)(input.endDate, `endDate`) != null,
468
+ () => (input[_eD].toISOString().split(".")[0] + "Z").toString()
469
+ ]
470
+ });
471
+ let body;
472
+ b.m("GET").h(headers).q(query).b(body);
473
+ return b.build();
474
+ }, "se_ListFindingsMetricsCommand");
475
+ var se_ListScansCommand = /* @__PURE__ */ __name(async (input, context) => {
476
+ const b = (0, import_core2.requestBuilder)(input, context);
477
+ const headers = {};
478
+ b.bp("/scans");
479
+ const query = (0, import_smithy_client.map)({
480
+ [_nT]: [, input[_nT]],
481
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
482
+ });
483
+ let body;
484
+ b.m("GET").h(headers).q(query).b(body);
485
+ return b.build();
486
+ }, "se_ListScansCommand");
487
+ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
488
+ const b = (0, import_core2.requestBuilder)(input, context);
489
+ const headers = {};
490
+ b.bp("/tags/{resourceArn}");
491
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
492
+ let body;
493
+ b.m("GET").h(headers).b(body);
494
+ return b.build();
495
+ }, "se_ListTagsForResourceCommand");
496
+ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
497
+ const b = (0, import_core2.requestBuilder)(input, context);
498
+ const headers = {
499
+ "content-type": "application/json"
500
+ };
501
+ b.bp("/tags/{resourceArn}");
502
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
503
+ let body;
504
+ body = JSON.stringify(
505
+ (0, import_smithy_client.take)(input, {
506
+ tags: (_) => (0, import_smithy_client._json)(_)
507
+ })
508
+ );
509
+ b.m("POST").h(headers).b(body);
510
+ return b.build();
511
+ }, "se_TagResourceCommand");
512
+ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
513
+ const b = (0, import_core2.requestBuilder)(input, context);
514
+ const headers = {};
515
+ b.bp("/tags/{resourceArn}");
516
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
517
+ const query = (0, import_smithy_client.map)({
518
+ [_tK]: [
519
+ (0, import_smithy_client.expectNonNull)(input.tagKeys, `tagKeys`) != null,
520
+ () => (input[_tK] || []).map((_entry) => _entry)
521
+ ]
522
+ });
523
+ let body;
524
+ b.m("DELETE").h(headers).q(query).b(body);
525
+ return b.build();
526
+ }, "se_UntagResourceCommand");
527
+ var se_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
528
+ const b = (0, import_core2.requestBuilder)(input, context);
529
+ const headers = {
530
+ "content-type": "application/json"
531
+ };
532
+ b.bp("/updateAccountConfiguration");
533
+ let body;
534
+ body = JSON.stringify(
535
+ (0, import_smithy_client.take)(input, {
536
+ encryptionConfig: (_) => (0, import_smithy_client._json)(_)
537
+ })
538
+ );
539
+ b.m("PUT").h(headers).b(body);
540
+ return b.build();
541
+ }, "se_UpdateAccountConfigurationCommand");
542
+ var de_BatchGetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
543
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
544
+ return de_BatchGetFindingsCommandError(output, context);
545
+ }
546
+ const contents = (0, import_smithy_client.map)({
547
+ $metadata: deserializeMetadata(output)
548
+ });
549
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
550
+ const doc = (0, import_smithy_client.take)(data, {
551
+ failedFindings: import_smithy_client._json,
552
+ findings: (_) => de_Findings(_, context)
553
+ });
554
+ Object.assign(contents, doc);
555
+ return contents;
556
+ }, "de_BatchGetFindingsCommand");
557
+ var de_BatchGetFindingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
558
+ const parsedOutput = {
559
+ ...output,
560
+ body: await parseErrorBody(output.body, context)
561
+ };
562
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
563
+ switch (errorCode) {
564
+ case "AccessDeniedException":
565
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
566
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
567
+ case "InternalServerException":
568
+ case "com.amazonaws.codegurusecurity#InternalServerException":
569
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
570
+ case "ThrottlingException":
571
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
572
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
573
+ case "ValidationException":
574
+ case "com.amazonaws.codegurusecurity#ValidationException":
575
+ throw await de_ValidationExceptionRes(parsedOutput, context);
576
+ default:
577
+ const parsedBody = parsedOutput.body;
578
+ return throwDefaultError({
579
+ output,
580
+ parsedBody,
581
+ errorCode
582
+ });
583
+ }
584
+ }, "de_BatchGetFindingsCommandError");
585
+ var de_CreateScanCommand = /* @__PURE__ */ __name(async (output, context) => {
586
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
587
+ return de_CreateScanCommandError(output, context);
588
+ }
589
+ const contents = (0, import_smithy_client.map)({
590
+ $metadata: deserializeMetadata(output)
591
+ });
592
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
593
+ const doc = (0, import_smithy_client.take)(data, {
594
+ resourceId: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
595
+ runId: import_smithy_client.expectString,
596
+ scanName: import_smithy_client.expectString,
597
+ scanNameArn: import_smithy_client.expectString,
598
+ scanState: import_smithy_client.expectString
599
+ });
600
+ Object.assign(contents, doc);
601
+ return contents;
602
+ }, "de_CreateScanCommand");
603
+ var de_CreateScanCommandError = /* @__PURE__ */ __name(async (output, context) => {
604
+ const parsedOutput = {
605
+ ...output,
606
+ body: await parseErrorBody(output.body, context)
607
+ };
608
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
+ switch (errorCode) {
610
+ case "AccessDeniedException":
611
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
612
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
613
+ case "ConflictException":
614
+ case "com.amazonaws.codegurusecurity#ConflictException":
615
+ throw await de_ConflictExceptionRes(parsedOutput, context);
616
+ case "InternalServerException":
617
+ case "com.amazonaws.codegurusecurity#InternalServerException":
618
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
619
+ case "ResourceNotFoundException":
620
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
621
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
622
+ case "ThrottlingException":
623
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
624
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
625
+ case "ValidationException":
626
+ case "com.amazonaws.codegurusecurity#ValidationException":
627
+ throw await de_ValidationExceptionRes(parsedOutput, context);
628
+ default:
629
+ const parsedBody = parsedOutput.body;
630
+ return throwDefaultError({
631
+ output,
632
+ parsedBody,
633
+ errorCode
634
+ });
635
+ }
636
+ }, "de_CreateScanCommandError");
637
+ var de_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (output, context) => {
638
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
639
+ return de_CreateUploadUrlCommandError(output, context);
640
+ }
641
+ const contents = (0, import_smithy_client.map)({
642
+ $metadata: deserializeMetadata(output)
643
+ });
644
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
645
+ const doc = (0, import_smithy_client.take)(data, {
646
+ codeArtifactId: import_smithy_client.expectString,
647
+ requestHeaders: import_smithy_client._json,
648
+ s3Url: import_smithy_client.expectString
649
+ });
650
+ Object.assign(contents, doc);
651
+ return contents;
652
+ }, "de_CreateUploadUrlCommand");
653
+ var de_CreateUploadUrlCommandError = /* @__PURE__ */ __name(async (output, context) => {
654
+ const parsedOutput = {
655
+ ...output,
656
+ body: await parseErrorBody(output.body, context)
657
+ };
658
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
659
+ switch (errorCode) {
660
+ case "AccessDeniedException":
661
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
662
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
663
+ case "InternalServerException":
664
+ case "com.amazonaws.codegurusecurity#InternalServerException":
665
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
666
+ case "ThrottlingException":
667
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
668
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
669
+ case "ValidationException":
670
+ case "com.amazonaws.codegurusecurity#ValidationException":
671
+ throw await de_ValidationExceptionRes(parsedOutput, context);
672
+ default:
673
+ const parsedBody = parsedOutput.body;
674
+ return throwDefaultError({
675
+ output,
676
+ parsedBody,
677
+ errorCode
678
+ });
679
+ }
680
+ }, "de_CreateUploadUrlCommandError");
681
+ var de_GetAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
682
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
683
+ return de_GetAccountConfigurationCommandError(output, context);
684
+ }
685
+ const contents = (0, import_smithy_client.map)({
686
+ $metadata: deserializeMetadata(output)
687
+ });
688
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
689
+ const doc = (0, import_smithy_client.take)(data, {
690
+ encryptionConfig: import_smithy_client._json
691
+ });
692
+ Object.assign(contents, doc);
693
+ return contents;
694
+ }, "de_GetAccountConfigurationCommand");
695
+ var de_GetAccountConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
696
+ const parsedOutput = {
697
+ ...output,
698
+ body: await parseErrorBody(output.body, context)
699
+ };
700
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
701
+ switch (errorCode) {
702
+ case "AccessDeniedException":
703
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
704
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
705
+ case "InternalServerException":
706
+ case "com.amazonaws.codegurusecurity#InternalServerException":
707
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
708
+ case "ThrottlingException":
709
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
710
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
711
+ case "ValidationException":
712
+ case "com.amazonaws.codegurusecurity#ValidationException":
713
+ throw await de_ValidationExceptionRes(parsedOutput, context);
714
+ default:
715
+ const parsedBody = parsedOutput.body;
716
+ return throwDefaultError({
717
+ output,
718
+ parsedBody,
719
+ errorCode
720
+ });
721
+ }
722
+ }, "de_GetAccountConfigurationCommandError");
723
+ var de_GetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
724
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
725
+ return de_GetFindingsCommandError(output, context);
726
+ }
727
+ const contents = (0, import_smithy_client.map)({
728
+ $metadata: deserializeMetadata(output)
729
+ });
730
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
731
+ const doc = (0, import_smithy_client.take)(data, {
732
+ findings: (_) => de_Findings(_, context),
733
+ nextToken: import_smithy_client.expectString
734
+ });
735
+ Object.assign(contents, doc);
736
+ return contents;
737
+ }, "de_GetFindingsCommand");
738
+ var de_GetFindingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
739
+ const parsedOutput = {
740
+ ...output,
741
+ body: await parseErrorBody(output.body, context)
742
+ };
743
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
744
+ switch (errorCode) {
745
+ case "AccessDeniedException":
746
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
747
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
748
+ case "ConflictException":
749
+ case "com.amazonaws.codegurusecurity#ConflictException":
750
+ throw await de_ConflictExceptionRes(parsedOutput, context);
751
+ case "InternalServerException":
752
+ case "com.amazonaws.codegurusecurity#InternalServerException":
753
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
754
+ case "ResourceNotFoundException":
755
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
756
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
757
+ case "ThrottlingException":
758
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
759
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
760
+ case "ValidationException":
761
+ case "com.amazonaws.codegurusecurity#ValidationException":
762
+ throw await de_ValidationExceptionRes(parsedOutput, context);
763
+ default:
764
+ const parsedBody = parsedOutput.body;
765
+ return throwDefaultError({
766
+ output,
767
+ parsedBody,
768
+ errorCode
769
+ });
770
+ }
771
+ }, "de_GetFindingsCommandError");
772
+ var de_GetMetricsSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {
773
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
774
+ return de_GetMetricsSummaryCommandError(output, context);
775
+ }
776
+ const contents = (0, import_smithy_client.map)({
777
+ $metadata: deserializeMetadata(output)
778
+ });
779
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
780
+ const doc = (0, import_smithy_client.take)(data, {
781
+ metricsSummary: (_) => de_MetricsSummary(_, context)
782
+ });
783
+ Object.assign(contents, doc);
784
+ return contents;
785
+ }, "de_GetMetricsSummaryCommand");
786
+ var de_GetMetricsSummaryCommandError = /* @__PURE__ */ __name(async (output, context) => {
787
+ const parsedOutput = {
788
+ ...output,
789
+ body: await parseErrorBody(output.body, context)
790
+ };
791
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
+ switch (errorCode) {
793
+ case "AccessDeniedException":
794
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
795
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
796
+ case "InternalServerException":
797
+ case "com.amazonaws.codegurusecurity#InternalServerException":
798
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
799
+ case "ThrottlingException":
800
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
801
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
802
+ case "ValidationException":
803
+ case "com.amazonaws.codegurusecurity#ValidationException":
804
+ throw await de_ValidationExceptionRes(parsedOutput, context);
805
+ default:
806
+ const parsedBody = parsedOutput.body;
807
+ return throwDefaultError({
808
+ output,
809
+ parsedBody,
810
+ errorCode
811
+ });
812
+ }
813
+ }, "de_GetMetricsSummaryCommandError");
814
+ var de_GetScanCommand = /* @__PURE__ */ __name(async (output, context) => {
815
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
816
+ return de_GetScanCommandError(output, context);
817
+ }
818
+ const contents = (0, import_smithy_client.map)({
819
+ $metadata: deserializeMetadata(output)
820
+ });
821
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
822
+ const doc = (0, import_smithy_client.take)(data, {
823
+ analysisType: import_smithy_client.expectString,
824
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
825
+ numberOfRevisions: import_smithy_client.expectLong,
826
+ runId: import_smithy_client.expectString,
827
+ scanName: import_smithy_client.expectString,
828
+ scanNameArn: import_smithy_client.expectString,
829
+ scanState: import_smithy_client.expectString,
830
+ updatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
831
+ });
832
+ Object.assign(contents, doc);
833
+ return contents;
834
+ }, "de_GetScanCommand");
835
+ var de_GetScanCommandError = /* @__PURE__ */ __name(async (output, context) => {
836
+ const parsedOutput = {
837
+ ...output,
838
+ body: await parseErrorBody(output.body, context)
839
+ };
840
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
841
+ switch (errorCode) {
842
+ case "AccessDeniedException":
843
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
844
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
845
+ case "InternalServerException":
846
+ case "com.amazonaws.codegurusecurity#InternalServerException":
847
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
848
+ case "ResourceNotFoundException":
849
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
850
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
851
+ case "ThrottlingException":
852
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
853
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
854
+ default:
855
+ const parsedBody = parsedOutput.body;
856
+ return throwDefaultError({
857
+ output,
858
+ parsedBody,
859
+ errorCode
860
+ });
861
+ }
862
+ }, "de_GetScanCommandError");
863
+ var de_ListFindingsMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
864
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
865
+ return de_ListFindingsMetricsCommandError(output, context);
866
+ }
867
+ const contents = (0, import_smithy_client.map)({
868
+ $metadata: deserializeMetadata(output)
869
+ });
870
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
871
+ const doc = (0, import_smithy_client.take)(data, {
872
+ findingsMetrics: (_) => de_FindingsMetricList(_, context),
873
+ nextToken: import_smithy_client.expectString
874
+ });
875
+ Object.assign(contents, doc);
876
+ return contents;
877
+ }, "de_ListFindingsMetricsCommand");
878
+ var de_ListFindingsMetricsCommandError = /* @__PURE__ */ __name(async (output, context) => {
879
+ const parsedOutput = {
880
+ ...output,
881
+ body: await parseErrorBody(output.body, context)
882
+ };
883
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
884
+ switch (errorCode) {
885
+ case "AccessDeniedException":
886
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
887
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
888
+ case "InternalServerException":
889
+ case "com.amazonaws.codegurusecurity#InternalServerException":
890
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
891
+ case "ThrottlingException":
892
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
893
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
894
+ case "ValidationException":
895
+ case "com.amazonaws.codegurusecurity#ValidationException":
896
+ throw await de_ValidationExceptionRes(parsedOutput, context);
897
+ default:
898
+ const parsedBody = parsedOutput.body;
899
+ return throwDefaultError({
900
+ output,
901
+ parsedBody,
902
+ errorCode
903
+ });
904
+ }
905
+ }, "de_ListFindingsMetricsCommandError");
906
+ var de_ListScansCommand = /* @__PURE__ */ __name(async (output, context) => {
907
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
908
+ return de_ListScansCommandError(output, context);
909
+ }
910
+ const contents = (0, import_smithy_client.map)({
911
+ $metadata: deserializeMetadata(output)
912
+ });
913
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
914
+ const doc = (0, import_smithy_client.take)(data, {
915
+ nextToken: import_smithy_client.expectString,
916
+ summaries: (_) => de_ScanSummaries(_, context)
917
+ });
918
+ Object.assign(contents, doc);
919
+ return contents;
920
+ }, "de_ListScansCommand");
921
+ var de_ListScansCommandError = /* @__PURE__ */ __name(async (output, context) => {
922
+ const parsedOutput = {
923
+ ...output,
924
+ body: await parseErrorBody(output.body, context)
925
+ };
926
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
927
+ switch (errorCode) {
928
+ case "AccessDeniedException":
929
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
930
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
931
+ case "InternalServerException":
932
+ case "com.amazonaws.codegurusecurity#InternalServerException":
933
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
934
+ case "ThrottlingException":
935
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
936
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
937
+ case "ValidationException":
938
+ case "com.amazonaws.codegurusecurity#ValidationException":
939
+ throw await de_ValidationExceptionRes(parsedOutput, context);
940
+ default:
941
+ const parsedBody = parsedOutput.body;
942
+ return throwDefaultError({
943
+ output,
944
+ parsedBody,
945
+ errorCode
946
+ });
947
+ }
948
+ }, "de_ListScansCommandError");
949
+ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
950
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
951
+ return de_ListTagsForResourceCommandError(output, context);
952
+ }
953
+ const contents = (0, import_smithy_client.map)({
954
+ $metadata: deserializeMetadata(output)
955
+ });
956
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
957
+ const doc = (0, import_smithy_client.take)(data, {
958
+ tags: import_smithy_client._json
959
+ });
960
+ Object.assign(contents, doc);
961
+ return contents;
962
+ }, "de_ListTagsForResourceCommand");
963
+ var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
964
+ const parsedOutput = {
965
+ ...output,
966
+ body: await parseErrorBody(output.body, context)
967
+ };
968
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
969
+ switch (errorCode) {
970
+ case "AccessDeniedException":
971
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
972
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
973
+ case "ConflictException":
974
+ case "com.amazonaws.codegurusecurity#ConflictException":
975
+ throw await de_ConflictExceptionRes(parsedOutput, context);
976
+ case "InternalServerException":
977
+ case "com.amazonaws.codegurusecurity#InternalServerException":
978
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
979
+ case "ResourceNotFoundException":
980
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
981
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
982
+ case "ThrottlingException":
983
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
984
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
985
+ case "ValidationException":
986
+ case "com.amazonaws.codegurusecurity#ValidationException":
987
+ throw await de_ValidationExceptionRes(parsedOutput, context);
988
+ default:
989
+ const parsedBody = parsedOutput.body;
990
+ return throwDefaultError({
991
+ output,
992
+ parsedBody,
993
+ errorCode
994
+ });
995
+ }
996
+ }, "de_ListTagsForResourceCommandError");
997
+ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
998
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
999
+ return de_TagResourceCommandError(output, context);
1000
+ }
1001
+ const contents = (0, import_smithy_client.map)({
1002
+ $metadata: deserializeMetadata(output)
1003
+ });
1004
+ await (0, import_smithy_client.collectBody)(output.body, context);
1005
+ return contents;
1006
+ }, "de_TagResourceCommand");
1007
+ var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1008
+ const parsedOutput = {
1009
+ ...output,
1010
+ body: await parseErrorBody(output.body, context)
1011
+ };
1012
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1013
+ switch (errorCode) {
1014
+ case "AccessDeniedException":
1015
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
1016
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1017
+ case "ConflictException":
1018
+ case "com.amazonaws.codegurusecurity#ConflictException":
1019
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1020
+ case "InternalServerException":
1021
+ case "com.amazonaws.codegurusecurity#InternalServerException":
1022
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1023
+ case "ResourceNotFoundException":
1024
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
1025
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1026
+ case "ThrottlingException":
1027
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
1028
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1029
+ case "ValidationException":
1030
+ case "com.amazonaws.codegurusecurity#ValidationException":
1031
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1032
+ default:
1033
+ const parsedBody = parsedOutput.body;
1034
+ return throwDefaultError({
1035
+ output,
1036
+ parsedBody,
1037
+ errorCode
1038
+ });
1039
+ }
1040
+ }, "de_TagResourceCommandError");
1041
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1042
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1043
+ return de_UntagResourceCommandError(output, context);
1044
+ }
1045
+ const contents = (0, import_smithy_client.map)({
1046
+ $metadata: deserializeMetadata(output)
1047
+ });
1048
+ await (0, import_smithy_client.collectBody)(output.body, context);
1049
+ return contents;
1050
+ }, "de_UntagResourceCommand");
1051
+ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1052
+ const parsedOutput = {
1053
+ ...output,
1054
+ body: await parseErrorBody(output.body, context)
1055
+ };
1056
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1057
+ switch (errorCode) {
1058
+ case "AccessDeniedException":
1059
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
1060
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1061
+ case "ConflictException":
1062
+ case "com.amazonaws.codegurusecurity#ConflictException":
1063
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1064
+ case "InternalServerException":
1065
+ case "com.amazonaws.codegurusecurity#InternalServerException":
1066
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1067
+ case "ResourceNotFoundException":
1068
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
1069
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1070
+ case "ThrottlingException":
1071
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
1072
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1073
+ case "ValidationException":
1074
+ case "com.amazonaws.codegurusecurity#ValidationException":
1075
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1076
+ default:
1077
+ const parsedBody = parsedOutput.body;
1078
+ return throwDefaultError({
1079
+ output,
1080
+ parsedBody,
1081
+ errorCode
1082
+ });
1083
+ }
1084
+ }, "de_UntagResourceCommandError");
1085
+ var de_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1086
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1087
+ return de_UpdateAccountConfigurationCommandError(output, context);
1088
+ }
1089
+ const contents = (0, import_smithy_client.map)({
1090
+ $metadata: deserializeMetadata(output)
1091
+ });
1092
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1093
+ const doc = (0, import_smithy_client.take)(data, {
1094
+ encryptionConfig: import_smithy_client._json
1095
+ });
1096
+ Object.assign(contents, doc);
1097
+ return contents;
1098
+ }, "de_UpdateAccountConfigurationCommand");
1099
+ var de_UpdateAccountConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1100
+ const parsedOutput = {
1101
+ ...output,
1102
+ body: await parseErrorBody(output.body, context)
1103
+ };
1104
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
+ switch (errorCode) {
1106
+ case "AccessDeniedException":
1107
+ case "com.amazonaws.codegurusecurity#AccessDeniedException":
1108
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1109
+ case "InternalServerException":
1110
+ case "com.amazonaws.codegurusecurity#InternalServerException":
1111
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1112
+ case "ResourceNotFoundException":
1113
+ case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
1114
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1115
+ case "ThrottlingException":
1116
+ case "com.amazonaws.codegurusecurity#ThrottlingException":
1117
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1118
+ case "ValidationException":
1119
+ case "com.amazonaws.codegurusecurity#ValidationException":
1120
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1121
+ default:
1122
+ const parsedBody = parsedOutput.body;
1123
+ return throwDefaultError({
1124
+ output,
1125
+ parsedBody,
1126
+ errorCode
1127
+ });
1128
+ }
1129
+ }, "de_UpdateAccountConfigurationCommandError");
1130
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(CodeGuruSecurityServiceException);
1131
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1132
+ const contents = (0, import_smithy_client.map)({});
1133
+ const data = parsedOutput.body;
1134
+ const doc = (0, import_smithy_client.take)(data, {
1135
+ errorCode: import_smithy_client.expectString,
1136
+ message: import_smithy_client.expectString,
1137
+ resourceId: import_smithy_client.expectString,
1138
+ resourceType: import_smithy_client.expectString
1139
+ });
1140
+ Object.assign(contents, doc);
1141
+ const exception = new AccessDeniedException({
1142
+ $metadata: deserializeMetadata(parsedOutput),
1143
+ ...contents
1144
+ });
1145
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1146
+ }, "de_AccessDeniedExceptionRes");
1147
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1148
+ const contents = (0, import_smithy_client.map)({});
1149
+ const data = parsedOutput.body;
1150
+ const doc = (0, import_smithy_client.take)(data, {
1151
+ errorCode: import_smithy_client.expectString,
1152
+ message: import_smithy_client.expectString,
1153
+ resourceId: import_smithy_client.expectString,
1154
+ resourceType: import_smithy_client.expectString
1155
+ });
1156
+ Object.assign(contents, doc);
1157
+ const exception = new ConflictException({
1158
+ $metadata: deserializeMetadata(parsedOutput),
1159
+ ...contents
1160
+ });
1161
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1162
+ }, "de_ConflictExceptionRes");
1163
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1164
+ const contents = (0, import_smithy_client.map)({});
1165
+ const data = parsedOutput.body;
1166
+ const doc = (0, import_smithy_client.take)(data, {
1167
+ error: import_smithy_client.expectString,
1168
+ message: import_smithy_client.expectString
1169
+ });
1170
+ Object.assign(contents, doc);
1171
+ const exception = new InternalServerException({
1172
+ $metadata: deserializeMetadata(parsedOutput),
1173
+ ...contents
1174
+ });
1175
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1176
+ }, "de_InternalServerExceptionRes");
1177
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1178
+ const contents = (0, import_smithy_client.map)({});
1179
+ const data = parsedOutput.body;
1180
+ const doc = (0, import_smithy_client.take)(data, {
1181
+ errorCode: import_smithy_client.expectString,
1182
+ message: import_smithy_client.expectString,
1183
+ resourceId: import_smithy_client.expectString,
1184
+ resourceType: import_smithy_client.expectString
1185
+ });
1186
+ Object.assign(contents, doc);
1187
+ const exception = new ResourceNotFoundException({
1188
+ $metadata: deserializeMetadata(parsedOutput),
1189
+ ...contents
1190
+ });
1191
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1192
+ }, "de_ResourceNotFoundExceptionRes");
1193
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1194
+ const contents = (0, import_smithy_client.map)({});
1195
+ const data = parsedOutput.body;
1196
+ const doc = (0, import_smithy_client.take)(data, {
1197
+ errorCode: import_smithy_client.expectString,
1198
+ message: import_smithy_client.expectString,
1199
+ quotaCode: import_smithy_client.expectString,
1200
+ serviceCode: import_smithy_client.expectString
1201
+ });
1202
+ Object.assign(contents, doc);
1203
+ const exception = new ThrottlingException({
1204
+ $metadata: deserializeMetadata(parsedOutput),
1205
+ ...contents
1206
+ });
1207
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1208
+ }, "de_ThrottlingExceptionRes");
1209
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1210
+ const contents = (0, import_smithy_client.map)({});
1211
+ const data = parsedOutput.body;
1212
+ const doc = (0, import_smithy_client.take)(data, {
1213
+ errorCode: import_smithy_client.expectString,
1214
+ fieldList: import_smithy_client._json,
1215
+ message: import_smithy_client.expectString,
1216
+ reason: import_smithy_client.expectString
1217
+ });
1218
+ Object.assign(contents, doc);
1219
+ const exception = new ValidationException({
1220
+ $metadata: deserializeMetadata(parsedOutput),
1221
+ ...contents
1222
+ });
1223
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1224
+ }, "de_ValidationExceptionRes");
1225
+ var de_AccountFindingsMetric = /* @__PURE__ */ __name((output, context) => {
1226
+ return (0, import_smithy_client.take)(output, {
1227
+ closedFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
1228
+ date: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1229
+ meanTimeToClose: (_) => de_FindingMetricsValuePerSeverity(_, context),
1230
+ newFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
1231
+ openFindings: (_) => de_FindingMetricsValuePerSeverity(_, context)
1232
+ });
1233
+ }, "de_AccountFindingsMetric");
1234
+ var de_Finding = /* @__PURE__ */ __name((output, context) => {
1235
+ return (0, import_smithy_client.take)(output, {
1236
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1237
+ description: import_smithy_client.expectString,
1238
+ detectorId: import_smithy_client.expectString,
1239
+ detectorName: import_smithy_client.expectString,
1240
+ detectorTags: import_smithy_client._json,
1241
+ generatorId: import_smithy_client.expectString,
1242
+ id: import_smithy_client.expectString,
1243
+ remediation: import_smithy_client._json,
1244
+ resource: import_smithy_client._json,
1245
+ ruleId: import_smithy_client.expectString,
1246
+ severity: import_smithy_client.expectString,
1247
+ status: import_smithy_client.expectString,
1248
+ title: import_smithy_client.expectString,
1249
+ type: import_smithy_client.expectString,
1250
+ updatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1251
+ vulnerability: import_smithy_client._json
1252
+ });
1253
+ }, "de_Finding");
1254
+ var de_FindingMetricsValuePerSeverity = /* @__PURE__ */ __name((output, context) => {
1255
+ return (0, import_smithy_client.take)(output, {
1256
+ critical: import_smithy_client.limitedParseDouble,
1257
+ high: import_smithy_client.limitedParseDouble,
1258
+ info: import_smithy_client.limitedParseDouble,
1259
+ low: import_smithy_client.limitedParseDouble,
1260
+ medium: import_smithy_client.limitedParseDouble
1261
+ });
1262
+ }, "de_FindingMetricsValuePerSeverity");
1263
+ var de_Findings = /* @__PURE__ */ __name((output, context) => {
1264
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1265
+ return de_Finding(entry, context);
1266
+ });
1267
+ return retVal;
1268
+ }, "de_Findings");
1269
+ var de_FindingsMetricList = /* @__PURE__ */ __name((output, context) => {
1270
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1271
+ return de_AccountFindingsMetric(entry, context);
1272
+ });
1273
+ return retVal;
1274
+ }, "de_FindingsMetricList");
1275
+ var de_MetricsSummary = /* @__PURE__ */ __name((output, context) => {
1276
+ return (0, import_smithy_client.take)(output, {
1277
+ categoriesWithMostFindings: import_smithy_client._json,
1278
+ date: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1279
+ openFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
1280
+ scansWithMostOpenCriticalFindings: import_smithy_client._json,
1281
+ scansWithMostOpenFindings: import_smithy_client._json
1282
+ });
1283
+ }, "de_MetricsSummary");
1284
+ var de_ScanSummaries = /* @__PURE__ */ __name((output, context) => {
1285
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1286
+ return de_ScanSummary(entry, context);
1287
+ });
1288
+ return retVal;
1289
+ }, "de_ScanSummaries");
1290
+ var de_ScanSummary = /* @__PURE__ */ __name((output, context) => {
1291
+ return (0, import_smithy_client.take)(output, {
1292
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1293
+ runId: import_smithy_client.expectString,
1294
+ scanName: import_smithy_client.expectString,
1295
+ scanNameArn: import_smithy_client.expectString,
1296
+ scanState: import_smithy_client.expectString,
1297
+ updatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
1298
+ });
1299
+ }, "de_ScanSummary");
1300
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1301
+ httpStatusCode: output.statusCode,
1302
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1303
+ extendedRequestId: output.headers["x-amz-id-2"],
1304
+ cfId: output.headers["x-amz-cf-id"]
1305
+ }), "deserializeMetadata");
1306
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1307
+ var _d = "date";
1308
+ var _eD = "endDate";
1309
+ var _mR = "maxResults";
1310
+ var _nT = "nextToken";
1311
+ var _rI = "runId";
1312
+ var _s = "status";
1313
+ var _sD = "startDate";
1314
+ var _tK = "tagKeys";
1315
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1316
+ if (encoded.length) {
1317
+ return JSON.parse(encoded);
1318
+ }
1319
+ return {};
1320
+ }), "parseBody");
1321
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1322
+ const value = await parseBody(errorBody, context);
1323
+ value.message = value.message ?? value.Message;
1324
+ return value;
1325
+ }, "parseErrorBody");
1326
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1327
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1328
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1329
+ let cleanValue = rawValue;
1330
+ if (typeof cleanValue === "number") {
1331
+ cleanValue = cleanValue.toString();
1332
+ }
1333
+ if (cleanValue.indexOf(",") >= 0) {
1334
+ cleanValue = cleanValue.split(",")[0];
1335
+ }
1336
+ if (cleanValue.indexOf(":") >= 0) {
1337
+ cleanValue = cleanValue.split(":")[0];
1338
+ }
1339
+ if (cleanValue.indexOf("#") >= 0) {
1340
+ cleanValue = cleanValue.split("#")[1];
1341
+ }
1342
+ return cleanValue;
1343
+ }, "sanitizeErrorCode");
1344
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1345
+ if (headerKey !== void 0) {
1346
+ return sanitizeErrorCode(output.headers[headerKey]);
1347
+ }
1348
+ if (data.code !== void 0) {
1349
+ return sanitizeErrorCode(data.code);
1350
+ }
1351
+ if (data["__type"] !== void 0) {
1352
+ return sanitizeErrorCode(data["__type"]);
1353
+ }
1354
+ }, "loadRestJsonErrorCode");
1355
+
1356
+ // src/commands/BatchGetFindingsCommand.ts
1357
+ var _BatchGetFindingsCommand = class _BatchGetFindingsCommand extends import_smithy_client.Command.classBuilder().ep({
1358
+ ...commonParams
1359
+ }).m(function(Command, cs, config, o) {
1360
+ return [
1361
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1362
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1363
+ ];
1364
+ }).s("AwsCodeGuruSecurity", "BatchGetFindings", {}).n("CodeGuruSecurityClient", "BatchGetFindingsCommand").f(void 0, void 0).ser(se_BatchGetFindingsCommand).de(de_BatchGetFindingsCommand).build() {
1365
+ };
1366
+ __name(_BatchGetFindingsCommand, "BatchGetFindingsCommand");
1367
+ var BatchGetFindingsCommand = _BatchGetFindingsCommand;
1368
+
1369
+ // src/commands/CreateScanCommand.ts
1370
+
1371
+
1372
+
1373
+
1374
+ var _CreateScanCommand = class _CreateScanCommand extends import_smithy_client.Command.classBuilder().ep({
1375
+ ...commonParams
1376
+ }).m(function(Command, cs, config, o) {
1377
+ return [
1378
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1379
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1380
+ ];
1381
+ }).s("AwsCodeGuruSecurity", "CreateScan", {}).n("CodeGuruSecurityClient", "CreateScanCommand").f(void 0, void 0).ser(se_CreateScanCommand).de(de_CreateScanCommand).build() {
1382
+ };
1383
+ __name(_CreateScanCommand, "CreateScanCommand");
1384
+ var CreateScanCommand = _CreateScanCommand;
1385
+
1386
+ // src/commands/CreateUploadUrlCommand.ts
1387
+
1388
+
1389
+
1390
+
1391
+ var _CreateUploadUrlCommand = class _CreateUploadUrlCommand extends import_smithy_client.Command.classBuilder().ep({
1392
+ ...commonParams
1393
+ }).m(function(Command, cs, config, o) {
1394
+ return [
1395
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1396
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1397
+ ];
1398
+ }).s("AwsCodeGuruSecurity", "CreateUploadUrl", {}).n("CodeGuruSecurityClient", "CreateUploadUrlCommand").f(void 0, CreateUploadUrlResponseFilterSensitiveLog).ser(se_CreateUploadUrlCommand).de(de_CreateUploadUrlCommand).build() {
1399
+ };
1400
+ __name(_CreateUploadUrlCommand, "CreateUploadUrlCommand");
1401
+ var CreateUploadUrlCommand = _CreateUploadUrlCommand;
1402
+
1403
+ // src/commands/GetAccountConfigurationCommand.ts
1404
+
1405
+
1406
+
1407
+
1408
+ var _GetAccountConfigurationCommand = class _GetAccountConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
1409
+ ...commonParams
1410
+ }).m(function(Command, cs, config, o) {
1411
+ return [
1412
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1413
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1414
+ ];
1415
+ }).s("AwsCodeGuruSecurity", "GetAccountConfiguration", {}).n("CodeGuruSecurityClient", "GetAccountConfigurationCommand").f(void 0, void 0).ser(se_GetAccountConfigurationCommand).de(de_GetAccountConfigurationCommand).build() {
1416
+ };
1417
+ __name(_GetAccountConfigurationCommand, "GetAccountConfigurationCommand");
1418
+ var GetAccountConfigurationCommand = _GetAccountConfigurationCommand;
1419
+
1420
+ // src/commands/GetFindingsCommand.ts
1421
+
1422
+
1423
+
1424
+
1425
+ var _GetFindingsCommand = class _GetFindingsCommand extends import_smithy_client.Command.classBuilder().ep({
1426
+ ...commonParams
1427
+ }).m(function(Command, cs, config, o) {
1428
+ return [
1429
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1430
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1431
+ ];
1432
+ }).s("AwsCodeGuruSecurity", "GetFindings", {}).n("CodeGuruSecurityClient", "GetFindingsCommand").f(void 0, void 0).ser(se_GetFindingsCommand).de(de_GetFindingsCommand).build() {
1433
+ };
1434
+ __name(_GetFindingsCommand, "GetFindingsCommand");
1435
+ var GetFindingsCommand = _GetFindingsCommand;
1436
+
1437
+ // src/commands/GetMetricsSummaryCommand.ts
1438
+
1439
+
1440
+
1441
+
1442
+ var _GetMetricsSummaryCommand = class _GetMetricsSummaryCommand extends import_smithy_client.Command.classBuilder().ep({
1443
+ ...commonParams
1444
+ }).m(function(Command, cs, config, o) {
1445
+ return [
1446
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1447
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1448
+ ];
1449
+ }).s("AwsCodeGuruSecurity", "GetMetricsSummary", {}).n("CodeGuruSecurityClient", "GetMetricsSummaryCommand").f(void 0, void 0).ser(se_GetMetricsSummaryCommand).de(de_GetMetricsSummaryCommand).build() {
1450
+ };
1451
+ __name(_GetMetricsSummaryCommand, "GetMetricsSummaryCommand");
1452
+ var GetMetricsSummaryCommand = _GetMetricsSummaryCommand;
1453
+
1454
+ // src/commands/GetScanCommand.ts
1455
+
1456
+
1457
+
1458
+
1459
+ var _GetScanCommand = class _GetScanCommand extends import_smithy_client.Command.classBuilder().ep({
1460
+ ...commonParams
1461
+ }).m(function(Command, cs, config, o) {
1462
+ return [
1463
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1464
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1465
+ ];
1466
+ }).s("AwsCodeGuruSecurity", "GetScan", {}).n("CodeGuruSecurityClient", "GetScanCommand").f(void 0, void 0).ser(se_GetScanCommand).de(de_GetScanCommand).build() {
1467
+ };
1468
+ __name(_GetScanCommand, "GetScanCommand");
1469
+ var GetScanCommand = _GetScanCommand;
1470
+
1471
+ // src/commands/ListFindingsMetricsCommand.ts
1472
+
1473
+
1474
+
1475
+
1476
+ var _ListFindingsMetricsCommand = class _ListFindingsMetricsCommand extends import_smithy_client.Command.classBuilder().ep({
1477
+ ...commonParams
1478
+ }).m(function(Command, cs, config, o) {
1479
+ return [
1480
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1481
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1482
+ ];
1483
+ }).s("AwsCodeGuruSecurity", "ListFindingsMetrics", {}).n("CodeGuruSecurityClient", "ListFindingsMetricsCommand").f(void 0, void 0).ser(se_ListFindingsMetricsCommand).de(de_ListFindingsMetricsCommand).build() {
1484
+ };
1485
+ __name(_ListFindingsMetricsCommand, "ListFindingsMetricsCommand");
1486
+ var ListFindingsMetricsCommand = _ListFindingsMetricsCommand;
1487
+
1488
+ // src/commands/ListScansCommand.ts
1489
+
1490
+
1491
+
1492
+
1493
+ var _ListScansCommand = class _ListScansCommand extends import_smithy_client.Command.classBuilder().ep({
1494
+ ...commonParams
1495
+ }).m(function(Command, cs, config, o) {
1496
+ return [
1497
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1498
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1499
+ ];
1500
+ }).s("AwsCodeGuruSecurity", "ListScans", {}).n("CodeGuruSecurityClient", "ListScansCommand").f(void 0, void 0).ser(se_ListScansCommand).de(de_ListScansCommand).build() {
1501
+ };
1502
+ __name(_ListScansCommand, "ListScansCommand");
1503
+ var ListScansCommand = _ListScansCommand;
1504
+
1505
+ // src/commands/ListTagsForResourceCommand.ts
1506
+
1507
+
1508
+
1509
+
1510
+ var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1511
+ ...commonParams
1512
+ }).m(function(Command, cs, config, o) {
1513
+ return [
1514
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1515
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1516
+ ];
1517
+ }).s("AwsCodeGuruSecurity", "ListTagsForResource", {}).n("CodeGuruSecurityClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1518
+ };
1519
+ __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
1520
+ var ListTagsForResourceCommand = _ListTagsForResourceCommand;
1521
+
1522
+ // src/commands/TagResourceCommand.ts
1523
+
1524
+
1525
+
1526
+
1527
+ var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1528
+ ...commonParams
1529
+ }).m(function(Command, cs, config, o) {
1530
+ return [
1531
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1532
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1533
+ ];
1534
+ }).s("AwsCodeGuruSecurity", "TagResource", {}).n("CodeGuruSecurityClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1535
+ };
1536
+ __name(_TagResourceCommand, "TagResourceCommand");
1537
+ var TagResourceCommand = _TagResourceCommand;
1538
+
1539
+ // src/commands/UntagResourceCommand.ts
1540
+
1541
+
1542
+
1543
+
1544
+ var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1545
+ ...commonParams
1546
+ }).m(function(Command, cs, config, o) {
1547
+ return [
1548
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1549
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1550
+ ];
1551
+ }).s("AwsCodeGuruSecurity", "UntagResource", {}).n("CodeGuruSecurityClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1552
+ };
1553
+ __name(_UntagResourceCommand, "UntagResourceCommand");
1554
+ var UntagResourceCommand = _UntagResourceCommand;
1555
+
1556
+ // src/commands/UpdateAccountConfigurationCommand.ts
1557
+
1558
+
1559
+
1560
+
1561
+ var _UpdateAccountConfigurationCommand = class _UpdateAccountConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
1562
+ ...commonParams
1563
+ }).m(function(Command, cs, config, o) {
1564
+ return [
1565
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1566
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1567
+ ];
1568
+ }).s("AwsCodeGuruSecurity", "UpdateAccountConfiguration", {}).n("CodeGuruSecurityClient", "UpdateAccountConfigurationCommand").f(void 0, void 0).ser(se_UpdateAccountConfigurationCommand).de(de_UpdateAccountConfigurationCommand).build() {
1569
+ };
1570
+ __name(_UpdateAccountConfigurationCommand, "UpdateAccountConfigurationCommand");
1571
+ var UpdateAccountConfigurationCommand = _UpdateAccountConfigurationCommand;
1572
+
1573
+ // src/CodeGuruSecurity.ts
1574
+ var commands = {
1575
+ BatchGetFindingsCommand,
1576
+ CreateScanCommand,
1577
+ CreateUploadUrlCommand,
1578
+ GetAccountConfigurationCommand,
1579
+ GetFindingsCommand,
1580
+ GetMetricsSummaryCommand,
1581
+ GetScanCommand,
1582
+ ListFindingsMetricsCommand,
1583
+ ListScansCommand,
1584
+ ListTagsForResourceCommand,
1585
+ TagResourceCommand,
1586
+ UntagResourceCommand,
1587
+ UpdateAccountConfigurationCommand
1588
+ };
1589
+ var _CodeGuruSecurity = class _CodeGuruSecurity extends CodeGuruSecurityClient {
1590
+ };
1591
+ __name(_CodeGuruSecurity, "CodeGuruSecurity");
1592
+ var CodeGuruSecurity = _CodeGuruSecurity;
1593
+ (0, import_smithy_client.createAggregatedClient)(commands, CodeGuruSecurity);
1594
+
1595
+ // src/pagination/GetFindingsPaginator.ts
1596
+ var import_core3 = require("@smithy/core");
1597
+ var paginateGetFindings = (0, import_core3.createPaginator)(CodeGuruSecurityClient, GetFindingsCommand, "nextToken", "nextToken", "maxResults");
1598
+
1599
+ // src/pagination/ListFindingsMetricsPaginator.ts
1600
+ var import_core4 = require("@smithy/core");
1601
+ var paginateListFindingsMetrics = (0, import_core4.createPaginator)(CodeGuruSecurityClient, ListFindingsMetricsCommand, "nextToken", "nextToken", "maxResults");
1602
+
1603
+ // src/pagination/ListScansPaginator.ts
1604
+ var import_core5 = require("@smithy/core");
1605
+ var paginateListScans = (0, import_core5.createPaginator)(CodeGuruSecurityClient, ListScansCommand, "nextToken", "nextToken", "maxResults");
1606
+
1607
+ // src/index.ts
1608
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1609
+ // Annotate the CommonJS export names for ESM import in node:
1610
+ 0 && (module.exports = {
1611
+ AccessDeniedException,
1612
+ AnalysisType,
1613
+ BatchGetFindingsCommand,
1614
+ CodeGuruSecurity,
1615
+ CodeGuruSecurityClient,
1616
+ CodeGuruSecurityServiceException,
1617
+ ConflictException,
1618
+ CreateScanCommand,
1619
+ CreateUploadUrlCommand,
1620
+ CreateUploadUrlResponseFilterSensitiveLog,
1621
+ ErrorCode,
1622
+ GetAccountConfigurationCommand,
1623
+ GetFindingsCommand,
1624
+ GetMetricsSummaryCommand,
1625
+ GetScanCommand,
1626
+ InternalServerException,
1627
+ ListFindingsMetricsCommand,
1628
+ ListScansCommand,
1629
+ ListTagsForResourceCommand,
1630
+ ResourceId,
1631
+ ResourceNotFoundException,
1632
+ ScanState,
1633
+ ScanType,
1634
+ Severity,
1635
+ Status,
1636
+ TagResourceCommand,
1637
+ ThrottlingException,
1638
+ UntagResourceCommand,
1639
+ UpdateAccountConfigurationCommand,
1640
+ ValidationException,
1641
+ ValidationExceptionReason,
1642
+ __Client,
1643
+ paginateGetFindings,
1644
+ paginateListFindingsMetrics,
1645
+ paginateListScans
1646
+ });