@aws-sdk/client-accessanalyzer 3.312.0 → 3.316.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.
@@ -14,11 +14,11 @@ const se_ApplyArchiveRuleCommand = async (input, context) => {
14
14
  };
15
15
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/archive-rule";
16
16
  let body;
17
- body = JSON.stringify({
18
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
19
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
20
- ...(input.ruleName != null && { ruleName: input.ruleName }),
21
- });
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ analyzerArn: [],
19
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
20
+ ruleName: [],
21
+ }));
22
22
  return new protocol_http_1.HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -54,11 +54,11 @@ const se_CreateAccessPreviewCommand = async (input, context) => {
54
54
  };
55
55
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/access-preview";
56
56
  let body;
57
- body = JSON.stringify({
58
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
59
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
60
- ...(input.configurations != null && { configurations: se_ConfigurationsMap(input.configurations, context) }),
61
- });
57
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
58
+ analyzerArn: [],
59
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
60
+ configurations: (_) => (0, smithy_client_1._json)(_),
61
+ }));
62
62
  return new protocol_http_1.HttpRequest({
63
63
  protocol,
64
64
  hostname,
@@ -77,13 +77,13 @@ const se_CreateAnalyzerCommand = async (input, context) => {
77
77
  };
78
78
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer";
79
79
  let body;
80
- body = JSON.stringify({
81
- ...(input.analyzerName != null && { analyzerName: input.analyzerName }),
82
- ...(input.archiveRules != null && { archiveRules: se_InlineArchiveRulesList(input.archiveRules, context) }),
83
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
84
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
85
- ...(input.type != null && { type: input.type }),
86
- });
80
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
81
+ analyzerName: [],
82
+ archiveRules: (_) => (0, smithy_client_1._json)(_),
83
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
84
+ tags: (_) => (0, smithy_client_1._json)(_),
85
+ type: [],
86
+ }));
87
87
  return new protocol_http_1.HttpRequest({
88
88
  protocol,
89
89
  hostname,
@@ -103,11 +103,11 @@ const se_CreateArchiveRuleCommand = async (input, context) => {
103
103
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer/{analyzerName}/archive-rule";
104
104
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
105
105
  let body;
106
- body = JSON.stringify({
107
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
108
- ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }),
109
- ...(input.ruleName != null && { ruleName: input.ruleName }),
110
- });
106
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
107
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
108
+ filter: (_) => (0, smithy_client_1._json)(_),
109
+ ruleName: [],
110
+ }));
111
111
  return new protocol_http_1.HttpRequest({
112
112
  protocol,
113
113
  hostname,
@@ -124,7 +124,7 @@ const se_DeleteAnalyzerCommand = async (input, context) => {
124
124
  const headers = {};
125
125
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer/{analyzerName}";
126
126
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
127
- const query = map({
127
+ const query = (0, smithy_client_1.map)({
128
128
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
129
129
  });
130
130
  let body;
@@ -147,7 +147,7 @@ const se_DeleteArchiveRuleCommand = async (input, context) => {
147
147
  "/analyzer/{analyzerName}/archive-rule/{ruleName}";
148
148
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
149
149
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ruleName", () => input.ruleName, "{ruleName}", false);
150
- const query = map({
150
+ const query = (0, smithy_client_1.map)({
151
151
  clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
152
152
  });
153
153
  let body;
@@ -168,7 +168,7 @@ const se_GetAccessPreviewCommand = async (input, context) => {
168
168
  const headers = {};
169
169
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/access-preview/{accessPreviewId}";
170
170
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accessPreviewId", () => input.accessPreviewId, "{accessPreviewId}", false);
171
- const query = map({
171
+ const query = (0, smithy_client_1.map)({
172
172
  analyzerArn: [, (0, smithy_client_1.expectNonNull)(input.analyzerArn, `analyzerArn`)],
173
173
  });
174
174
  let body;
@@ -188,7 +188,7 @@ const se_GetAnalyzedResourceCommand = async (input, context) => {
188
188
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
189
  const headers = {};
190
190
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzed-resource";
191
- const query = map({
191
+ const query = (0, smithy_client_1.map)({
192
192
  analyzerArn: [, (0, smithy_client_1.expectNonNull)(input.analyzerArn, `analyzerArn`)],
193
193
  resourceArn: [, (0, smithy_client_1.expectNonNull)(input.resourceArn, `resourceArn`)],
194
194
  });
@@ -246,7 +246,7 @@ const se_GetFindingCommand = async (input, context) => {
246
246
  const headers = {};
247
247
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/finding/{id}";
248
248
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
249
- const query = map({
249
+ const query = (0, smithy_client_1.map)({
250
250
  analyzerArn: [, (0, smithy_client_1.expectNonNull)(input.analyzerArn, `analyzerArn`)],
251
251
  });
252
252
  let body;
@@ -267,7 +267,7 @@ const se_GetGeneratedPolicyCommand = async (input, context) => {
267
267
  const headers = {};
268
268
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/generation/{jobId}";
269
269
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
270
- const query = map({
270
+ const query = (0, smithy_client_1.map)({
271
271
  includeResourcePlaceholders: [
272
272
  () => input.includeResourcePlaceholders !== void 0,
273
273
  () => input.includeResourcePlaceholders.toString(),
@@ -298,12 +298,12 @@ const se_ListAccessPreviewFindingsCommand = async (input, context) => {
298
298
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/access-preview/{accessPreviewId}";
299
299
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accessPreviewId", () => input.accessPreviewId, "{accessPreviewId}", false);
300
300
  let body;
301
- body = JSON.stringify({
302
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
303
- ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }),
304
- ...(input.maxResults != null && { maxResults: input.maxResults }),
305
- ...(input.nextToken != null && { nextToken: input.nextToken }),
306
- });
301
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
302
+ analyzerArn: [],
303
+ filter: (_) => (0, smithy_client_1._json)(_),
304
+ maxResults: [],
305
+ nextToken: [],
306
+ }));
307
307
  return new protocol_http_1.HttpRequest({
308
308
  protocol,
309
309
  hostname,
@@ -319,7 +319,7 @@ const se_ListAccessPreviewsCommand = async (input, context) => {
319
319
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
320
320
  const headers = {};
321
321
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/access-preview";
322
- const query = map({
322
+ const query = (0, smithy_client_1.map)({
323
323
  analyzerArn: [, (0, smithy_client_1.expectNonNull)(input.analyzerArn, `analyzerArn`)],
324
324
  nextToken: [, input.nextToken],
325
325
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -344,12 +344,12 @@ const se_ListAnalyzedResourcesCommand = async (input, context) => {
344
344
  };
345
345
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzed-resource";
346
346
  let body;
347
- body = JSON.stringify({
348
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
349
- ...(input.maxResults != null && { maxResults: input.maxResults }),
350
- ...(input.nextToken != null && { nextToken: input.nextToken }),
351
- ...(input.resourceType != null && { resourceType: input.resourceType }),
352
- });
347
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
348
+ analyzerArn: [],
349
+ maxResults: [],
350
+ nextToken: [],
351
+ resourceType: [],
352
+ }));
353
353
  return new protocol_http_1.HttpRequest({
354
354
  protocol,
355
355
  hostname,
@@ -365,7 +365,7 @@ const se_ListAnalyzersCommand = async (input, context) => {
365
365
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
366
366
  const headers = {};
367
367
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer";
368
- const query = map({
368
+ const query = (0, smithy_client_1.map)({
369
369
  nextToken: [, input.nextToken],
370
370
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
371
371
  type: [, input.type],
@@ -388,7 +388,7 @@ const se_ListArchiveRulesCommand = async (input, context) => {
388
388
  const headers = {};
389
389
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer/{analyzerName}/archive-rule";
390
390
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
391
- const query = map({
391
+ const query = (0, smithy_client_1.map)({
392
392
  nextToken: [, input.nextToken],
393
393
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
394
394
  });
@@ -412,13 +412,13 @@ const se_ListFindingsCommand = async (input, context) => {
412
412
  };
413
413
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/finding";
414
414
  let body;
415
- body = JSON.stringify({
416
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
417
- ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }),
418
- ...(input.maxResults != null && { maxResults: input.maxResults }),
419
- ...(input.nextToken != null && { nextToken: input.nextToken }),
420
- ...(input.sort != null && { sort: se_SortCriteria(input.sort, context) }),
421
- });
415
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
416
+ analyzerArn: [],
417
+ filter: (_) => (0, smithy_client_1._json)(_),
418
+ maxResults: [],
419
+ nextToken: [],
420
+ sort: (_) => (0, smithy_client_1._json)(_),
421
+ }));
422
422
  return new protocol_http_1.HttpRequest({
423
423
  protocol,
424
424
  hostname,
@@ -434,7 +434,7 @@ const se_ListPolicyGenerationsCommand = async (input, context) => {
434
434
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
435
435
  const headers = {};
436
436
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/generation";
437
- const query = map({
437
+ const query = (0, smithy_client_1.map)({
438
438
  principalArn: [, input.principalArn],
439
439
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
440
440
  nextToken: [, input.nextToken],
@@ -476,15 +476,11 @@ const se_StartPolicyGenerationCommand = async (input, context) => {
476
476
  };
477
477
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/generation";
478
478
  let body;
479
- body = JSON.stringify({
480
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
481
- ...(input.cloudTrailDetails != null && {
482
- cloudTrailDetails: se_CloudTrailDetails(input.cloudTrailDetails, context),
483
- }),
484
- ...(input.policyGenerationDetails != null && {
485
- policyGenerationDetails: se_PolicyGenerationDetails(input.policyGenerationDetails, context),
486
- }),
487
- });
479
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
480
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
481
+ cloudTrailDetails: (_) => se_CloudTrailDetails(_, context),
482
+ policyGenerationDetails: (_) => (0, smithy_client_1._json)(_),
483
+ }));
488
484
  return new protocol_http_1.HttpRequest({
489
485
  protocol,
490
486
  hostname,
@@ -503,11 +499,11 @@ const se_StartResourceScanCommand = async (input, context) => {
503
499
  };
504
500
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource/scan";
505
501
  let body;
506
- body = JSON.stringify({
507
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
508
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
509
- ...(input.resourceOwnerAccount != null && { resourceOwnerAccount: input.resourceOwnerAccount }),
510
- });
502
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
503
+ analyzerArn: [],
504
+ resourceArn: [],
505
+ resourceOwnerAccount: [],
506
+ }));
511
507
  return new protocol_http_1.HttpRequest({
512
508
  protocol,
513
509
  hostname,
@@ -527,9 +523,9 @@ const se_TagResourceCommand = async (input, context) => {
527
523
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
528
524
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
529
525
  let body;
530
- body = JSON.stringify({
531
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
532
- });
526
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
527
+ tags: (_) => (0, smithy_client_1._json)(_),
528
+ }));
533
529
  return new protocol_http_1.HttpRequest({
534
530
  protocol,
535
531
  hostname,
@@ -546,7 +542,7 @@ const se_UntagResourceCommand = async (input, context) => {
546
542
  const headers = {};
547
543
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
548
544
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
549
- const query = map({
545
+ const query = (0, smithy_client_1.map)({
550
546
  tagKeys: [
551
547
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
552
548
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -575,10 +571,10 @@ const se_UpdateArchiveRuleCommand = async (input, context) => {
575
571
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
576
572
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ruleName", () => input.ruleName, "{ruleName}", false);
577
573
  let body;
578
- body = JSON.stringify({
579
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
580
- ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }),
581
- });
574
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
575
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
576
+ filter: (_) => (0, smithy_client_1._json)(_),
577
+ }));
582
578
  return new protocol_http_1.HttpRequest({
583
579
  protocol,
584
580
  hostname,
@@ -597,13 +593,13 @@ const se_UpdateFindingsCommand = async (input, context) => {
597
593
  };
598
594
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/finding";
599
595
  let body;
600
- body = JSON.stringify({
601
- ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
602
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
603
- ...(input.ids != null && { ids: se_FindingIdList(input.ids, context) }),
604
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
605
- ...(input.status != null && { status: input.status }),
606
- });
596
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
597
+ analyzerArn: [],
598
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
599
+ ids: (_) => (0, smithy_client_1._json)(_),
600
+ resourceArn: [],
601
+ status: [],
602
+ }));
607
603
  return new protocol_http_1.HttpRequest({
608
604
  protocol,
609
605
  hostname,
@@ -621,17 +617,17 @@ const se_ValidatePolicyCommand = async (input, context) => {
621
617
  "content-type": "application/json",
622
618
  };
623
619
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/validation";
624
- const query = map({
620
+ const query = (0, smithy_client_1.map)({
625
621
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
626
622
  nextToken: [, input.nextToken],
627
623
  });
628
624
  let body;
629
- body = JSON.stringify({
630
- ...(input.locale != null && { locale: input.locale }),
631
- ...(input.policyDocument != null && { policyDocument: input.policyDocument }),
632
- ...(input.policyType != null && { policyType: input.policyType }),
633
- ...(input.validatePolicyResourceType != null && { validatePolicyResourceType: input.validatePolicyResourceType }),
634
- });
625
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
626
+ locale: [],
627
+ policyDocument: [],
628
+ policyType: [],
629
+ validatePolicyResourceType: [],
630
+ }));
635
631
  return new protocol_http_1.HttpRequest({
636
632
  protocol,
637
633
  hostname,
@@ -648,7 +644,7 @@ const de_ApplyArchiveRuleCommand = async (output, context) => {
648
644
  if (output.statusCode !== 200 && output.statusCode >= 300) {
649
645
  return de_ApplyArchiveRuleCommandError(output, context);
650
646
  }
651
- const contents = map({
647
+ const contents = (0, smithy_client_1.map)({
652
648
  $metadata: deserializeMetadata(output),
653
649
  });
654
650
  await collectBody(output.body, context);
@@ -679,10 +675,9 @@ const de_ApplyArchiveRuleCommandError = async (output, context) => {
679
675
  throw await de_ValidationExceptionRes(parsedOutput, context);
680
676
  default:
681
677
  const parsedBody = parsedOutput.body;
682
- (0, smithy_client_1.throwDefaultError)({
678
+ return throwDefaultError({
683
679
  output,
684
680
  parsedBody,
685
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
686
681
  errorCode,
687
682
  });
688
683
  }
@@ -691,7 +686,7 @@ const de_CancelPolicyGenerationCommand = async (output, context) => {
691
686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
692
687
  return de_CancelPolicyGenerationCommandError(output, context);
693
688
  }
694
- const contents = map({
689
+ const contents = (0, smithy_client_1.map)({
695
690
  $metadata: deserializeMetadata(output),
696
691
  });
697
692
  await collectBody(output.body, context);
@@ -719,10 +714,9 @@ const de_CancelPolicyGenerationCommandError = async (output, context) => {
719
714
  throw await de_ValidationExceptionRes(parsedOutput, context);
720
715
  default:
721
716
  const parsedBody = parsedOutput.body;
722
- (0, smithy_client_1.throwDefaultError)({
717
+ return throwDefaultError({
723
718
  output,
724
719
  parsedBody,
725
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
726
720
  errorCode,
727
721
  });
728
722
  }
@@ -731,13 +725,14 @@ const de_CreateAccessPreviewCommand = async (output, context) => {
731
725
  if (output.statusCode !== 200 && output.statusCode >= 300) {
732
726
  return de_CreateAccessPreviewCommandError(output, context);
733
727
  }
734
- const contents = map({
728
+ const contents = (0, smithy_client_1.map)({
735
729
  $metadata: deserializeMetadata(output),
736
730
  });
737
731
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
738
- if (data.id != null) {
739
- contents.id = (0, smithy_client_1.expectString)(data.id);
740
- }
732
+ const doc = (0, smithy_client_1.take)(data, {
733
+ id: smithy_client_1.expectString,
734
+ });
735
+ Object.assign(contents, doc);
741
736
  return contents;
742
737
  };
743
738
  exports.de_CreateAccessPreviewCommand = de_CreateAccessPreviewCommand;
@@ -771,10 +766,9 @@ const de_CreateAccessPreviewCommandError = async (output, context) => {
771
766
  throw await de_ValidationExceptionRes(parsedOutput, context);
772
767
  default:
773
768
  const parsedBody = parsedOutput.body;
774
- (0, smithy_client_1.throwDefaultError)({
769
+ return throwDefaultError({
775
770
  output,
776
771
  parsedBody,
777
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
778
772
  errorCode,
779
773
  });
780
774
  }
@@ -783,13 +777,14 @@ const de_CreateAnalyzerCommand = async (output, context) => {
783
777
  if (output.statusCode !== 200 && output.statusCode >= 300) {
784
778
  return de_CreateAnalyzerCommandError(output, context);
785
779
  }
786
- const contents = map({
780
+ const contents = (0, smithy_client_1.map)({
787
781
  $metadata: deserializeMetadata(output),
788
782
  });
789
783
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
790
- if (data.arn != null) {
791
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
792
- }
784
+ const doc = (0, smithy_client_1.take)(data, {
785
+ arn: smithy_client_1.expectString,
786
+ });
787
+ Object.assign(contents, doc);
793
788
  return contents;
794
789
  };
795
790
  exports.de_CreateAnalyzerCommand = de_CreateAnalyzerCommand;
@@ -820,10 +815,9 @@ const de_CreateAnalyzerCommandError = async (output, context) => {
820
815
  throw await de_ValidationExceptionRes(parsedOutput, context);
821
816
  default:
822
817
  const parsedBody = parsedOutput.body;
823
- (0, smithy_client_1.throwDefaultError)({
818
+ return throwDefaultError({
824
819
  output,
825
820
  parsedBody,
826
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
827
821
  errorCode,
828
822
  });
829
823
  }
@@ -832,7 +826,7 @@ const de_CreateArchiveRuleCommand = async (output, context) => {
832
826
  if (output.statusCode !== 200 && output.statusCode >= 300) {
833
827
  return de_CreateArchiveRuleCommandError(output, context);
834
828
  }
835
- const contents = map({
829
+ const contents = (0, smithy_client_1.map)({
836
830
  $metadata: deserializeMetadata(output),
837
831
  });
838
832
  await collectBody(output.body, context);
@@ -869,10 +863,9 @@ const de_CreateArchiveRuleCommandError = async (output, context) => {
869
863
  throw await de_ValidationExceptionRes(parsedOutput, context);
870
864
  default:
871
865
  const parsedBody = parsedOutput.body;
872
- (0, smithy_client_1.throwDefaultError)({
866
+ return throwDefaultError({
873
867
  output,
874
868
  parsedBody,
875
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
876
869
  errorCode,
877
870
  });
878
871
  }
@@ -881,7 +874,7 @@ const de_DeleteAnalyzerCommand = async (output, context) => {
881
874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
882
875
  return de_DeleteAnalyzerCommandError(output, context);
883
876
  }
884
- const contents = map({
877
+ const contents = (0, smithy_client_1.map)({
885
878
  $metadata: deserializeMetadata(output),
886
879
  });
887
880
  await collectBody(output.body, context);
@@ -912,10 +905,9 @@ const de_DeleteAnalyzerCommandError = async (output, context) => {
912
905
  throw await de_ValidationExceptionRes(parsedOutput, context);
913
906
  default:
914
907
  const parsedBody = parsedOutput.body;
915
- (0, smithy_client_1.throwDefaultError)({
908
+ return throwDefaultError({
916
909
  output,
917
910
  parsedBody,
918
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
919
911
  errorCode,
920
912
  });
921
913
  }
@@ -924,7 +916,7 @@ const de_DeleteArchiveRuleCommand = async (output, context) => {
924
916
  if (output.statusCode !== 200 && output.statusCode >= 300) {
925
917
  return de_DeleteArchiveRuleCommandError(output, context);
926
918
  }
927
- const contents = map({
919
+ const contents = (0, smithy_client_1.map)({
928
920
  $metadata: deserializeMetadata(output),
929
921
  });
930
922
  await collectBody(output.body, context);
@@ -955,10 +947,9 @@ const de_DeleteArchiveRuleCommandError = async (output, context) => {
955
947
  throw await de_ValidationExceptionRes(parsedOutput, context);
956
948
  default:
957
949
  const parsedBody = parsedOutput.body;
958
- (0, smithy_client_1.throwDefaultError)({
950
+ return throwDefaultError({
959
951
  output,
960
952
  parsedBody,
961
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
962
953
  errorCode,
963
954
  });
964
955
  }
@@ -967,13 +958,14 @@ const de_GetAccessPreviewCommand = async (output, context) => {
967
958
  if (output.statusCode !== 200 && output.statusCode >= 300) {
968
959
  return de_GetAccessPreviewCommandError(output, context);
969
960
  }
970
- const contents = map({
961
+ const contents = (0, smithy_client_1.map)({
971
962
  $metadata: deserializeMetadata(output),
972
963
  });
973
964
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
974
- if (data.accessPreview != null) {
975
- contents.accessPreview = de_AccessPreview(data.accessPreview, context);
976
- }
965
+ const doc = (0, smithy_client_1.take)(data, {
966
+ accessPreview: (_) => de_AccessPreview(_, context),
967
+ });
968
+ Object.assign(contents, doc);
977
969
  return contents;
978
970
  };
979
971
  exports.de_GetAccessPreviewCommand = de_GetAccessPreviewCommand;
@@ -1001,10 +993,9 @@ const de_GetAccessPreviewCommandError = async (output, context) => {
1001
993
  throw await de_ValidationExceptionRes(parsedOutput, context);
1002
994
  default:
1003
995
  const parsedBody = parsedOutput.body;
1004
- (0, smithy_client_1.throwDefaultError)({
996
+ return throwDefaultError({
1005
997
  output,
1006
998
  parsedBody,
1007
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1008
999
  errorCode,
1009
1000
  });
1010
1001
  }
@@ -1013,13 +1004,14 @@ const de_GetAnalyzedResourceCommand = async (output, context) => {
1013
1004
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1014
1005
  return de_GetAnalyzedResourceCommandError(output, context);
1015
1006
  }
1016
- const contents = map({
1007
+ const contents = (0, smithy_client_1.map)({
1017
1008
  $metadata: deserializeMetadata(output),
1018
1009
  });
1019
1010
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1020
- if (data.resource != null) {
1021
- contents.resource = de_AnalyzedResource(data.resource, context);
1022
- }
1011
+ const doc = (0, smithy_client_1.take)(data, {
1012
+ resource: (_) => de_AnalyzedResource(_, context),
1013
+ });
1014
+ Object.assign(contents, doc);
1023
1015
  return contents;
1024
1016
  };
1025
1017
  exports.de_GetAnalyzedResourceCommand = de_GetAnalyzedResourceCommand;
@@ -1047,10 +1039,9 @@ const de_GetAnalyzedResourceCommandError = async (output, context) => {
1047
1039
  throw await de_ValidationExceptionRes(parsedOutput, context);
1048
1040
  default:
1049
1041
  const parsedBody = parsedOutput.body;
1050
- (0, smithy_client_1.throwDefaultError)({
1042
+ return throwDefaultError({
1051
1043
  output,
1052
1044
  parsedBody,
1053
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1054
1045
  errorCode,
1055
1046
  });
1056
1047
  }
@@ -1059,13 +1050,14 @@ const de_GetAnalyzerCommand = async (output, context) => {
1059
1050
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1060
1051
  return de_GetAnalyzerCommandError(output, context);
1061
1052
  }
1062
- const contents = map({
1053
+ const contents = (0, smithy_client_1.map)({
1063
1054
  $metadata: deserializeMetadata(output),
1064
1055
  });
1065
1056
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1066
- if (data.analyzer != null) {
1067
- contents.analyzer = de_AnalyzerSummary(data.analyzer, context);
1068
- }
1057
+ const doc = (0, smithy_client_1.take)(data, {
1058
+ analyzer: (_) => de_AnalyzerSummary(_, context),
1059
+ });
1060
+ Object.assign(contents, doc);
1069
1061
  return contents;
1070
1062
  };
1071
1063
  exports.de_GetAnalyzerCommand = de_GetAnalyzerCommand;
@@ -1093,10 +1085,9 @@ const de_GetAnalyzerCommandError = async (output, context) => {
1093
1085
  throw await de_ValidationExceptionRes(parsedOutput, context);
1094
1086
  default:
1095
1087
  const parsedBody = parsedOutput.body;
1096
- (0, smithy_client_1.throwDefaultError)({
1088
+ return throwDefaultError({
1097
1089
  output,
1098
1090
  parsedBody,
1099
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1100
1091
  errorCode,
1101
1092
  });
1102
1093
  }
@@ -1105,13 +1096,14 @@ const de_GetArchiveRuleCommand = async (output, context) => {
1105
1096
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1106
1097
  return de_GetArchiveRuleCommandError(output, context);
1107
1098
  }
1108
- const contents = map({
1099
+ const contents = (0, smithy_client_1.map)({
1109
1100
  $metadata: deserializeMetadata(output),
1110
1101
  });
1111
1102
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1112
- if (data.archiveRule != null) {
1113
- contents.archiveRule = de_ArchiveRuleSummary(data.archiveRule, context);
1114
- }
1103
+ const doc = (0, smithy_client_1.take)(data, {
1104
+ archiveRule: (_) => de_ArchiveRuleSummary(_, context),
1105
+ });
1106
+ Object.assign(contents, doc);
1115
1107
  return contents;
1116
1108
  };
1117
1109
  exports.de_GetArchiveRuleCommand = de_GetArchiveRuleCommand;
@@ -1139,10 +1131,9 @@ const de_GetArchiveRuleCommandError = async (output, context) => {
1139
1131
  throw await de_ValidationExceptionRes(parsedOutput, context);
1140
1132
  default:
1141
1133
  const parsedBody = parsedOutput.body;
1142
- (0, smithy_client_1.throwDefaultError)({
1134
+ return throwDefaultError({
1143
1135
  output,
1144
1136
  parsedBody,
1145
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1146
1137
  errorCode,
1147
1138
  });
1148
1139
  }
@@ -1151,13 +1142,14 @@ const de_GetFindingCommand = async (output, context) => {
1151
1142
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1152
1143
  return de_GetFindingCommandError(output, context);
1153
1144
  }
1154
- const contents = map({
1145
+ const contents = (0, smithy_client_1.map)({
1155
1146
  $metadata: deserializeMetadata(output),
1156
1147
  });
1157
1148
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1158
- if (data.finding != null) {
1159
- contents.finding = de_Finding(data.finding, context);
1160
- }
1149
+ const doc = (0, smithy_client_1.take)(data, {
1150
+ finding: (_) => de_Finding(_, context),
1151
+ });
1152
+ Object.assign(contents, doc);
1161
1153
  return contents;
1162
1154
  };
1163
1155
  exports.de_GetFindingCommand = de_GetFindingCommand;
@@ -1185,10 +1177,9 @@ const de_GetFindingCommandError = async (output, context) => {
1185
1177
  throw await de_ValidationExceptionRes(parsedOutput, context);
1186
1178
  default:
1187
1179
  const parsedBody = parsedOutput.body;
1188
- (0, smithy_client_1.throwDefaultError)({
1180
+ return throwDefaultError({
1189
1181
  output,
1190
1182
  parsedBody,
1191
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1192
1183
  errorCode,
1193
1184
  });
1194
1185
  }
@@ -1197,16 +1188,15 @@ const de_GetGeneratedPolicyCommand = async (output, context) => {
1197
1188
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1198
1189
  return de_GetGeneratedPolicyCommandError(output, context);
1199
1190
  }
1200
- const contents = map({
1191
+ const contents = (0, smithy_client_1.map)({
1201
1192
  $metadata: deserializeMetadata(output),
1202
1193
  });
1203
1194
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1204
- if (data.generatedPolicyResult != null) {
1205
- contents.generatedPolicyResult = de_GeneratedPolicyResult(data.generatedPolicyResult, context);
1206
- }
1207
- if (data.jobDetails != null) {
1208
- contents.jobDetails = de_JobDetails(data.jobDetails, context);
1209
- }
1195
+ const doc = (0, smithy_client_1.take)(data, {
1196
+ generatedPolicyResult: (_) => de_GeneratedPolicyResult(_, context),
1197
+ jobDetails: (_) => de_JobDetails(_, context),
1198
+ });
1199
+ Object.assign(contents, doc);
1210
1200
  return contents;
1211
1201
  };
1212
1202
  exports.de_GetGeneratedPolicyCommand = de_GetGeneratedPolicyCommand;
@@ -1231,10 +1221,9 @@ const de_GetGeneratedPolicyCommandError = async (output, context) => {
1231
1221
  throw await de_ValidationExceptionRes(parsedOutput, context);
1232
1222
  default:
1233
1223
  const parsedBody = parsedOutput.body;
1234
- (0, smithy_client_1.throwDefaultError)({
1224
+ return throwDefaultError({
1235
1225
  output,
1236
1226
  parsedBody,
1237
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1238
1227
  errorCode,
1239
1228
  });
1240
1229
  }
@@ -1243,16 +1232,15 @@ const de_ListAccessPreviewFindingsCommand = async (output, context) => {
1243
1232
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1244
1233
  return de_ListAccessPreviewFindingsCommandError(output, context);
1245
1234
  }
1246
- const contents = map({
1235
+ const contents = (0, smithy_client_1.map)({
1247
1236
  $metadata: deserializeMetadata(output),
1248
1237
  });
1249
1238
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1250
- if (data.findings != null) {
1251
- contents.findings = de_AccessPreviewFindingsList(data.findings, context);
1252
- }
1253
- if (data.nextToken != null) {
1254
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1255
- }
1239
+ const doc = (0, smithy_client_1.take)(data, {
1240
+ findings: (_) => de_AccessPreviewFindingsList(_, context),
1241
+ nextToken: smithy_client_1.expectString,
1242
+ });
1243
+ Object.assign(contents, doc);
1256
1244
  return contents;
1257
1245
  };
1258
1246
  exports.de_ListAccessPreviewFindingsCommand = de_ListAccessPreviewFindingsCommand;
@@ -1283,10 +1271,9 @@ const de_ListAccessPreviewFindingsCommandError = async (output, context) => {
1283
1271
  throw await de_ValidationExceptionRes(parsedOutput, context);
1284
1272
  default:
1285
1273
  const parsedBody = parsedOutput.body;
1286
- (0, smithy_client_1.throwDefaultError)({
1274
+ return throwDefaultError({
1287
1275
  output,
1288
1276
  parsedBody,
1289
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1290
1277
  errorCode,
1291
1278
  });
1292
1279
  }
@@ -1295,16 +1282,15 @@ const de_ListAccessPreviewsCommand = async (output, context) => {
1295
1282
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1296
1283
  return de_ListAccessPreviewsCommandError(output, context);
1297
1284
  }
1298
- const contents = map({
1285
+ const contents = (0, smithy_client_1.map)({
1299
1286
  $metadata: deserializeMetadata(output),
1300
1287
  });
1301
1288
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1302
- if (data.accessPreviews != null) {
1303
- contents.accessPreviews = de_AccessPreviewsList(data.accessPreviews, context);
1304
- }
1305
- if (data.nextToken != null) {
1306
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1307
- }
1289
+ const doc = (0, smithy_client_1.take)(data, {
1290
+ accessPreviews: (_) => de_AccessPreviewsList(_, context),
1291
+ nextToken: smithy_client_1.expectString,
1292
+ });
1293
+ Object.assign(contents, doc);
1308
1294
  return contents;
1309
1295
  };
1310
1296
  exports.de_ListAccessPreviewsCommand = de_ListAccessPreviewsCommand;
@@ -1332,10 +1318,9 @@ const de_ListAccessPreviewsCommandError = async (output, context) => {
1332
1318
  throw await de_ValidationExceptionRes(parsedOutput, context);
1333
1319
  default:
1334
1320
  const parsedBody = parsedOutput.body;
1335
- (0, smithy_client_1.throwDefaultError)({
1321
+ return throwDefaultError({
1336
1322
  output,
1337
1323
  parsedBody,
1338
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1339
1324
  errorCode,
1340
1325
  });
1341
1326
  }
@@ -1344,16 +1329,15 @@ const de_ListAnalyzedResourcesCommand = async (output, context) => {
1344
1329
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1345
1330
  return de_ListAnalyzedResourcesCommandError(output, context);
1346
1331
  }
1347
- const contents = map({
1332
+ const contents = (0, smithy_client_1.map)({
1348
1333
  $metadata: deserializeMetadata(output),
1349
1334
  });
1350
1335
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1351
- if (data.analyzedResources != null) {
1352
- contents.analyzedResources = de_AnalyzedResourcesList(data.analyzedResources, context);
1353
- }
1354
- if (data.nextToken != null) {
1355
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1356
- }
1336
+ const doc = (0, smithy_client_1.take)(data, {
1337
+ analyzedResources: smithy_client_1._json,
1338
+ nextToken: smithy_client_1.expectString,
1339
+ });
1340
+ Object.assign(contents, doc);
1357
1341
  return contents;
1358
1342
  };
1359
1343
  exports.de_ListAnalyzedResourcesCommand = de_ListAnalyzedResourcesCommand;
@@ -1381,10 +1365,9 @@ const de_ListAnalyzedResourcesCommandError = async (output, context) => {
1381
1365
  throw await de_ValidationExceptionRes(parsedOutput, context);
1382
1366
  default:
1383
1367
  const parsedBody = parsedOutput.body;
1384
- (0, smithy_client_1.throwDefaultError)({
1368
+ return throwDefaultError({
1385
1369
  output,
1386
1370
  parsedBody,
1387
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1388
1371
  errorCode,
1389
1372
  });
1390
1373
  }
@@ -1393,16 +1376,15 @@ const de_ListAnalyzersCommand = async (output, context) => {
1393
1376
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1394
1377
  return de_ListAnalyzersCommandError(output, context);
1395
1378
  }
1396
- const contents = map({
1379
+ const contents = (0, smithy_client_1.map)({
1397
1380
  $metadata: deserializeMetadata(output),
1398
1381
  });
1399
1382
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1400
- if (data.analyzers != null) {
1401
- contents.analyzers = de_AnalyzersList(data.analyzers, context);
1402
- }
1403
- if (data.nextToken != null) {
1404
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1405
- }
1383
+ const doc = (0, smithy_client_1.take)(data, {
1384
+ analyzers: (_) => de_AnalyzersList(_, context),
1385
+ nextToken: smithy_client_1.expectString,
1386
+ });
1387
+ Object.assign(contents, doc);
1406
1388
  return contents;
1407
1389
  };
1408
1390
  exports.de_ListAnalyzersCommand = de_ListAnalyzersCommand;
@@ -1427,10 +1409,9 @@ const de_ListAnalyzersCommandError = async (output, context) => {
1427
1409
  throw await de_ValidationExceptionRes(parsedOutput, context);
1428
1410
  default:
1429
1411
  const parsedBody = parsedOutput.body;
1430
- (0, smithy_client_1.throwDefaultError)({
1412
+ return throwDefaultError({
1431
1413
  output,
1432
1414
  parsedBody,
1433
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1434
1415
  errorCode,
1435
1416
  });
1436
1417
  }
@@ -1439,16 +1420,15 @@ const de_ListArchiveRulesCommand = async (output, context) => {
1439
1420
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1440
1421
  return de_ListArchiveRulesCommandError(output, context);
1441
1422
  }
1442
- const contents = map({
1423
+ const contents = (0, smithy_client_1.map)({
1443
1424
  $metadata: deserializeMetadata(output),
1444
1425
  });
1445
1426
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1446
- if (data.archiveRules != null) {
1447
- contents.archiveRules = de_ArchiveRulesList(data.archiveRules, context);
1448
- }
1449
- if (data.nextToken != null) {
1450
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1451
- }
1427
+ const doc = (0, smithy_client_1.take)(data, {
1428
+ archiveRules: (_) => de_ArchiveRulesList(_, context),
1429
+ nextToken: smithy_client_1.expectString,
1430
+ });
1431
+ Object.assign(contents, doc);
1452
1432
  return contents;
1453
1433
  };
1454
1434
  exports.de_ListArchiveRulesCommand = de_ListArchiveRulesCommand;
@@ -1473,10 +1453,9 @@ const de_ListArchiveRulesCommandError = async (output, context) => {
1473
1453
  throw await de_ValidationExceptionRes(parsedOutput, context);
1474
1454
  default:
1475
1455
  const parsedBody = parsedOutput.body;
1476
- (0, smithy_client_1.throwDefaultError)({
1456
+ return throwDefaultError({
1477
1457
  output,
1478
1458
  parsedBody,
1479
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1480
1459
  errorCode,
1481
1460
  });
1482
1461
  }
@@ -1485,16 +1464,15 @@ const de_ListFindingsCommand = async (output, context) => {
1485
1464
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1486
1465
  return de_ListFindingsCommandError(output, context);
1487
1466
  }
1488
- const contents = map({
1467
+ const contents = (0, smithy_client_1.map)({
1489
1468
  $metadata: deserializeMetadata(output),
1490
1469
  });
1491
1470
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1492
- if (data.findings != null) {
1493
- contents.findings = de_FindingsList(data.findings, context);
1494
- }
1495
- if (data.nextToken != null) {
1496
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1497
- }
1471
+ const doc = (0, smithy_client_1.take)(data, {
1472
+ findings: (_) => de_FindingsList(_, context),
1473
+ nextToken: smithy_client_1.expectString,
1474
+ });
1475
+ Object.assign(contents, doc);
1498
1476
  return contents;
1499
1477
  };
1500
1478
  exports.de_ListFindingsCommand = de_ListFindingsCommand;
@@ -1522,10 +1500,9 @@ const de_ListFindingsCommandError = async (output, context) => {
1522
1500
  throw await de_ValidationExceptionRes(parsedOutput, context);
1523
1501
  default:
1524
1502
  const parsedBody = parsedOutput.body;
1525
- (0, smithy_client_1.throwDefaultError)({
1503
+ return throwDefaultError({
1526
1504
  output,
1527
1505
  parsedBody,
1528
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1529
1506
  errorCode,
1530
1507
  });
1531
1508
  }
@@ -1534,16 +1511,15 @@ const de_ListPolicyGenerationsCommand = async (output, context) => {
1534
1511
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1535
1512
  return de_ListPolicyGenerationsCommandError(output, context);
1536
1513
  }
1537
- const contents = map({
1514
+ const contents = (0, smithy_client_1.map)({
1538
1515
  $metadata: deserializeMetadata(output),
1539
1516
  });
1540
1517
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1541
- if (data.nextToken != null) {
1542
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1543
- }
1544
- if (data.policyGenerations != null) {
1545
- contents.policyGenerations = de_PolicyGenerationList(data.policyGenerations, context);
1546
- }
1518
+ const doc = (0, smithy_client_1.take)(data, {
1519
+ nextToken: smithy_client_1.expectString,
1520
+ policyGenerations: (_) => de_PolicyGenerationList(_, context),
1521
+ });
1522
+ Object.assign(contents, doc);
1547
1523
  return contents;
1548
1524
  };
1549
1525
  exports.de_ListPolicyGenerationsCommand = de_ListPolicyGenerationsCommand;
@@ -1568,10 +1544,9 @@ const de_ListPolicyGenerationsCommandError = async (output, context) => {
1568
1544
  throw await de_ValidationExceptionRes(parsedOutput, context);
1569
1545
  default:
1570
1546
  const parsedBody = parsedOutput.body;
1571
- (0, smithy_client_1.throwDefaultError)({
1547
+ return throwDefaultError({
1572
1548
  output,
1573
1549
  parsedBody,
1574
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1575
1550
  errorCode,
1576
1551
  });
1577
1552
  }
@@ -1580,13 +1555,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1580
1555
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1581
1556
  return de_ListTagsForResourceCommandError(output, context);
1582
1557
  }
1583
- const contents = map({
1558
+ const contents = (0, smithy_client_1.map)({
1584
1559
  $metadata: deserializeMetadata(output),
1585
1560
  });
1586
1561
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1587
- if (data.tags != null) {
1588
- contents.tags = de_TagsMap(data.tags, context);
1589
- }
1562
+ const doc = (0, smithy_client_1.take)(data, {
1563
+ tags: smithy_client_1._json,
1564
+ });
1565
+ Object.assign(contents, doc);
1590
1566
  return contents;
1591
1567
  };
1592
1568
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1614,10 +1590,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1614
1590
  throw await de_ValidationExceptionRes(parsedOutput, context);
1615
1591
  default:
1616
1592
  const parsedBody = parsedOutput.body;
1617
- (0, smithy_client_1.throwDefaultError)({
1593
+ return throwDefaultError({
1618
1594
  output,
1619
1595
  parsedBody,
1620
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1621
1596
  errorCode,
1622
1597
  });
1623
1598
  }
@@ -1626,13 +1601,14 @@ const de_StartPolicyGenerationCommand = async (output, context) => {
1626
1601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1627
1602
  return de_StartPolicyGenerationCommandError(output, context);
1628
1603
  }
1629
- const contents = map({
1604
+ const contents = (0, smithy_client_1.map)({
1630
1605
  $metadata: deserializeMetadata(output),
1631
1606
  });
1632
1607
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1633
- if (data.jobId != null) {
1634
- contents.jobId = (0, smithy_client_1.expectString)(data.jobId);
1635
- }
1608
+ const doc = (0, smithy_client_1.take)(data, {
1609
+ jobId: smithy_client_1.expectString,
1610
+ });
1611
+ Object.assign(contents, doc);
1636
1612
  return contents;
1637
1613
  };
1638
1614
  exports.de_StartPolicyGenerationCommand = de_StartPolicyGenerationCommand;
@@ -1663,10 +1639,9 @@ const de_StartPolicyGenerationCommandError = async (output, context) => {
1663
1639
  throw await de_ValidationExceptionRes(parsedOutput, context);
1664
1640
  default:
1665
1641
  const parsedBody = parsedOutput.body;
1666
- (0, smithy_client_1.throwDefaultError)({
1642
+ return throwDefaultError({
1667
1643
  output,
1668
1644
  parsedBody,
1669
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1670
1645
  errorCode,
1671
1646
  });
1672
1647
  }
@@ -1675,7 +1650,7 @@ const de_StartResourceScanCommand = async (output, context) => {
1675
1650
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1676
1651
  return de_StartResourceScanCommandError(output, context);
1677
1652
  }
1678
- const contents = map({
1653
+ const contents = (0, smithy_client_1.map)({
1679
1654
  $metadata: deserializeMetadata(output),
1680
1655
  });
1681
1656
  await collectBody(output.body, context);
@@ -1706,10 +1681,9 @@ const de_StartResourceScanCommandError = async (output, context) => {
1706
1681
  throw await de_ValidationExceptionRes(parsedOutput, context);
1707
1682
  default:
1708
1683
  const parsedBody = parsedOutput.body;
1709
- (0, smithy_client_1.throwDefaultError)({
1684
+ return throwDefaultError({
1710
1685
  output,
1711
1686
  parsedBody,
1712
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1713
1687
  errorCode,
1714
1688
  });
1715
1689
  }
@@ -1718,7 +1692,7 @@ const de_TagResourceCommand = async (output, context) => {
1718
1692
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1719
1693
  return de_TagResourceCommandError(output, context);
1720
1694
  }
1721
- const contents = map({
1695
+ const contents = (0, smithy_client_1.map)({
1722
1696
  $metadata: deserializeMetadata(output),
1723
1697
  });
1724
1698
  await collectBody(output.body, context);
@@ -1749,10 +1723,9 @@ const de_TagResourceCommandError = async (output, context) => {
1749
1723
  throw await de_ValidationExceptionRes(parsedOutput, context);
1750
1724
  default:
1751
1725
  const parsedBody = parsedOutput.body;
1752
- (0, smithy_client_1.throwDefaultError)({
1726
+ return throwDefaultError({
1753
1727
  output,
1754
1728
  parsedBody,
1755
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1756
1729
  errorCode,
1757
1730
  });
1758
1731
  }
@@ -1761,7 +1734,7 @@ const de_UntagResourceCommand = async (output, context) => {
1761
1734
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1762
1735
  return de_UntagResourceCommandError(output, context);
1763
1736
  }
1764
- const contents = map({
1737
+ const contents = (0, smithy_client_1.map)({
1765
1738
  $metadata: deserializeMetadata(output),
1766
1739
  });
1767
1740
  await collectBody(output.body, context);
@@ -1792,10 +1765,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1792
1765
  throw await de_ValidationExceptionRes(parsedOutput, context);
1793
1766
  default:
1794
1767
  const parsedBody = parsedOutput.body;
1795
- (0, smithy_client_1.throwDefaultError)({
1768
+ return throwDefaultError({
1796
1769
  output,
1797
1770
  parsedBody,
1798
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1799
1771
  errorCode,
1800
1772
  });
1801
1773
  }
@@ -1804,7 +1776,7 @@ const de_UpdateArchiveRuleCommand = async (output, context) => {
1804
1776
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1805
1777
  return de_UpdateArchiveRuleCommandError(output, context);
1806
1778
  }
1807
- const contents = map({
1779
+ const contents = (0, smithy_client_1.map)({
1808
1780
  $metadata: deserializeMetadata(output),
1809
1781
  });
1810
1782
  await collectBody(output.body, context);
@@ -1835,10 +1807,9 @@ const de_UpdateArchiveRuleCommandError = async (output, context) => {
1835
1807
  throw await de_ValidationExceptionRes(parsedOutput, context);
1836
1808
  default:
1837
1809
  const parsedBody = parsedOutput.body;
1838
- (0, smithy_client_1.throwDefaultError)({
1810
+ return throwDefaultError({
1839
1811
  output,
1840
1812
  parsedBody,
1841
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1842
1813
  errorCode,
1843
1814
  });
1844
1815
  }
@@ -1847,7 +1818,7 @@ const de_UpdateFindingsCommand = async (output, context) => {
1847
1818
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1848
1819
  return de_UpdateFindingsCommandError(output, context);
1849
1820
  }
1850
- const contents = map({
1821
+ const contents = (0, smithy_client_1.map)({
1851
1822
  $metadata: deserializeMetadata(output),
1852
1823
  });
1853
1824
  await collectBody(output.body, context);
@@ -1878,10 +1849,9 @@ const de_UpdateFindingsCommandError = async (output, context) => {
1878
1849
  throw await de_ValidationExceptionRes(parsedOutput, context);
1879
1850
  default:
1880
1851
  const parsedBody = parsedOutput.body;
1881
- (0, smithy_client_1.throwDefaultError)({
1852
+ return throwDefaultError({
1882
1853
  output,
1883
1854
  parsedBody,
1884
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1885
1855
  errorCode,
1886
1856
  });
1887
1857
  }
@@ -1890,16 +1860,15 @@ const de_ValidatePolicyCommand = async (output, context) => {
1890
1860
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1891
1861
  return de_ValidatePolicyCommandError(output, context);
1892
1862
  }
1893
- const contents = map({
1863
+ const contents = (0, smithy_client_1.map)({
1894
1864
  $metadata: deserializeMetadata(output),
1895
1865
  });
1896
1866
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1897
- if (data.findings != null) {
1898
- contents.findings = de_ValidatePolicyFindingList(data.findings, context);
1899
- }
1900
- if (data.nextToken != null) {
1901
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1902
- }
1867
+ const doc = (0, smithy_client_1.take)(data, {
1868
+ findings: smithy_client_1._json,
1869
+ nextToken: smithy_client_1.expectString,
1870
+ });
1871
+ Object.assign(contents, doc);
1903
1872
  return contents;
1904
1873
  };
1905
1874
  exports.de_ValidatePolicyCommand = de_ValidatePolicyCommand;
@@ -1924,21 +1893,21 @@ const de_ValidatePolicyCommandError = async (output, context) => {
1924
1893
  throw await de_ValidationExceptionRes(parsedOutput, context);
1925
1894
  default:
1926
1895
  const parsedBody = parsedOutput.body;
1927
- (0, smithy_client_1.throwDefaultError)({
1896
+ return throwDefaultError({
1928
1897
  output,
1929
1898
  parsedBody,
1930
- exceptionCtor: AccessAnalyzerServiceException_1.AccessAnalyzerServiceException,
1931
1899
  errorCode,
1932
1900
  });
1933
1901
  }
1934
1902
  };
1935
- const map = smithy_client_1.map;
1903
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AccessAnalyzerServiceException_1.AccessAnalyzerServiceException);
1936
1904
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1937
- const contents = map({});
1905
+ const contents = (0, smithy_client_1.map)({});
1938
1906
  const data = parsedOutput.body;
1939
- if (data.message != null) {
1940
- contents.message = (0, smithy_client_1.expectString)(data.message);
1941
- }
1907
+ const doc = (0, smithy_client_1.take)(data, {
1908
+ message: smithy_client_1.expectString,
1909
+ });
1910
+ Object.assign(contents, doc);
1942
1911
  const exception = new models_0_1.AccessDeniedException({
1943
1912
  $metadata: deserializeMetadata(parsedOutput),
1944
1913
  ...contents,
@@ -1946,17 +1915,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1946
1915
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1947
1916
  };
1948
1917
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1949
- const contents = map({});
1918
+ const contents = (0, smithy_client_1.map)({});
1950
1919
  const data = parsedOutput.body;
1951
- if (data.message != null) {
1952
- contents.message = (0, smithy_client_1.expectString)(data.message);
1953
- }
1954
- if (data.resourceId != null) {
1955
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
1956
- }
1957
- if (data.resourceType != null) {
1958
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
1959
- }
1920
+ const doc = (0, smithy_client_1.take)(data, {
1921
+ message: smithy_client_1.expectString,
1922
+ resourceId: smithy_client_1.expectString,
1923
+ resourceType: smithy_client_1.expectString,
1924
+ });
1925
+ Object.assign(contents, doc);
1960
1926
  const exception = new models_0_1.ConflictException({
1961
1927
  $metadata: deserializeMetadata(parsedOutput),
1962
1928
  ...contents,
@@ -1964,16 +1930,17 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1964
1930
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1965
1931
  };
1966
1932
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1967
- const contents = map({
1933
+ const contents = (0, smithy_client_1.map)({
1968
1934
  retryAfterSeconds: [
1969
1935
  () => void 0 !== parsedOutput.headers["retry-after"],
1970
1936
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1971
1937
  ],
1972
1938
  });
1973
1939
  const data = parsedOutput.body;
1974
- if (data.message != null) {
1975
- contents.message = (0, smithy_client_1.expectString)(data.message);
1976
- }
1940
+ const doc = (0, smithy_client_1.take)(data, {
1941
+ message: smithy_client_1.expectString,
1942
+ });
1943
+ Object.assign(contents, doc);
1977
1944
  const exception = new models_0_1.InternalServerException({
1978
1945
  $metadata: deserializeMetadata(parsedOutput),
1979
1946
  ...contents,
@@ -1981,17 +1948,14 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1981
1948
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1982
1949
  };
1983
1950
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1984
- const contents = map({});
1951
+ const contents = (0, smithy_client_1.map)({});
1985
1952
  const data = parsedOutput.body;
1986
- if (data.message != null) {
1987
- contents.message = (0, smithy_client_1.expectString)(data.message);
1988
- }
1989
- if (data.resourceId != null) {
1990
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
1991
- }
1992
- if (data.resourceType != null) {
1993
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
1994
- }
1953
+ const doc = (0, smithy_client_1.take)(data, {
1954
+ message: smithy_client_1.expectString,
1955
+ resourceId: smithy_client_1.expectString,
1956
+ resourceType: smithy_client_1.expectString,
1957
+ });
1958
+ Object.assign(contents, doc);
1995
1959
  const exception = new models_0_1.ResourceNotFoundException({
1996
1960
  $metadata: deserializeMetadata(parsedOutput),
1997
1961
  ...contents,
@@ -1999,17 +1963,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1999
1963
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2000
1964
  };
2001
1965
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2002
- const contents = map({});
1966
+ const contents = (0, smithy_client_1.map)({});
2003
1967
  const data = parsedOutput.body;
2004
- if (data.message != null) {
2005
- contents.message = (0, smithy_client_1.expectString)(data.message);
2006
- }
2007
- if (data.resourceId != null) {
2008
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2009
- }
2010
- if (data.resourceType != null) {
2011
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2012
- }
1968
+ const doc = (0, smithy_client_1.take)(data, {
1969
+ message: smithy_client_1.expectString,
1970
+ resourceId: smithy_client_1.expectString,
1971
+ resourceType: smithy_client_1.expectString,
1972
+ });
1973
+ Object.assign(contents, doc);
2013
1974
  const exception = new models_0_1.ServiceQuotaExceededException({
2014
1975
  $metadata: deserializeMetadata(parsedOutput),
2015
1976
  ...contents,
@@ -2017,16 +1978,17 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2017
1978
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2018
1979
  };
2019
1980
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2020
- const contents = map({
1981
+ const contents = (0, smithy_client_1.map)({
2021
1982
  retryAfterSeconds: [
2022
1983
  () => void 0 !== parsedOutput.headers["retry-after"],
2023
1984
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2024
1985
  ],
2025
1986
  });
2026
1987
  const data = parsedOutput.body;
2027
- if (data.message != null) {
2028
- contents.message = (0, smithy_client_1.expectString)(data.message);
2029
- }
1988
+ const doc = (0, smithy_client_1.take)(data, {
1989
+ message: smithy_client_1.expectString,
1990
+ });
1991
+ Object.assign(contents, doc);
2030
1992
  const exception = new models_0_1.ThrottlingException({
2031
1993
  $metadata: deserializeMetadata(parsedOutput),
2032
1994
  ...contents,
@@ -2034,413 +1996,61 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2034
1996
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2035
1997
  };
2036
1998
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2037
- const contents = map({});
1999
+ const contents = (0, smithy_client_1.map)({});
2038
2000
  const data = parsedOutput.body;
2039
- if (data.fieldList != null) {
2040
- contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
2041
- }
2042
- if (data.message != null) {
2043
- contents.message = (0, smithy_client_1.expectString)(data.message);
2044
- }
2045
- if (data.reason != null) {
2046
- contents.reason = (0, smithy_client_1.expectString)(data.reason);
2047
- }
2001
+ const doc = (0, smithy_client_1.take)(data, {
2002
+ fieldList: smithy_client_1._json,
2003
+ message: smithy_client_1.expectString,
2004
+ reason: smithy_client_1.expectString,
2005
+ });
2006
+ Object.assign(contents, doc);
2048
2007
  const exception = new models_0_1.ValidationException({
2049
2008
  $metadata: deserializeMetadata(parsedOutput),
2050
2009
  ...contents,
2051
2010
  });
2052
2011
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2053
2012
  };
2054
- const se_AclGrantee = (input, context) => {
2055
- return models_0_1.AclGrantee.visit(input, {
2056
- id: (value) => ({ id: value }),
2057
- uri: (value) => ({ uri: value }),
2058
- _: (name, value) => ({ name: value }),
2059
- });
2060
- };
2061
2013
  const se_CloudTrailDetails = (input, context) => {
2062
- return {
2063
- ...(input.accessRole != null && { accessRole: input.accessRole }),
2064
- ...(input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }),
2065
- ...(input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }),
2066
- ...(input.trails != null && { trails: se_TrailList(input.trails, context) }),
2067
- };
2068
- };
2069
- const se_Configuration = (input, context) => {
2070
- return models_0_1.Configuration.visit(input, {
2071
- ebsSnapshot: (value) => ({ ebsSnapshot: se_EbsSnapshotConfiguration(value, context) }),
2072
- ecrRepository: (value) => ({ ecrRepository: se_EcrRepositoryConfiguration(value, context) }),
2073
- efsFileSystem: (value) => ({ efsFileSystem: se_EfsFileSystemConfiguration(value, context) }),
2074
- iamRole: (value) => ({ iamRole: se_IamRoleConfiguration(value, context) }),
2075
- kmsKey: (value) => ({ kmsKey: se_KmsKeyConfiguration(value, context) }),
2076
- rdsDbClusterSnapshot: (value) => ({ rdsDbClusterSnapshot: se_RdsDbClusterSnapshotConfiguration(value, context) }),
2077
- rdsDbSnapshot: (value) => ({ rdsDbSnapshot: se_RdsDbSnapshotConfiguration(value, context) }),
2078
- s3Bucket: (value) => ({ s3Bucket: se_S3BucketConfiguration(value, context) }),
2079
- secretsManagerSecret: (value) => ({ secretsManagerSecret: se_SecretsManagerSecretConfiguration(value, context) }),
2080
- snsTopic: (value) => ({ snsTopic: se_SnsTopicConfiguration(value, context) }),
2081
- sqsQueue: (value) => ({ sqsQueue: se_SqsQueueConfiguration(value, context) }),
2082
- _: (name, value) => ({ name: value }),
2083
- });
2084
- };
2085
- const se_ConfigurationsMap = (input, context) => {
2086
- return Object.entries(input).reduce((acc, [key, value]) => {
2087
- if (value === null) {
2088
- return acc;
2089
- }
2090
- acc[key] = se_Configuration(value, context);
2091
- return acc;
2092
- }, {});
2093
- };
2094
- const se_Criterion = (input, context) => {
2095
- return {
2096
- ...(input.contains != null && { contains: se_ValueList(input.contains, context) }),
2097
- ...(input.eq != null && { eq: se_ValueList(input.eq, context) }),
2098
- ...(input.exists != null && { exists: input.exists }),
2099
- ...(input.neq != null && { neq: se_ValueList(input.neq, context) }),
2100
- };
2101
- };
2102
- const se_EbsGroupList = (input, context) => {
2103
- return input
2104
- .filter((e) => e != null)
2105
- .map((entry) => {
2106
- return entry;
2107
- });
2108
- };
2109
- const se_EbsSnapshotConfiguration = (input, context) => {
2110
- return {
2111
- ...(input.groups != null && { groups: se_EbsGroupList(input.groups, context) }),
2112
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2113
- ...(input.userIds != null && { userIds: se_EbsUserIdList(input.userIds, context) }),
2114
- };
2115
- };
2116
- const se_EbsUserIdList = (input, context) => {
2117
- return input
2118
- .filter((e) => e != null)
2119
- .map((entry) => {
2120
- return entry;
2121
- });
2122
- };
2123
- const se_EcrRepositoryConfiguration = (input, context) => {
2124
- return {
2125
- ...(input.repositoryPolicy != null && { repositoryPolicy: input.repositoryPolicy }),
2126
- };
2127
- };
2128
- const se_EfsFileSystemConfiguration = (input, context) => {
2129
- return {
2130
- ...(input.fileSystemPolicy != null && { fileSystemPolicy: input.fileSystemPolicy }),
2131
- };
2132
- };
2133
- const se_FilterCriteriaMap = (input, context) => {
2134
- return Object.entries(input).reduce((acc, [key, value]) => {
2135
- if (value === null) {
2136
- return acc;
2137
- }
2138
- acc[key] = se_Criterion(value, context);
2139
- return acc;
2140
- }, {});
2141
- };
2142
- const se_FindingIdList = (input, context) => {
2143
- return input
2144
- .filter((e) => e != null)
2145
- .map((entry) => {
2146
- return entry;
2147
- });
2148
- };
2149
- const se_IamRoleConfiguration = (input, context) => {
2150
- return {
2151
- ...(input.trustPolicy != null && { trustPolicy: input.trustPolicy }),
2152
- };
2153
- };
2154
- const se_InlineArchiveRule = (input, context) => {
2155
- return {
2156
- ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }),
2157
- ...(input.ruleName != null && { ruleName: input.ruleName }),
2158
- };
2159
- };
2160
- const se_InlineArchiveRulesList = (input, context) => {
2161
- return input
2162
- .filter((e) => e != null)
2163
- .map((entry) => {
2164
- return se_InlineArchiveRule(entry, context);
2014
+ return (0, smithy_client_1.take)(input, {
2015
+ accessRole: [],
2016
+ endTime: (_) => _.toISOString().split(".")[0] + "Z",
2017
+ startTime: (_) => _.toISOString().split(".")[0] + "Z",
2018
+ trails: smithy_client_1._json,
2165
2019
  });
2166
2020
  };
2167
- const se_InternetConfiguration = (input, context) => {
2168
- return {};
2169
- };
2170
- const se_KmsConstraintsMap = (input, context) => {
2171
- return Object.entries(input).reduce((acc, [key, value]) => {
2172
- if (value === null) {
2173
- return acc;
2174
- }
2175
- acc[key] = value;
2176
- return acc;
2177
- }, {});
2178
- };
2179
- const se_KmsGrantConfiguration = (input, context) => {
2180
- return {
2181
- ...(input.constraints != null && { constraints: se_KmsGrantConstraints(input.constraints, context) }),
2182
- ...(input.granteePrincipal != null && { granteePrincipal: input.granteePrincipal }),
2183
- ...(input.issuingAccount != null && { issuingAccount: input.issuingAccount }),
2184
- ...(input.operations != null && { operations: se_KmsGrantOperationsList(input.operations, context) }),
2185
- ...(input.retiringPrincipal != null && { retiringPrincipal: input.retiringPrincipal }),
2186
- };
2187
- };
2188
- const se_KmsGrantConfigurationsList = (input, context) => {
2189
- return input
2190
- .filter((e) => e != null)
2191
- .map((entry) => {
2192
- return se_KmsGrantConfiguration(entry, context);
2193
- });
2194
- };
2195
- const se_KmsGrantConstraints = (input, context) => {
2196
- return {
2197
- ...(input.encryptionContextEquals != null && {
2198
- encryptionContextEquals: se_KmsConstraintsMap(input.encryptionContextEquals, context),
2199
- }),
2200
- ...(input.encryptionContextSubset != null && {
2201
- encryptionContextSubset: se_KmsConstraintsMap(input.encryptionContextSubset, context),
2202
- }),
2203
- };
2204
- };
2205
- const se_KmsGrantOperationsList = (input, context) => {
2206
- return input
2207
- .filter((e) => e != null)
2208
- .map((entry) => {
2209
- return entry;
2210
- });
2211
- };
2212
- const se_KmsKeyConfiguration = (input, context) => {
2213
- return {
2214
- ...(input.grants != null && { grants: se_KmsGrantConfigurationsList(input.grants, context) }),
2215
- ...(input.keyPolicies != null && { keyPolicies: se_KmsKeyPoliciesMap(input.keyPolicies, context) }),
2216
- };
2217
- };
2218
- const se_KmsKeyPoliciesMap = (input, context) => {
2219
- return Object.entries(input).reduce((acc, [key, value]) => {
2220
- if (value === null) {
2221
- return acc;
2222
- }
2223
- acc[key] = value;
2224
- return acc;
2225
- }, {});
2226
- };
2227
- const se_NetworkOriginConfiguration = (input, context) => {
2228
- return models_0_1.NetworkOriginConfiguration.visit(input, {
2229
- internetConfiguration: (value) => ({ internetConfiguration: se_InternetConfiguration(value, context) }),
2230
- vpcConfiguration: (value) => ({ vpcConfiguration: se_VpcConfiguration(value, context) }),
2231
- _: (name, value) => ({ name: value }),
2232
- });
2233
- };
2234
- const se_PolicyGenerationDetails = (input, context) => {
2235
- return {
2236
- ...(input.principalArn != null && { principalArn: input.principalArn }),
2237
- };
2238
- };
2239
- const se_RdsDbClusterSnapshotAccountIdsList = (input, context) => {
2240
- return input
2241
- .filter((e) => e != null)
2242
- .map((entry) => {
2243
- return entry;
2244
- });
2245
- };
2246
- const se_RdsDbClusterSnapshotAttributesMap = (input, context) => {
2247
- return Object.entries(input).reduce((acc, [key, value]) => {
2248
- if (value === null) {
2249
- return acc;
2250
- }
2251
- acc[key] = se_RdsDbClusterSnapshotAttributeValue(value, context);
2252
- return acc;
2253
- }, {});
2254
- };
2255
- const se_RdsDbClusterSnapshotAttributeValue = (input, context) => {
2256
- return models_0_1.RdsDbClusterSnapshotAttributeValue.visit(input, {
2257
- accountIds: (value) => ({ accountIds: se_RdsDbClusterSnapshotAccountIdsList(value, context) }),
2258
- _: (name, value) => ({ name: value }),
2259
- });
2260
- };
2261
- const se_RdsDbClusterSnapshotConfiguration = (input, context) => {
2262
- return {
2263
- ...(input.attributes != null && { attributes: se_RdsDbClusterSnapshotAttributesMap(input.attributes, context) }),
2264
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2265
- };
2266
- };
2267
- const se_RdsDbSnapshotAccountIdsList = (input, context) => {
2268
- return input
2269
- .filter((e) => e != null)
2270
- .map((entry) => {
2271
- return entry;
2272
- });
2273
- };
2274
- const se_RdsDbSnapshotAttributesMap = (input, context) => {
2275
- return Object.entries(input).reduce((acc, [key, value]) => {
2276
- if (value === null) {
2277
- return acc;
2278
- }
2279
- acc[key] = se_RdsDbSnapshotAttributeValue(value, context);
2280
- return acc;
2281
- }, {});
2282
- };
2283
- const se_RdsDbSnapshotAttributeValue = (input, context) => {
2284
- return models_0_1.RdsDbSnapshotAttributeValue.visit(input, {
2285
- accountIds: (value) => ({ accountIds: se_RdsDbSnapshotAccountIdsList(value, context) }),
2286
- _: (name, value) => ({ name: value }),
2287
- });
2288
- };
2289
- const se_RdsDbSnapshotConfiguration = (input, context) => {
2290
- return {
2291
- ...(input.attributes != null && { attributes: se_RdsDbSnapshotAttributesMap(input.attributes, context) }),
2292
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2293
- };
2294
- };
2295
- const se_RegionList = (input, context) => {
2296
- return input
2297
- .filter((e) => e != null)
2298
- .map((entry) => {
2299
- return entry;
2300
- });
2301
- };
2302
- const se_S3AccessPointConfiguration = (input, context) => {
2303
- return {
2304
- ...(input.accessPointPolicy != null && { accessPointPolicy: input.accessPointPolicy }),
2305
- ...(input.networkOrigin != null && { networkOrigin: se_NetworkOriginConfiguration(input.networkOrigin, context) }),
2306
- ...(input.publicAccessBlock != null && {
2307
- publicAccessBlock: se_S3PublicAccessBlockConfiguration(input.publicAccessBlock, context),
2308
- }),
2309
- };
2310
- };
2311
- const se_S3AccessPointConfigurationsMap = (input, context) => {
2312
- return Object.entries(input).reduce((acc, [key, value]) => {
2313
- if (value === null) {
2314
- return acc;
2315
- }
2316
- acc[key] = se_S3AccessPointConfiguration(value, context);
2317
- return acc;
2318
- }, {});
2319
- };
2320
- const se_S3BucketAclGrantConfiguration = (input, context) => {
2321
- return {
2322
- ...(input.grantee != null && { grantee: se_AclGrantee(input.grantee, context) }),
2323
- ...(input.permission != null && { permission: input.permission }),
2324
- };
2325
- };
2326
- const se_S3BucketAclGrantConfigurationsList = (input, context) => {
2327
- return input
2328
- .filter((e) => e != null)
2329
- .map((entry) => {
2330
- return se_S3BucketAclGrantConfiguration(entry, context);
2331
- });
2332
- };
2333
- const se_S3BucketConfiguration = (input, context) => {
2334
- return {
2335
- ...(input.accessPoints != null && { accessPoints: se_S3AccessPointConfigurationsMap(input.accessPoints, context) }),
2336
- ...(input.bucketAclGrants != null && {
2337
- bucketAclGrants: se_S3BucketAclGrantConfigurationsList(input.bucketAclGrants, context),
2338
- }),
2339
- ...(input.bucketPolicy != null && { bucketPolicy: input.bucketPolicy }),
2340
- ...(input.bucketPublicAccessBlock != null && {
2341
- bucketPublicAccessBlock: se_S3PublicAccessBlockConfiguration(input.bucketPublicAccessBlock, context),
2342
- }),
2343
- };
2344
- };
2345
- const se_S3PublicAccessBlockConfiguration = (input, context) => {
2346
- return {
2347
- ...(input.ignorePublicAcls != null && { ignorePublicAcls: input.ignorePublicAcls }),
2348
- ...(input.restrictPublicBuckets != null && { restrictPublicBuckets: input.restrictPublicBuckets }),
2349
- };
2350
- };
2351
- const se_SecretsManagerSecretConfiguration = (input, context) => {
2352
- return {
2353
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2354
- ...(input.secretPolicy != null && { secretPolicy: input.secretPolicy }),
2355
- };
2356
- };
2357
- const se_SnsTopicConfiguration = (input, context) => {
2358
- return {
2359
- ...(input.topicPolicy != null && { topicPolicy: input.topicPolicy }),
2360
- };
2361
- };
2362
- const se_SortCriteria = (input, context) => {
2363
- return {
2364
- ...(input.attributeName != null && { attributeName: input.attributeName }),
2365
- ...(input.orderBy != null && { orderBy: input.orderBy }),
2366
- };
2367
- };
2368
- const se_SqsQueueConfiguration = (input, context) => {
2369
- return {
2370
- ...(input.queuePolicy != null && { queuePolicy: input.queuePolicy }),
2371
- };
2372
- };
2373
- const se_TagsMap = (input, context) => {
2374
- return Object.entries(input).reduce((acc, [key, value]) => {
2375
- if (value === null) {
2376
- return acc;
2377
- }
2378
- acc[key] = value;
2379
- return acc;
2380
- }, {});
2381
- };
2382
- const se_Trail = (input, context) => {
2383
- return {
2384
- ...(input.allRegions != null && { allRegions: input.allRegions }),
2385
- ...(input.cloudTrailArn != null && { cloudTrailArn: input.cloudTrailArn }),
2386
- ...(input.regions != null && { regions: se_RegionList(input.regions, context) }),
2387
- };
2388
- };
2389
- const se_TrailList = (input, context) => {
2390
- return input
2391
- .filter((e) => e != null)
2392
- .map((entry) => {
2393
- return se_Trail(entry, context);
2394
- });
2395
- };
2396
- const se_ValueList = (input, context) => {
2397
- return input
2398
- .filter((e) => e != null)
2399
- .map((entry) => {
2400
- return entry;
2401
- });
2402
- };
2403
- const se_VpcConfiguration = (input, context) => {
2404
- return {
2405
- ...(input.vpcId != null && { vpcId: input.vpcId }),
2406
- };
2407
- };
2408
2021
  const de_AccessPreview = (output, context) => {
2409
- return {
2410
- analyzerArn: (0, smithy_client_1.expectString)(output.analyzerArn),
2411
- configurations: output.configurations != null ? de_ConfigurationsMap(output.configurations, context) : undefined,
2412
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2413
- id: (0, smithy_client_1.expectString)(output.id),
2414
- status: (0, smithy_client_1.expectString)(output.status),
2415
- statusReason: output.statusReason != null ? de_AccessPreviewStatusReason(output.statusReason, context) : undefined,
2416
- };
2022
+ return (0, smithy_client_1.take)(output, {
2023
+ analyzerArn: smithy_client_1.expectString,
2024
+ configurations: smithy_client_1._json,
2025
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2026
+ id: smithy_client_1.expectString,
2027
+ status: smithy_client_1.expectString,
2028
+ statusReason: smithy_client_1._json,
2029
+ });
2417
2030
  };
2418
2031
  const de_AccessPreviewFinding = (output, context) => {
2419
- return {
2420
- action: output.action != null ? de_ActionList(output.action, context) : undefined,
2421
- changeType: (0, smithy_client_1.expectString)(output.changeType),
2422
- condition: output.condition != null ? de_ConditionKeyMap(output.condition, context) : undefined,
2423
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2424
- error: (0, smithy_client_1.expectString)(output.error),
2425
- existingFindingId: (0, smithy_client_1.expectString)(output.existingFindingId),
2426
- existingFindingStatus: (0, smithy_client_1.expectString)(output.existingFindingStatus),
2427
- id: (0, smithy_client_1.expectString)(output.id),
2428
- isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2429
- principal: output.principal != null ? de_PrincipalMap(output.principal, context) : undefined,
2430
- resource: (0, smithy_client_1.expectString)(output.resource),
2431
- resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2432
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2433
- sources: output.sources != null ? de_FindingSourceList(output.sources, context) : undefined,
2434
- status: (0, smithy_client_1.expectString)(output.status),
2435
- };
2032
+ return (0, smithy_client_1.take)(output, {
2033
+ action: smithy_client_1._json,
2034
+ changeType: smithy_client_1.expectString,
2035
+ condition: smithy_client_1._json,
2036
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2037
+ error: smithy_client_1.expectString,
2038
+ existingFindingId: smithy_client_1.expectString,
2039
+ existingFindingStatus: smithy_client_1.expectString,
2040
+ id: smithy_client_1.expectString,
2041
+ isPublic: smithy_client_1.expectBoolean,
2042
+ principal: smithy_client_1._json,
2043
+ resource: smithy_client_1.expectString,
2044
+ resourceOwnerAccount: smithy_client_1.expectString,
2045
+ resourceType: smithy_client_1.expectString,
2046
+ sources: smithy_client_1._json,
2047
+ status: smithy_client_1.expectString,
2048
+ });
2436
2049
  };
2437
2050
  const de_AccessPreviewFindingsList = (output, context) => {
2438
2051
  const retVal = (output || [])
2439
2052
  .filter((e) => e != null)
2440
2053
  .map((entry) => {
2441
- if (entry === null) {
2442
- return null;
2443
- }
2444
2054
  return de_AccessPreviewFinding(entry, context);
2445
2055
  });
2446
2056
  return retVal;
@@ -2449,803 +2059,161 @@ const de_AccessPreviewsList = (output, context) => {
2449
2059
  const retVal = (output || [])
2450
2060
  .filter((e) => e != null)
2451
2061
  .map((entry) => {
2452
- if (entry === null) {
2453
- return null;
2454
- }
2455
2062
  return de_AccessPreviewSummary(entry, context);
2456
2063
  });
2457
2064
  return retVal;
2458
2065
  };
2459
- const de_AccessPreviewStatusReason = (output, context) => {
2460
- return {
2461
- code: (0, smithy_client_1.expectString)(output.code),
2462
- };
2463
- };
2464
2066
  const de_AccessPreviewSummary = (output, context) => {
2465
- return {
2466
- analyzerArn: (0, smithy_client_1.expectString)(output.analyzerArn),
2467
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2468
- id: (0, smithy_client_1.expectString)(output.id),
2469
- status: (0, smithy_client_1.expectString)(output.status),
2470
- statusReason: output.statusReason != null ? de_AccessPreviewStatusReason(output.statusReason, context) : undefined,
2471
- };
2472
- };
2473
- const de_AclGrantee = (output, context) => {
2474
- if ((0, smithy_client_1.expectString)(output.id) !== undefined) {
2475
- return { id: (0, smithy_client_1.expectString)(output.id) };
2476
- }
2477
- if ((0, smithy_client_1.expectString)(output.uri) !== undefined) {
2478
- return { uri: (0, smithy_client_1.expectString)(output.uri) };
2479
- }
2480
- return { $unknown: Object.entries(output)[0] };
2481
- };
2482
- const de_ActionList = (output, context) => {
2483
- const retVal = (output || [])
2484
- .filter((e) => e != null)
2485
- .map((entry) => {
2486
- if (entry === null) {
2487
- return null;
2488
- }
2489
- return (0, smithy_client_1.expectString)(entry);
2067
+ return (0, smithy_client_1.take)(output, {
2068
+ analyzerArn: smithy_client_1.expectString,
2069
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2070
+ id: smithy_client_1.expectString,
2071
+ status: smithy_client_1.expectString,
2072
+ statusReason: smithy_client_1._json,
2490
2073
  });
2491
- return retVal;
2492
2074
  };
2493
2075
  const de_AnalyzedResource = (output, context) => {
2494
- return {
2495
- actions: output.actions != null ? de_ActionList(output.actions, context) : undefined,
2496
- analyzedAt: output.analyzedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.analyzedAt)) : undefined,
2497
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2498
- error: (0, smithy_client_1.expectString)(output.error),
2499
- isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2500
- resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
2501
- resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2502
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2503
- sharedVia: output.sharedVia != null ? de_SharedViaList(output.sharedVia, context) : undefined,
2504
- status: (0, smithy_client_1.expectString)(output.status),
2505
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.updatedAt)) : undefined,
2506
- };
2507
- };
2508
- const de_AnalyzedResourcesList = (output, context) => {
2509
- const retVal = (output || [])
2510
- .filter((e) => e != null)
2511
- .map((entry) => {
2512
- if (entry === null) {
2513
- return null;
2514
- }
2515
- return de_AnalyzedResourceSummary(entry, context);
2076
+ return (0, smithy_client_1.take)(output, {
2077
+ actions: smithy_client_1._json,
2078
+ analyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2079
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2080
+ error: smithy_client_1.expectString,
2081
+ isPublic: smithy_client_1.expectBoolean,
2082
+ resourceArn: smithy_client_1.expectString,
2083
+ resourceOwnerAccount: smithy_client_1.expectString,
2084
+ resourceType: smithy_client_1.expectString,
2085
+ sharedVia: smithy_client_1._json,
2086
+ status: smithy_client_1.expectString,
2087
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2516
2088
  });
2517
- return retVal;
2518
- };
2519
- const de_AnalyzedResourceSummary = (output, context) => {
2520
- return {
2521
- resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
2522
- resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2523
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2524
- };
2525
2089
  };
2526
2090
  const de_AnalyzersList = (output, context) => {
2527
2091
  const retVal = (output || [])
2528
2092
  .filter((e) => e != null)
2529
2093
  .map((entry) => {
2530
- if (entry === null) {
2531
- return null;
2532
- }
2533
2094
  return de_AnalyzerSummary(entry, context);
2534
2095
  });
2535
2096
  return retVal;
2536
2097
  };
2537
2098
  const de_AnalyzerSummary = (output, context) => {
2538
- return {
2539
- arn: (0, smithy_client_1.expectString)(output.arn),
2540
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2541
- lastResourceAnalyzed: (0, smithy_client_1.expectString)(output.lastResourceAnalyzed),
2542
- lastResourceAnalyzedAt: output.lastResourceAnalyzedAt != null
2543
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastResourceAnalyzedAt))
2544
- : undefined,
2545
- name: (0, smithy_client_1.expectString)(output.name),
2546
- status: (0, smithy_client_1.expectString)(output.status),
2547
- statusReason: output.statusReason != null ? de_StatusReason(output.statusReason, context) : undefined,
2548
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
2549
- type: (0, smithy_client_1.expectString)(output.type),
2550
- };
2099
+ return (0, smithy_client_1.take)(output, {
2100
+ arn: smithy_client_1.expectString,
2101
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2102
+ lastResourceAnalyzed: smithy_client_1.expectString,
2103
+ lastResourceAnalyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2104
+ name: smithy_client_1.expectString,
2105
+ status: smithy_client_1.expectString,
2106
+ statusReason: smithy_client_1._json,
2107
+ tags: smithy_client_1._json,
2108
+ type: smithy_client_1.expectString,
2109
+ });
2551
2110
  };
2552
2111
  const de_ArchiveRulesList = (output, context) => {
2553
2112
  const retVal = (output || [])
2554
2113
  .filter((e) => e != null)
2555
2114
  .map((entry) => {
2556
- if (entry === null) {
2557
- return null;
2558
- }
2559
2115
  return de_ArchiveRuleSummary(entry, context);
2560
2116
  });
2561
2117
  return retVal;
2562
2118
  };
2563
2119
  const de_ArchiveRuleSummary = (output, context) => {
2564
- return {
2565
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2566
- filter: output.filter != null ? de_FilterCriteriaMap(output.filter, context) : undefined,
2567
- ruleName: (0, smithy_client_1.expectString)(output.ruleName),
2568
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.updatedAt)) : undefined,
2569
- };
2570
- };
2571
- const de_CloudTrailProperties = (output, context) => {
2572
- return {
2573
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.endTime)) : undefined,
2574
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.startTime)) : undefined,
2575
- trailProperties: output.trailProperties != null ? de_TrailPropertiesList(output.trailProperties, context) : undefined,
2576
- };
2577
- };
2578
- const de_ConditionKeyMap = (output, context) => {
2579
- return Object.entries(output).reduce((acc, [key, value]) => {
2580
- if (value === null) {
2581
- return acc;
2582
- }
2583
- acc[key] = (0, smithy_client_1.expectString)(value);
2584
- return acc;
2585
- }, {});
2586
- };
2587
- const de_Configuration = (output, context) => {
2588
- if (output.ebsSnapshot != null) {
2589
- return {
2590
- ebsSnapshot: de_EbsSnapshotConfiguration(output.ebsSnapshot, context),
2591
- };
2592
- }
2593
- if (output.ecrRepository != null) {
2594
- return {
2595
- ecrRepository: de_EcrRepositoryConfiguration(output.ecrRepository, context),
2596
- };
2597
- }
2598
- if (output.efsFileSystem != null) {
2599
- return {
2600
- efsFileSystem: de_EfsFileSystemConfiguration(output.efsFileSystem, context),
2601
- };
2602
- }
2603
- if (output.iamRole != null) {
2604
- return {
2605
- iamRole: de_IamRoleConfiguration(output.iamRole, context),
2606
- };
2607
- }
2608
- if (output.kmsKey != null) {
2609
- return {
2610
- kmsKey: de_KmsKeyConfiguration(output.kmsKey, context),
2611
- };
2612
- }
2613
- if (output.rdsDbClusterSnapshot != null) {
2614
- return {
2615
- rdsDbClusterSnapshot: de_RdsDbClusterSnapshotConfiguration(output.rdsDbClusterSnapshot, context),
2616
- };
2617
- }
2618
- if (output.rdsDbSnapshot != null) {
2619
- return {
2620
- rdsDbSnapshot: de_RdsDbSnapshotConfiguration(output.rdsDbSnapshot, context),
2621
- };
2622
- }
2623
- if (output.s3Bucket != null) {
2624
- return {
2625
- s3Bucket: de_S3BucketConfiguration(output.s3Bucket, context),
2626
- };
2627
- }
2628
- if (output.secretsManagerSecret != null) {
2629
- return {
2630
- secretsManagerSecret: de_SecretsManagerSecretConfiguration(output.secretsManagerSecret, context),
2631
- };
2632
- }
2633
- if (output.snsTopic != null) {
2634
- return {
2635
- snsTopic: de_SnsTopicConfiguration(output.snsTopic, context),
2636
- };
2637
- }
2638
- if (output.sqsQueue != null) {
2639
- return {
2640
- sqsQueue: de_SqsQueueConfiguration(output.sqsQueue, context),
2641
- };
2642
- }
2643
- return { $unknown: Object.entries(output)[0] };
2644
- };
2645
- const de_ConfigurationsMap = (output, context) => {
2646
- return Object.entries(output).reduce((acc, [key, value]) => {
2647
- if (value === null) {
2648
- return acc;
2649
- }
2650
- acc[key] = de_Configuration((0, smithy_client_1.expectUnion)(value), context);
2651
- return acc;
2652
- }, {});
2653
- };
2654
- const de_Criterion = (output, context) => {
2655
- return {
2656
- contains: output.contains != null ? de_ValueList(output.contains, context) : undefined,
2657
- eq: output.eq != null ? de_ValueList(output.eq, context) : undefined,
2658
- exists: (0, smithy_client_1.expectBoolean)(output.exists),
2659
- neq: output.neq != null ? de_ValueList(output.neq, context) : undefined,
2660
- };
2661
- };
2662
- const de_EbsGroupList = (output, context) => {
2663
- const retVal = (output || [])
2664
- .filter((e) => e != null)
2665
- .map((entry) => {
2666
- if (entry === null) {
2667
- return null;
2668
- }
2669
- return (0, smithy_client_1.expectString)(entry);
2120
+ return (0, smithy_client_1.take)(output, {
2121
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2122
+ filter: smithy_client_1._json,
2123
+ ruleName: smithy_client_1.expectString,
2124
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2670
2125
  });
2671
- return retVal;
2672
- };
2673
- const de_EbsSnapshotConfiguration = (output, context) => {
2674
- return {
2675
- groups: output.groups != null ? de_EbsGroupList(output.groups, context) : undefined,
2676
- kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
2677
- userIds: output.userIds != null ? de_EbsUserIdList(output.userIds, context) : undefined,
2678
- };
2679
2126
  };
2680
- const de_EbsUserIdList = (output, context) => {
2681
- const retVal = (output || [])
2682
- .filter((e) => e != null)
2683
- .map((entry) => {
2684
- if (entry === null) {
2685
- return null;
2686
- }
2687
- return (0, smithy_client_1.expectString)(entry);
2127
+ const de_CloudTrailProperties = (output, context) => {
2128
+ return (0, smithy_client_1.take)(output, {
2129
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2130
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2131
+ trailProperties: smithy_client_1._json,
2688
2132
  });
2689
- return retVal;
2690
- };
2691
- const de_EcrRepositoryConfiguration = (output, context) => {
2692
- return {
2693
- repositoryPolicy: (0, smithy_client_1.expectString)(output.repositoryPolicy),
2694
- };
2695
- };
2696
- const de_EfsFileSystemConfiguration = (output, context) => {
2697
- return {
2698
- fileSystemPolicy: (0, smithy_client_1.expectString)(output.fileSystemPolicy),
2699
- };
2700
- };
2701
- const de_FilterCriteriaMap = (output, context) => {
2702
- return Object.entries(output).reduce((acc, [key, value]) => {
2703
- if (value === null) {
2704
- return acc;
2705
- }
2706
- acc[key] = de_Criterion(value, context);
2707
- return acc;
2708
- }, {});
2709
2133
  };
2710
2134
  const de_Finding = (output, context) => {
2711
- return {
2712
- action: output.action != null ? de_ActionList(output.action, context) : undefined,
2713
- analyzedAt: output.analyzedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.analyzedAt)) : undefined,
2714
- condition: output.condition != null ? de_ConditionKeyMap(output.condition, context) : undefined,
2715
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2716
- error: (0, smithy_client_1.expectString)(output.error),
2717
- id: (0, smithy_client_1.expectString)(output.id),
2718
- isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2719
- principal: output.principal != null ? de_PrincipalMap(output.principal, context) : undefined,
2720
- resource: (0, smithy_client_1.expectString)(output.resource),
2721
- resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2722
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2723
- sources: output.sources != null ? de_FindingSourceList(output.sources, context) : undefined,
2724
- status: (0, smithy_client_1.expectString)(output.status),
2725
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.updatedAt)) : undefined,
2726
- };
2135
+ return (0, smithy_client_1.take)(output, {
2136
+ action: smithy_client_1._json,
2137
+ analyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2138
+ condition: smithy_client_1._json,
2139
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2140
+ error: smithy_client_1.expectString,
2141
+ id: smithy_client_1.expectString,
2142
+ isPublic: smithy_client_1.expectBoolean,
2143
+ principal: smithy_client_1._json,
2144
+ resource: smithy_client_1.expectString,
2145
+ resourceOwnerAccount: smithy_client_1.expectString,
2146
+ resourceType: smithy_client_1.expectString,
2147
+ sources: smithy_client_1._json,
2148
+ status: smithy_client_1.expectString,
2149
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2150
+ });
2727
2151
  };
2728
2152
  const de_FindingsList = (output, context) => {
2729
2153
  const retVal = (output || [])
2730
2154
  .filter((e) => e != null)
2731
2155
  .map((entry) => {
2732
- if (entry === null) {
2733
- return null;
2734
- }
2735
2156
  return de_FindingSummary(entry, context);
2736
2157
  });
2737
2158
  return retVal;
2738
2159
  };
2739
- const de_FindingSource = (output, context) => {
2740
- return {
2741
- detail: output.detail != null ? de_FindingSourceDetail(output.detail, context) : undefined,
2742
- type: (0, smithy_client_1.expectString)(output.type),
2743
- };
2744
- };
2745
- const de_FindingSourceDetail = (output, context) => {
2746
- return {
2747
- accessPointAccount: (0, smithy_client_1.expectString)(output.accessPointAccount),
2748
- accessPointArn: (0, smithy_client_1.expectString)(output.accessPointArn),
2749
- };
2750
- };
2751
- const de_FindingSourceList = (output, context) => {
2752
- const retVal = (output || [])
2753
- .filter((e) => e != null)
2754
- .map((entry) => {
2755
- if (entry === null) {
2756
- return null;
2757
- }
2758
- return de_FindingSource(entry, context);
2759
- });
2760
- return retVal;
2761
- };
2762
2160
  const de_FindingSummary = (output, context) => {
2763
- return {
2764
- action: output.action != null ? de_ActionList(output.action, context) : undefined,
2765
- analyzedAt: output.analyzedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.analyzedAt)) : undefined,
2766
- condition: output.condition != null ? de_ConditionKeyMap(output.condition, context) : undefined,
2767
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
2768
- error: (0, smithy_client_1.expectString)(output.error),
2769
- id: (0, smithy_client_1.expectString)(output.id),
2770
- isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2771
- principal: output.principal != null ? de_PrincipalMap(output.principal, context) : undefined,
2772
- resource: (0, smithy_client_1.expectString)(output.resource),
2773
- resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2774
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2775
- sources: output.sources != null ? de_FindingSourceList(output.sources, context) : undefined,
2776
- status: (0, smithy_client_1.expectString)(output.status),
2777
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.updatedAt)) : undefined,
2778
- };
2779
- };
2780
- const de_GeneratedPolicy = (output, context) => {
2781
- return {
2782
- policy: (0, smithy_client_1.expectString)(output.policy),
2783
- };
2784
- };
2785
- const de_GeneratedPolicyList = (output, context) => {
2786
- const retVal = (output || [])
2787
- .filter((e) => e != null)
2788
- .map((entry) => {
2789
- if (entry === null) {
2790
- return null;
2791
- }
2792
- return de_GeneratedPolicy(entry, context);
2161
+ return (0, smithy_client_1.take)(output, {
2162
+ action: smithy_client_1._json,
2163
+ analyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2164
+ condition: smithy_client_1._json,
2165
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2166
+ error: smithy_client_1.expectString,
2167
+ id: smithy_client_1.expectString,
2168
+ isPublic: smithy_client_1.expectBoolean,
2169
+ principal: smithy_client_1._json,
2170
+ resource: smithy_client_1.expectString,
2171
+ resourceOwnerAccount: smithy_client_1.expectString,
2172
+ resourceType: smithy_client_1.expectString,
2173
+ sources: smithy_client_1._json,
2174
+ status: smithy_client_1.expectString,
2175
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2793
2176
  });
2794
- return retVal;
2795
2177
  };
2796
2178
  const de_GeneratedPolicyProperties = (output, context) => {
2797
- return {
2798
- cloudTrailProperties: output.cloudTrailProperties != null ? de_CloudTrailProperties(output.cloudTrailProperties, context) : undefined,
2799
- isComplete: (0, smithy_client_1.expectBoolean)(output.isComplete),
2800
- principalArn: (0, smithy_client_1.expectString)(output.principalArn),
2801
- };
2802
- };
2803
- const de_GeneratedPolicyResult = (output, context) => {
2804
- return {
2805
- generatedPolicies: output.generatedPolicies != null ? de_GeneratedPolicyList(output.generatedPolicies, context) : undefined,
2806
- properties: output.properties != null ? de_GeneratedPolicyProperties(output.properties, context) : undefined,
2807
- };
2808
- };
2809
- const de_IamRoleConfiguration = (output, context) => {
2810
- return {
2811
- trustPolicy: (0, smithy_client_1.expectString)(output.trustPolicy),
2812
- };
2813
- };
2814
- const de_InternetConfiguration = (output, context) => {
2815
- return {};
2816
- };
2817
- const de_JobDetails = (output, context) => {
2818
- return {
2819
- completedOn: output.completedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.completedOn)) : undefined,
2820
- jobError: output.jobError != null ? de_JobError(output.jobError, context) : undefined,
2821
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2822
- startedOn: output.startedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.startedOn)) : undefined,
2823
- status: (0, smithy_client_1.expectString)(output.status),
2824
- };
2825
- };
2826
- const de_JobError = (output, context) => {
2827
- return {
2828
- code: (0, smithy_client_1.expectString)(output.code),
2829
- message: (0, smithy_client_1.expectString)(output.message),
2830
- };
2831
- };
2832
- const de_KmsConstraintsMap = (output, context) => {
2833
- return Object.entries(output).reduce((acc, [key, value]) => {
2834
- if (value === null) {
2835
- return acc;
2836
- }
2837
- acc[key] = (0, smithy_client_1.expectString)(value);
2838
- return acc;
2839
- }, {});
2840
- };
2841
- const de_KmsGrantConfiguration = (output, context) => {
2842
- return {
2843
- constraints: output.constraints != null ? de_KmsGrantConstraints(output.constraints, context) : undefined,
2844
- granteePrincipal: (0, smithy_client_1.expectString)(output.granteePrincipal),
2845
- issuingAccount: (0, smithy_client_1.expectString)(output.issuingAccount),
2846
- operations: output.operations != null ? de_KmsGrantOperationsList(output.operations, context) : undefined,
2847
- retiringPrincipal: (0, smithy_client_1.expectString)(output.retiringPrincipal),
2848
- };
2849
- };
2850
- const de_KmsGrantConfigurationsList = (output, context) => {
2851
- const retVal = (output || [])
2852
- .filter((e) => e != null)
2853
- .map((entry) => {
2854
- if (entry === null) {
2855
- return null;
2856
- }
2857
- return de_KmsGrantConfiguration(entry, context);
2858
- });
2859
- return retVal;
2860
- };
2861
- const de_KmsGrantConstraints = (output, context) => {
2862
- return {
2863
- encryptionContextEquals: output.encryptionContextEquals != null
2864
- ? de_KmsConstraintsMap(output.encryptionContextEquals, context)
2865
- : undefined,
2866
- encryptionContextSubset: output.encryptionContextSubset != null
2867
- ? de_KmsConstraintsMap(output.encryptionContextSubset, context)
2868
- : undefined,
2869
- };
2870
- };
2871
- const de_KmsGrantOperationsList = (output, context) => {
2872
- const retVal = (output || [])
2873
- .filter((e) => e != null)
2874
- .map((entry) => {
2875
- if (entry === null) {
2876
- return null;
2877
- }
2878
- return (0, smithy_client_1.expectString)(entry);
2179
+ return (0, smithy_client_1.take)(output, {
2180
+ cloudTrailProperties: (_) => de_CloudTrailProperties(_, context),
2181
+ isComplete: smithy_client_1.expectBoolean,
2182
+ principalArn: smithy_client_1.expectString,
2879
2183
  });
2880
- return retVal;
2881
- };
2882
- const de_KmsKeyConfiguration = (output, context) => {
2883
- return {
2884
- grants: output.grants != null ? de_KmsGrantConfigurationsList(output.grants, context) : undefined,
2885
- keyPolicies: output.keyPolicies != null ? de_KmsKeyPoliciesMap(output.keyPolicies, context) : undefined,
2886
- };
2887
- };
2888
- const de_KmsKeyPoliciesMap = (output, context) => {
2889
- return Object.entries(output).reduce((acc, [key, value]) => {
2890
- if (value === null) {
2891
- return acc;
2892
- }
2893
- acc[key] = (0, smithy_client_1.expectString)(value);
2894
- return acc;
2895
- }, {});
2896
- };
2897
- const de_Location = (output, context) => {
2898
- return {
2899
- path: output.path != null ? de_PathElementList(output.path, context) : undefined,
2900
- span: output.span != null ? de_Span(output.span, context) : undefined,
2901
- };
2902
2184
  };
2903
- const de_LocationList = (output, context) => {
2904
- const retVal = (output || [])
2905
- .filter((e) => e != null)
2906
- .map((entry) => {
2907
- if (entry === null) {
2908
- return null;
2909
- }
2910
- return de_Location(entry, context);
2185
+ const de_GeneratedPolicyResult = (output, context) => {
2186
+ return (0, smithy_client_1.take)(output, {
2187
+ generatedPolicies: smithy_client_1._json,
2188
+ properties: (_) => de_GeneratedPolicyProperties(_, context),
2911
2189
  });
2912
- return retVal;
2913
- };
2914
- const de_NetworkOriginConfiguration = (output, context) => {
2915
- if (output.internetConfiguration != null) {
2916
- return {
2917
- internetConfiguration: de_InternetConfiguration(output.internetConfiguration, context),
2918
- };
2919
- }
2920
- if (output.vpcConfiguration != null) {
2921
- return {
2922
- vpcConfiguration: de_VpcConfiguration(output.vpcConfiguration, context),
2923
- };
2924
- }
2925
- return { $unknown: Object.entries(output)[0] };
2926
- };
2927
- const de_PathElement = (output, context) => {
2928
- if ((0, smithy_client_1.expectInt32)(output.index) !== undefined) {
2929
- return { index: (0, smithy_client_1.expectInt32)(output.index) };
2930
- }
2931
- if ((0, smithy_client_1.expectString)(output.key) !== undefined) {
2932
- return { key: (0, smithy_client_1.expectString)(output.key) };
2933
- }
2934
- if (output.substring != null) {
2935
- return {
2936
- substring: de_Substring(output.substring, context),
2937
- };
2938
- }
2939
- if ((0, smithy_client_1.expectString)(output.value) !== undefined) {
2940
- return { value: (0, smithy_client_1.expectString)(output.value) };
2941
- }
2942
- return { $unknown: Object.entries(output)[0] };
2943
2190
  };
2944
- const de_PathElementList = (output, context) => {
2945
- const retVal = (output || [])
2946
- .filter((e) => e != null)
2947
- .map((entry) => {
2948
- if (entry === null) {
2949
- return null;
2950
- }
2951
- return de_PathElement((0, smithy_client_1.expectUnion)(entry), context);
2191
+ const de_JobDetails = (output, context) => {
2192
+ return (0, smithy_client_1.take)(output, {
2193
+ completedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2194
+ jobError: smithy_client_1._json,
2195
+ jobId: smithy_client_1.expectString,
2196
+ startedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2197
+ status: smithy_client_1.expectString,
2952
2198
  });
2953
- return retVal;
2954
2199
  };
2955
2200
  const de_PolicyGeneration = (output, context) => {
2956
- return {
2957
- completedOn: output.completedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.completedOn)) : undefined,
2958
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2959
- principalArn: (0, smithy_client_1.expectString)(output.principalArn),
2960
- startedOn: output.startedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.startedOn)) : undefined,
2961
- status: (0, smithy_client_1.expectString)(output.status),
2962
- };
2201
+ return (0, smithy_client_1.take)(output, {
2202
+ completedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2203
+ jobId: smithy_client_1.expectString,
2204
+ principalArn: smithy_client_1.expectString,
2205
+ startedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2206
+ status: smithy_client_1.expectString,
2207
+ });
2963
2208
  };
2964
2209
  const de_PolicyGenerationList = (output, context) => {
2965
2210
  const retVal = (output || [])
2966
2211
  .filter((e) => e != null)
2967
2212
  .map((entry) => {
2968
- if (entry === null) {
2969
- return null;
2970
- }
2971
2213
  return de_PolicyGeneration(entry, context);
2972
2214
  });
2973
2215
  return retVal;
2974
2216
  };
2975
- const de_Position = (output, context) => {
2976
- return {
2977
- column: (0, smithy_client_1.expectInt32)(output.column),
2978
- line: (0, smithy_client_1.expectInt32)(output.line),
2979
- offset: (0, smithy_client_1.expectInt32)(output.offset),
2980
- };
2981
- };
2982
- const de_PrincipalMap = (output, context) => {
2983
- return Object.entries(output).reduce((acc, [key, value]) => {
2984
- if (value === null) {
2985
- return acc;
2986
- }
2987
- acc[key] = (0, smithy_client_1.expectString)(value);
2988
- return acc;
2989
- }, {});
2990
- };
2991
- const de_RdsDbClusterSnapshotAccountIdsList = (output, context) => {
2992
- const retVal = (output || [])
2993
- .filter((e) => e != null)
2994
- .map((entry) => {
2995
- if (entry === null) {
2996
- return null;
2997
- }
2998
- return (0, smithy_client_1.expectString)(entry);
2999
- });
3000
- return retVal;
3001
- };
3002
- const de_RdsDbClusterSnapshotAttributesMap = (output, context) => {
3003
- return Object.entries(output).reduce((acc, [key, value]) => {
3004
- if (value === null) {
3005
- return acc;
3006
- }
3007
- acc[key] = de_RdsDbClusterSnapshotAttributeValue((0, smithy_client_1.expectUnion)(value), context);
3008
- return acc;
3009
- }, {});
3010
- };
3011
- const de_RdsDbClusterSnapshotAttributeValue = (output, context) => {
3012
- if (output.accountIds != null) {
3013
- return {
3014
- accountIds: de_RdsDbClusterSnapshotAccountIdsList(output.accountIds, context),
3015
- };
3016
- }
3017
- return { $unknown: Object.entries(output)[0] };
3018
- };
3019
- const de_RdsDbClusterSnapshotConfiguration = (output, context) => {
3020
- return {
3021
- attributes: output.attributes != null ? de_RdsDbClusterSnapshotAttributesMap(output.attributes, context) : undefined,
3022
- kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
3023
- };
3024
- };
3025
- const de_RdsDbSnapshotAccountIdsList = (output, context) => {
3026
- const retVal = (output || [])
3027
- .filter((e) => e != null)
3028
- .map((entry) => {
3029
- if (entry === null) {
3030
- return null;
3031
- }
3032
- return (0, smithy_client_1.expectString)(entry);
3033
- });
3034
- return retVal;
3035
- };
3036
- const de_RdsDbSnapshotAttributesMap = (output, context) => {
3037
- return Object.entries(output).reduce((acc, [key, value]) => {
3038
- if (value === null) {
3039
- return acc;
3040
- }
3041
- acc[key] = de_RdsDbSnapshotAttributeValue((0, smithy_client_1.expectUnion)(value), context);
3042
- return acc;
3043
- }, {});
3044
- };
3045
- const de_RdsDbSnapshotAttributeValue = (output, context) => {
3046
- if (output.accountIds != null) {
3047
- return {
3048
- accountIds: de_RdsDbSnapshotAccountIdsList(output.accountIds, context),
3049
- };
3050
- }
3051
- return { $unknown: Object.entries(output)[0] };
3052
- };
3053
- const de_RdsDbSnapshotConfiguration = (output, context) => {
3054
- return {
3055
- attributes: output.attributes != null ? de_RdsDbSnapshotAttributesMap(output.attributes, context) : undefined,
3056
- kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
3057
- };
3058
- };
3059
- const de_RegionList = (output, context) => {
3060
- const retVal = (output || [])
3061
- .filter((e) => e != null)
3062
- .map((entry) => {
3063
- if (entry === null) {
3064
- return null;
3065
- }
3066
- return (0, smithy_client_1.expectString)(entry);
3067
- });
3068
- return retVal;
3069
- };
3070
- const de_S3AccessPointConfiguration = (output, context) => {
3071
- return {
3072
- accessPointPolicy: (0, smithy_client_1.expectString)(output.accessPointPolicy),
3073
- networkOrigin: output.networkOrigin != null
3074
- ? de_NetworkOriginConfiguration((0, smithy_client_1.expectUnion)(output.networkOrigin), context)
3075
- : undefined,
3076
- publicAccessBlock: output.publicAccessBlock != null
3077
- ? de_S3PublicAccessBlockConfiguration(output.publicAccessBlock, context)
3078
- : undefined,
3079
- };
3080
- };
3081
- const de_S3AccessPointConfigurationsMap = (output, context) => {
3082
- return Object.entries(output).reduce((acc, [key, value]) => {
3083
- if (value === null) {
3084
- return acc;
3085
- }
3086
- acc[key] = de_S3AccessPointConfiguration(value, context);
3087
- return acc;
3088
- }, {});
3089
- };
3090
- const de_S3BucketAclGrantConfiguration = (output, context) => {
3091
- return {
3092
- grantee: output.grantee != null ? de_AclGrantee((0, smithy_client_1.expectUnion)(output.grantee), context) : undefined,
3093
- permission: (0, smithy_client_1.expectString)(output.permission),
3094
- };
3095
- };
3096
- const de_S3BucketAclGrantConfigurationsList = (output, context) => {
3097
- const retVal = (output || [])
3098
- .filter((e) => e != null)
3099
- .map((entry) => {
3100
- if (entry === null) {
3101
- return null;
3102
- }
3103
- return de_S3BucketAclGrantConfiguration(entry, context);
3104
- });
3105
- return retVal;
3106
- };
3107
- const de_S3BucketConfiguration = (output, context) => {
3108
- return {
3109
- accessPoints: output.accessPoints != null ? de_S3AccessPointConfigurationsMap(output.accessPoints, context) : undefined,
3110
- bucketAclGrants: output.bucketAclGrants != null
3111
- ? de_S3BucketAclGrantConfigurationsList(output.bucketAclGrants, context)
3112
- : undefined,
3113
- bucketPolicy: (0, smithy_client_1.expectString)(output.bucketPolicy),
3114
- bucketPublicAccessBlock: output.bucketPublicAccessBlock != null
3115
- ? de_S3PublicAccessBlockConfiguration(output.bucketPublicAccessBlock, context)
3116
- : undefined,
3117
- };
3118
- };
3119
- const de_S3PublicAccessBlockConfiguration = (output, context) => {
3120
- return {
3121
- ignorePublicAcls: (0, smithy_client_1.expectBoolean)(output.ignorePublicAcls),
3122
- restrictPublicBuckets: (0, smithy_client_1.expectBoolean)(output.restrictPublicBuckets),
3123
- };
3124
- };
3125
- const de_SecretsManagerSecretConfiguration = (output, context) => {
3126
- return {
3127
- kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
3128
- secretPolicy: (0, smithy_client_1.expectString)(output.secretPolicy),
3129
- };
3130
- };
3131
- const de_SharedViaList = (output, context) => {
3132
- const retVal = (output || [])
3133
- .filter((e) => e != null)
3134
- .map((entry) => {
3135
- if (entry === null) {
3136
- return null;
3137
- }
3138
- return (0, smithy_client_1.expectString)(entry);
3139
- });
3140
- return retVal;
3141
- };
3142
- const de_SnsTopicConfiguration = (output, context) => {
3143
- return {
3144
- topicPolicy: (0, smithy_client_1.expectString)(output.topicPolicy),
3145
- };
3146
- };
3147
- const de_Span = (output, context) => {
3148
- return {
3149
- end: output.end != null ? de_Position(output.end, context) : undefined,
3150
- start: output.start != null ? de_Position(output.start, context) : undefined,
3151
- };
3152
- };
3153
- const de_SqsQueueConfiguration = (output, context) => {
3154
- return {
3155
- queuePolicy: (0, smithy_client_1.expectString)(output.queuePolicy),
3156
- };
3157
- };
3158
- const de_StatusReason = (output, context) => {
3159
- return {
3160
- code: (0, smithy_client_1.expectString)(output.code),
3161
- };
3162
- };
3163
- const de_Substring = (output, context) => {
3164
- return {
3165
- length: (0, smithy_client_1.expectInt32)(output.length),
3166
- start: (0, smithy_client_1.expectInt32)(output.start),
3167
- };
3168
- };
3169
- const de_TagsMap = (output, context) => {
3170
- return Object.entries(output).reduce((acc, [key, value]) => {
3171
- if (value === null) {
3172
- return acc;
3173
- }
3174
- acc[key] = (0, smithy_client_1.expectString)(value);
3175
- return acc;
3176
- }, {});
3177
- };
3178
- const de_TrailProperties = (output, context) => {
3179
- return {
3180
- allRegions: (0, smithy_client_1.expectBoolean)(output.allRegions),
3181
- cloudTrailArn: (0, smithy_client_1.expectString)(output.cloudTrailArn),
3182
- regions: output.regions != null ? de_RegionList(output.regions, context) : undefined,
3183
- };
3184
- };
3185
- const de_TrailPropertiesList = (output, context) => {
3186
- const retVal = (output || [])
3187
- .filter((e) => e != null)
3188
- .map((entry) => {
3189
- if (entry === null) {
3190
- return null;
3191
- }
3192
- return de_TrailProperties(entry, context);
3193
- });
3194
- return retVal;
3195
- };
3196
- const de_ValidatePolicyFinding = (output, context) => {
3197
- return {
3198
- findingDetails: (0, smithy_client_1.expectString)(output.findingDetails),
3199
- findingType: (0, smithy_client_1.expectString)(output.findingType),
3200
- issueCode: (0, smithy_client_1.expectString)(output.issueCode),
3201
- learnMoreLink: (0, smithy_client_1.expectString)(output.learnMoreLink),
3202
- locations: output.locations != null ? de_LocationList(output.locations, context) : undefined,
3203
- };
3204
- };
3205
- const de_ValidatePolicyFindingList = (output, context) => {
3206
- const retVal = (output || [])
3207
- .filter((e) => e != null)
3208
- .map((entry) => {
3209
- if (entry === null) {
3210
- return null;
3211
- }
3212
- return de_ValidatePolicyFinding(entry, context);
3213
- });
3214
- return retVal;
3215
- };
3216
- const de_ValidationExceptionField = (output, context) => {
3217
- return {
3218
- message: (0, smithy_client_1.expectString)(output.message),
3219
- name: (0, smithy_client_1.expectString)(output.name),
3220
- };
3221
- };
3222
- const de_ValidationExceptionFieldList = (output, context) => {
3223
- const retVal = (output || [])
3224
- .filter((e) => e != null)
3225
- .map((entry) => {
3226
- if (entry === null) {
3227
- return null;
3228
- }
3229
- return de_ValidationExceptionField(entry, context);
3230
- });
3231
- return retVal;
3232
- };
3233
- const de_ValueList = (output, context) => {
3234
- const retVal = (output || [])
3235
- .filter((e) => e != null)
3236
- .map((entry) => {
3237
- if (entry === null) {
3238
- return null;
3239
- }
3240
- return (0, smithy_client_1.expectString)(entry);
3241
- });
3242
- return retVal;
3243
- };
3244
- const de_VpcConfiguration = (output, context) => {
3245
- return {
3246
- vpcId: (0, smithy_client_1.expectString)(output.vpcId),
3247
- };
3248
- };
3249
2217
  const deserializeMetadata = (output) => ({
3250
2218
  httpStatusCode: output.statusCode,
3251
2219
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],