@aws-sdk/client-auditmanager 3.310.0 → 3.315.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.
@@ -16,9 +16,9 @@ const se_AssociateAssessmentReportEvidenceFolderCommand = async (input, context)
16
16
  "/assessments/{assessmentId}/associateToAssessmentReport";
17
17
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
18
18
  let body;
19
- body = JSON.stringify({
20
- ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }),
21
- });
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ evidenceFolderId: [],
21
+ }));
22
22
  return new protocol_http_1.HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -39,10 +39,10 @@ const se_BatchAssociateAssessmentReportEvidenceCommand = async (input, context)
39
39
  "/assessments/{assessmentId}/batchAssociateToAssessmentReport";
40
40
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
41
41
  let body;
42
- body = JSON.stringify({
43
- ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }),
44
- ...(input.evidenceIds != null && { evidenceIds: se_EvidenceIds(input.evidenceIds, context) }),
45
- });
42
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
43
+ evidenceFolderId: [],
44
+ evidenceIds: (_) => (0, smithy_client_1._json)(_),
45
+ }));
46
46
  return new protocol_http_1.HttpRequest({
47
47
  protocol,
48
48
  hostname,
@@ -62,11 +62,9 @@ const se_BatchCreateDelegationByAssessmentCommand = async (input, context) => {
62
62
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments/{assessmentId}/delegations";
63
63
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
64
64
  let body;
65
- body = JSON.stringify({
66
- ...(input.createDelegationRequests != null && {
67
- createDelegationRequests: se_CreateDelegationRequests(input.createDelegationRequests, context),
68
- }),
69
- });
65
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
66
+ createDelegationRequests: (_) => (0, smithy_client_1._json)(_),
67
+ }));
70
68
  return new protocol_http_1.HttpRequest({
71
69
  protocol,
72
70
  hostname,
@@ -86,9 +84,9 @@ const se_BatchDeleteDelegationByAssessmentCommand = async (input, context) => {
86
84
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments/{assessmentId}/delegations";
87
85
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
88
86
  let body;
89
- body = JSON.stringify({
90
- ...(input.delegationIds != null && { delegationIds: se_DelegationIds(input.delegationIds, context) }),
91
- });
87
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
88
+ delegationIds: (_) => (0, smithy_client_1._json)(_),
89
+ }));
92
90
  return new protocol_http_1.HttpRequest({
93
91
  protocol,
94
92
  hostname,
@@ -109,10 +107,10 @@ const se_BatchDisassociateAssessmentReportEvidenceCommand = async (input, contex
109
107
  "/assessments/{assessmentId}/batchDisassociateFromAssessmentReport";
110
108
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
111
109
  let body;
112
- body = JSON.stringify({
113
- ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }),
114
- ...(input.evidenceIds != null && { evidenceIds: se_EvidenceIds(input.evidenceIds, context) }),
115
- });
110
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
111
+ evidenceFolderId: [],
112
+ evidenceIds: (_) => (0, smithy_client_1._json)(_),
113
+ }));
116
114
  return new protocol_http_1.HttpRequest({
117
115
  protocol,
118
116
  hostname,
@@ -135,9 +133,9 @@ const se_BatchImportEvidenceToAssessmentControlCommand = async (input, context)
135
133
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlSetId", () => input.controlSetId, "{controlSetId}", false);
136
134
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlId", () => input.controlId, "{controlId}", false);
137
135
  let body;
138
- body = JSON.stringify({
139
- ...(input.manualEvidence != null && { manualEvidence: se_ManualEvidenceList(input.manualEvidence, context) }),
140
- });
136
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
137
+ manualEvidence: (_) => (0, smithy_client_1._json)(_),
138
+ }));
141
139
  return new protocol_http_1.HttpRequest({
142
140
  protocol,
143
141
  hostname,
@@ -156,17 +154,15 @@ const se_CreateAssessmentCommand = async (input, context) => {
156
154
  };
157
155
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments";
158
156
  let body;
159
- body = JSON.stringify({
160
- ...(input.assessmentReportsDestination != null && {
161
- assessmentReportsDestination: se_AssessmentReportsDestination(input.assessmentReportsDestination, context),
162
- }),
163
- ...(input.description != null && { description: input.description }),
164
- ...(input.frameworkId != null && { frameworkId: input.frameworkId }),
165
- ...(input.name != null && { name: input.name }),
166
- ...(input.roles != null && { roles: se_Roles(input.roles, context) }),
167
- ...(input.scope != null && { scope: se_Scope(input.scope, context) }),
168
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
169
- });
157
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
158
+ assessmentReportsDestination: (_) => (0, smithy_client_1._json)(_),
159
+ description: [],
160
+ frameworkId: [],
161
+ name: [],
162
+ roles: (_) => (0, smithy_client_1._json)(_),
163
+ scope: (_) => (0, smithy_client_1._json)(_),
164
+ tags: (_) => (0, smithy_client_1._json)(_),
165
+ }));
170
166
  return new protocol_http_1.HttpRequest({
171
167
  protocol,
172
168
  hostname,
@@ -185,15 +181,13 @@ const se_CreateAssessmentFrameworkCommand = async (input, context) => {
185
181
  };
186
182
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentFrameworks";
187
183
  let body;
188
- body = JSON.stringify({
189
- ...(input.complianceType != null && { complianceType: input.complianceType }),
190
- ...(input.controlSets != null && {
191
- controlSets: se_CreateAssessmentFrameworkControlSets(input.controlSets, context),
192
- }),
193
- ...(input.description != null && { description: input.description }),
194
- ...(input.name != null && { name: input.name }),
195
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
196
- });
184
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
185
+ complianceType: [],
186
+ controlSets: (_) => (0, smithy_client_1._json)(_),
187
+ description: [],
188
+ name: [],
189
+ tags: (_) => (0, smithy_client_1._json)(_),
190
+ }));
197
191
  return new protocol_http_1.HttpRequest({
198
192
  protocol,
199
193
  hostname,
@@ -213,11 +207,11 @@ const se_CreateAssessmentReportCommand = async (input, context) => {
213
207
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments/{assessmentId}/reports";
214
208
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
215
209
  let body;
216
- body = JSON.stringify({
217
- ...(input.description != null && { description: input.description }),
218
- ...(input.name != null && { name: input.name }),
219
- ...(input.queryStatement != null && { queryStatement: input.queryStatement }),
220
- });
210
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
211
+ description: [],
212
+ name: [],
213
+ queryStatement: [],
214
+ }));
221
215
  return new protocol_http_1.HttpRequest({
222
216
  protocol,
223
217
  hostname,
@@ -236,17 +230,15 @@ const se_CreateControlCommand = async (input, context) => {
236
230
  };
237
231
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controls";
238
232
  let body;
239
- body = JSON.stringify({
240
- ...(input.actionPlanInstructions != null && { actionPlanInstructions: input.actionPlanInstructions }),
241
- ...(input.actionPlanTitle != null && { actionPlanTitle: input.actionPlanTitle }),
242
- ...(input.controlMappingSources != null && {
243
- controlMappingSources: se_CreateControlMappingSources(input.controlMappingSources, context),
244
- }),
245
- ...(input.description != null && { description: input.description }),
246
- ...(input.name != null && { name: input.name }),
247
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
248
- ...(input.testingInformation != null && { testingInformation: input.testingInformation }),
249
- });
233
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
234
+ actionPlanInstructions: [],
235
+ actionPlanTitle: [],
236
+ controlMappingSources: (_) => (0, smithy_client_1._json)(_),
237
+ description: [],
238
+ name: [],
239
+ tags: (_) => (0, smithy_client_1._json)(_),
240
+ testingInformation: [],
241
+ }));
250
242
  return new protocol_http_1.HttpRequest({
251
243
  protocol,
252
244
  hostname,
@@ -298,7 +290,7 @@ const se_DeleteAssessmentFrameworkShareCommand = async (input, context) => {
298
290
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
299
291
  "/assessmentFrameworkShareRequests/{requestId}";
300
292
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "requestId", () => input.requestId, "{requestId}", false);
301
- const query = map({
293
+ const query = (0, smithy_client_1.map)({
302
294
  requestType: [, (0, smithy_client_1.expectNonNull)(input.requestType, `requestType`)],
303
295
  });
304
296
  let body;
@@ -377,9 +369,9 @@ const se_DeregisterOrganizationAdminAccountCommand = async (input, context) => {
377
369
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
378
370
  "/account/deregisterOrganizationAdminAccount";
379
371
  let body;
380
- body = JSON.stringify({
381
- ...(input.adminAccountId != null && { adminAccountId: input.adminAccountId }),
382
- });
372
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
373
+ adminAccountId: [],
374
+ }));
383
375
  return new protocol_http_1.HttpRequest({
384
376
  protocol,
385
377
  hostname,
@@ -400,9 +392,9 @@ const se_DisassociateAssessmentReportEvidenceFolderCommand = async (input, conte
400
392
  "/assessments/{assessmentId}/disassociateFromAssessmentReport";
401
393
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
402
394
  let body;
403
- body = JSON.stringify({
404
- ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }),
405
- });
395
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
396
+ evidenceFolderId: [],
397
+ }));
406
398
  return new protocol_http_1.HttpRequest({
407
399
  protocol,
408
400
  hostname,
@@ -491,7 +483,7 @@ const se_GetChangeLogsCommand = async (input, context) => {
491
483
  const headers = {};
492
484
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments/{assessmentId}/changelogs";
493
485
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
494
- const query = map({
486
+ const query = (0, smithy_client_1.map)({
495
487
  controlSetId: [, input.controlSetId],
496
488
  controlId: [, input.controlId],
497
489
  nextToken: [, input.nextToken],
@@ -531,7 +523,7 @@ const se_GetDelegationsCommand = async (input, context) => {
531
523
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
532
524
  const headers = {};
533
525
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegations";
534
- const query = map({
526
+ const query = (0, smithy_client_1.map)({
535
527
  nextToken: [, input.nextToken],
536
528
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
537
529
  });
@@ -577,7 +569,7 @@ const se_GetEvidenceByEvidenceFolderCommand = async (input, context) => {
577
569
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
578
570
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlSetId", () => input.controlSetId, "{controlSetId}", false);
579
571
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "evidenceFolderId", () => input.evidenceFolderId, "{evidenceFolderId}", false);
580
- const query = map({
572
+ const query = (0, smithy_client_1.map)({
581
573
  nextToken: [, input.nextToken],
582
574
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
583
575
  });
@@ -620,7 +612,7 @@ const se_GetEvidenceFoldersByAssessmentCommand = async (input, context) => {
620
612
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
621
613
  "/assessments/{assessmentId}/evidenceFolders";
622
614
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
623
- const query = map({
615
+ const query = (0, smithy_client_1.map)({
624
616
  nextToken: [, input.nextToken],
625
617
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
626
618
  });
@@ -645,7 +637,7 @@ const se_GetEvidenceFoldersByAssessmentControlCommand = async (input, context) =
645
637
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
646
638
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlSetId", () => input.controlSetId, "{controlSetId}", false);
647
639
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlId", () => input.controlId, "{controlId}", false);
648
- const query = map({
640
+ const query = (0, smithy_client_1.map)({
649
641
  nextToken: [, input.nextToken],
650
642
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
651
643
  });
@@ -757,7 +749,7 @@ const se_ListAssessmentControlInsightsByControlDomainCommand = async (input, con
757
749
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
758
750
  const headers = {};
759
751
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/controls-by-assessment";
760
- const query = map({
752
+ const query = (0, smithy_client_1.map)({
761
753
  controlDomainId: [, (0, smithy_client_1.expectNonNull)(input.controlDomainId, `controlDomainId`)],
762
754
  assessmentId: [, (0, smithy_client_1.expectNonNull)(input.assessmentId, `assessmentId`)],
763
755
  nextToken: [, input.nextToken],
@@ -780,7 +772,7 @@ const se_ListAssessmentFrameworksCommand = async (input, context) => {
780
772
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
781
773
  const headers = {};
782
774
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentFrameworks";
783
- const query = map({
775
+ const query = (0, smithy_client_1.map)({
784
776
  frameworkType: [, (0, smithy_client_1.expectNonNull)(input.frameworkType, `frameworkType`)],
785
777
  nextToken: [, input.nextToken],
786
778
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -802,7 +794,7 @@ const se_ListAssessmentFrameworkShareRequestsCommand = async (input, context) =>
802
794
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
803
795
  const headers = {};
804
796
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentFrameworkShareRequests";
805
- const query = map({
797
+ const query = (0, smithy_client_1.map)({
806
798
  requestType: [, (0, smithy_client_1.expectNonNull)(input.requestType, `requestType`)],
807
799
  nextToken: [, input.nextToken],
808
800
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -824,7 +816,7 @@ const se_ListAssessmentReportsCommand = async (input, context) => {
824
816
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
825
817
  const headers = {};
826
818
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentReports";
827
- const query = map({
819
+ const query = (0, smithy_client_1.map)({
828
820
  nextToken: [, input.nextToken],
829
821
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
830
822
  });
@@ -845,7 +837,7 @@ const se_ListAssessmentsCommand = async (input, context) => {
845
837
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
846
838
  const headers = {};
847
839
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments";
848
- const query = map({
840
+ const query = (0, smithy_client_1.map)({
849
841
  status: [, input.status],
850
842
  nextToken: [, input.nextToken],
851
843
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -867,7 +859,7 @@ const se_ListControlDomainInsightsCommand = async (input, context) => {
867
859
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
868
860
  const headers = {};
869
861
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/control-domains";
870
- const query = map({
862
+ const query = (0, smithy_client_1.map)({
871
863
  nextToken: [, input.nextToken],
872
864
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
873
865
  });
@@ -888,7 +880,7 @@ const se_ListControlDomainInsightsByAssessmentCommand = async (input, context) =
888
880
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
889
881
  const headers = {};
890
882
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/control-domains-by-assessment";
891
- const query = map({
883
+ const query = (0, smithy_client_1.map)({
892
884
  assessmentId: [, (0, smithy_client_1.expectNonNull)(input.assessmentId, `assessmentId`)],
893
885
  nextToken: [, input.nextToken],
894
886
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -910,7 +902,7 @@ const se_ListControlInsightsByControlDomainCommand = async (input, context) => {
910
902
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
911
903
  const headers = {};
912
904
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/controls";
913
- const query = map({
905
+ const query = (0, smithy_client_1.map)({
914
906
  controlDomainId: [, (0, smithy_client_1.expectNonNull)(input.controlDomainId, `controlDomainId`)],
915
907
  nextToken: [, input.nextToken],
916
908
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -932,7 +924,7 @@ const se_ListControlsCommand = async (input, context) => {
932
924
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
933
925
  const headers = {};
934
926
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controls";
935
- const query = map({
927
+ const query = (0, smithy_client_1.map)({
936
928
  controlType: [, (0, smithy_client_1.expectNonNull)(input.controlType, `controlType`)],
937
929
  nextToken: [, input.nextToken],
938
930
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -954,7 +946,7 @@ const se_ListKeywordsForDataSourceCommand = async (input, context) => {
954
946
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
955
947
  const headers = {};
956
948
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataSourceKeywords";
957
- const query = map({
949
+ const query = (0, smithy_client_1.map)({
958
950
  source: [, (0, smithy_client_1.expectNonNull)(input.source, `source`)],
959
951
  nextToken: [, input.nextToken],
960
952
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -976,7 +968,7 @@ const se_ListNotificationsCommand = async (input, context) => {
976
968
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
977
969
  const headers = {};
978
970
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/notifications";
979
- const query = map({
971
+ const query = (0, smithy_client_1.map)({
980
972
  nextToken: [, input.nextToken],
981
973
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
982
974
  });
@@ -1017,10 +1009,10 @@ const se_RegisterAccountCommand = async (input, context) => {
1017
1009
  };
1018
1010
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account/registerAccount";
1019
1011
  let body;
1020
- body = JSON.stringify({
1021
- ...(input.delegatedAdminAccount != null && { delegatedAdminAccount: input.delegatedAdminAccount }),
1022
- ...(input.kmsKey != null && { kmsKey: input.kmsKey }),
1023
- });
1012
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1013
+ delegatedAdminAccount: [],
1014
+ kmsKey: [],
1015
+ }));
1024
1016
  return new protocol_http_1.HttpRequest({
1025
1017
  protocol,
1026
1018
  hostname,
@@ -1039,9 +1031,9 @@ const se_RegisterOrganizationAdminAccountCommand = async (input, context) => {
1039
1031
  };
1040
1032
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account/registerOrganizationAdminAccount";
1041
1033
  let body;
1042
- body = JSON.stringify({
1043
- ...(input.adminAccountId != null && { adminAccountId: input.adminAccountId }),
1044
- });
1034
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1035
+ adminAccountId: [],
1036
+ }));
1045
1037
  return new protocol_http_1.HttpRequest({
1046
1038
  protocol,
1047
1039
  hostname,
@@ -1062,11 +1054,11 @@ const se_StartAssessmentFrameworkShareCommand = async (input, context) => {
1062
1054
  "/assessmentFrameworks/{frameworkId}/shareRequests";
1063
1055
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "frameworkId", () => input.frameworkId, "{frameworkId}", false);
1064
1056
  let body;
1065
- body = JSON.stringify({
1066
- ...(input.comment != null && { comment: input.comment }),
1067
- ...(input.destinationAccount != null && { destinationAccount: input.destinationAccount }),
1068
- ...(input.destinationRegion != null && { destinationRegion: input.destinationRegion }),
1069
- });
1057
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1058
+ comment: [],
1059
+ destinationAccount: [],
1060
+ destinationRegion: [],
1061
+ }));
1070
1062
  return new protocol_http_1.HttpRequest({
1071
1063
  protocol,
1072
1064
  hostname,
@@ -1086,9 +1078,9 @@ const se_TagResourceCommand = async (input, context) => {
1086
1078
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
1087
1079
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
1088
1080
  let body;
1089
- body = JSON.stringify({
1090
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
1091
- });
1081
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1082
+ tags: (_) => (0, smithy_client_1._json)(_),
1083
+ }));
1092
1084
  return new protocol_http_1.HttpRequest({
1093
1085
  protocol,
1094
1086
  hostname,
@@ -1105,7 +1097,7 @@ const se_UntagResourceCommand = async (input, context) => {
1105
1097
  const headers = {};
1106
1098
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
1107
1099
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
1108
- const query = map({
1100
+ const query = (0, smithy_client_1.map)({
1109
1101
  tagKeys: [
1110
1102
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
1111
1103
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -1132,15 +1124,13 @@ const se_UpdateAssessmentCommand = async (input, context) => {
1132
1124
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments/{assessmentId}";
1133
1125
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
1134
1126
  let body;
1135
- body = JSON.stringify({
1136
- ...(input.assessmentDescription != null && { assessmentDescription: input.assessmentDescription }),
1137
- ...(input.assessmentName != null && { assessmentName: input.assessmentName }),
1138
- ...(input.assessmentReportsDestination != null && {
1139
- assessmentReportsDestination: se_AssessmentReportsDestination(input.assessmentReportsDestination, context),
1140
- }),
1141
- ...(input.roles != null && { roles: se_Roles(input.roles, context) }),
1142
- ...(input.scope != null && { scope: se_Scope(input.scope, context) }),
1143
- });
1127
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1128
+ assessmentDescription: [],
1129
+ assessmentName: [],
1130
+ assessmentReportsDestination: (_) => (0, smithy_client_1._json)(_),
1131
+ roles: (_) => (0, smithy_client_1._json)(_),
1132
+ scope: (_) => (0, smithy_client_1._json)(_),
1133
+ }));
1144
1134
  return new protocol_http_1.HttpRequest({
1145
1135
  protocol,
1146
1136
  hostname,
@@ -1163,10 +1153,10 @@ const se_UpdateAssessmentControlCommand = async (input, context) => {
1163
1153
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlSetId", () => input.controlSetId, "{controlSetId}", false);
1164
1154
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlId", () => input.controlId, "{controlId}", false);
1165
1155
  let body;
1166
- body = JSON.stringify({
1167
- ...(input.commentBody != null && { commentBody: input.commentBody }),
1168
- ...(input.controlStatus != null && { controlStatus: input.controlStatus }),
1169
- });
1156
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1157
+ commentBody: [],
1158
+ controlStatus: [],
1159
+ }));
1170
1160
  return new protocol_http_1.HttpRequest({
1171
1161
  protocol,
1172
1162
  hostname,
@@ -1188,10 +1178,10 @@ const se_UpdateAssessmentControlSetStatusCommand = async (input, context) => {
1188
1178
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
1189
1179
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlSetId", () => input.controlSetId, "{controlSetId}", false);
1190
1180
  let body;
1191
- body = JSON.stringify({
1192
- ...(input.comment != null && { comment: input.comment }),
1193
- ...(input.status != null && { status: input.status }),
1194
- });
1181
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1182
+ comment: [],
1183
+ status: [],
1184
+ }));
1195
1185
  return new protocol_http_1.HttpRequest({
1196
1186
  protocol,
1197
1187
  hostname,
@@ -1211,14 +1201,12 @@ const se_UpdateAssessmentFrameworkCommand = async (input, context) => {
1211
1201
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentFrameworks/{frameworkId}";
1212
1202
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "frameworkId", () => input.frameworkId, "{frameworkId}", false);
1213
1203
  let body;
1214
- body = JSON.stringify({
1215
- ...(input.complianceType != null && { complianceType: input.complianceType }),
1216
- ...(input.controlSets != null && {
1217
- controlSets: se_UpdateAssessmentFrameworkControlSets(input.controlSets, context),
1218
- }),
1219
- ...(input.description != null && { description: input.description }),
1220
- ...(input.name != null && { name: input.name }),
1221
- });
1204
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1205
+ complianceType: [],
1206
+ controlSets: (_) => (0, smithy_client_1._json)(_),
1207
+ description: [],
1208
+ name: [],
1209
+ }));
1222
1210
  return new protocol_http_1.HttpRequest({
1223
1211
  protocol,
1224
1212
  hostname,
@@ -1239,10 +1227,10 @@ const se_UpdateAssessmentFrameworkShareCommand = async (input, context) => {
1239
1227
  "/assessmentFrameworkShareRequests/{requestId}";
1240
1228
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "requestId", () => input.requestId, "{requestId}", false);
1241
1229
  let body;
1242
- body = JSON.stringify({
1243
- ...(input.action != null && { action: input.action }),
1244
- ...(input.requestType != null && { requestType: input.requestType }),
1245
- });
1230
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1231
+ action: [],
1232
+ requestType: [],
1233
+ }));
1246
1234
  return new protocol_http_1.HttpRequest({
1247
1235
  protocol,
1248
1236
  hostname,
@@ -1262,9 +1250,9 @@ const se_UpdateAssessmentStatusCommand = async (input, context) => {
1262
1250
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments/{assessmentId}/status";
1263
1251
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assessmentId", () => input.assessmentId, "{assessmentId}", false);
1264
1252
  let body;
1265
- body = JSON.stringify({
1266
- ...(input.status != null && { status: input.status }),
1267
- });
1253
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1254
+ status: [],
1255
+ }));
1268
1256
  return new protocol_http_1.HttpRequest({
1269
1257
  protocol,
1270
1258
  hostname,
@@ -1284,16 +1272,14 @@ const se_UpdateControlCommand = async (input, context) => {
1284
1272
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controls/{controlId}";
1285
1273
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "controlId", () => input.controlId, "{controlId}", false);
1286
1274
  let body;
1287
- body = JSON.stringify({
1288
- ...(input.actionPlanInstructions != null && { actionPlanInstructions: input.actionPlanInstructions }),
1289
- ...(input.actionPlanTitle != null && { actionPlanTitle: input.actionPlanTitle }),
1290
- ...(input.controlMappingSources != null && {
1291
- controlMappingSources: se_ControlMappingSources(input.controlMappingSources, context),
1292
- }),
1293
- ...(input.description != null && { description: input.description }),
1294
- ...(input.name != null && { name: input.name }),
1295
- ...(input.testingInformation != null && { testingInformation: input.testingInformation }),
1296
- });
1275
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1276
+ actionPlanInstructions: [],
1277
+ actionPlanTitle: [],
1278
+ controlMappingSources: (_) => (0, smithy_client_1._json)(_),
1279
+ description: [],
1280
+ name: [],
1281
+ testingInformation: [],
1282
+ }));
1297
1283
  return new protocol_http_1.HttpRequest({
1298
1284
  protocol,
1299
1285
  hostname,
@@ -1312,18 +1298,14 @@ const se_UpdateSettingsCommand = async (input, context) => {
1312
1298
  };
1313
1299
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
1314
1300
  let body;
1315
- body = JSON.stringify({
1316
- ...(input.defaultAssessmentReportsDestination != null && {
1317
- defaultAssessmentReportsDestination: se_AssessmentReportsDestination(input.defaultAssessmentReportsDestination, context),
1318
- }),
1319
- ...(input.defaultProcessOwners != null && { defaultProcessOwners: se_Roles(input.defaultProcessOwners, context) }),
1320
- ...(input.deregistrationPolicy != null && {
1321
- deregistrationPolicy: se_DeregistrationPolicy(input.deregistrationPolicy, context),
1322
- }),
1323
- ...(input.evidenceFinderEnabled != null && { evidenceFinderEnabled: input.evidenceFinderEnabled }),
1324
- ...(input.kmsKey != null && { kmsKey: input.kmsKey }),
1325
- ...(input.snsTopic != null && { snsTopic: input.snsTopic }),
1326
- });
1301
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1302
+ defaultAssessmentReportsDestination: (_) => (0, smithy_client_1._json)(_),
1303
+ defaultProcessOwners: (_) => (0, smithy_client_1._json)(_),
1304
+ deregistrationPolicy: (_) => (0, smithy_client_1._json)(_),
1305
+ evidenceFinderEnabled: [],
1306
+ kmsKey: [],
1307
+ snsTopic: [],
1308
+ }));
1327
1309
  return new protocol_http_1.HttpRequest({
1328
1310
  protocol,
1329
1311
  hostname,
@@ -1342,9 +1324,9 @@ const se_ValidateAssessmentReportIntegrityCommand = async (input, context) => {
1342
1324
  };
1343
1325
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentReports/integrity";
1344
1326
  let body;
1345
- body = JSON.stringify({
1346
- ...(input.s3RelativePath != null && { s3RelativePath: input.s3RelativePath }),
1347
- });
1327
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1328
+ s3RelativePath: [],
1329
+ }));
1348
1330
  return new protocol_http_1.HttpRequest({
1349
1331
  protocol,
1350
1332
  hostname,
@@ -1360,7 +1342,7 @@ const de_AssociateAssessmentReportEvidenceFolderCommand = async (output, context
1360
1342
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1361
1343
  return de_AssociateAssessmentReportEvidenceFolderCommandError(output, context);
1362
1344
  }
1363
- const contents = map({
1345
+ const contents = (0, smithy_client_1.map)({
1364
1346
  $metadata: deserializeMetadata(output),
1365
1347
  });
1366
1348
  await collectBody(output.body, context);
@@ -1388,10 +1370,9 @@ const de_AssociateAssessmentReportEvidenceFolderCommandError = async (output, co
1388
1370
  throw await de_ValidationExceptionRes(parsedOutput, context);
1389
1371
  default:
1390
1372
  const parsedBody = parsedOutput.body;
1391
- (0, smithy_client_1.throwDefaultError)({
1373
+ return throwDefaultError({
1392
1374
  output,
1393
1375
  parsedBody,
1394
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1395
1376
  errorCode,
1396
1377
  });
1397
1378
  }
@@ -1400,16 +1381,15 @@ const de_BatchAssociateAssessmentReportEvidenceCommand = async (output, context)
1400
1381
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1401
1382
  return de_BatchAssociateAssessmentReportEvidenceCommandError(output, context);
1402
1383
  }
1403
- const contents = map({
1384
+ const contents = (0, smithy_client_1.map)({
1404
1385
  $metadata: deserializeMetadata(output),
1405
1386
  });
1406
1387
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1407
- if (data.errors != null) {
1408
- contents.errors = de_AssessmentReportEvidenceErrors(data.errors, context);
1409
- }
1410
- if (data.evidenceIds != null) {
1411
- contents.evidenceIds = de_EvidenceIds(data.evidenceIds, context);
1412
- }
1388
+ const doc = (0, smithy_client_1.take)(data, {
1389
+ errors: smithy_client_1._json,
1390
+ evidenceIds: smithy_client_1._json,
1391
+ });
1392
+ Object.assign(contents, doc);
1413
1393
  return contents;
1414
1394
  };
1415
1395
  exports.de_BatchAssociateAssessmentReportEvidenceCommand = de_BatchAssociateAssessmentReportEvidenceCommand;
@@ -1434,10 +1414,9 @@ const de_BatchAssociateAssessmentReportEvidenceCommandError = async (output, con
1434
1414
  throw await de_ValidationExceptionRes(parsedOutput, context);
1435
1415
  default:
1436
1416
  const parsedBody = parsedOutput.body;
1437
- (0, smithy_client_1.throwDefaultError)({
1417
+ return throwDefaultError({
1438
1418
  output,
1439
1419
  parsedBody,
1440
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1441
1420
  errorCode,
1442
1421
  });
1443
1422
  }
@@ -1446,16 +1425,15 @@ const de_BatchCreateDelegationByAssessmentCommand = async (output, context) => {
1446
1425
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1447
1426
  return de_BatchCreateDelegationByAssessmentCommandError(output, context);
1448
1427
  }
1449
- const contents = map({
1428
+ const contents = (0, smithy_client_1.map)({
1450
1429
  $metadata: deserializeMetadata(output),
1451
1430
  });
1452
1431
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1453
- if (data.delegations != null) {
1454
- contents.delegations = de_Delegations(data.delegations, context);
1455
- }
1456
- if (data.errors != null) {
1457
- contents.errors = de_BatchCreateDelegationByAssessmentErrors(data.errors, context);
1458
- }
1432
+ const doc = (0, smithy_client_1.take)(data, {
1433
+ delegations: (_) => de_Delegations(_, context),
1434
+ errors: smithy_client_1._json,
1435
+ });
1436
+ Object.assign(contents, doc);
1459
1437
  return contents;
1460
1438
  };
1461
1439
  exports.de_BatchCreateDelegationByAssessmentCommand = de_BatchCreateDelegationByAssessmentCommand;
@@ -1480,10 +1458,9 @@ const de_BatchCreateDelegationByAssessmentCommandError = async (output, context)
1480
1458
  throw await de_ValidationExceptionRes(parsedOutput, context);
1481
1459
  default:
1482
1460
  const parsedBody = parsedOutput.body;
1483
- (0, smithy_client_1.throwDefaultError)({
1461
+ return throwDefaultError({
1484
1462
  output,
1485
1463
  parsedBody,
1486
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1487
1464
  errorCode,
1488
1465
  });
1489
1466
  }
@@ -1492,13 +1469,14 @@ const de_BatchDeleteDelegationByAssessmentCommand = async (output, context) => {
1492
1469
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1493
1470
  return de_BatchDeleteDelegationByAssessmentCommandError(output, context);
1494
1471
  }
1495
- const contents = map({
1472
+ const contents = (0, smithy_client_1.map)({
1496
1473
  $metadata: deserializeMetadata(output),
1497
1474
  });
1498
1475
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1499
- if (data.errors != null) {
1500
- contents.errors = de_BatchDeleteDelegationByAssessmentErrors(data.errors, context);
1501
- }
1476
+ const doc = (0, smithy_client_1.take)(data, {
1477
+ errors: smithy_client_1._json,
1478
+ });
1479
+ Object.assign(contents, doc);
1502
1480
  return contents;
1503
1481
  };
1504
1482
  exports.de_BatchDeleteDelegationByAssessmentCommand = de_BatchDeleteDelegationByAssessmentCommand;
@@ -1523,10 +1501,9 @@ const de_BatchDeleteDelegationByAssessmentCommandError = async (output, context)
1523
1501
  throw await de_ValidationExceptionRes(parsedOutput, context);
1524
1502
  default:
1525
1503
  const parsedBody = parsedOutput.body;
1526
- (0, smithy_client_1.throwDefaultError)({
1504
+ return throwDefaultError({
1527
1505
  output,
1528
1506
  parsedBody,
1529
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1530
1507
  errorCode,
1531
1508
  });
1532
1509
  }
@@ -1535,16 +1512,15 @@ const de_BatchDisassociateAssessmentReportEvidenceCommand = async (output, conte
1535
1512
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1536
1513
  return de_BatchDisassociateAssessmentReportEvidenceCommandError(output, context);
1537
1514
  }
1538
- const contents = map({
1515
+ const contents = (0, smithy_client_1.map)({
1539
1516
  $metadata: deserializeMetadata(output),
1540
1517
  });
1541
1518
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1542
- if (data.errors != null) {
1543
- contents.errors = de_AssessmentReportEvidenceErrors(data.errors, context);
1544
- }
1545
- if (data.evidenceIds != null) {
1546
- contents.evidenceIds = de_EvidenceIds(data.evidenceIds, context);
1547
- }
1519
+ const doc = (0, smithy_client_1.take)(data, {
1520
+ errors: smithy_client_1._json,
1521
+ evidenceIds: smithy_client_1._json,
1522
+ });
1523
+ Object.assign(contents, doc);
1548
1524
  return contents;
1549
1525
  };
1550
1526
  exports.de_BatchDisassociateAssessmentReportEvidenceCommand = de_BatchDisassociateAssessmentReportEvidenceCommand;
@@ -1569,10 +1545,9 @@ const de_BatchDisassociateAssessmentReportEvidenceCommandError = async (output,
1569
1545
  throw await de_ValidationExceptionRes(parsedOutput, context);
1570
1546
  default:
1571
1547
  const parsedBody = parsedOutput.body;
1572
- (0, smithy_client_1.throwDefaultError)({
1548
+ return throwDefaultError({
1573
1549
  output,
1574
1550
  parsedBody,
1575
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1576
1551
  errorCode,
1577
1552
  });
1578
1553
  }
@@ -1581,13 +1556,14 @@ const de_BatchImportEvidenceToAssessmentControlCommand = async (output, context)
1581
1556
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1582
1557
  return de_BatchImportEvidenceToAssessmentControlCommandError(output, context);
1583
1558
  }
1584
- const contents = map({
1559
+ const contents = (0, smithy_client_1.map)({
1585
1560
  $metadata: deserializeMetadata(output),
1586
1561
  });
1587
1562
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1588
- if (data.errors != null) {
1589
- contents.errors = de_BatchImportEvidenceToAssessmentControlErrors(data.errors, context);
1590
- }
1563
+ const doc = (0, smithy_client_1.take)(data, {
1564
+ errors: smithy_client_1._json,
1565
+ });
1566
+ Object.assign(contents, doc);
1591
1567
  return contents;
1592
1568
  };
1593
1569
  exports.de_BatchImportEvidenceToAssessmentControlCommand = de_BatchImportEvidenceToAssessmentControlCommand;
@@ -1612,10 +1588,9 @@ const de_BatchImportEvidenceToAssessmentControlCommandError = async (output, con
1612
1588
  throw await de_ValidationExceptionRes(parsedOutput, context);
1613
1589
  default:
1614
1590
  const parsedBody = parsedOutput.body;
1615
- (0, smithy_client_1.throwDefaultError)({
1591
+ return throwDefaultError({
1616
1592
  output,
1617
1593
  parsedBody,
1618
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1619
1594
  errorCode,
1620
1595
  });
1621
1596
  }
@@ -1624,13 +1599,14 @@ const de_CreateAssessmentCommand = async (output, context) => {
1624
1599
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1625
1600
  return de_CreateAssessmentCommandError(output, context);
1626
1601
  }
1627
- const contents = map({
1602
+ const contents = (0, smithy_client_1.map)({
1628
1603
  $metadata: deserializeMetadata(output),
1629
1604
  });
1630
1605
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1631
- if (data.assessment != null) {
1632
- contents.assessment = de_Assessment(data.assessment, context);
1633
- }
1606
+ const doc = (0, smithy_client_1.take)(data, {
1607
+ assessment: (_) => de_Assessment(_, context),
1608
+ });
1609
+ Object.assign(contents, doc);
1634
1610
  return contents;
1635
1611
  };
1636
1612
  exports.de_CreateAssessmentCommand = de_CreateAssessmentCommand;
@@ -1658,10 +1634,9 @@ const de_CreateAssessmentCommandError = async (output, context) => {
1658
1634
  throw await de_ValidationExceptionRes(parsedOutput, context);
1659
1635
  default:
1660
1636
  const parsedBody = parsedOutput.body;
1661
- (0, smithy_client_1.throwDefaultError)({
1637
+ return throwDefaultError({
1662
1638
  output,
1663
1639
  parsedBody,
1664
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1665
1640
  errorCode,
1666
1641
  });
1667
1642
  }
@@ -1670,13 +1645,14 @@ const de_CreateAssessmentFrameworkCommand = async (output, context) => {
1670
1645
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1671
1646
  return de_CreateAssessmentFrameworkCommandError(output, context);
1672
1647
  }
1673
- const contents = map({
1648
+ const contents = (0, smithy_client_1.map)({
1674
1649
  $metadata: deserializeMetadata(output),
1675
1650
  });
1676
1651
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1677
- if (data.framework != null) {
1678
- contents.framework = de_Framework(data.framework, context);
1679
- }
1652
+ const doc = (0, smithy_client_1.take)(data, {
1653
+ framework: (_) => de_Framework(_, context),
1654
+ });
1655
+ Object.assign(contents, doc);
1680
1656
  return contents;
1681
1657
  };
1682
1658
  exports.de_CreateAssessmentFrameworkCommand = de_CreateAssessmentFrameworkCommand;
@@ -1704,10 +1680,9 @@ const de_CreateAssessmentFrameworkCommandError = async (output, context) => {
1704
1680
  throw await de_ValidationExceptionRes(parsedOutput, context);
1705
1681
  default:
1706
1682
  const parsedBody = parsedOutput.body;
1707
- (0, smithy_client_1.throwDefaultError)({
1683
+ return throwDefaultError({
1708
1684
  output,
1709
1685
  parsedBody,
1710
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1711
1686
  errorCode,
1712
1687
  });
1713
1688
  }
@@ -1716,13 +1691,14 @@ const de_CreateAssessmentReportCommand = async (output, context) => {
1716
1691
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1717
1692
  return de_CreateAssessmentReportCommandError(output, context);
1718
1693
  }
1719
- const contents = map({
1694
+ const contents = (0, smithy_client_1.map)({
1720
1695
  $metadata: deserializeMetadata(output),
1721
1696
  });
1722
1697
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1723
- if (data.assessmentReport != null) {
1724
- contents.assessmentReport = de_AssessmentReport(data.assessmentReport, context);
1725
- }
1698
+ const doc = (0, smithy_client_1.take)(data, {
1699
+ assessmentReport: (_) => de_AssessmentReport(_, context),
1700
+ });
1701
+ Object.assign(contents, doc);
1726
1702
  return contents;
1727
1703
  };
1728
1704
  exports.de_CreateAssessmentReportCommand = de_CreateAssessmentReportCommand;
@@ -1747,10 +1723,9 @@ const de_CreateAssessmentReportCommandError = async (output, context) => {
1747
1723
  throw await de_ValidationExceptionRes(parsedOutput, context);
1748
1724
  default:
1749
1725
  const parsedBody = parsedOutput.body;
1750
- (0, smithy_client_1.throwDefaultError)({
1726
+ return throwDefaultError({
1751
1727
  output,
1752
1728
  parsedBody,
1753
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1754
1729
  errorCode,
1755
1730
  });
1756
1731
  }
@@ -1759,13 +1734,14 @@ const de_CreateControlCommand = async (output, context) => {
1759
1734
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1760
1735
  return de_CreateControlCommandError(output, context);
1761
1736
  }
1762
- const contents = map({
1737
+ const contents = (0, smithy_client_1.map)({
1763
1738
  $metadata: deserializeMetadata(output),
1764
1739
  });
1765
1740
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1766
- if (data.control != null) {
1767
- contents.control = de_Control(data.control, context);
1768
- }
1741
+ const doc = (0, smithy_client_1.take)(data, {
1742
+ control: (_) => de_Control(_, context),
1743
+ });
1744
+ Object.assign(contents, doc);
1769
1745
  return contents;
1770
1746
  };
1771
1747
  exports.de_CreateControlCommand = de_CreateControlCommand;
@@ -1793,10 +1769,9 @@ const de_CreateControlCommandError = async (output, context) => {
1793
1769
  throw await de_ValidationExceptionRes(parsedOutput, context);
1794
1770
  default:
1795
1771
  const parsedBody = parsedOutput.body;
1796
- (0, smithy_client_1.throwDefaultError)({
1772
+ return throwDefaultError({
1797
1773
  output,
1798
1774
  parsedBody,
1799
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1800
1775
  errorCode,
1801
1776
  });
1802
1777
  }
@@ -1805,7 +1780,7 @@ const de_DeleteAssessmentCommand = async (output, context) => {
1805
1780
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1806
1781
  return de_DeleteAssessmentCommandError(output, context);
1807
1782
  }
1808
- const contents = map({
1783
+ const contents = (0, smithy_client_1.map)({
1809
1784
  $metadata: deserializeMetadata(output),
1810
1785
  });
1811
1786
  await collectBody(output.body, context);
@@ -1833,10 +1808,9 @@ const de_DeleteAssessmentCommandError = async (output, context) => {
1833
1808
  throw await de_ValidationExceptionRes(parsedOutput, context);
1834
1809
  default:
1835
1810
  const parsedBody = parsedOutput.body;
1836
- (0, smithy_client_1.throwDefaultError)({
1811
+ return throwDefaultError({
1837
1812
  output,
1838
1813
  parsedBody,
1839
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1840
1814
  errorCode,
1841
1815
  });
1842
1816
  }
@@ -1845,7 +1819,7 @@ const de_DeleteAssessmentFrameworkCommand = async (output, context) => {
1845
1819
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1846
1820
  return de_DeleteAssessmentFrameworkCommandError(output, context);
1847
1821
  }
1848
- const contents = map({
1822
+ const contents = (0, smithy_client_1.map)({
1849
1823
  $metadata: deserializeMetadata(output),
1850
1824
  });
1851
1825
  await collectBody(output.body, context);
@@ -1873,10 +1847,9 @@ const de_DeleteAssessmentFrameworkCommandError = async (output, context) => {
1873
1847
  throw await de_ValidationExceptionRes(parsedOutput, context);
1874
1848
  default:
1875
1849
  const parsedBody = parsedOutput.body;
1876
- (0, smithy_client_1.throwDefaultError)({
1850
+ return throwDefaultError({
1877
1851
  output,
1878
1852
  parsedBody,
1879
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1880
1853
  errorCode,
1881
1854
  });
1882
1855
  }
@@ -1885,7 +1858,7 @@ const de_DeleteAssessmentFrameworkShareCommand = async (output, context) => {
1885
1858
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1886
1859
  return de_DeleteAssessmentFrameworkShareCommandError(output, context);
1887
1860
  }
1888
- const contents = map({
1861
+ const contents = (0, smithy_client_1.map)({
1889
1862
  $metadata: deserializeMetadata(output),
1890
1863
  });
1891
1864
  await collectBody(output.body, context);
@@ -1913,10 +1886,9 @@ const de_DeleteAssessmentFrameworkShareCommandError = async (output, context) =>
1913
1886
  throw await de_ValidationExceptionRes(parsedOutput, context);
1914
1887
  default:
1915
1888
  const parsedBody = parsedOutput.body;
1916
- (0, smithy_client_1.throwDefaultError)({
1889
+ return throwDefaultError({
1917
1890
  output,
1918
1891
  parsedBody,
1919
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1920
1892
  errorCode,
1921
1893
  });
1922
1894
  }
@@ -1925,7 +1897,7 @@ const de_DeleteAssessmentReportCommand = async (output, context) => {
1925
1897
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1926
1898
  return de_DeleteAssessmentReportCommandError(output, context);
1927
1899
  }
1928
- const contents = map({
1900
+ const contents = (0, smithy_client_1.map)({
1929
1901
  $metadata: deserializeMetadata(output),
1930
1902
  });
1931
1903
  await collectBody(output.body, context);
@@ -1953,10 +1925,9 @@ const de_DeleteAssessmentReportCommandError = async (output, context) => {
1953
1925
  throw await de_ValidationExceptionRes(parsedOutput, context);
1954
1926
  default:
1955
1927
  const parsedBody = parsedOutput.body;
1956
- (0, smithy_client_1.throwDefaultError)({
1928
+ return throwDefaultError({
1957
1929
  output,
1958
1930
  parsedBody,
1959
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
1960
1931
  errorCode,
1961
1932
  });
1962
1933
  }
@@ -1965,7 +1936,7 @@ const de_DeleteControlCommand = async (output, context) => {
1965
1936
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1966
1937
  return de_DeleteControlCommandError(output, context);
1967
1938
  }
1968
- const contents = map({
1939
+ const contents = (0, smithy_client_1.map)({
1969
1940
  $metadata: deserializeMetadata(output),
1970
1941
  });
1971
1942
  await collectBody(output.body, context);
@@ -1993,10 +1964,9 @@ const de_DeleteControlCommandError = async (output, context) => {
1993
1964
  throw await de_ValidationExceptionRes(parsedOutput, context);
1994
1965
  default:
1995
1966
  const parsedBody = parsedOutput.body;
1996
- (0, smithy_client_1.throwDefaultError)({
1967
+ return throwDefaultError({
1997
1968
  output,
1998
1969
  parsedBody,
1999
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2000
1970
  errorCode,
2001
1971
  });
2002
1972
  }
@@ -2005,13 +1975,14 @@ const de_DeregisterAccountCommand = async (output, context) => {
2005
1975
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2006
1976
  return de_DeregisterAccountCommandError(output, context);
2007
1977
  }
2008
- const contents = map({
1978
+ const contents = (0, smithy_client_1.map)({
2009
1979
  $metadata: deserializeMetadata(output),
2010
1980
  });
2011
1981
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2012
- if (data.status != null) {
2013
- contents.status = (0, smithy_client_1.expectString)(data.status);
2014
- }
1982
+ const doc = (0, smithy_client_1.take)(data, {
1983
+ status: smithy_client_1.expectString,
1984
+ });
1985
+ Object.assign(contents, doc);
2015
1986
  return contents;
2016
1987
  };
2017
1988
  exports.de_DeregisterAccountCommand = de_DeregisterAccountCommand;
@@ -2036,10 +2007,9 @@ const de_DeregisterAccountCommandError = async (output, context) => {
2036
2007
  throw await de_ValidationExceptionRes(parsedOutput, context);
2037
2008
  default:
2038
2009
  const parsedBody = parsedOutput.body;
2039
- (0, smithy_client_1.throwDefaultError)({
2010
+ return throwDefaultError({
2040
2011
  output,
2041
2012
  parsedBody,
2042
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2043
2013
  errorCode,
2044
2014
  });
2045
2015
  }
@@ -2048,7 +2018,7 @@ const de_DeregisterOrganizationAdminAccountCommand = async (output, context) =>
2048
2018
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2049
2019
  return de_DeregisterOrganizationAdminAccountCommandError(output, context);
2050
2020
  }
2051
- const contents = map({
2021
+ const contents = (0, smithy_client_1.map)({
2052
2022
  $metadata: deserializeMetadata(output),
2053
2023
  });
2054
2024
  await collectBody(output.body, context);
@@ -2076,10 +2046,9 @@ const de_DeregisterOrganizationAdminAccountCommandError = async (output, context
2076
2046
  throw await de_ValidationExceptionRes(parsedOutput, context);
2077
2047
  default:
2078
2048
  const parsedBody = parsedOutput.body;
2079
- (0, smithy_client_1.throwDefaultError)({
2049
+ return throwDefaultError({
2080
2050
  output,
2081
2051
  parsedBody,
2082
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2083
2052
  errorCode,
2084
2053
  });
2085
2054
  }
@@ -2088,7 +2057,7 @@ const de_DisassociateAssessmentReportEvidenceFolderCommand = async (output, cont
2088
2057
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2089
2058
  return de_DisassociateAssessmentReportEvidenceFolderCommandError(output, context);
2090
2059
  }
2091
- const contents = map({
2060
+ const contents = (0, smithy_client_1.map)({
2092
2061
  $metadata: deserializeMetadata(output),
2093
2062
  });
2094
2063
  await collectBody(output.body, context);
@@ -2116,10 +2085,9 @@ const de_DisassociateAssessmentReportEvidenceFolderCommandError = async (output,
2116
2085
  throw await de_ValidationExceptionRes(parsedOutput, context);
2117
2086
  default:
2118
2087
  const parsedBody = parsedOutput.body;
2119
- (0, smithy_client_1.throwDefaultError)({
2088
+ return throwDefaultError({
2120
2089
  output,
2121
2090
  parsedBody,
2122
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2123
2091
  errorCode,
2124
2092
  });
2125
2093
  }
@@ -2128,13 +2096,14 @@ const de_GetAccountStatusCommand = async (output, context) => {
2128
2096
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2129
2097
  return de_GetAccountStatusCommandError(output, context);
2130
2098
  }
2131
- const contents = map({
2099
+ const contents = (0, smithy_client_1.map)({
2132
2100
  $metadata: deserializeMetadata(output),
2133
2101
  });
2134
2102
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2135
- if (data.status != null) {
2136
- contents.status = (0, smithy_client_1.expectString)(data.status);
2137
- }
2103
+ const doc = (0, smithy_client_1.take)(data, {
2104
+ status: smithy_client_1.expectString,
2105
+ });
2106
+ Object.assign(contents, doc);
2138
2107
  return contents;
2139
2108
  };
2140
2109
  exports.de_GetAccountStatusCommand = de_GetAccountStatusCommand;
@@ -2150,10 +2119,9 @@ const de_GetAccountStatusCommandError = async (output, context) => {
2150
2119
  throw await de_InternalServerExceptionRes(parsedOutput, context);
2151
2120
  default:
2152
2121
  const parsedBody = parsedOutput.body;
2153
- (0, smithy_client_1.throwDefaultError)({
2122
+ return throwDefaultError({
2154
2123
  output,
2155
2124
  parsedBody,
2156
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2157
2125
  errorCode,
2158
2126
  });
2159
2127
  }
@@ -2162,16 +2130,15 @@ const de_GetAssessmentCommand = async (output, context) => {
2162
2130
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2163
2131
  return de_GetAssessmentCommandError(output, context);
2164
2132
  }
2165
- const contents = map({
2133
+ const contents = (0, smithy_client_1.map)({
2166
2134
  $metadata: deserializeMetadata(output),
2167
2135
  });
2168
2136
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2169
- if (data.assessment != null) {
2170
- contents.assessment = de_Assessment(data.assessment, context);
2171
- }
2172
- if (data.userRole != null) {
2173
- contents.userRole = de_Role(data.userRole, context);
2174
- }
2137
+ const doc = (0, smithy_client_1.take)(data, {
2138
+ assessment: (_) => de_Assessment(_, context),
2139
+ userRole: smithy_client_1._json,
2140
+ });
2141
+ Object.assign(contents, doc);
2175
2142
  return contents;
2176
2143
  };
2177
2144
  exports.de_GetAssessmentCommand = de_GetAssessmentCommand;
@@ -2196,10 +2163,9 @@ const de_GetAssessmentCommandError = async (output, context) => {
2196
2163
  throw await de_ValidationExceptionRes(parsedOutput, context);
2197
2164
  default:
2198
2165
  const parsedBody = parsedOutput.body;
2199
- (0, smithy_client_1.throwDefaultError)({
2166
+ return throwDefaultError({
2200
2167
  output,
2201
2168
  parsedBody,
2202
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2203
2169
  errorCode,
2204
2170
  });
2205
2171
  }
@@ -2208,13 +2174,14 @@ const de_GetAssessmentFrameworkCommand = async (output, context) => {
2208
2174
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2209
2175
  return de_GetAssessmentFrameworkCommandError(output, context);
2210
2176
  }
2211
- const contents = map({
2177
+ const contents = (0, smithy_client_1.map)({
2212
2178
  $metadata: deserializeMetadata(output),
2213
2179
  });
2214
2180
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2215
- if (data.framework != null) {
2216
- contents.framework = de_Framework(data.framework, context);
2217
- }
2181
+ const doc = (0, smithy_client_1.take)(data, {
2182
+ framework: (_) => de_Framework(_, context),
2183
+ });
2184
+ Object.assign(contents, doc);
2218
2185
  return contents;
2219
2186
  };
2220
2187
  exports.de_GetAssessmentFrameworkCommand = de_GetAssessmentFrameworkCommand;
@@ -2239,10 +2206,9 @@ const de_GetAssessmentFrameworkCommandError = async (output, context) => {
2239
2206
  throw await de_ValidationExceptionRes(parsedOutput, context);
2240
2207
  default:
2241
2208
  const parsedBody = parsedOutput.body;
2242
- (0, smithy_client_1.throwDefaultError)({
2209
+ return throwDefaultError({
2243
2210
  output,
2244
2211
  parsedBody,
2245
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2246
2212
  errorCode,
2247
2213
  });
2248
2214
  }
@@ -2251,13 +2217,14 @@ const de_GetAssessmentReportUrlCommand = async (output, context) => {
2251
2217
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2252
2218
  return de_GetAssessmentReportUrlCommandError(output, context);
2253
2219
  }
2254
- const contents = map({
2220
+ const contents = (0, smithy_client_1.map)({
2255
2221
  $metadata: deserializeMetadata(output),
2256
2222
  });
2257
2223
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2258
- if (data.preSignedUrl != null) {
2259
- contents.preSignedUrl = de_URL(data.preSignedUrl, context);
2260
- }
2224
+ const doc = (0, smithy_client_1.take)(data, {
2225
+ preSignedUrl: smithy_client_1._json,
2226
+ });
2227
+ Object.assign(contents, doc);
2261
2228
  return contents;
2262
2229
  };
2263
2230
  exports.de_GetAssessmentReportUrlCommand = de_GetAssessmentReportUrlCommand;
@@ -2282,10 +2249,9 @@ const de_GetAssessmentReportUrlCommandError = async (output, context) => {
2282
2249
  throw await de_ValidationExceptionRes(parsedOutput, context);
2283
2250
  default:
2284
2251
  const parsedBody = parsedOutput.body;
2285
- (0, smithy_client_1.throwDefaultError)({
2252
+ return throwDefaultError({
2286
2253
  output,
2287
2254
  parsedBody,
2288
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2289
2255
  errorCode,
2290
2256
  });
2291
2257
  }
@@ -2294,16 +2260,15 @@ const de_GetChangeLogsCommand = async (output, context) => {
2294
2260
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2295
2261
  return de_GetChangeLogsCommandError(output, context);
2296
2262
  }
2297
- const contents = map({
2263
+ const contents = (0, smithy_client_1.map)({
2298
2264
  $metadata: deserializeMetadata(output),
2299
2265
  });
2300
2266
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2301
- if (data.changeLogs != null) {
2302
- contents.changeLogs = de_ChangeLogs(data.changeLogs, context);
2303
- }
2304
- if (data.nextToken != null) {
2305
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2306
- }
2267
+ const doc = (0, smithy_client_1.take)(data, {
2268
+ changeLogs: (_) => de_ChangeLogs(_, context),
2269
+ nextToken: smithy_client_1.expectString,
2270
+ });
2271
+ Object.assign(contents, doc);
2307
2272
  return contents;
2308
2273
  };
2309
2274
  exports.de_GetChangeLogsCommand = de_GetChangeLogsCommand;
@@ -2328,10 +2293,9 @@ const de_GetChangeLogsCommandError = async (output, context) => {
2328
2293
  throw await de_ValidationExceptionRes(parsedOutput, context);
2329
2294
  default:
2330
2295
  const parsedBody = parsedOutput.body;
2331
- (0, smithy_client_1.throwDefaultError)({
2296
+ return throwDefaultError({
2332
2297
  output,
2333
2298
  parsedBody,
2334
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2335
2299
  errorCode,
2336
2300
  });
2337
2301
  }
@@ -2340,13 +2304,14 @@ const de_GetControlCommand = async (output, context) => {
2340
2304
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2341
2305
  return de_GetControlCommandError(output, context);
2342
2306
  }
2343
- const contents = map({
2307
+ const contents = (0, smithy_client_1.map)({
2344
2308
  $metadata: deserializeMetadata(output),
2345
2309
  });
2346
2310
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2347
- if (data.control != null) {
2348
- contents.control = de_Control(data.control, context);
2349
- }
2311
+ const doc = (0, smithy_client_1.take)(data, {
2312
+ control: (_) => de_Control(_, context),
2313
+ });
2314
+ Object.assign(contents, doc);
2350
2315
  return contents;
2351
2316
  };
2352
2317
  exports.de_GetControlCommand = de_GetControlCommand;
@@ -2371,10 +2336,9 @@ const de_GetControlCommandError = async (output, context) => {
2371
2336
  throw await de_ValidationExceptionRes(parsedOutput, context);
2372
2337
  default:
2373
2338
  const parsedBody = parsedOutput.body;
2374
- (0, smithy_client_1.throwDefaultError)({
2339
+ return throwDefaultError({
2375
2340
  output,
2376
2341
  parsedBody,
2377
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2378
2342
  errorCode,
2379
2343
  });
2380
2344
  }
@@ -2383,16 +2347,15 @@ const de_GetDelegationsCommand = async (output, context) => {
2383
2347
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2384
2348
  return de_GetDelegationsCommandError(output, context);
2385
2349
  }
2386
- const contents = map({
2350
+ const contents = (0, smithy_client_1.map)({
2387
2351
  $metadata: deserializeMetadata(output),
2388
2352
  });
2389
2353
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2390
- if (data.delegations != null) {
2391
- contents.delegations = de_DelegationMetadataList(data.delegations, context);
2392
- }
2393
- if (data.nextToken != null) {
2394
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2395
- }
2354
+ const doc = (0, smithy_client_1.take)(data, {
2355
+ delegations: (_) => de_DelegationMetadataList(_, context),
2356
+ nextToken: smithy_client_1.expectString,
2357
+ });
2358
+ Object.assign(contents, doc);
2396
2359
  return contents;
2397
2360
  };
2398
2361
  exports.de_GetDelegationsCommand = de_GetDelegationsCommand;
@@ -2414,10 +2377,9 @@ const de_GetDelegationsCommandError = async (output, context) => {
2414
2377
  throw await de_ValidationExceptionRes(parsedOutput, context);
2415
2378
  default:
2416
2379
  const parsedBody = parsedOutput.body;
2417
- (0, smithy_client_1.throwDefaultError)({
2380
+ return throwDefaultError({
2418
2381
  output,
2419
2382
  parsedBody,
2420
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2421
2383
  errorCode,
2422
2384
  });
2423
2385
  }
@@ -2426,13 +2388,14 @@ const de_GetEvidenceCommand = async (output, context) => {
2426
2388
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2427
2389
  return de_GetEvidenceCommandError(output, context);
2428
2390
  }
2429
- const contents = map({
2391
+ const contents = (0, smithy_client_1.map)({
2430
2392
  $metadata: deserializeMetadata(output),
2431
2393
  });
2432
2394
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2433
- if (data.evidence != null) {
2434
- contents.evidence = de_Evidence(data.evidence, context);
2435
- }
2395
+ const doc = (0, smithy_client_1.take)(data, {
2396
+ evidence: (_) => de_Evidence(_, context),
2397
+ });
2398
+ Object.assign(contents, doc);
2436
2399
  return contents;
2437
2400
  };
2438
2401
  exports.de_GetEvidenceCommand = de_GetEvidenceCommand;
@@ -2457,10 +2420,9 @@ const de_GetEvidenceCommandError = async (output, context) => {
2457
2420
  throw await de_ValidationExceptionRes(parsedOutput, context);
2458
2421
  default:
2459
2422
  const parsedBody = parsedOutput.body;
2460
- (0, smithy_client_1.throwDefaultError)({
2423
+ return throwDefaultError({
2461
2424
  output,
2462
2425
  parsedBody,
2463
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2464
2426
  errorCode,
2465
2427
  });
2466
2428
  }
@@ -2469,16 +2431,15 @@ const de_GetEvidenceByEvidenceFolderCommand = async (output, context) => {
2469
2431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2470
2432
  return de_GetEvidenceByEvidenceFolderCommandError(output, context);
2471
2433
  }
2472
- const contents = map({
2434
+ const contents = (0, smithy_client_1.map)({
2473
2435
  $metadata: deserializeMetadata(output),
2474
2436
  });
2475
2437
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2476
- if (data.evidence != null) {
2477
- contents.evidence = de_EvidenceList(data.evidence, context);
2478
- }
2479
- if (data.nextToken != null) {
2480
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2481
- }
2438
+ const doc = (0, smithy_client_1.take)(data, {
2439
+ evidence: (_) => de_EvidenceList(_, context),
2440
+ nextToken: smithy_client_1.expectString,
2441
+ });
2442
+ Object.assign(contents, doc);
2482
2443
  return contents;
2483
2444
  };
2484
2445
  exports.de_GetEvidenceByEvidenceFolderCommand = de_GetEvidenceByEvidenceFolderCommand;
@@ -2503,10 +2464,9 @@ const de_GetEvidenceByEvidenceFolderCommandError = async (output, context) => {
2503
2464
  throw await de_ValidationExceptionRes(parsedOutput, context);
2504
2465
  default:
2505
2466
  const parsedBody = parsedOutput.body;
2506
- (0, smithy_client_1.throwDefaultError)({
2467
+ return throwDefaultError({
2507
2468
  output,
2508
2469
  parsedBody,
2509
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2510
2470
  errorCode,
2511
2471
  });
2512
2472
  }
@@ -2515,13 +2475,14 @@ const de_GetEvidenceFolderCommand = async (output, context) => {
2515
2475
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2516
2476
  return de_GetEvidenceFolderCommandError(output, context);
2517
2477
  }
2518
- const contents = map({
2478
+ const contents = (0, smithy_client_1.map)({
2519
2479
  $metadata: deserializeMetadata(output),
2520
2480
  });
2521
2481
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2522
- if (data.evidenceFolder != null) {
2523
- contents.evidenceFolder = de_AssessmentEvidenceFolder(data.evidenceFolder, context);
2524
- }
2482
+ const doc = (0, smithy_client_1.take)(data, {
2483
+ evidenceFolder: (_) => de_AssessmentEvidenceFolder(_, context),
2484
+ });
2485
+ Object.assign(contents, doc);
2525
2486
  return contents;
2526
2487
  };
2527
2488
  exports.de_GetEvidenceFolderCommand = de_GetEvidenceFolderCommand;
@@ -2546,10 +2507,9 @@ const de_GetEvidenceFolderCommandError = async (output, context) => {
2546
2507
  throw await de_ValidationExceptionRes(parsedOutput, context);
2547
2508
  default:
2548
2509
  const parsedBody = parsedOutput.body;
2549
- (0, smithy_client_1.throwDefaultError)({
2510
+ return throwDefaultError({
2550
2511
  output,
2551
2512
  parsedBody,
2552
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2553
2513
  errorCode,
2554
2514
  });
2555
2515
  }
@@ -2558,16 +2518,15 @@ const de_GetEvidenceFoldersByAssessmentCommand = async (output, context) => {
2558
2518
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2559
2519
  return de_GetEvidenceFoldersByAssessmentCommandError(output, context);
2560
2520
  }
2561
- const contents = map({
2521
+ const contents = (0, smithy_client_1.map)({
2562
2522
  $metadata: deserializeMetadata(output),
2563
2523
  });
2564
2524
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2565
- if (data.evidenceFolders != null) {
2566
- contents.evidenceFolders = de_AssessmentEvidenceFolders(data.evidenceFolders, context);
2567
- }
2568
- if (data.nextToken != null) {
2569
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2570
- }
2525
+ const doc = (0, smithy_client_1.take)(data, {
2526
+ evidenceFolders: (_) => de_AssessmentEvidenceFolders(_, context),
2527
+ nextToken: smithy_client_1.expectString,
2528
+ });
2529
+ Object.assign(contents, doc);
2571
2530
  return contents;
2572
2531
  };
2573
2532
  exports.de_GetEvidenceFoldersByAssessmentCommand = de_GetEvidenceFoldersByAssessmentCommand;
@@ -2592,10 +2551,9 @@ const de_GetEvidenceFoldersByAssessmentCommandError = async (output, context) =>
2592
2551
  throw await de_ValidationExceptionRes(parsedOutput, context);
2593
2552
  default:
2594
2553
  const parsedBody = parsedOutput.body;
2595
- (0, smithy_client_1.throwDefaultError)({
2554
+ return throwDefaultError({
2596
2555
  output,
2597
2556
  parsedBody,
2598
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2599
2557
  errorCode,
2600
2558
  });
2601
2559
  }
@@ -2604,16 +2562,15 @@ const de_GetEvidenceFoldersByAssessmentControlCommand = async (output, context)
2604
2562
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2605
2563
  return de_GetEvidenceFoldersByAssessmentControlCommandError(output, context);
2606
2564
  }
2607
- const contents = map({
2565
+ const contents = (0, smithy_client_1.map)({
2608
2566
  $metadata: deserializeMetadata(output),
2609
2567
  });
2610
2568
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2611
- if (data.evidenceFolders != null) {
2612
- contents.evidenceFolders = de_AssessmentEvidenceFolders(data.evidenceFolders, context);
2613
- }
2614
- if (data.nextToken != null) {
2615
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2616
- }
2569
+ const doc = (0, smithy_client_1.take)(data, {
2570
+ evidenceFolders: (_) => de_AssessmentEvidenceFolders(_, context),
2571
+ nextToken: smithy_client_1.expectString,
2572
+ });
2573
+ Object.assign(contents, doc);
2617
2574
  return contents;
2618
2575
  };
2619
2576
  exports.de_GetEvidenceFoldersByAssessmentControlCommand = de_GetEvidenceFoldersByAssessmentControlCommand;
@@ -2638,10 +2595,9 @@ const de_GetEvidenceFoldersByAssessmentControlCommandError = async (output, cont
2638
2595
  throw await de_ValidationExceptionRes(parsedOutput, context);
2639
2596
  default:
2640
2597
  const parsedBody = parsedOutput.body;
2641
- (0, smithy_client_1.throwDefaultError)({
2598
+ return throwDefaultError({
2642
2599
  output,
2643
2600
  parsedBody,
2644
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2645
2601
  errorCode,
2646
2602
  });
2647
2603
  }
@@ -2650,13 +2606,14 @@ const de_GetInsightsCommand = async (output, context) => {
2650
2606
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2651
2607
  return de_GetInsightsCommandError(output, context);
2652
2608
  }
2653
- const contents = map({
2609
+ const contents = (0, smithy_client_1.map)({
2654
2610
  $metadata: deserializeMetadata(output),
2655
2611
  });
2656
2612
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2657
- if (data.insights != null) {
2658
- contents.insights = de_Insights(data.insights, context);
2659
- }
2613
+ const doc = (0, smithy_client_1.take)(data, {
2614
+ insights: (_) => de_Insights(_, context),
2615
+ });
2616
+ Object.assign(contents, doc);
2660
2617
  return contents;
2661
2618
  };
2662
2619
  exports.de_GetInsightsCommand = de_GetInsightsCommand;
@@ -2675,10 +2632,9 @@ const de_GetInsightsCommandError = async (output, context) => {
2675
2632
  throw await de_InternalServerExceptionRes(parsedOutput, context);
2676
2633
  default:
2677
2634
  const parsedBody = parsedOutput.body;
2678
- (0, smithy_client_1.throwDefaultError)({
2635
+ return throwDefaultError({
2679
2636
  output,
2680
2637
  parsedBody,
2681
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2682
2638
  errorCode,
2683
2639
  });
2684
2640
  }
@@ -2687,13 +2643,14 @@ const de_GetInsightsByAssessmentCommand = async (output, context) => {
2687
2643
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2688
2644
  return de_GetInsightsByAssessmentCommandError(output, context);
2689
2645
  }
2690
- const contents = map({
2646
+ const contents = (0, smithy_client_1.map)({
2691
2647
  $metadata: deserializeMetadata(output),
2692
2648
  });
2693
2649
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2694
- if (data.insights != null) {
2695
- contents.insights = de_InsightsByAssessment(data.insights, context);
2696
- }
2650
+ const doc = (0, smithy_client_1.take)(data, {
2651
+ insights: (_) => de_InsightsByAssessment(_, context),
2652
+ });
2653
+ Object.assign(contents, doc);
2697
2654
  return contents;
2698
2655
  };
2699
2656
  exports.de_GetInsightsByAssessmentCommand = de_GetInsightsByAssessmentCommand;
@@ -2718,10 +2675,9 @@ const de_GetInsightsByAssessmentCommandError = async (output, context) => {
2718
2675
  throw await de_ValidationExceptionRes(parsedOutput, context);
2719
2676
  default:
2720
2677
  const parsedBody = parsedOutput.body;
2721
- (0, smithy_client_1.throwDefaultError)({
2678
+ return throwDefaultError({
2722
2679
  output,
2723
2680
  parsedBody,
2724
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2725
2681
  errorCode,
2726
2682
  });
2727
2683
  }
@@ -2730,16 +2686,15 @@ const de_GetOrganizationAdminAccountCommand = async (output, context) => {
2730
2686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2731
2687
  return de_GetOrganizationAdminAccountCommandError(output, context);
2732
2688
  }
2733
- const contents = map({
2689
+ const contents = (0, smithy_client_1.map)({
2734
2690
  $metadata: deserializeMetadata(output),
2735
2691
  });
2736
2692
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2737
- if (data.adminAccountId != null) {
2738
- contents.adminAccountId = (0, smithy_client_1.expectString)(data.adminAccountId);
2739
- }
2740
- if (data.organizationId != null) {
2741
- contents.organizationId = (0, smithy_client_1.expectString)(data.organizationId);
2742
- }
2693
+ const doc = (0, smithy_client_1.take)(data, {
2694
+ adminAccountId: smithy_client_1.expectString,
2695
+ organizationId: smithy_client_1.expectString,
2696
+ });
2697
+ Object.assign(contents, doc);
2743
2698
  return contents;
2744
2699
  };
2745
2700
  exports.de_GetOrganizationAdminAccountCommand = de_GetOrganizationAdminAccountCommand;
@@ -2764,10 +2719,9 @@ const de_GetOrganizationAdminAccountCommandError = async (output, context) => {
2764
2719
  throw await de_ValidationExceptionRes(parsedOutput, context);
2765
2720
  default:
2766
2721
  const parsedBody = parsedOutput.body;
2767
- (0, smithy_client_1.throwDefaultError)({
2722
+ return throwDefaultError({
2768
2723
  output,
2769
2724
  parsedBody,
2770
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2771
2725
  errorCode,
2772
2726
  });
2773
2727
  }
@@ -2776,13 +2730,14 @@ const de_GetServicesInScopeCommand = async (output, context) => {
2776
2730
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2777
2731
  return de_GetServicesInScopeCommandError(output, context);
2778
2732
  }
2779
- const contents = map({
2733
+ const contents = (0, smithy_client_1.map)({
2780
2734
  $metadata: deserializeMetadata(output),
2781
2735
  });
2782
2736
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2783
- if (data.serviceMetadata != null) {
2784
- contents.serviceMetadata = de_ServiceMetadataList(data.serviceMetadata, context);
2785
- }
2737
+ const doc = (0, smithy_client_1.take)(data, {
2738
+ serviceMetadata: smithy_client_1._json,
2739
+ });
2740
+ Object.assign(contents, doc);
2786
2741
  return contents;
2787
2742
  };
2788
2743
  exports.de_GetServicesInScopeCommand = de_GetServicesInScopeCommand;
@@ -2804,10 +2759,9 @@ const de_GetServicesInScopeCommandError = async (output, context) => {
2804
2759
  throw await de_ValidationExceptionRes(parsedOutput, context);
2805
2760
  default:
2806
2761
  const parsedBody = parsedOutput.body;
2807
- (0, smithy_client_1.throwDefaultError)({
2762
+ return throwDefaultError({
2808
2763
  output,
2809
2764
  parsedBody,
2810
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2811
2765
  errorCode,
2812
2766
  });
2813
2767
  }
@@ -2816,13 +2770,14 @@ const de_GetSettingsCommand = async (output, context) => {
2816
2770
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2817
2771
  return de_GetSettingsCommandError(output, context);
2818
2772
  }
2819
- const contents = map({
2773
+ const contents = (0, smithy_client_1.map)({
2820
2774
  $metadata: deserializeMetadata(output),
2821
2775
  });
2822
2776
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2823
- if (data.settings != null) {
2824
- contents.settings = de_Settings(data.settings, context);
2825
- }
2777
+ const doc = (0, smithy_client_1.take)(data, {
2778
+ settings: smithy_client_1._json,
2779
+ });
2780
+ Object.assign(contents, doc);
2826
2781
  return contents;
2827
2782
  };
2828
2783
  exports.de_GetSettingsCommand = de_GetSettingsCommand;
@@ -2841,10 +2796,9 @@ const de_GetSettingsCommandError = async (output, context) => {
2841
2796
  throw await de_InternalServerExceptionRes(parsedOutput, context);
2842
2797
  default:
2843
2798
  const parsedBody = parsedOutput.body;
2844
- (0, smithy_client_1.throwDefaultError)({
2799
+ return throwDefaultError({
2845
2800
  output,
2846
2801
  parsedBody,
2847
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2848
2802
  errorCode,
2849
2803
  });
2850
2804
  }
@@ -2853,16 +2807,15 @@ const de_ListAssessmentControlInsightsByControlDomainCommand = async (output, co
2853
2807
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2854
2808
  return de_ListAssessmentControlInsightsByControlDomainCommandError(output, context);
2855
2809
  }
2856
- const contents = map({
2810
+ const contents = (0, smithy_client_1.map)({
2857
2811
  $metadata: deserializeMetadata(output),
2858
2812
  });
2859
2813
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2860
- if (data.controlInsightsByAssessment != null) {
2861
- contents.controlInsightsByAssessment = de_ControlInsightsMetadataByAssessment(data.controlInsightsByAssessment, context);
2862
- }
2863
- if (data.nextToken != null) {
2864
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2865
- }
2814
+ const doc = (0, smithy_client_1.take)(data, {
2815
+ controlInsightsByAssessment: (_) => de_ControlInsightsMetadataByAssessment(_, context),
2816
+ nextToken: smithy_client_1.expectString,
2817
+ });
2818
+ Object.assign(contents, doc);
2866
2819
  return contents;
2867
2820
  };
2868
2821
  exports.de_ListAssessmentControlInsightsByControlDomainCommand = de_ListAssessmentControlInsightsByControlDomainCommand;
@@ -2887,10 +2840,9 @@ const de_ListAssessmentControlInsightsByControlDomainCommandError = async (outpu
2887
2840
  throw await de_ValidationExceptionRes(parsedOutput, context);
2888
2841
  default:
2889
2842
  const parsedBody = parsedOutput.body;
2890
- (0, smithy_client_1.throwDefaultError)({
2843
+ return throwDefaultError({
2891
2844
  output,
2892
2845
  parsedBody,
2893
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2894
2846
  errorCode,
2895
2847
  });
2896
2848
  }
@@ -2899,16 +2851,15 @@ const de_ListAssessmentFrameworksCommand = async (output, context) => {
2899
2851
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2900
2852
  return de_ListAssessmentFrameworksCommandError(output, context);
2901
2853
  }
2902
- const contents = map({
2854
+ const contents = (0, smithy_client_1.map)({
2903
2855
  $metadata: deserializeMetadata(output),
2904
2856
  });
2905
2857
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2906
- if (data.frameworkMetadataList != null) {
2907
- contents.frameworkMetadataList = de_FrameworkMetadataList(data.frameworkMetadataList, context);
2908
- }
2909
- if (data.nextToken != null) {
2910
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2911
- }
2858
+ const doc = (0, smithy_client_1.take)(data, {
2859
+ frameworkMetadataList: (_) => de_FrameworkMetadataList(_, context),
2860
+ nextToken: smithy_client_1.expectString,
2861
+ });
2862
+ Object.assign(contents, doc);
2912
2863
  return contents;
2913
2864
  };
2914
2865
  exports.de_ListAssessmentFrameworksCommand = de_ListAssessmentFrameworksCommand;
@@ -2930,10 +2881,9 @@ const de_ListAssessmentFrameworksCommandError = async (output, context) => {
2930
2881
  throw await de_ValidationExceptionRes(parsedOutput, context);
2931
2882
  default:
2932
2883
  const parsedBody = parsedOutput.body;
2933
- (0, smithy_client_1.throwDefaultError)({
2884
+ return throwDefaultError({
2934
2885
  output,
2935
2886
  parsedBody,
2936
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2937
2887
  errorCode,
2938
2888
  });
2939
2889
  }
@@ -2942,16 +2892,15 @@ const de_ListAssessmentFrameworkShareRequestsCommand = async (output, context) =
2942
2892
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2943
2893
  return de_ListAssessmentFrameworkShareRequestsCommandError(output, context);
2944
2894
  }
2945
- const contents = map({
2895
+ const contents = (0, smithy_client_1.map)({
2946
2896
  $metadata: deserializeMetadata(output),
2947
2897
  });
2948
2898
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2949
- if (data.assessmentFrameworkShareRequests != null) {
2950
- contents.assessmentFrameworkShareRequests = de_AssessmentFrameworkShareRequestList(data.assessmentFrameworkShareRequests, context);
2951
- }
2952
- if (data.nextToken != null) {
2953
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2954
- }
2899
+ const doc = (0, smithy_client_1.take)(data, {
2900
+ assessmentFrameworkShareRequests: (_) => de_AssessmentFrameworkShareRequestList(_, context),
2901
+ nextToken: smithy_client_1.expectString,
2902
+ });
2903
+ Object.assign(contents, doc);
2955
2904
  return contents;
2956
2905
  };
2957
2906
  exports.de_ListAssessmentFrameworkShareRequestsCommand = de_ListAssessmentFrameworkShareRequestsCommand;
@@ -2973,10 +2922,9 @@ const de_ListAssessmentFrameworkShareRequestsCommandError = async (output, conte
2973
2922
  throw await de_ValidationExceptionRes(parsedOutput, context);
2974
2923
  default:
2975
2924
  const parsedBody = parsedOutput.body;
2976
- (0, smithy_client_1.throwDefaultError)({
2925
+ return throwDefaultError({
2977
2926
  output,
2978
2927
  parsedBody,
2979
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
2980
2928
  errorCode,
2981
2929
  });
2982
2930
  }
@@ -2985,16 +2933,15 @@ const de_ListAssessmentReportsCommand = async (output, context) => {
2985
2933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2986
2934
  return de_ListAssessmentReportsCommandError(output, context);
2987
2935
  }
2988
- const contents = map({
2936
+ const contents = (0, smithy_client_1.map)({
2989
2937
  $metadata: deserializeMetadata(output),
2990
2938
  });
2991
2939
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2992
- if (data.assessmentReports != null) {
2993
- contents.assessmentReports = de_AssessmentReportsMetadata(data.assessmentReports, context);
2994
- }
2995
- if (data.nextToken != null) {
2996
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2997
- }
2940
+ const doc = (0, smithy_client_1.take)(data, {
2941
+ assessmentReports: (_) => de_AssessmentReportsMetadata(_, context),
2942
+ nextToken: smithy_client_1.expectString,
2943
+ });
2944
+ Object.assign(contents, doc);
2998
2945
  return contents;
2999
2946
  };
3000
2947
  exports.de_ListAssessmentReportsCommand = de_ListAssessmentReportsCommand;
@@ -3016,10 +2963,9 @@ const de_ListAssessmentReportsCommandError = async (output, context) => {
3016
2963
  throw await de_ValidationExceptionRes(parsedOutput, context);
3017
2964
  default:
3018
2965
  const parsedBody = parsedOutput.body;
3019
- (0, smithy_client_1.throwDefaultError)({
2966
+ return throwDefaultError({
3020
2967
  output,
3021
2968
  parsedBody,
3022
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3023
2969
  errorCode,
3024
2970
  });
3025
2971
  }
@@ -3028,16 +2974,15 @@ const de_ListAssessmentsCommand = async (output, context) => {
3028
2974
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3029
2975
  return de_ListAssessmentsCommandError(output, context);
3030
2976
  }
3031
- const contents = map({
2977
+ const contents = (0, smithy_client_1.map)({
3032
2978
  $metadata: deserializeMetadata(output),
3033
2979
  });
3034
2980
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3035
- if (data.assessmentMetadata != null) {
3036
- contents.assessmentMetadata = de_ListAssessmentMetadata(data.assessmentMetadata, context);
3037
- }
3038
- if (data.nextToken != null) {
3039
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3040
- }
2981
+ const doc = (0, smithy_client_1.take)(data, {
2982
+ assessmentMetadata: (_) => de_ListAssessmentMetadata(_, context),
2983
+ nextToken: smithy_client_1.expectString,
2984
+ });
2985
+ Object.assign(contents, doc);
3041
2986
  return contents;
3042
2987
  };
3043
2988
  exports.de_ListAssessmentsCommand = de_ListAssessmentsCommand;
@@ -3059,10 +3004,9 @@ const de_ListAssessmentsCommandError = async (output, context) => {
3059
3004
  throw await de_ValidationExceptionRes(parsedOutput, context);
3060
3005
  default:
3061
3006
  const parsedBody = parsedOutput.body;
3062
- (0, smithy_client_1.throwDefaultError)({
3007
+ return throwDefaultError({
3063
3008
  output,
3064
3009
  parsedBody,
3065
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3066
3010
  errorCode,
3067
3011
  });
3068
3012
  }
@@ -3071,16 +3015,15 @@ const de_ListControlDomainInsightsCommand = async (output, context) => {
3071
3015
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3072
3016
  return de_ListControlDomainInsightsCommandError(output, context);
3073
3017
  }
3074
- const contents = map({
3018
+ const contents = (0, smithy_client_1.map)({
3075
3019
  $metadata: deserializeMetadata(output),
3076
3020
  });
3077
3021
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3078
- if (data.controlDomainInsights != null) {
3079
- contents.controlDomainInsights = de_ControlDomainInsightsList(data.controlDomainInsights, context);
3080
- }
3081
- if (data.nextToken != null) {
3082
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3083
- }
3022
+ const doc = (0, smithy_client_1.take)(data, {
3023
+ controlDomainInsights: (_) => de_ControlDomainInsightsList(_, context),
3024
+ nextToken: smithy_client_1.expectString,
3025
+ });
3026
+ Object.assign(contents, doc);
3084
3027
  return contents;
3085
3028
  };
3086
3029
  exports.de_ListControlDomainInsightsCommand = de_ListControlDomainInsightsCommand;
@@ -3105,10 +3048,9 @@ const de_ListControlDomainInsightsCommandError = async (output, context) => {
3105
3048
  throw await de_ValidationExceptionRes(parsedOutput, context);
3106
3049
  default:
3107
3050
  const parsedBody = parsedOutput.body;
3108
- (0, smithy_client_1.throwDefaultError)({
3051
+ return throwDefaultError({
3109
3052
  output,
3110
3053
  parsedBody,
3111
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3112
3054
  errorCode,
3113
3055
  });
3114
3056
  }
@@ -3117,16 +3059,15 @@ const de_ListControlDomainInsightsByAssessmentCommand = async (output, context)
3117
3059
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3118
3060
  return de_ListControlDomainInsightsByAssessmentCommandError(output, context);
3119
3061
  }
3120
- const contents = map({
3062
+ const contents = (0, smithy_client_1.map)({
3121
3063
  $metadata: deserializeMetadata(output),
3122
3064
  });
3123
3065
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3124
- if (data.controlDomainInsights != null) {
3125
- contents.controlDomainInsights = de_ControlDomainInsightsList(data.controlDomainInsights, context);
3126
- }
3127
- if (data.nextToken != null) {
3128
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3129
- }
3066
+ const doc = (0, smithy_client_1.take)(data, {
3067
+ controlDomainInsights: (_) => de_ControlDomainInsightsList(_, context),
3068
+ nextToken: smithy_client_1.expectString,
3069
+ });
3070
+ Object.assign(contents, doc);
3130
3071
  return contents;
3131
3072
  };
3132
3073
  exports.de_ListControlDomainInsightsByAssessmentCommand = de_ListControlDomainInsightsByAssessmentCommand;
@@ -3151,10 +3092,9 @@ const de_ListControlDomainInsightsByAssessmentCommandError = async (output, cont
3151
3092
  throw await de_ValidationExceptionRes(parsedOutput, context);
3152
3093
  default:
3153
3094
  const parsedBody = parsedOutput.body;
3154
- (0, smithy_client_1.throwDefaultError)({
3095
+ return throwDefaultError({
3155
3096
  output,
3156
3097
  parsedBody,
3157
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3158
3098
  errorCode,
3159
3099
  });
3160
3100
  }
@@ -3163,16 +3103,15 @@ const de_ListControlInsightsByControlDomainCommand = async (output, context) =>
3163
3103
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3164
3104
  return de_ListControlInsightsByControlDomainCommandError(output, context);
3165
3105
  }
3166
- const contents = map({
3106
+ const contents = (0, smithy_client_1.map)({
3167
3107
  $metadata: deserializeMetadata(output),
3168
3108
  });
3169
3109
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3170
- if (data.controlInsightsMetadata != null) {
3171
- contents.controlInsightsMetadata = de_ControlInsightsMetadata(data.controlInsightsMetadata, context);
3172
- }
3173
- if (data.nextToken != null) {
3174
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3175
- }
3110
+ const doc = (0, smithy_client_1.take)(data, {
3111
+ controlInsightsMetadata: (_) => de_ControlInsightsMetadata(_, context),
3112
+ nextToken: smithy_client_1.expectString,
3113
+ });
3114
+ Object.assign(contents, doc);
3176
3115
  return contents;
3177
3116
  };
3178
3117
  exports.de_ListControlInsightsByControlDomainCommand = de_ListControlInsightsByControlDomainCommand;
@@ -3197,10 +3136,9 @@ const de_ListControlInsightsByControlDomainCommandError = async (output, context
3197
3136
  throw await de_ValidationExceptionRes(parsedOutput, context);
3198
3137
  default:
3199
3138
  const parsedBody = parsedOutput.body;
3200
- (0, smithy_client_1.throwDefaultError)({
3139
+ return throwDefaultError({
3201
3140
  output,
3202
3141
  parsedBody,
3203
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3204
3142
  errorCode,
3205
3143
  });
3206
3144
  }
@@ -3209,16 +3147,15 @@ const de_ListControlsCommand = async (output, context) => {
3209
3147
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3210
3148
  return de_ListControlsCommandError(output, context);
3211
3149
  }
3212
- const contents = map({
3150
+ const contents = (0, smithy_client_1.map)({
3213
3151
  $metadata: deserializeMetadata(output),
3214
3152
  });
3215
3153
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3216
- if (data.controlMetadataList != null) {
3217
- contents.controlMetadataList = de_ControlMetadataList(data.controlMetadataList, context);
3218
- }
3219
- if (data.nextToken != null) {
3220
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3221
- }
3154
+ const doc = (0, smithy_client_1.take)(data, {
3155
+ controlMetadataList: (_) => de_ControlMetadataList(_, context),
3156
+ nextToken: smithy_client_1.expectString,
3157
+ });
3158
+ Object.assign(contents, doc);
3222
3159
  return contents;
3223
3160
  };
3224
3161
  exports.de_ListControlsCommand = de_ListControlsCommand;
@@ -3240,10 +3177,9 @@ const de_ListControlsCommandError = async (output, context) => {
3240
3177
  throw await de_ValidationExceptionRes(parsedOutput, context);
3241
3178
  default:
3242
3179
  const parsedBody = parsedOutput.body;
3243
- (0, smithy_client_1.throwDefaultError)({
3180
+ return throwDefaultError({
3244
3181
  output,
3245
3182
  parsedBody,
3246
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3247
3183
  errorCode,
3248
3184
  });
3249
3185
  }
@@ -3252,16 +3188,15 @@ const de_ListKeywordsForDataSourceCommand = async (output, context) => {
3252
3188
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3253
3189
  return de_ListKeywordsForDataSourceCommandError(output, context);
3254
3190
  }
3255
- const contents = map({
3191
+ const contents = (0, smithy_client_1.map)({
3256
3192
  $metadata: deserializeMetadata(output),
3257
3193
  });
3258
3194
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3259
- if (data.keywords != null) {
3260
- contents.keywords = de_Keywords(data.keywords, context);
3261
- }
3262
- if (data.nextToken != null) {
3263
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3264
- }
3195
+ const doc = (0, smithy_client_1.take)(data, {
3196
+ keywords: smithy_client_1._json,
3197
+ nextToken: smithy_client_1.expectString,
3198
+ });
3199
+ Object.assign(contents, doc);
3265
3200
  return contents;
3266
3201
  };
3267
3202
  exports.de_ListKeywordsForDataSourceCommand = de_ListKeywordsForDataSourceCommand;
@@ -3283,10 +3218,9 @@ const de_ListKeywordsForDataSourceCommandError = async (output, context) => {
3283
3218
  throw await de_ValidationExceptionRes(parsedOutput, context);
3284
3219
  default:
3285
3220
  const parsedBody = parsedOutput.body;
3286
- (0, smithy_client_1.throwDefaultError)({
3221
+ return throwDefaultError({
3287
3222
  output,
3288
3223
  parsedBody,
3289
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3290
3224
  errorCode,
3291
3225
  });
3292
3226
  }
@@ -3295,16 +3229,15 @@ const de_ListNotificationsCommand = async (output, context) => {
3295
3229
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3296
3230
  return de_ListNotificationsCommandError(output, context);
3297
3231
  }
3298
- const contents = map({
3232
+ const contents = (0, smithy_client_1.map)({
3299
3233
  $metadata: deserializeMetadata(output),
3300
3234
  });
3301
3235
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3302
- if (data.nextToken != null) {
3303
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3304
- }
3305
- if (data.notifications != null) {
3306
- contents.notifications = de_Notifications(data.notifications, context);
3307
- }
3236
+ const doc = (0, smithy_client_1.take)(data, {
3237
+ nextToken: smithy_client_1.expectString,
3238
+ notifications: (_) => de_Notifications(_, context),
3239
+ });
3240
+ Object.assign(contents, doc);
3308
3241
  return contents;
3309
3242
  };
3310
3243
  exports.de_ListNotificationsCommand = de_ListNotificationsCommand;
@@ -3326,10 +3259,9 @@ const de_ListNotificationsCommandError = async (output, context) => {
3326
3259
  throw await de_ValidationExceptionRes(parsedOutput, context);
3327
3260
  default:
3328
3261
  const parsedBody = parsedOutput.body;
3329
- (0, smithy_client_1.throwDefaultError)({
3262
+ return throwDefaultError({
3330
3263
  output,
3331
3264
  parsedBody,
3332
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3333
3265
  errorCode,
3334
3266
  });
3335
3267
  }
@@ -3338,13 +3270,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
3338
3270
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3339
3271
  return de_ListTagsForResourceCommandError(output, context);
3340
3272
  }
3341
- const contents = map({
3273
+ const contents = (0, smithy_client_1.map)({
3342
3274
  $metadata: deserializeMetadata(output),
3343
3275
  });
3344
3276
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3345
- if (data.tags != null) {
3346
- contents.tags = de_TagMap(data.tags, context);
3347
- }
3277
+ const doc = (0, smithy_client_1.take)(data, {
3278
+ tags: smithy_client_1._json,
3279
+ });
3280
+ Object.assign(contents, doc);
3348
3281
  return contents;
3349
3282
  };
3350
3283
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -3366,10 +3299,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
3366
3299
  throw await de_ValidationExceptionRes(parsedOutput, context);
3367
3300
  default:
3368
3301
  const parsedBody = parsedOutput.body;
3369
- (0, smithy_client_1.throwDefaultError)({
3302
+ return throwDefaultError({
3370
3303
  output,
3371
3304
  parsedBody,
3372
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3373
3305
  errorCode,
3374
3306
  });
3375
3307
  }
@@ -3378,13 +3310,14 @@ const de_RegisterAccountCommand = async (output, context) => {
3378
3310
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3379
3311
  return de_RegisterAccountCommandError(output, context);
3380
3312
  }
3381
- const contents = map({
3313
+ const contents = (0, smithy_client_1.map)({
3382
3314
  $metadata: deserializeMetadata(output),
3383
3315
  });
3384
3316
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3385
- if (data.status != null) {
3386
- contents.status = (0, smithy_client_1.expectString)(data.status);
3387
- }
3317
+ const doc = (0, smithy_client_1.take)(data, {
3318
+ status: smithy_client_1.expectString,
3319
+ });
3320
+ Object.assign(contents, doc);
3388
3321
  return contents;
3389
3322
  };
3390
3323
  exports.de_RegisterAccountCommand = de_RegisterAccountCommand;
@@ -3412,10 +3345,9 @@ const de_RegisterAccountCommandError = async (output, context) => {
3412
3345
  throw await de_ValidationExceptionRes(parsedOutput, context);
3413
3346
  default:
3414
3347
  const parsedBody = parsedOutput.body;
3415
- (0, smithy_client_1.throwDefaultError)({
3348
+ return throwDefaultError({
3416
3349
  output,
3417
3350
  parsedBody,
3418
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3419
3351
  errorCode,
3420
3352
  });
3421
3353
  }
@@ -3424,16 +3356,15 @@ const de_RegisterOrganizationAdminAccountCommand = async (output, context) => {
3424
3356
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3425
3357
  return de_RegisterOrganizationAdminAccountCommandError(output, context);
3426
3358
  }
3427
- const contents = map({
3359
+ const contents = (0, smithy_client_1.map)({
3428
3360
  $metadata: deserializeMetadata(output),
3429
3361
  });
3430
3362
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3431
- if (data.adminAccountId != null) {
3432
- contents.adminAccountId = (0, smithy_client_1.expectString)(data.adminAccountId);
3433
- }
3434
- if (data.organizationId != null) {
3435
- contents.organizationId = (0, smithy_client_1.expectString)(data.organizationId);
3436
- }
3363
+ const doc = (0, smithy_client_1.take)(data, {
3364
+ adminAccountId: smithy_client_1.expectString,
3365
+ organizationId: smithy_client_1.expectString,
3366
+ });
3367
+ Object.assign(contents, doc);
3437
3368
  return contents;
3438
3369
  };
3439
3370
  exports.de_RegisterOrganizationAdminAccountCommand = de_RegisterOrganizationAdminAccountCommand;
@@ -3458,10 +3389,9 @@ const de_RegisterOrganizationAdminAccountCommandError = async (output, context)
3458
3389
  throw await de_ValidationExceptionRes(parsedOutput, context);
3459
3390
  default:
3460
3391
  const parsedBody = parsedOutput.body;
3461
- (0, smithy_client_1.throwDefaultError)({
3392
+ return throwDefaultError({
3462
3393
  output,
3463
3394
  parsedBody,
3464
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3465
3395
  errorCode,
3466
3396
  });
3467
3397
  }
@@ -3470,13 +3400,14 @@ const de_StartAssessmentFrameworkShareCommand = async (output, context) => {
3470
3400
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3471
3401
  return de_StartAssessmentFrameworkShareCommandError(output, context);
3472
3402
  }
3473
- const contents = map({
3403
+ const contents = (0, smithy_client_1.map)({
3474
3404
  $metadata: deserializeMetadata(output),
3475
3405
  });
3476
3406
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3477
- if (data.assessmentFrameworkShareRequest != null) {
3478
- contents.assessmentFrameworkShareRequest = de_AssessmentFrameworkShareRequest(data.assessmentFrameworkShareRequest, context);
3479
- }
3407
+ const doc = (0, smithy_client_1.take)(data, {
3408
+ assessmentFrameworkShareRequest: (_) => de_AssessmentFrameworkShareRequest(_, context),
3409
+ });
3410
+ Object.assign(contents, doc);
3480
3411
  return contents;
3481
3412
  };
3482
3413
  exports.de_StartAssessmentFrameworkShareCommand = de_StartAssessmentFrameworkShareCommand;
@@ -3501,10 +3432,9 @@ const de_StartAssessmentFrameworkShareCommandError = async (output, context) =>
3501
3432
  throw await de_ValidationExceptionRes(parsedOutput, context);
3502
3433
  default:
3503
3434
  const parsedBody = parsedOutput.body;
3504
- (0, smithy_client_1.throwDefaultError)({
3435
+ return throwDefaultError({
3505
3436
  output,
3506
3437
  parsedBody,
3507
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3508
3438
  errorCode,
3509
3439
  });
3510
3440
  }
@@ -3513,7 +3443,7 @@ const de_TagResourceCommand = async (output, context) => {
3513
3443
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3514
3444
  return de_TagResourceCommandError(output, context);
3515
3445
  }
3516
- const contents = map({
3446
+ const contents = (0, smithy_client_1.map)({
3517
3447
  $metadata: deserializeMetadata(output),
3518
3448
  });
3519
3449
  await collectBody(output.body, context);
@@ -3538,10 +3468,9 @@ const de_TagResourceCommandError = async (output, context) => {
3538
3468
  throw await de_ValidationExceptionRes(parsedOutput, context);
3539
3469
  default:
3540
3470
  const parsedBody = parsedOutput.body;
3541
- (0, smithy_client_1.throwDefaultError)({
3471
+ return throwDefaultError({
3542
3472
  output,
3543
3473
  parsedBody,
3544
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3545
3474
  errorCode,
3546
3475
  });
3547
3476
  }
@@ -3550,7 +3479,7 @@ const de_UntagResourceCommand = async (output, context) => {
3550
3479
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3551
3480
  return de_UntagResourceCommandError(output, context);
3552
3481
  }
3553
- const contents = map({
3482
+ const contents = (0, smithy_client_1.map)({
3554
3483
  $metadata: deserializeMetadata(output),
3555
3484
  });
3556
3485
  await collectBody(output.body, context);
@@ -3575,10 +3504,9 @@ const de_UntagResourceCommandError = async (output, context) => {
3575
3504
  throw await de_ValidationExceptionRes(parsedOutput, context);
3576
3505
  default:
3577
3506
  const parsedBody = parsedOutput.body;
3578
- (0, smithy_client_1.throwDefaultError)({
3507
+ return throwDefaultError({
3579
3508
  output,
3580
3509
  parsedBody,
3581
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3582
3510
  errorCode,
3583
3511
  });
3584
3512
  }
@@ -3587,13 +3515,14 @@ const de_UpdateAssessmentCommand = async (output, context) => {
3587
3515
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3588
3516
  return de_UpdateAssessmentCommandError(output, context);
3589
3517
  }
3590
- const contents = map({
3518
+ const contents = (0, smithy_client_1.map)({
3591
3519
  $metadata: deserializeMetadata(output),
3592
3520
  });
3593
3521
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3594
- if (data.assessment != null) {
3595
- contents.assessment = de_Assessment(data.assessment, context);
3596
- }
3522
+ const doc = (0, smithy_client_1.take)(data, {
3523
+ assessment: (_) => de_Assessment(_, context),
3524
+ });
3525
+ Object.assign(contents, doc);
3597
3526
  return contents;
3598
3527
  };
3599
3528
  exports.de_UpdateAssessmentCommand = de_UpdateAssessmentCommand;
@@ -3618,10 +3547,9 @@ const de_UpdateAssessmentCommandError = async (output, context) => {
3618
3547
  throw await de_ValidationExceptionRes(parsedOutput, context);
3619
3548
  default:
3620
3549
  const parsedBody = parsedOutput.body;
3621
- (0, smithy_client_1.throwDefaultError)({
3550
+ return throwDefaultError({
3622
3551
  output,
3623
3552
  parsedBody,
3624
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3625
3553
  errorCode,
3626
3554
  });
3627
3555
  }
@@ -3630,13 +3558,14 @@ const de_UpdateAssessmentControlCommand = async (output, context) => {
3630
3558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3631
3559
  return de_UpdateAssessmentControlCommandError(output, context);
3632
3560
  }
3633
- const contents = map({
3561
+ const contents = (0, smithy_client_1.map)({
3634
3562
  $metadata: deserializeMetadata(output),
3635
3563
  });
3636
3564
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3637
- if (data.control != null) {
3638
- contents.control = de_AssessmentControl(data.control, context);
3639
- }
3565
+ const doc = (0, smithy_client_1.take)(data, {
3566
+ control: (_) => de_AssessmentControl(_, context),
3567
+ });
3568
+ Object.assign(contents, doc);
3640
3569
  return contents;
3641
3570
  };
3642
3571
  exports.de_UpdateAssessmentControlCommand = de_UpdateAssessmentControlCommand;
@@ -3661,10 +3590,9 @@ const de_UpdateAssessmentControlCommandError = async (output, context) => {
3661
3590
  throw await de_ValidationExceptionRes(parsedOutput, context);
3662
3591
  default:
3663
3592
  const parsedBody = parsedOutput.body;
3664
- (0, smithy_client_1.throwDefaultError)({
3593
+ return throwDefaultError({
3665
3594
  output,
3666
3595
  parsedBody,
3667
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3668
3596
  errorCode,
3669
3597
  });
3670
3598
  }
@@ -3673,13 +3601,14 @@ const de_UpdateAssessmentControlSetStatusCommand = async (output, context) => {
3673
3601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3674
3602
  return de_UpdateAssessmentControlSetStatusCommandError(output, context);
3675
3603
  }
3676
- const contents = map({
3604
+ const contents = (0, smithy_client_1.map)({
3677
3605
  $metadata: deserializeMetadata(output),
3678
3606
  });
3679
3607
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3680
- if (data.controlSet != null) {
3681
- contents.controlSet = de_AssessmentControlSet(data.controlSet, context);
3682
- }
3608
+ const doc = (0, smithy_client_1.take)(data, {
3609
+ controlSet: (_) => de_AssessmentControlSet(_, context),
3610
+ });
3611
+ Object.assign(contents, doc);
3683
3612
  return contents;
3684
3613
  };
3685
3614
  exports.de_UpdateAssessmentControlSetStatusCommand = de_UpdateAssessmentControlSetStatusCommand;
@@ -3704,10 +3633,9 @@ const de_UpdateAssessmentControlSetStatusCommandError = async (output, context)
3704
3633
  throw await de_ValidationExceptionRes(parsedOutput, context);
3705
3634
  default:
3706
3635
  const parsedBody = parsedOutput.body;
3707
- (0, smithy_client_1.throwDefaultError)({
3636
+ return throwDefaultError({
3708
3637
  output,
3709
3638
  parsedBody,
3710
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3711
3639
  errorCode,
3712
3640
  });
3713
3641
  }
@@ -3716,13 +3644,14 @@ const de_UpdateAssessmentFrameworkCommand = async (output, context) => {
3716
3644
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3717
3645
  return de_UpdateAssessmentFrameworkCommandError(output, context);
3718
3646
  }
3719
- const contents = map({
3647
+ const contents = (0, smithy_client_1.map)({
3720
3648
  $metadata: deserializeMetadata(output),
3721
3649
  });
3722
3650
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3723
- if (data.framework != null) {
3724
- contents.framework = de_Framework(data.framework, context);
3725
- }
3651
+ const doc = (0, smithy_client_1.take)(data, {
3652
+ framework: (_) => de_Framework(_, context),
3653
+ });
3654
+ Object.assign(contents, doc);
3726
3655
  return contents;
3727
3656
  };
3728
3657
  exports.de_UpdateAssessmentFrameworkCommand = de_UpdateAssessmentFrameworkCommand;
@@ -3747,10 +3676,9 @@ const de_UpdateAssessmentFrameworkCommandError = async (output, context) => {
3747
3676
  throw await de_ValidationExceptionRes(parsedOutput, context);
3748
3677
  default:
3749
3678
  const parsedBody = parsedOutput.body;
3750
- (0, smithy_client_1.throwDefaultError)({
3679
+ return throwDefaultError({
3751
3680
  output,
3752
3681
  parsedBody,
3753
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3754
3682
  errorCode,
3755
3683
  });
3756
3684
  }
@@ -3759,13 +3687,14 @@ const de_UpdateAssessmentFrameworkShareCommand = async (output, context) => {
3759
3687
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3760
3688
  return de_UpdateAssessmentFrameworkShareCommandError(output, context);
3761
3689
  }
3762
- const contents = map({
3690
+ const contents = (0, smithy_client_1.map)({
3763
3691
  $metadata: deserializeMetadata(output),
3764
3692
  });
3765
3693
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3766
- if (data.assessmentFrameworkShareRequest != null) {
3767
- contents.assessmentFrameworkShareRequest = de_AssessmentFrameworkShareRequest(data.assessmentFrameworkShareRequest, context);
3768
- }
3694
+ const doc = (0, smithy_client_1.take)(data, {
3695
+ assessmentFrameworkShareRequest: (_) => de_AssessmentFrameworkShareRequest(_, context),
3696
+ });
3697
+ Object.assign(contents, doc);
3769
3698
  return contents;
3770
3699
  };
3771
3700
  exports.de_UpdateAssessmentFrameworkShareCommand = de_UpdateAssessmentFrameworkShareCommand;
@@ -3793,10 +3722,9 @@ const de_UpdateAssessmentFrameworkShareCommandError = async (output, context) =>
3793
3722
  throw await de_ValidationExceptionRes(parsedOutput, context);
3794
3723
  default:
3795
3724
  const parsedBody = parsedOutput.body;
3796
- (0, smithy_client_1.throwDefaultError)({
3725
+ return throwDefaultError({
3797
3726
  output,
3798
3727
  parsedBody,
3799
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3800
3728
  errorCode,
3801
3729
  });
3802
3730
  }
@@ -3805,13 +3733,14 @@ const de_UpdateAssessmentStatusCommand = async (output, context) => {
3805
3733
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3806
3734
  return de_UpdateAssessmentStatusCommandError(output, context);
3807
3735
  }
3808
- const contents = map({
3736
+ const contents = (0, smithy_client_1.map)({
3809
3737
  $metadata: deserializeMetadata(output),
3810
3738
  });
3811
3739
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3812
- if (data.assessment != null) {
3813
- contents.assessment = de_Assessment(data.assessment, context);
3814
- }
3740
+ const doc = (0, smithy_client_1.take)(data, {
3741
+ assessment: (_) => de_Assessment(_, context),
3742
+ });
3743
+ Object.assign(contents, doc);
3815
3744
  return contents;
3816
3745
  };
3817
3746
  exports.de_UpdateAssessmentStatusCommand = de_UpdateAssessmentStatusCommand;
@@ -3839,10 +3768,9 @@ const de_UpdateAssessmentStatusCommandError = async (output, context) => {
3839
3768
  throw await de_ValidationExceptionRes(parsedOutput, context);
3840
3769
  default:
3841
3770
  const parsedBody = parsedOutput.body;
3842
- (0, smithy_client_1.throwDefaultError)({
3771
+ return throwDefaultError({
3843
3772
  output,
3844
3773
  parsedBody,
3845
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3846
3774
  errorCode,
3847
3775
  });
3848
3776
  }
@@ -3851,13 +3779,14 @@ const de_UpdateControlCommand = async (output, context) => {
3851
3779
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3852
3780
  return de_UpdateControlCommandError(output, context);
3853
3781
  }
3854
- const contents = map({
3782
+ const contents = (0, smithy_client_1.map)({
3855
3783
  $metadata: deserializeMetadata(output),
3856
3784
  });
3857
3785
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3858
- if (data.control != null) {
3859
- contents.control = de_Control(data.control, context);
3860
- }
3786
+ const doc = (0, smithy_client_1.take)(data, {
3787
+ control: (_) => de_Control(_, context),
3788
+ });
3789
+ Object.assign(contents, doc);
3861
3790
  return contents;
3862
3791
  };
3863
3792
  exports.de_UpdateControlCommand = de_UpdateControlCommand;
@@ -3882,10 +3811,9 @@ const de_UpdateControlCommandError = async (output, context) => {
3882
3811
  throw await de_ValidationExceptionRes(parsedOutput, context);
3883
3812
  default:
3884
3813
  const parsedBody = parsedOutput.body;
3885
- (0, smithy_client_1.throwDefaultError)({
3814
+ return throwDefaultError({
3886
3815
  output,
3887
3816
  parsedBody,
3888
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3889
3817
  errorCode,
3890
3818
  });
3891
3819
  }
@@ -3894,13 +3822,14 @@ const de_UpdateSettingsCommand = async (output, context) => {
3894
3822
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3895
3823
  return de_UpdateSettingsCommandError(output, context);
3896
3824
  }
3897
- const contents = map({
3825
+ const contents = (0, smithy_client_1.map)({
3898
3826
  $metadata: deserializeMetadata(output),
3899
3827
  });
3900
3828
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3901
- if (data.settings != null) {
3902
- contents.settings = de_Settings(data.settings, context);
3903
- }
3829
+ const doc = (0, smithy_client_1.take)(data, {
3830
+ settings: smithy_client_1._json,
3831
+ });
3832
+ Object.assign(contents, doc);
3904
3833
  return contents;
3905
3834
  };
3906
3835
  exports.de_UpdateSettingsCommand = de_UpdateSettingsCommand;
@@ -3922,10 +3851,9 @@ const de_UpdateSettingsCommandError = async (output, context) => {
3922
3851
  throw await de_ValidationExceptionRes(parsedOutput, context);
3923
3852
  default:
3924
3853
  const parsedBody = parsedOutput.body;
3925
- (0, smithy_client_1.throwDefaultError)({
3854
+ return throwDefaultError({
3926
3855
  output,
3927
3856
  parsedBody,
3928
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3929
3857
  errorCode,
3930
3858
  });
3931
3859
  }
@@ -3934,25 +3862,18 @@ const de_ValidateAssessmentReportIntegrityCommand = async (output, context) => {
3934
3862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3935
3863
  return de_ValidateAssessmentReportIntegrityCommandError(output, context);
3936
3864
  }
3937
- const contents = map({
3865
+ const contents = (0, smithy_client_1.map)({
3938
3866
  $metadata: deserializeMetadata(output),
3939
3867
  });
3940
3868
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3941
- if (data.signatureAlgorithm != null) {
3942
- contents.signatureAlgorithm = (0, smithy_client_1.expectString)(data.signatureAlgorithm);
3943
- }
3944
- if (data.signatureDateTime != null) {
3945
- contents.signatureDateTime = (0, smithy_client_1.expectString)(data.signatureDateTime);
3946
- }
3947
- if (data.signatureKeyId != null) {
3948
- contents.signatureKeyId = (0, smithy_client_1.expectString)(data.signatureKeyId);
3949
- }
3950
- if (data.signatureValid != null) {
3951
- contents.signatureValid = (0, smithy_client_1.expectBoolean)(data.signatureValid);
3952
- }
3953
- if (data.validationErrors != null) {
3954
- contents.validationErrors = de_ValidationErrors(data.validationErrors, context);
3955
- }
3869
+ const doc = (0, smithy_client_1.take)(data, {
3870
+ signatureAlgorithm: smithy_client_1.expectString,
3871
+ signatureDateTime: smithy_client_1.expectString,
3872
+ signatureKeyId: smithy_client_1.expectString,
3873
+ signatureValid: smithy_client_1.expectBoolean,
3874
+ validationErrors: smithy_client_1._json,
3875
+ });
3876
+ Object.assign(contents, doc);
3956
3877
  return contents;
3957
3878
  };
3958
3879
  exports.de_ValidateAssessmentReportIntegrityCommand = de_ValidateAssessmentReportIntegrityCommand;
@@ -3977,21 +3898,21 @@ const de_ValidateAssessmentReportIntegrityCommandError = async (output, context)
3977
3898
  throw await de_ValidationExceptionRes(parsedOutput, context);
3978
3899
  default:
3979
3900
  const parsedBody = parsedOutput.body;
3980
- (0, smithy_client_1.throwDefaultError)({
3901
+ return throwDefaultError({
3981
3902
  output,
3982
3903
  parsedBody,
3983
- exceptionCtor: AuditManagerServiceException_1.AuditManagerServiceException,
3984
3904
  errorCode,
3985
3905
  });
3986
3906
  }
3987
3907
  };
3988
- const map = smithy_client_1.map;
3908
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AuditManagerServiceException_1.AuditManagerServiceException);
3989
3909
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3990
- const contents = map({});
3910
+ const contents = (0, smithy_client_1.map)({});
3991
3911
  const data = parsedOutput.body;
3992
- if (data.message != null) {
3993
- contents.message = (0, smithy_client_1.expectString)(data.message);
3994
- }
3912
+ const doc = (0, smithy_client_1.take)(data, {
3913
+ message: smithy_client_1.expectString,
3914
+ });
3915
+ Object.assign(contents, doc);
3995
3916
  const exception = new models_0_1.AccessDeniedException({
3996
3917
  $metadata: deserializeMetadata(parsedOutput),
3997
3918
  ...contents,
@@ -3999,11 +3920,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3999
3920
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4000
3921
  };
4001
3922
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4002
- const contents = map({});
3923
+ const contents = (0, smithy_client_1.map)({});
4003
3924
  const data = parsedOutput.body;
4004
- if (data.message != null) {
4005
- contents.message = (0, smithy_client_1.expectString)(data.message);
4006
- }
3925
+ const doc = (0, smithy_client_1.take)(data, {
3926
+ message: smithy_client_1.expectString,
3927
+ });
3928
+ Object.assign(contents, doc);
4007
3929
  const exception = new models_0_1.InternalServerException({
4008
3930
  $metadata: deserializeMetadata(parsedOutput),
4009
3931
  ...contents,
@@ -4011,17 +3933,14 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4011
3933
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4012
3934
  };
4013
3935
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4014
- const contents = map({});
3936
+ const contents = (0, smithy_client_1.map)({});
4015
3937
  const data = parsedOutput.body;
4016
- if (data.message != null) {
4017
- contents.message = (0, smithy_client_1.expectString)(data.message);
4018
- }
4019
- if (data.resourceId != null) {
4020
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
4021
- }
4022
- if (data.resourceType != null) {
4023
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
4024
- }
3938
+ const doc = (0, smithy_client_1.take)(data, {
3939
+ message: smithy_client_1.expectString,
3940
+ resourceId: smithy_client_1.expectString,
3941
+ resourceType: smithy_client_1.expectString,
3942
+ });
3943
+ Object.assign(contents, doc);
4025
3944
  const exception = new models_0_1.ResourceNotFoundException({
4026
3945
  $metadata: deserializeMetadata(parsedOutput),
4027
3946
  ...contents,
@@ -4029,11 +3948,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4029
3948
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4030
3949
  };
4031
3950
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4032
- const contents = map({});
3951
+ const contents = (0, smithy_client_1.map)({});
4033
3952
  const data = parsedOutput.body;
4034
- if (data.message != null) {
4035
- contents.message = (0, smithy_client_1.expectString)(data.message);
4036
- }
3953
+ const doc = (0, smithy_client_1.take)(data, {
3954
+ message: smithy_client_1.expectString,
3955
+ });
3956
+ Object.assign(contents, doc);
4037
3957
  const exception = new models_0_1.ServiceQuotaExceededException({
4038
3958
  $metadata: deserializeMetadata(parsedOutput),
4039
3959
  ...contents,
@@ -4041,11 +3961,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4041
3961
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4042
3962
  };
4043
3963
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4044
- const contents = map({});
3964
+ const contents = (0, smithy_client_1.map)({});
4045
3965
  const data = parsedOutput.body;
4046
- if (data.message != null) {
4047
- contents.message = (0, smithy_client_1.expectString)(data.message);
4048
- }
3966
+ const doc = (0, smithy_client_1.take)(data, {
3967
+ message: smithy_client_1.expectString,
3968
+ });
3969
+ Object.assign(contents, doc);
4049
3970
  const exception = new models_0_1.ThrottlingException({
4050
3971
  $metadata: deserializeMetadata(parsedOutput),
4051
3972
  ...contents,
@@ -4053,632 +3974,275 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4053
3974
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4054
3975
  };
4055
3976
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
4056
- const contents = map({});
3977
+ const contents = (0, smithy_client_1.map)({});
4057
3978
  const data = parsedOutput.body;
4058
- if (data.fields != null) {
4059
- contents.fields = de_ValidationExceptionFieldList(data.fields, context);
4060
- }
4061
- if (data.message != null) {
4062
- contents.message = (0, smithy_client_1.expectString)(data.message);
4063
- }
4064
- if (data.reason != null) {
4065
- contents.reason = (0, smithy_client_1.expectString)(data.reason);
4066
- }
3979
+ const doc = (0, smithy_client_1.take)(data, {
3980
+ fields: smithy_client_1._json,
3981
+ message: smithy_client_1.expectString,
3982
+ reason: smithy_client_1.expectString,
3983
+ });
3984
+ Object.assign(contents, doc);
4067
3985
  const exception = new models_0_1.ValidationException({
4068
3986
  $metadata: deserializeMetadata(parsedOutput),
4069
3987
  ...contents,
4070
3988
  });
4071
3989
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4072
3990
  };
4073
- const se_AssessmentReportsDestination = (input, context) => {
4074
- return {
4075
- ...(input.destination != null && { destination: input.destination }),
4076
- ...(input.destinationType != null && { destinationType: input.destinationType }),
4077
- };
4078
- };
4079
- const se_AWSAccount = (input, context) => {
4080
- return {
4081
- ...(input.emailAddress != null && { emailAddress: input.emailAddress }),
4082
- ...(input.id != null && { id: input.id }),
4083
- ...(input.name != null && { name: input.name }),
4084
- };
4085
- };
4086
- const se_AWSAccounts = (input, context) => {
4087
- return input
4088
- .filter((e) => e != null)
4089
- .map((entry) => {
4090
- return se_AWSAccount(entry, context);
4091
- });
4092
- };
4093
- const se_AWSService = (input, context) => {
4094
- return {
4095
- ...(input.serviceName != null && { serviceName: input.serviceName }),
4096
- };
4097
- };
4098
- const se_AWSServices = (input, context) => {
4099
- return input
4100
- .filter((e) => e != null)
4101
- .map((entry) => {
4102
- return se_AWSService(entry, context);
4103
- });
4104
- };
4105
- const se_ControlMappingSource = (input, context) => {
4106
- return {
4107
- ...(input.sourceDescription != null && { sourceDescription: input.sourceDescription }),
4108
- ...(input.sourceFrequency != null && { sourceFrequency: input.sourceFrequency }),
4109
- ...(input.sourceId != null && { sourceId: input.sourceId }),
4110
- ...(input.sourceKeyword != null && { sourceKeyword: se_SourceKeyword(input.sourceKeyword, context) }),
4111
- ...(input.sourceName != null && { sourceName: input.sourceName }),
4112
- ...(input.sourceSetUpOption != null && { sourceSetUpOption: input.sourceSetUpOption }),
4113
- ...(input.sourceType != null && { sourceType: input.sourceType }),
4114
- ...(input.troubleshootingText != null && { troubleshootingText: input.troubleshootingText }),
4115
- };
4116
- };
4117
- const se_ControlMappingSources = (input, context) => {
4118
- return input
4119
- .filter((e) => e != null)
4120
- .map((entry) => {
4121
- return se_ControlMappingSource(entry, context);
4122
- });
4123
- };
4124
- const se_CreateAssessmentFrameworkControl = (input, context) => {
4125
- return {
4126
- ...(input.id != null && { id: input.id }),
4127
- };
4128
- };
4129
- const se_CreateAssessmentFrameworkControls = (input, context) => {
4130
- return input
4131
- .filter((e) => e != null)
4132
- .map((entry) => {
4133
- return se_CreateAssessmentFrameworkControl(entry, context);
4134
- });
4135
- };
4136
- const se_CreateAssessmentFrameworkControlSet = (input, context) => {
4137
- return {
4138
- ...(input.controls != null && { controls: se_CreateAssessmentFrameworkControls(input.controls, context) }),
4139
- ...(input.name != null && { name: input.name }),
4140
- };
4141
- };
4142
- const se_CreateAssessmentFrameworkControlSets = (input, context) => {
4143
- return input
4144
- .filter((e) => e != null)
4145
- .map((entry) => {
4146
- return se_CreateAssessmentFrameworkControlSet(entry, context);
4147
- });
4148
- };
4149
- const se_CreateControlMappingSource = (input, context) => {
4150
- return {
4151
- ...(input.sourceDescription != null && { sourceDescription: input.sourceDescription }),
4152
- ...(input.sourceFrequency != null && { sourceFrequency: input.sourceFrequency }),
4153
- ...(input.sourceKeyword != null && { sourceKeyword: se_SourceKeyword(input.sourceKeyword, context) }),
4154
- ...(input.sourceName != null && { sourceName: input.sourceName }),
4155
- ...(input.sourceSetUpOption != null && { sourceSetUpOption: input.sourceSetUpOption }),
4156
- ...(input.sourceType != null && { sourceType: input.sourceType }),
4157
- ...(input.troubleshootingText != null && { troubleshootingText: input.troubleshootingText }),
4158
- };
4159
- };
4160
- const se_CreateControlMappingSources = (input, context) => {
4161
- return input
4162
- .filter((e) => e != null)
4163
- .map((entry) => {
4164
- return se_CreateControlMappingSource(entry, context);
4165
- });
4166
- };
4167
- const se_CreateDelegationRequest = (input, context) => {
4168
- return {
4169
- ...(input.comment != null && { comment: input.comment }),
4170
- ...(input.controlSetId != null && { controlSetId: input.controlSetId }),
4171
- ...(input.roleArn != null && { roleArn: input.roleArn }),
4172
- ...(input.roleType != null && { roleType: input.roleType }),
4173
- };
4174
- };
4175
- const se_CreateDelegationRequests = (input, context) => {
4176
- return input
4177
- .filter((e) => e != null)
4178
- .map((entry) => {
4179
- return se_CreateDelegationRequest(entry, context);
4180
- });
4181
- };
4182
- const se_DelegationIds = (input, context) => {
4183
- return input
4184
- .filter((e) => e != null)
4185
- .map((entry) => {
4186
- return entry;
4187
- });
4188
- };
4189
- const se_DeregistrationPolicy = (input, context) => {
4190
- return {
4191
- ...(input.deleteResources != null && { deleteResources: input.deleteResources }),
4192
- };
4193
- };
4194
- const se_EvidenceIds = (input, context) => {
4195
- return input
4196
- .filter((e) => e != null)
4197
- .map((entry) => {
4198
- return entry;
4199
- });
4200
- };
4201
- const se_ManualEvidence = (input, context) => {
4202
- return {
4203
- ...(input.s3ResourcePath != null && { s3ResourcePath: input.s3ResourcePath }),
4204
- };
4205
- };
4206
- const se_ManualEvidenceList = (input, context) => {
4207
- return input
4208
- .filter((e) => e != null)
4209
- .map((entry) => {
4210
- return se_ManualEvidence(entry, context);
4211
- });
4212
- };
4213
- const se_Role = (input, context) => {
4214
- return {
4215
- ...(input.roleArn != null && { roleArn: input.roleArn }),
4216
- ...(input.roleType != null && { roleType: input.roleType }),
4217
- };
4218
- };
4219
- const se_Roles = (input, context) => {
4220
- return input
4221
- .filter((e) => e != null)
4222
- .map((entry) => {
4223
- return se_Role(entry, context);
4224
- });
4225
- };
4226
- const se_Scope = (input, context) => {
4227
- return {
4228
- ...(input.awsAccounts != null && { awsAccounts: se_AWSAccounts(input.awsAccounts, context) }),
4229
- ...(input.awsServices != null && { awsServices: se_AWSServices(input.awsServices, context) }),
4230
- };
4231
- };
4232
- const se_SourceKeyword = (input, context) => {
4233
- return {
4234
- ...(input.keywordInputType != null && { keywordInputType: input.keywordInputType }),
4235
- ...(input.keywordValue != null && { keywordValue: input.keywordValue }),
4236
- };
4237
- };
4238
- const se_TagMap = (input, context) => {
4239
- return Object.entries(input).reduce((acc, [key, value]) => {
4240
- if (value === null) {
4241
- return acc;
4242
- }
4243
- acc[key] = value;
4244
- return acc;
4245
- }, {});
4246
- };
4247
- const se_UpdateAssessmentFrameworkControlSet = (input, context) => {
4248
- return {
4249
- ...(input.controls != null && { controls: se_CreateAssessmentFrameworkControls(input.controls, context) }),
4250
- ...(input.id != null && { id: input.id }),
4251
- ...(input.name != null && { name: input.name }),
4252
- };
4253
- };
4254
- const se_UpdateAssessmentFrameworkControlSets = (input, context) => {
4255
- return input
4256
- .filter((e) => e != null)
4257
- .map((entry) => {
4258
- return se_UpdateAssessmentFrameworkControlSet(entry, context);
4259
- });
4260
- };
4261
3991
  const de_Assessment = (output, context) => {
4262
- return {
4263
- arn: (0, smithy_client_1.expectString)(output.arn),
4264
- awsAccount: output.awsAccount != null ? de_AWSAccount(output.awsAccount, context) : undefined,
4265
- framework: output.framework != null ? de_AssessmentFramework(output.framework, context) : undefined,
4266
- metadata: output.metadata != null ? de_AssessmentMetadata(output.metadata, context) : undefined,
4267
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
4268
- };
3992
+ return (0, smithy_client_1.take)(output, {
3993
+ arn: smithy_client_1.expectString,
3994
+ awsAccount: smithy_client_1._json,
3995
+ framework: (_) => de_AssessmentFramework(_, context),
3996
+ metadata: (_) => de_AssessmentMetadata(_, context),
3997
+ tags: smithy_client_1._json,
3998
+ });
4269
3999
  };
4270
4000
  const de_AssessmentControl = (output, context) => {
4271
- return {
4272
- assessmentReportEvidenceCount: (0, smithy_client_1.expectInt32)(output.assessmentReportEvidenceCount),
4273
- comments: output.comments != null ? de_ControlComments(output.comments, context) : undefined,
4274
- description: (0, smithy_client_1.expectString)(output.description),
4275
- evidenceCount: (0, smithy_client_1.expectInt32)(output.evidenceCount),
4276
- evidenceSources: output.evidenceSources != null ? de_EvidenceSources(output.evidenceSources, context) : undefined,
4277
- id: (0, smithy_client_1.expectString)(output.id),
4278
- name: (0, smithy_client_1.expectString)(output.name),
4279
- response: (0, smithy_client_1.expectString)(output.response),
4280
- status: (0, smithy_client_1.expectString)(output.status),
4281
- };
4001
+ return (0, smithy_client_1.take)(output, {
4002
+ assessmentReportEvidenceCount: smithy_client_1.expectInt32,
4003
+ comments: (_) => de_ControlComments(_, context),
4004
+ description: smithy_client_1.expectString,
4005
+ evidenceCount: smithy_client_1.expectInt32,
4006
+ evidenceSources: smithy_client_1._json,
4007
+ id: smithy_client_1.expectString,
4008
+ name: smithy_client_1.expectString,
4009
+ response: smithy_client_1.expectString,
4010
+ status: smithy_client_1.expectString,
4011
+ });
4282
4012
  };
4283
4013
  const de_AssessmentControls = (output, context) => {
4284
4014
  const retVal = (output || [])
4285
4015
  .filter((e) => e != null)
4286
4016
  .map((entry) => {
4287
- if (entry === null) {
4288
- return null;
4289
- }
4290
4017
  return de_AssessmentControl(entry, context);
4291
4018
  });
4292
4019
  return retVal;
4293
4020
  };
4294
4021
  const de_AssessmentControlSet = (output, context) => {
4295
- return {
4296
- controls: output.controls != null ? de_AssessmentControls(output.controls, context) : undefined,
4297
- delegations: output.delegations != null ? de_Delegations(output.delegations, context) : undefined,
4298
- description: (0, smithy_client_1.expectString)(output.description),
4299
- id: (0, smithy_client_1.expectString)(output.id),
4300
- manualEvidenceCount: (0, smithy_client_1.expectInt32)(output.manualEvidenceCount),
4301
- roles: output.roles != null ? de_Roles(output.roles, context) : undefined,
4302
- status: (0, smithy_client_1.expectString)(output.status),
4303
- systemEvidenceCount: (0, smithy_client_1.expectInt32)(output.systemEvidenceCount),
4304
- };
4022
+ return (0, smithy_client_1.take)(output, {
4023
+ controls: (_) => de_AssessmentControls(_, context),
4024
+ delegations: (_) => de_Delegations(_, context),
4025
+ description: smithy_client_1.expectString,
4026
+ id: smithy_client_1.expectString,
4027
+ manualEvidenceCount: smithy_client_1.expectInt32,
4028
+ roles: smithy_client_1._json,
4029
+ status: smithy_client_1.expectString,
4030
+ systemEvidenceCount: smithy_client_1.expectInt32,
4031
+ });
4305
4032
  };
4306
4033
  const de_AssessmentControlSets = (output, context) => {
4307
4034
  const retVal = (output || [])
4308
4035
  .filter((e) => e != null)
4309
4036
  .map((entry) => {
4310
- if (entry === null) {
4311
- return null;
4312
- }
4313
4037
  return de_AssessmentControlSet(entry, context);
4314
4038
  });
4315
4039
  return retVal;
4316
4040
  };
4317
4041
  const de_AssessmentEvidenceFolder = (output, context) => {
4318
- return {
4319
- assessmentId: (0, smithy_client_1.expectString)(output.assessmentId),
4320
- assessmentReportSelectionCount: (0, smithy_client_1.expectInt32)(output.assessmentReportSelectionCount),
4321
- author: (0, smithy_client_1.expectString)(output.author),
4322
- controlId: (0, smithy_client_1.expectString)(output.controlId),
4323
- controlName: (0, smithy_client_1.expectString)(output.controlName),
4324
- controlSetId: (0, smithy_client_1.expectString)(output.controlSetId),
4325
- dataSource: (0, smithy_client_1.expectString)(output.dataSource),
4326
- date: output.date != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.date))) : undefined,
4327
- evidenceAwsServiceSourceCount: (0, smithy_client_1.expectInt32)(output.evidenceAwsServiceSourceCount),
4328
- evidenceByTypeComplianceCheckCount: (0, smithy_client_1.expectInt32)(output.evidenceByTypeComplianceCheckCount),
4329
- evidenceByTypeComplianceCheckIssuesCount: (0, smithy_client_1.expectInt32)(output.evidenceByTypeComplianceCheckIssuesCount),
4330
- evidenceByTypeConfigurationDataCount: (0, smithy_client_1.expectInt32)(output.evidenceByTypeConfigurationDataCount),
4331
- evidenceByTypeManualCount: (0, smithy_client_1.expectInt32)(output.evidenceByTypeManualCount),
4332
- evidenceByTypeUserActivityCount: (0, smithy_client_1.expectInt32)(output.evidenceByTypeUserActivityCount),
4333
- evidenceResourcesIncludedCount: (0, smithy_client_1.expectInt32)(output.evidenceResourcesIncludedCount),
4334
- id: (0, smithy_client_1.expectString)(output.id),
4335
- name: (0, smithy_client_1.expectString)(output.name),
4336
- totalEvidence: (0, smithy_client_1.expectInt32)(output.totalEvidence),
4337
- };
4042
+ return (0, smithy_client_1.take)(output, {
4043
+ assessmentId: smithy_client_1.expectString,
4044
+ assessmentReportSelectionCount: smithy_client_1.expectInt32,
4045
+ author: smithy_client_1.expectString,
4046
+ controlId: smithy_client_1.expectString,
4047
+ controlName: smithy_client_1.expectString,
4048
+ controlSetId: smithy_client_1.expectString,
4049
+ dataSource: smithy_client_1.expectString,
4050
+ date: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4051
+ evidenceAwsServiceSourceCount: smithy_client_1.expectInt32,
4052
+ evidenceByTypeComplianceCheckCount: smithy_client_1.expectInt32,
4053
+ evidenceByTypeComplianceCheckIssuesCount: smithy_client_1.expectInt32,
4054
+ evidenceByTypeConfigurationDataCount: smithy_client_1.expectInt32,
4055
+ evidenceByTypeManualCount: smithy_client_1.expectInt32,
4056
+ evidenceByTypeUserActivityCount: smithy_client_1.expectInt32,
4057
+ evidenceResourcesIncludedCount: smithy_client_1.expectInt32,
4058
+ id: smithy_client_1.expectString,
4059
+ name: smithy_client_1.expectString,
4060
+ totalEvidence: smithy_client_1.expectInt32,
4061
+ });
4338
4062
  };
4339
4063
  const de_AssessmentEvidenceFolders = (output, context) => {
4340
4064
  const retVal = (output || [])
4341
4065
  .filter((e) => e != null)
4342
4066
  .map((entry) => {
4343
- if (entry === null) {
4344
- return null;
4345
- }
4346
4067
  return de_AssessmentEvidenceFolder(entry, context);
4347
4068
  });
4348
4069
  return retVal;
4349
4070
  };
4350
4071
  const de_AssessmentFramework = (output, context) => {
4351
- return {
4352
- arn: (0, smithy_client_1.expectString)(output.arn),
4353
- controlSets: output.controlSets != null ? de_AssessmentControlSets(output.controlSets, context) : undefined,
4354
- id: (0, smithy_client_1.expectString)(output.id),
4355
- metadata: output.metadata != null ? de_FrameworkMetadata(output.metadata, context) : undefined,
4356
- };
4072
+ return (0, smithy_client_1.take)(output, {
4073
+ arn: smithy_client_1.expectString,
4074
+ controlSets: (_) => de_AssessmentControlSets(_, context),
4075
+ id: smithy_client_1.expectString,
4076
+ metadata: smithy_client_1._json,
4077
+ });
4357
4078
  };
4358
4079
  const de_AssessmentFrameworkMetadata = (output, context) => {
4359
- return {
4360
- arn: (0, smithy_client_1.expectString)(output.arn),
4361
- complianceType: (0, smithy_client_1.expectString)(output.complianceType),
4362
- controlSetsCount: (0, smithy_client_1.expectInt32)(output.controlSetsCount),
4363
- controlsCount: (0, smithy_client_1.expectInt32)(output.controlsCount),
4364
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
4365
- description: (0, smithy_client_1.expectString)(output.description),
4366
- id: (0, smithy_client_1.expectString)(output.id),
4367
- lastUpdatedAt: output.lastUpdatedAt != null
4368
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
4369
- : undefined,
4370
- logo: (0, smithy_client_1.expectString)(output.logo),
4371
- name: (0, smithy_client_1.expectString)(output.name),
4372
- type: (0, smithy_client_1.expectString)(output.type),
4373
- };
4080
+ return (0, smithy_client_1.take)(output, {
4081
+ arn: smithy_client_1.expectString,
4082
+ complianceType: smithy_client_1.expectString,
4083
+ controlSetsCount: smithy_client_1.expectInt32,
4084
+ controlsCount: smithy_client_1.expectInt32,
4085
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4086
+ description: smithy_client_1.expectString,
4087
+ id: smithy_client_1.expectString,
4088
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4089
+ logo: smithy_client_1.expectString,
4090
+ name: smithy_client_1.expectString,
4091
+ type: smithy_client_1.expectString,
4092
+ });
4374
4093
  };
4375
4094
  const de_AssessmentFrameworkShareRequest = (output, context) => {
4376
- return {
4377
- comment: (0, smithy_client_1.expectString)(output.comment),
4378
- complianceType: (0, smithy_client_1.expectString)(output.complianceType),
4379
- creationTime: output.creationTime != null
4380
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4381
- : undefined,
4382
- customControlsCount: (0, smithy_client_1.expectInt32)(output.customControlsCount),
4383
- destinationAccount: (0, smithy_client_1.expectString)(output.destinationAccount),
4384
- destinationRegion: (0, smithy_client_1.expectString)(output.destinationRegion),
4385
- expirationTime: output.expirationTime != null
4386
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.expirationTime)))
4387
- : undefined,
4388
- frameworkDescription: (0, smithy_client_1.expectString)(output.frameworkDescription),
4389
- frameworkId: (0, smithy_client_1.expectString)(output.frameworkId),
4390
- frameworkName: (0, smithy_client_1.expectString)(output.frameworkName),
4391
- id: (0, smithy_client_1.expectString)(output.id),
4392
- lastUpdated: output.lastUpdated != null
4393
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4394
- : undefined,
4395
- sourceAccount: (0, smithy_client_1.expectString)(output.sourceAccount),
4396
- standardControlsCount: (0, smithy_client_1.expectInt32)(output.standardControlsCount),
4397
- status: (0, smithy_client_1.expectString)(output.status),
4398
- };
4095
+ return (0, smithy_client_1.take)(output, {
4096
+ comment: smithy_client_1.expectString,
4097
+ complianceType: smithy_client_1.expectString,
4098
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4099
+ customControlsCount: smithy_client_1.expectInt32,
4100
+ destinationAccount: smithy_client_1.expectString,
4101
+ destinationRegion: smithy_client_1.expectString,
4102
+ expirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4103
+ frameworkDescription: smithy_client_1.expectString,
4104
+ frameworkId: smithy_client_1.expectString,
4105
+ frameworkName: smithy_client_1.expectString,
4106
+ id: smithy_client_1.expectString,
4107
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4108
+ sourceAccount: smithy_client_1.expectString,
4109
+ standardControlsCount: smithy_client_1.expectInt32,
4110
+ status: smithy_client_1.expectString,
4111
+ });
4399
4112
  };
4400
4113
  const de_AssessmentFrameworkShareRequestList = (output, context) => {
4401
4114
  const retVal = (output || [])
4402
4115
  .filter((e) => e != null)
4403
4116
  .map((entry) => {
4404
- if (entry === null) {
4405
- return null;
4406
- }
4407
4117
  return de_AssessmentFrameworkShareRequest(entry, context);
4408
4118
  });
4409
4119
  return retVal;
4410
4120
  };
4411
4121
  const de_AssessmentMetadata = (output, context) => {
4412
- return {
4413
- assessmentReportsDestination: output.assessmentReportsDestination != null
4414
- ? de_AssessmentReportsDestination(output.assessmentReportsDestination, context)
4415
- : undefined,
4416
- complianceType: (0, smithy_client_1.expectString)(output.complianceType),
4417
- creationTime: output.creationTime != null
4418
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4419
- : undefined,
4420
- delegations: output.delegations != null ? de_Delegations(output.delegations, context) : undefined,
4421
- description: (0, smithy_client_1.expectString)(output.description),
4422
- id: (0, smithy_client_1.expectString)(output.id),
4423
- lastUpdated: output.lastUpdated != null
4424
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4425
- : undefined,
4426
- name: (0, smithy_client_1.expectString)(output.name),
4427
- roles: output.roles != null ? de_Roles(output.roles, context) : undefined,
4428
- scope: output.scope != null ? de_Scope(output.scope, context) : undefined,
4429
- status: (0, smithy_client_1.expectString)(output.status),
4430
- };
4122
+ return (0, smithy_client_1.take)(output, {
4123
+ assessmentReportsDestination: smithy_client_1._json,
4124
+ complianceType: smithy_client_1.expectString,
4125
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4126
+ delegations: (_) => de_Delegations(_, context),
4127
+ description: smithy_client_1.expectString,
4128
+ id: smithy_client_1.expectString,
4129
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4130
+ name: smithy_client_1.expectString,
4131
+ roles: smithy_client_1._json,
4132
+ scope: smithy_client_1._json,
4133
+ status: smithy_client_1.expectString,
4134
+ });
4431
4135
  };
4432
4136
  const de_AssessmentMetadataItem = (output, context) => {
4433
- return {
4434
- complianceType: (0, smithy_client_1.expectString)(output.complianceType),
4435
- creationTime: output.creationTime != null
4436
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4437
- : undefined,
4438
- delegations: output.delegations != null ? de_Delegations(output.delegations, context) : undefined,
4439
- id: (0, smithy_client_1.expectString)(output.id),
4440
- lastUpdated: output.lastUpdated != null
4441
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4442
- : undefined,
4443
- name: (0, smithy_client_1.expectString)(output.name),
4444
- roles: output.roles != null ? de_Roles(output.roles, context) : undefined,
4445
- status: (0, smithy_client_1.expectString)(output.status),
4446
- };
4137
+ return (0, smithy_client_1.take)(output, {
4138
+ complianceType: smithy_client_1.expectString,
4139
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4140
+ delegations: (_) => de_Delegations(_, context),
4141
+ id: smithy_client_1.expectString,
4142
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4143
+ name: smithy_client_1.expectString,
4144
+ roles: smithy_client_1._json,
4145
+ status: smithy_client_1.expectString,
4146
+ });
4447
4147
  };
4448
4148
  const de_AssessmentReport = (output, context) => {
4449
- return {
4450
- assessmentId: (0, smithy_client_1.expectString)(output.assessmentId),
4451
- assessmentName: (0, smithy_client_1.expectString)(output.assessmentName),
4452
- author: (0, smithy_client_1.expectString)(output.author),
4453
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
4454
- creationTime: output.creationTime != null
4455
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4456
- : undefined,
4457
- description: (0, smithy_client_1.expectString)(output.description),
4458
- id: (0, smithy_client_1.expectString)(output.id),
4459
- name: (0, smithy_client_1.expectString)(output.name),
4460
- status: (0, smithy_client_1.expectString)(output.status),
4461
- };
4462
- };
4463
- const de_AssessmentReportEvidenceError = (output, context) => {
4464
- return {
4465
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
4466
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
4467
- evidenceId: (0, smithy_client_1.expectString)(output.evidenceId),
4468
- };
4469
- };
4470
- const de_AssessmentReportEvidenceErrors = (output, context) => {
4471
- const retVal = (output || [])
4472
- .filter((e) => e != null)
4473
- .map((entry) => {
4474
- if (entry === null) {
4475
- return null;
4476
- }
4477
- return de_AssessmentReportEvidenceError(entry, context);
4149
+ return (0, smithy_client_1.take)(output, {
4150
+ assessmentId: smithy_client_1.expectString,
4151
+ assessmentName: smithy_client_1.expectString,
4152
+ author: smithy_client_1.expectString,
4153
+ awsAccountId: smithy_client_1.expectString,
4154
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4155
+ description: smithy_client_1.expectString,
4156
+ id: smithy_client_1.expectString,
4157
+ name: smithy_client_1.expectString,
4158
+ status: smithy_client_1.expectString,
4478
4159
  });
4479
- return retVal;
4480
4160
  };
4481
4161
  const de_AssessmentReportMetadata = (output, context) => {
4482
- return {
4483
- assessmentId: (0, smithy_client_1.expectString)(output.assessmentId),
4484
- assessmentName: (0, smithy_client_1.expectString)(output.assessmentName),
4485
- author: (0, smithy_client_1.expectString)(output.author),
4486
- creationTime: output.creationTime != null
4487
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4488
- : undefined,
4489
- description: (0, smithy_client_1.expectString)(output.description),
4490
- id: (0, smithy_client_1.expectString)(output.id),
4491
- name: (0, smithy_client_1.expectString)(output.name),
4492
- status: (0, smithy_client_1.expectString)(output.status),
4493
- };
4494
- };
4495
- const de_AssessmentReportsDestination = (output, context) => {
4496
- return {
4497
- destination: (0, smithy_client_1.expectString)(output.destination),
4498
- destinationType: (0, smithy_client_1.expectString)(output.destinationType),
4499
- };
4162
+ return (0, smithy_client_1.take)(output, {
4163
+ assessmentId: smithy_client_1.expectString,
4164
+ assessmentName: smithy_client_1.expectString,
4165
+ author: smithy_client_1.expectString,
4166
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4167
+ description: smithy_client_1.expectString,
4168
+ id: smithy_client_1.expectString,
4169
+ name: smithy_client_1.expectString,
4170
+ status: smithy_client_1.expectString,
4171
+ });
4500
4172
  };
4501
4173
  const de_AssessmentReportsMetadata = (output, context) => {
4502
4174
  const retVal = (output || [])
4503
4175
  .filter((e) => e != null)
4504
4176
  .map((entry) => {
4505
- if (entry === null) {
4506
- return null;
4507
- }
4508
4177
  return de_AssessmentReportMetadata(entry, context);
4509
4178
  });
4510
4179
  return retVal;
4511
4180
  };
4512
- const de_AWSAccount = (output, context) => {
4513
- return {
4514
- emailAddress: (0, smithy_client_1.expectString)(output.emailAddress),
4515
- id: (0, smithy_client_1.expectString)(output.id),
4516
- name: (0, smithy_client_1.expectString)(output.name),
4517
- };
4518
- };
4519
- const de_AWSAccounts = (output, context) => {
4520
- const retVal = (output || [])
4521
- .filter((e) => e != null)
4522
- .map((entry) => {
4523
- if (entry === null) {
4524
- return null;
4525
- }
4526
- return de_AWSAccount(entry, context);
4527
- });
4528
- return retVal;
4529
- };
4530
- const de_AWSService = (output, context) => {
4531
- return {
4532
- serviceName: (0, smithy_client_1.expectString)(output.serviceName),
4533
- };
4534
- };
4535
- const de_AWSServices = (output, context) => {
4536
- const retVal = (output || [])
4537
- .filter((e) => e != null)
4538
- .map((entry) => {
4539
- if (entry === null) {
4540
- return null;
4541
- }
4542
- return de_AWSService(entry, context);
4543
- });
4544
- return retVal;
4545
- };
4546
- const de_BatchCreateDelegationByAssessmentError = (output, context) => {
4547
- return {
4548
- createDelegationRequest: output.createDelegationRequest != null
4549
- ? de_CreateDelegationRequest(output.createDelegationRequest, context)
4550
- : undefined,
4551
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
4552
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
4553
- };
4554
- };
4555
- const de_BatchCreateDelegationByAssessmentErrors = (output, context) => {
4556
- const retVal = (output || [])
4557
- .filter((e) => e != null)
4558
- .map((entry) => {
4559
- if (entry === null) {
4560
- return null;
4561
- }
4562
- return de_BatchCreateDelegationByAssessmentError(entry, context);
4563
- });
4564
- return retVal;
4565
- };
4566
- const de_BatchDeleteDelegationByAssessmentError = (output, context) => {
4567
- return {
4568
- delegationId: (0, smithy_client_1.expectString)(output.delegationId),
4569
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
4570
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
4571
- };
4572
- };
4573
- const de_BatchDeleteDelegationByAssessmentErrors = (output, context) => {
4574
- const retVal = (output || [])
4575
- .filter((e) => e != null)
4576
- .map((entry) => {
4577
- if (entry === null) {
4578
- return null;
4579
- }
4580
- return de_BatchDeleteDelegationByAssessmentError(entry, context);
4581
- });
4582
- return retVal;
4583
- };
4584
- const de_BatchImportEvidenceToAssessmentControlError = (output, context) => {
4585
- return {
4586
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
4587
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
4588
- manualEvidence: output.manualEvidence != null ? de_ManualEvidence(output.manualEvidence, context) : undefined,
4589
- };
4590
- };
4591
- const de_BatchImportEvidenceToAssessmentControlErrors = (output, context) => {
4592
- const retVal = (output || [])
4593
- .filter((e) => e != null)
4594
- .map((entry) => {
4595
- if (entry === null) {
4596
- return null;
4597
- }
4598
- return de_BatchImportEvidenceToAssessmentControlError(entry, context);
4599
- });
4600
- return retVal;
4601
- };
4602
4181
  const de_ChangeLog = (output, context) => {
4603
- return {
4604
- action: (0, smithy_client_1.expectString)(output.action),
4605
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
4606
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
4607
- objectName: (0, smithy_client_1.expectString)(output.objectName),
4608
- objectType: (0, smithy_client_1.expectString)(output.objectType),
4609
- };
4182
+ return (0, smithy_client_1.take)(output, {
4183
+ action: smithy_client_1.expectString,
4184
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4185
+ createdBy: smithy_client_1.expectString,
4186
+ objectName: smithy_client_1.expectString,
4187
+ objectType: smithy_client_1.expectString,
4188
+ });
4610
4189
  };
4611
4190
  const de_ChangeLogs = (output, context) => {
4612
4191
  const retVal = (output || [])
4613
4192
  .filter((e) => e != null)
4614
4193
  .map((entry) => {
4615
- if (entry === null) {
4616
- return null;
4617
- }
4618
4194
  return de_ChangeLog(entry, context);
4619
4195
  });
4620
4196
  return retVal;
4621
4197
  };
4622
4198
  const de_Control = (output, context) => {
4623
- return {
4624
- actionPlanInstructions: (0, smithy_client_1.expectString)(output.actionPlanInstructions),
4625
- actionPlanTitle: (0, smithy_client_1.expectString)(output.actionPlanTitle),
4626
- arn: (0, smithy_client_1.expectString)(output.arn),
4627
- controlMappingSources: output.controlMappingSources != null
4628
- ? de_ControlMappingSources(output.controlMappingSources, context)
4629
- : undefined,
4630
- controlSources: (0, smithy_client_1.expectString)(output.controlSources),
4631
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
4632
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
4633
- description: (0, smithy_client_1.expectString)(output.description),
4634
- id: (0, smithy_client_1.expectString)(output.id),
4635
- lastUpdatedAt: output.lastUpdatedAt != null
4636
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
4637
- : undefined,
4638
- lastUpdatedBy: (0, smithy_client_1.expectString)(output.lastUpdatedBy),
4639
- name: (0, smithy_client_1.expectString)(output.name),
4640
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
4641
- testingInformation: (0, smithy_client_1.expectString)(output.testingInformation),
4642
- type: (0, smithy_client_1.expectString)(output.type),
4643
- };
4199
+ return (0, smithy_client_1.take)(output, {
4200
+ actionPlanInstructions: smithy_client_1.expectString,
4201
+ actionPlanTitle: smithy_client_1.expectString,
4202
+ arn: smithy_client_1.expectString,
4203
+ controlMappingSources: smithy_client_1._json,
4204
+ controlSources: smithy_client_1.expectString,
4205
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4206
+ createdBy: smithy_client_1.expectString,
4207
+ description: smithy_client_1.expectString,
4208
+ id: smithy_client_1.expectString,
4209
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4210
+ lastUpdatedBy: smithy_client_1.expectString,
4211
+ name: smithy_client_1.expectString,
4212
+ tags: smithy_client_1._json,
4213
+ testingInformation: smithy_client_1.expectString,
4214
+ type: smithy_client_1.expectString,
4215
+ });
4644
4216
  };
4645
4217
  const de_ControlComment = (output, context) => {
4646
- return {
4647
- authorName: (0, smithy_client_1.expectString)(output.authorName),
4648
- commentBody: (0, smithy_client_1.expectString)(output.commentBody),
4649
- postedDate: output.postedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.postedDate))) : undefined,
4650
- };
4218
+ return (0, smithy_client_1.take)(output, {
4219
+ authorName: smithy_client_1.expectString,
4220
+ commentBody: smithy_client_1.expectString,
4221
+ postedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4222
+ });
4651
4223
  };
4652
4224
  const de_ControlComments = (output, context) => {
4653
4225
  const retVal = (output || [])
4654
4226
  .filter((e) => e != null)
4655
4227
  .map((entry) => {
4656
- if (entry === null) {
4657
- return null;
4658
- }
4659
4228
  return de_ControlComment(entry, context);
4660
4229
  });
4661
4230
  return retVal;
4662
4231
  };
4663
4232
  const de_ControlDomainInsights = (output, context) => {
4664
- return {
4665
- controlsCountByNoncompliantEvidence: (0, smithy_client_1.expectInt32)(output.controlsCountByNoncompliantEvidence),
4666
- evidenceInsights: output.evidenceInsights != null ? de_EvidenceInsights(output.evidenceInsights, context) : undefined,
4667
- id: (0, smithy_client_1.expectString)(output.id),
4668
- lastUpdated: output.lastUpdated != null
4669
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4670
- : undefined,
4671
- name: (0, smithy_client_1.expectString)(output.name),
4672
- totalControlsCount: (0, smithy_client_1.expectInt32)(output.totalControlsCount),
4673
- };
4233
+ return (0, smithy_client_1.take)(output, {
4234
+ controlsCountByNoncompliantEvidence: smithy_client_1.expectInt32,
4235
+ evidenceInsights: smithy_client_1._json,
4236
+ id: smithy_client_1.expectString,
4237
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4238
+ name: smithy_client_1.expectString,
4239
+ totalControlsCount: smithy_client_1.expectInt32,
4240
+ });
4674
4241
  };
4675
4242
  const de_ControlDomainInsightsList = (output, context) => {
4676
4243
  const retVal = (output || [])
4677
4244
  .filter((e) => e != null)
4678
4245
  .map((entry) => {
4679
- if (entry === null) {
4680
- return null;
4681
- }
4682
4246
  return de_ControlDomainInsights(entry, context);
4683
4247
  });
4684
4248
  return retVal;
@@ -4687,9 +4251,6 @@ const de_ControlInsightsMetadata = (output, context) => {
4687
4251
  const retVal = (output || [])
4688
4252
  .filter((e) => e != null)
4689
4253
  .map((entry) => {
4690
- if (entry === null) {
4691
- return null;
4692
- }
4693
4254
  return de_ControlInsightsMetadataItem(entry, context);
4694
4255
  });
4695
4256
  return retVal;
@@ -4698,76 +4259,41 @@ const de_ControlInsightsMetadataByAssessment = (output, context) => {
4698
4259
  const retVal = (output || [])
4699
4260
  .filter((e) => e != null)
4700
4261
  .map((entry) => {
4701
- if (entry === null) {
4702
- return null;
4703
- }
4704
4262
  return de_ControlInsightsMetadataByAssessmentItem(entry, context);
4705
4263
  });
4706
4264
  return retVal;
4707
4265
  };
4708
4266
  const de_ControlInsightsMetadataByAssessmentItem = (output, context) => {
4709
- return {
4710
- controlSetName: (0, smithy_client_1.expectString)(output.controlSetName),
4711
- evidenceInsights: output.evidenceInsights != null ? de_EvidenceInsights(output.evidenceInsights, context) : undefined,
4712
- id: (0, smithy_client_1.expectString)(output.id),
4713
- lastUpdated: output.lastUpdated != null
4714
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4715
- : undefined,
4716
- name: (0, smithy_client_1.expectString)(output.name),
4717
- };
4267
+ return (0, smithy_client_1.take)(output, {
4268
+ controlSetName: smithy_client_1.expectString,
4269
+ evidenceInsights: smithy_client_1._json,
4270
+ id: smithy_client_1.expectString,
4271
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4272
+ name: smithy_client_1.expectString,
4273
+ });
4718
4274
  };
4719
4275
  const de_ControlInsightsMetadataItem = (output, context) => {
4720
- return {
4721
- evidenceInsights: output.evidenceInsights != null ? de_EvidenceInsights(output.evidenceInsights, context) : undefined,
4722
- id: (0, smithy_client_1.expectString)(output.id),
4723
- lastUpdated: output.lastUpdated != null
4724
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4725
- : undefined,
4726
- name: (0, smithy_client_1.expectString)(output.name),
4727
- };
4728
- };
4729
- const de_ControlMappingSource = (output, context) => {
4730
- return {
4731
- sourceDescription: (0, smithy_client_1.expectString)(output.sourceDescription),
4732
- sourceFrequency: (0, smithy_client_1.expectString)(output.sourceFrequency),
4733
- sourceId: (0, smithy_client_1.expectString)(output.sourceId),
4734
- sourceKeyword: output.sourceKeyword != null ? de_SourceKeyword(output.sourceKeyword, context) : undefined,
4735
- sourceName: (0, smithy_client_1.expectString)(output.sourceName),
4736
- sourceSetUpOption: (0, smithy_client_1.expectString)(output.sourceSetUpOption),
4737
- sourceType: (0, smithy_client_1.expectString)(output.sourceType),
4738
- troubleshootingText: (0, smithy_client_1.expectString)(output.troubleshootingText),
4739
- };
4740
- };
4741
- const de_ControlMappingSources = (output, context) => {
4742
- const retVal = (output || [])
4743
- .filter((e) => e != null)
4744
- .map((entry) => {
4745
- if (entry === null) {
4746
- return null;
4747
- }
4748
- return de_ControlMappingSource(entry, context);
4276
+ return (0, smithy_client_1.take)(output, {
4277
+ evidenceInsights: smithy_client_1._json,
4278
+ id: smithy_client_1.expectString,
4279
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4280
+ name: smithy_client_1.expectString,
4749
4281
  });
4750
- return retVal;
4751
4282
  };
4752
4283
  const de_ControlMetadata = (output, context) => {
4753
- return {
4754
- arn: (0, smithy_client_1.expectString)(output.arn),
4755
- controlSources: (0, smithy_client_1.expectString)(output.controlSources),
4756
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
4757
- id: (0, smithy_client_1.expectString)(output.id),
4758
- lastUpdatedAt: output.lastUpdatedAt != null
4759
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
4760
- : undefined,
4761
- name: (0, smithy_client_1.expectString)(output.name),
4762
- };
4284
+ return (0, smithy_client_1.take)(output, {
4285
+ arn: smithy_client_1.expectString,
4286
+ controlSources: smithy_client_1.expectString,
4287
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4288
+ id: smithy_client_1.expectString,
4289
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4290
+ name: smithy_client_1.expectString,
4291
+ });
4763
4292
  };
4764
4293
  const de_ControlMetadataList = (output, context) => {
4765
4294
  const retVal = (output || [])
4766
4295
  .filter((e) => e != null)
4767
4296
  .map((entry) => {
4768
- if (entry === null) {
4769
- return null;
4770
- }
4771
4297
  return de_ControlMetadata(entry, context);
4772
4298
  });
4773
4299
  return retVal;
@@ -4776,78 +4302,55 @@ const de_Controls = (output, context) => {
4776
4302
  const retVal = (output || [])
4777
4303
  .filter((e) => e != null)
4778
4304
  .map((entry) => {
4779
- if (entry === null) {
4780
- return null;
4781
- }
4782
4305
  return de_Control(entry, context);
4783
4306
  });
4784
4307
  return retVal;
4785
4308
  };
4786
4309
  const de_ControlSet = (output, context) => {
4787
- return {
4788
- controls: output.controls != null ? de_Controls(output.controls, context) : undefined,
4789
- id: (0, smithy_client_1.expectString)(output.id),
4790
- name: (0, smithy_client_1.expectString)(output.name),
4791
- };
4310
+ return (0, smithy_client_1.take)(output, {
4311
+ controls: (_) => de_Controls(_, context),
4312
+ id: smithy_client_1.expectString,
4313
+ name: smithy_client_1.expectString,
4314
+ });
4792
4315
  };
4793
4316
  const de_ControlSets = (output, context) => {
4794
4317
  const retVal = (output || [])
4795
4318
  .filter((e) => e != null)
4796
4319
  .map((entry) => {
4797
- if (entry === null) {
4798
- return null;
4799
- }
4800
4320
  return de_ControlSet(entry, context);
4801
4321
  });
4802
4322
  return retVal;
4803
4323
  };
4804
- const de_CreateDelegationRequest = (output, context) => {
4805
- return {
4806
- comment: (0, smithy_client_1.expectString)(output.comment),
4807
- controlSetId: (0, smithy_client_1.expectString)(output.controlSetId),
4808
- roleArn: (0, smithy_client_1.expectString)(output.roleArn),
4809
- roleType: (0, smithy_client_1.expectString)(output.roleType),
4810
- };
4811
- };
4812
4324
  const de_Delegation = (output, context) => {
4813
- return {
4814
- assessmentId: (0, smithy_client_1.expectString)(output.assessmentId),
4815
- assessmentName: (0, smithy_client_1.expectString)(output.assessmentName),
4816
- comment: (0, smithy_client_1.expectString)(output.comment),
4817
- controlSetId: (0, smithy_client_1.expectString)(output.controlSetId),
4818
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
4819
- creationTime: output.creationTime != null
4820
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4821
- : undefined,
4822
- id: (0, smithy_client_1.expectString)(output.id),
4823
- lastUpdated: output.lastUpdated != null
4824
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4825
- : undefined,
4826
- roleArn: (0, smithy_client_1.expectString)(output.roleArn),
4827
- roleType: (0, smithy_client_1.expectString)(output.roleType),
4828
- status: (0, smithy_client_1.expectString)(output.status),
4829
- };
4325
+ return (0, smithy_client_1.take)(output, {
4326
+ assessmentId: smithy_client_1.expectString,
4327
+ assessmentName: smithy_client_1.expectString,
4328
+ comment: smithy_client_1.expectString,
4329
+ controlSetId: smithy_client_1.expectString,
4330
+ createdBy: smithy_client_1.expectString,
4331
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4332
+ id: smithy_client_1.expectString,
4333
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4334
+ roleArn: smithy_client_1.expectString,
4335
+ roleType: smithy_client_1.expectString,
4336
+ status: smithy_client_1.expectString,
4337
+ });
4830
4338
  };
4831
4339
  const de_DelegationMetadata = (output, context) => {
4832
- return {
4833
- assessmentId: (0, smithy_client_1.expectString)(output.assessmentId),
4834
- assessmentName: (0, smithy_client_1.expectString)(output.assessmentName),
4835
- controlSetName: (0, smithy_client_1.expectString)(output.controlSetName),
4836
- creationTime: output.creationTime != null
4837
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
4838
- : undefined,
4839
- id: (0, smithy_client_1.expectString)(output.id),
4840
- roleArn: (0, smithy_client_1.expectString)(output.roleArn),
4841
- status: (0, smithy_client_1.expectString)(output.status),
4842
- };
4340
+ return (0, smithy_client_1.take)(output, {
4341
+ assessmentId: smithy_client_1.expectString,
4342
+ assessmentName: smithy_client_1.expectString,
4343
+ controlSetName: smithy_client_1.expectString,
4344
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4345
+ id: smithy_client_1.expectString,
4346
+ roleArn: smithy_client_1.expectString,
4347
+ status: smithy_client_1.expectString,
4348
+ });
4843
4349
  };
4844
4350
  const de_DelegationMetadataList = (output, context) => {
4845
4351
  const retVal = (output || [])
4846
4352
  .filter((e) => e != null)
4847
4353
  .map((entry) => {
4848
- if (entry === null) {
4849
- return null;
4850
- }
4851
4354
  return de_DelegationMetadata(entry, context);
4852
4355
  });
4853
4356
  return retVal;
@@ -4856,332 +4359,112 @@ const de_Delegations = (output, context) => {
4856
4359
  const retVal = (output || [])
4857
4360
  .filter((e) => e != null)
4858
4361
  .map((entry) => {
4859
- if (entry === null) {
4860
- return null;
4861
- }
4862
4362
  return de_Delegation(entry, context);
4863
4363
  });
4864
4364
  return retVal;
4865
4365
  };
4866
- const de_DeregistrationPolicy = (output, context) => {
4867
- return {
4868
- deleteResources: (0, smithy_client_1.expectString)(output.deleteResources),
4869
- };
4870
- };
4871
4366
  const de_Evidence = (output, context) => {
4872
- return {
4873
- assessmentReportSelection: (0, smithy_client_1.expectString)(output.assessmentReportSelection),
4874
- attributes: output.attributes != null ? de_EvidenceAttributes(output.attributes, context) : undefined,
4875
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
4876
- awsOrganization: (0, smithy_client_1.expectString)(output.awsOrganization),
4877
- complianceCheck: (0, smithy_client_1.expectString)(output.complianceCheck),
4878
- dataSource: (0, smithy_client_1.expectString)(output.dataSource),
4879
- eventName: (0, smithy_client_1.expectString)(output.eventName),
4880
- eventSource: (0, smithy_client_1.expectString)(output.eventSource),
4881
- evidenceAwsAccountId: (0, smithy_client_1.expectString)(output.evidenceAwsAccountId),
4882
- evidenceByType: (0, smithy_client_1.expectString)(output.evidenceByType),
4883
- evidenceFolderId: (0, smithy_client_1.expectString)(output.evidenceFolderId),
4884
- iamId: (0, smithy_client_1.expectString)(output.iamId),
4885
- id: (0, smithy_client_1.expectString)(output.id),
4886
- resourcesIncluded: output.resourcesIncluded != null ? de_Resources(output.resourcesIncluded, context) : undefined,
4887
- time: output.time != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.time))) : undefined,
4888
- };
4889
- };
4890
- const de_EvidenceAttributes = (output, context) => {
4891
- return Object.entries(output).reduce((acc, [key, value]) => {
4892
- if (value === null) {
4893
- return acc;
4894
- }
4895
- acc[key] = (0, smithy_client_1.expectString)(value);
4896
- return acc;
4897
- }, {});
4898
- };
4899
- const de_EvidenceFinderEnablement = (output, context) => {
4900
- return {
4901
- backfillStatus: (0, smithy_client_1.expectString)(output.backfillStatus),
4902
- enablementStatus: (0, smithy_client_1.expectString)(output.enablementStatus),
4903
- error: (0, smithy_client_1.expectString)(output.error),
4904
- eventDataStoreArn: (0, smithy_client_1.expectString)(output.eventDataStoreArn),
4905
- };
4906
- };
4907
- const de_EvidenceIds = (output, context) => {
4908
- const retVal = (output || [])
4909
- .filter((e) => e != null)
4910
- .map((entry) => {
4911
- if (entry === null) {
4912
- return null;
4913
- }
4914
- return (0, smithy_client_1.expectString)(entry);
4367
+ return (0, smithy_client_1.take)(output, {
4368
+ assessmentReportSelection: smithy_client_1.expectString,
4369
+ attributes: smithy_client_1._json,
4370
+ awsAccountId: smithy_client_1.expectString,
4371
+ awsOrganization: smithy_client_1.expectString,
4372
+ complianceCheck: smithy_client_1.expectString,
4373
+ dataSource: smithy_client_1.expectString,
4374
+ eventName: smithy_client_1.expectString,
4375
+ eventSource: smithy_client_1.expectString,
4376
+ evidenceAwsAccountId: smithy_client_1.expectString,
4377
+ evidenceByType: smithy_client_1.expectString,
4378
+ evidenceFolderId: smithy_client_1.expectString,
4379
+ iamId: smithy_client_1.expectString,
4380
+ id: smithy_client_1.expectString,
4381
+ resourcesIncluded: smithy_client_1._json,
4382
+ time: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4915
4383
  });
4916
- return retVal;
4917
- };
4918
- const de_EvidenceInsights = (output, context) => {
4919
- return {
4920
- compliantEvidenceCount: (0, smithy_client_1.expectInt32)(output.compliantEvidenceCount),
4921
- inconclusiveEvidenceCount: (0, smithy_client_1.expectInt32)(output.inconclusiveEvidenceCount),
4922
- noncompliantEvidenceCount: (0, smithy_client_1.expectInt32)(output.noncompliantEvidenceCount),
4923
- };
4924
4384
  };
4925
4385
  const de_EvidenceList = (output, context) => {
4926
4386
  const retVal = (output || [])
4927
4387
  .filter((e) => e != null)
4928
4388
  .map((entry) => {
4929
- if (entry === null) {
4930
- return null;
4931
- }
4932
4389
  return de_Evidence(entry, context);
4933
4390
  });
4934
4391
  return retVal;
4935
4392
  };
4936
- const de_EvidenceSources = (output, context) => {
4937
- const retVal = (output || [])
4938
- .filter((e) => e != null)
4939
- .map((entry) => {
4940
- if (entry === null) {
4941
- return null;
4942
- }
4943
- return (0, smithy_client_1.expectString)(entry);
4944
- });
4945
- return retVal;
4946
- };
4947
4393
  const de_Framework = (output, context) => {
4948
- return {
4949
- arn: (0, smithy_client_1.expectString)(output.arn),
4950
- complianceType: (0, smithy_client_1.expectString)(output.complianceType),
4951
- controlSets: output.controlSets != null ? de_ControlSets(output.controlSets, context) : undefined,
4952
- controlSources: (0, smithy_client_1.expectString)(output.controlSources),
4953
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
4954
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
4955
- description: (0, smithy_client_1.expectString)(output.description),
4956
- id: (0, smithy_client_1.expectString)(output.id),
4957
- lastUpdatedAt: output.lastUpdatedAt != null
4958
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
4959
- : undefined,
4960
- lastUpdatedBy: (0, smithy_client_1.expectString)(output.lastUpdatedBy),
4961
- logo: (0, smithy_client_1.expectString)(output.logo),
4962
- name: (0, smithy_client_1.expectString)(output.name),
4963
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
4964
- type: (0, smithy_client_1.expectString)(output.type),
4965
- };
4966
- };
4967
- const de_FrameworkMetadata = (output, context) => {
4968
- return {
4969
- complianceType: (0, smithy_client_1.expectString)(output.complianceType),
4970
- description: (0, smithy_client_1.expectString)(output.description),
4971
- logo: (0, smithy_client_1.expectString)(output.logo),
4972
- name: (0, smithy_client_1.expectString)(output.name),
4973
- };
4394
+ return (0, smithy_client_1.take)(output, {
4395
+ arn: smithy_client_1.expectString,
4396
+ complianceType: smithy_client_1.expectString,
4397
+ controlSets: (_) => de_ControlSets(_, context),
4398
+ controlSources: smithy_client_1.expectString,
4399
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4400
+ createdBy: smithy_client_1.expectString,
4401
+ description: smithy_client_1.expectString,
4402
+ id: smithy_client_1.expectString,
4403
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4404
+ lastUpdatedBy: smithy_client_1.expectString,
4405
+ logo: smithy_client_1.expectString,
4406
+ name: smithy_client_1.expectString,
4407
+ tags: smithy_client_1._json,
4408
+ type: smithy_client_1.expectString,
4409
+ });
4974
4410
  };
4975
4411
  const de_FrameworkMetadataList = (output, context) => {
4976
4412
  const retVal = (output || [])
4977
4413
  .filter((e) => e != null)
4978
4414
  .map((entry) => {
4979
- if (entry === null) {
4980
- return null;
4981
- }
4982
4415
  return de_AssessmentFrameworkMetadata(entry, context);
4983
4416
  });
4984
4417
  return retVal;
4985
4418
  };
4986
4419
  const de_Insights = (output, context) => {
4987
- return {
4988
- activeAssessmentsCount: (0, smithy_client_1.expectInt32)(output.activeAssessmentsCount),
4989
- assessmentControlsCountByNoncompliantEvidence: (0, smithy_client_1.expectInt32)(output.assessmentControlsCountByNoncompliantEvidence),
4990
- compliantEvidenceCount: (0, smithy_client_1.expectInt32)(output.compliantEvidenceCount),
4991
- inconclusiveEvidenceCount: (0, smithy_client_1.expectInt32)(output.inconclusiveEvidenceCount),
4992
- lastUpdated: output.lastUpdated != null
4993
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
4994
- : undefined,
4995
- noncompliantEvidenceCount: (0, smithy_client_1.expectInt32)(output.noncompliantEvidenceCount),
4996
- totalAssessmentControlsCount: (0, smithy_client_1.expectInt32)(output.totalAssessmentControlsCount),
4997
- };
4420
+ return (0, smithy_client_1.take)(output, {
4421
+ activeAssessmentsCount: smithy_client_1.expectInt32,
4422
+ assessmentControlsCountByNoncompliantEvidence: smithy_client_1.expectInt32,
4423
+ compliantEvidenceCount: smithy_client_1.expectInt32,
4424
+ inconclusiveEvidenceCount: smithy_client_1.expectInt32,
4425
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4426
+ noncompliantEvidenceCount: smithy_client_1.expectInt32,
4427
+ totalAssessmentControlsCount: smithy_client_1.expectInt32,
4428
+ });
4998
4429
  };
4999
4430
  const de_InsightsByAssessment = (output, context) => {
5000
- return {
5001
- assessmentControlsCountByNoncompliantEvidence: (0, smithy_client_1.expectInt32)(output.assessmentControlsCountByNoncompliantEvidence),
5002
- compliantEvidenceCount: (0, smithy_client_1.expectInt32)(output.compliantEvidenceCount),
5003
- inconclusiveEvidenceCount: (0, smithy_client_1.expectInt32)(output.inconclusiveEvidenceCount),
5004
- lastUpdated: output.lastUpdated != null
5005
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdated)))
5006
- : undefined,
5007
- noncompliantEvidenceCount: (0, smithy_client_1.expectInt32)(output.noncompliantEvidenceCount),
5008
- totalAssessmentControlsCount: (0, smithy_client_1.expectInt32)(output.totalAssessmentControlsCount),
5009
- };
5010
- };
5011
- const de_Keywords = (output, context) => {
5012
- const retVal = (output || [])
5013
- .filter((e) => e != null)
5014
- .map((entry) => {
5015
- if (entry === null) {
5016
- return null;
5017
- }
5018
- return (0, smithy_client_1.expectString)(entry);
4431
+ return (0, smithy_client_1.take)(output, {
4432
+ assessmentControlsCountByNoncompliantEvidence: smithy_client_1.expectInt32,
4433
+ compliantEvidenceCount: smithy_client_1.expectInt32,
4434
+ inconclusiveEvidenceCount: smithy_client_1.expectInt32,
4435
+ lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4436
+ noncompliantEvidenceCount: smithy_client_1.expectInt32,
4437
+ totalAssessmentControlsCount: smithy_client_1.expectInt32,
5019
4438
  });
5020
- return retVal;
5021
4439
  };
5022
4440
  const de_ListAssessmentMetadata = (output, context) => {
5023
4441
  const retVal = (output || [])
5024
4442
  .filter((e) => e != null)
5025
4443
  .map((entry) => {
5026
- if (entry === null) {
5027
- return null;
5028
- }
5029
4444
  return de_AssessmentMetadataItem(entry, context);
5030
4445
  });
5031
4446
  return retVal;
5032
4447
  };
5033
- const de_ManualEvidence = (output, context) => {
5034
- return {
5035
- s3ResourcePath: (0, smithy_client_1.expectString)(output.s3ResourcePath),
5036
- };
5037
- };
5038
4448
  const de_Notification = (output, context) => {
5039
- return {
5040
- assessmentId: (0, smithy_client_1.expectString)(output.assessmentId),
5041
- assessmentName: (0, smithy_client_1.expectString)(output.assessmentName),
5042
- controlSetId: (0, smithy_client_1.expectString)(output.controlSetId),
5043
- controlSetName: (0, smithy_client_1.expectString)(output.controlSetName),
5044
- description: (0, smithy_client_1.expectString)(output.description),
5045
- eventTime: output.eventTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.eventTime))) : undefined,
5046
- id: (0, smithy_client_1.expectString)(output.id),
5047
- source: (0, smithy_client_1.expectString)(output.source),
5048
- };
4449
+ return (0, smithy_client_1.take)(output, {
4450
+ assessmentId: smithy_client_1.expectString,
4451
+ assessmentName: smithy_client_1.expectString,
4452
+ controlSetId: smithy_client_1.expectString,
4453
+ controlSetName: smithy_client_1.expectString,
4454
+ description: smithy_client_1.expectString,
4455
+ eventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4456
+ id: smithy_client_1.expectString,
4457
+ source: smithy_client_1.expectString,
4458
+ });
5049
4459
  };
5050
4460
  const de_Notifications = (output, context) => {
5051
4461
  const retVal = (output || [])
5052
4462
  .filter((e) => e != null)
5053
4463
  .map((entry) => {
5054
- if (entry === null) {
5055
- return null;
5056
- }
5057
4464
  return de_Notification(entry, context);
5058
4465
  });
5059
4466
  return retVal;
5060
4467
  };
5061
- const de_Resource = (output, context) => {
5062
- return {
5063
- arn: (0, smithy_client_1.expectString)(output.arn),
5064
- complianceCheck: (0, smithy_client_1.expectString)(output.complianceCheck),
5065
- value: (0, smithy_client_1.expectString)(output.value),
5066
- };
5067
- };
5068
- const de_Resources = (output, context) => {
5069
- const retVal = (output || [])
5070
- .filter((e) => e != null)
5071
- .map((entry) => {
5072
- if (entry === null) {
5073
- return null;
5074
- }
5075
- return de_Resource(entry, context);
5076
- });
5077
- return retVal;
5078
- };
5079
- const de_Role = (output, context) => {
5080
- return {
5081
- roleArn: (0, smithy_client_1.expectString)(output.roleArn),
5082
- roleType: (0, smithy_client_1.expectString)(output.roleType),
5083
- };
5084
- };
5085
- const de_Roles = (output, context) => {
5086
- const retVal = (output || [])
5087
- .filter((e) => e != null)
5088
- .map((entry) => {
5089
- if (entry === null) {
5090
- return null;
5091
- }
5092
- return de_Role(entry, context);
5093
- });
5094
- return retVal;
5095
- };
5096
- const de_Scope = (output, context) => {
5097
- return {
5098
- awsAccounts: output.awsAccounts != null ? de_AWSAccounts(output.awsAccounts, context) : undefined,
5099
- awsServices: output.awsServices != null ? de_AWSServices(output.awsServices, context) : undefined,
5100
- };
5101
- };
5102
- const de_ServiceMetadata = (output, context) => {
5103
- return {
5104
- category: (0, smithy_client_1.expectString)(output.category),
5105
- description: (0, smithy_client_1.expectString)(output.description),
5106
- displayName: (0, smithy_client_1.expectString)(output.displayName),
5107
- name: (0, smithy_client_1.expectString)(output.name),
5108
- };
5109
- };
5110
- const de_ServiceMetadataList = (output, context) => {
5111
- const retVal = (output || [])
5112
- .filter((e) => e != null)
5113
- .map((entry) => {
5114
- if (entry === null) {
5115
- return null;
5116
- }
5117
- return de_ServiceMetadata(entry, context);
5118
- });
5119
- return retVal;
5120
- };
5121
- const de_Settings = (output, context) => {
5122
- return {
5123
- defaultAssessmentReportsDestination: output.defaultAssessmentReportsDestination != null
5124
- ? de_AssessmentReportsDestination(output.defaultAssessmentReportsDestination, context)
5125
- : undefined,
5126
- defaultProcessOwners: output.defaultProcessOwners != null ? de_Roles(output.defaultProcessOwners, context) : undefined,
5127
- deregistrationPolicy: output.deregistrationPolicy != null ? de_DeregistrationPolicy(output.deregistrationPolicy, context) : undefined,
5128
- evidenceFinderEnablement: output.evidenceFinderEnablement != null
5129
- ? de_EvidenceFinderEnablement(output.evidenceFinderEnablement, context)
5130
- : undefined,
5131
- isAwsOrgEnabled: (0, smithy_client_1.expectBoolean)(output.isAwsOrgEnabled),
5132
- kmsKey: (0, smithy_client_1.expectString)(output.kmsKey),
5133
- snsTopic: (0, smithy_client_1.expectString)(output.snsTopic),
5134
- };
5135
- };
5136
- const de_SourceKeyword = (output, context) => {
5137
- return {
5138
- keywordInputType: (0, smithy_client_1.expectString)(output.keywordInputType),
5139
- keywordValue: (0, smithy_client_1.expectString)(output.keywordValue),
5140
- };
5141
- };
5142
- const de_TagMap = (output, context) => {
5143
- return Object.entries(output).reduce((acc, [key, value]) => {
5144
- if (value === null) {
5145
- return acc;
5146
- }
5147
- acc[key] = (0, smithy_client_1.expectString)(value);
5148
- return acc;
5149
- }, {});
5150
- };
5151
- const de_URL = (output, context) => {
5152
- return {
5153
- hyperlinkName: (0, smithy_client_1.expectString)(output.hyperlinkName),
5154
- link: (0, smithy_client_1.expectString)(output.link),
5155
- };
5156
- };
5157
- const de_ValidationErrors = (output, context) => {
5158
- const retVal = (output || [])
5159
- .filter((e) => e != null)
5160
- .map((entry) => {
5161
- if (entry === null) {
5162
- return null;
5163
- }
5164
- return (0, smithy_client_1.expectString)(entry);
5165
- });
5166
- return retVal;
5167
- };
5168
- const de_ValidationExceptionField = (output, context) => {
5169
- return {
5170
- message: (0, smithy_client_1.expectString)(output.message),
5171
- name: (0, smithy_client_1.expectString)(output.name),
5172
- };
5173
- };
5174
- const de_ValidationExceptionFieldList = (output, context) => {
5175
- const retVal = (output || [])
5176
- .filter((e) => e != null)
5177
- .map((entry) => {
5178
- if (entry === null) {
5179
- return null;
5180
- }
5181
- return de_ValidationExceptionField(entry, context);
5182
- });
5183
- return retVal;
5184
- };
5185
4468
  const deserializeMetadata = (output) => ({
5186
4469
  httpStatusCode: output.statusCode,
5187
4470
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],