@aws-sdk/client-wellarchitected 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.
@@ -15,9 +15,9 @@ const se_AssociateLensesCommand = async (input, context) => {
15
15
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/associateLenses";
16
16
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
17
17
  let body;
18
- body = JSON.stringify({
19
- ...(input.LensAliases != null && { LensAliases: se_LensAliases(input.LensAliases, context) }),
20
- });
18
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
19
+ LensAliases: (_) => (0, smithy_client_1._json)(_),
20
+ }));
21
21
  return new protocol_http_1.HttpRequest({
22
22
  protocol,
23
23
  hostname,
@@ -37,10 +37,10 @@ const se_CreateLensShareCommand = async (input, context) => {
37
37
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
38
38
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
39
39
  let body;
40
- body = JSON.stringify({
41
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
42
- ...(input.SharedWith != null && { SharedWith: input.SharedWith }),
43
- });
40
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
41
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
42
+ SharedWith: [],
43
+ }));
44
44
  return new protocol_http_1.HttpRequest({
45
45
  protocol,
46
46
  hostname,
@@ -60,11 +60,11 @@ const se_CreateLensVersionCommand = async (input, context) => {
60
60
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versions";
61
61
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
62
62
  let body;
63
- body = JSON.stringify({
64
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
65
- ...(input.IsMajorVersion != null && { IsMajorVersion: input.IsMajorVersion }),
66
- ...(input.LensVersion != null && { LensVersion: input.LensVersion }),
67
- });
63
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
64
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
65
+ IsMajorVersion: [],
66
+ LensVersion: [],
67
+ }));
68
68
  return new protocol_http_1.HttpRequest({
69
69
  protocol,
70
70
  hostname,
@@ -84,10 +84,10 @@ const se_CreateMilestoneCommand = async (input, context) => {
84
84
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/milestones";
85
85
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
86
86
  let body;
87
- body = JSON.stringify({
88
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
89
- ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }),
90
- });
87
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
88
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
89
+ MilestoneName: [],
90
+ }));
91
91
  return new protocol_http_1.HttpRequest({
92
92
  protocol,
93
93
  hostname,
@@ -106,29 +106,25 @@ const se_CreateWorkloadCommand = async (input, context) => {
106
106
  };
107
107
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads";
108
108
  let body;
109
- body = JSON.stringify({
110
- ...(input.AccountIds != null && { AccountIds: se_WorkloadAccountIds(input.AccountIds, context) }),
111
- ...(input.Applications != null && { Applications: se_WorkloadApplications(input.Applications, context) }),
112
- ...(input.ArchitecturalDesign != null && { ArchitecturalDesign: input.ArchitecturalDesign }),
113
- ...(input.AwsRegions != null && { AwsRegions: se_WorkloadAwsRegions(input.AwsRegions, context) }),
114
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
115
- ...(input.Description != null && { Description: input.Description }),
116
- ...(input.DiscoveryConfig != null && {
117
- DiscoveryConfig: se_WorkloadDiscoveryConfig(input.DiscoveryConfig, context),
118
- }),
119
- ...(input.Environment != null && { Environment: input.Environment }),
120
- ...(input.Industry != null && { Industry: input.Industry }),
121
- ...(input.IndustryType != null && { IndustryType: input.IndustryType }),
122
- ...(input.Lenses != null && { Lenses: se_WorkloadLenses(input.Lenses, context) }),
123
- ...(input.NonAwsRegions != null && { NonAwsRegions: se_WorkloadNonAwsRegions(input.NonAwsRegions, context) }),
124
- ...(input.Notes != null && { Notes: input.Notes }),
125
- ...(input.PillarPriorities != null && {
126
- PillarPriorities: se_WorkloadPillarPriorities(input.PillarPriorities, context),
127
- }),
128
- ...(input.ReviewOwner != null && { ReviewOwner: input.ReviewOwner }),
129
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
130
- ...(input.WorkloadName != null && { WorkloadName: input.WorkloadName }),
131
- });
109
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
110
+ AccountIds: (_) => (0, smithy_client_1._json)(_),
111
+ Applications: (_) => (0, smithy_client_1._json)(_),
112
+ ArchitecturalDesign: [],
113
+ AwsRegions: (_) => (0, smithy_client_1._json)(_),
114
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
115
+ Description: [],
116
+ DiscoveryConfig: (_) => (0, smithy_client_1._json)(_),
117
+ Environment: [],
118
+ Industry: [],
119
+ IndustryType: [],
120
+ Lenses: (_) => (0, smithy_client_1._json)(_),
121
+ NonAwsRegions: (_) => (0, smithy_client_1._json)(_),
122
+ Notes: [],
123
+ PillarPriorities: (_) => (0, smithy_client_1._json)(_),
124
+ ReviewOwner: [],
125
+ Tags: (_) => (0, smithy_client_1._json)(_),
126
+ WorkloadName: [],
127
+ }));
132
128
  return new protocol_http_1.HttpRequest({
133
129
  protocol,
134
130
  hostname,
@@ -148,11 +144,11 @@ const se_CreateWorkloadShareCommand = async (input, context) => {
148
144
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
149
145
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
150
146
  let body;
151
- body = JSON.stringify({
152
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
153
- ...(input.PermissionType != null && { PermissionType: input.PermissionType }),
154
- ...(input.SharedWith != null && { SharedWith: input.SharedWith }),
155
- });
147
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
148
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
149
+ PermissionType: [],
150
+ SharedWith: [],
151
+ }));
156
152
  return new protocol_http_1.HttpRequest({
157
153
  protocol,
158
154
  hostname,
@@ -169,7 +165,7 @@ const se_DeleteLensCommand = async (input, context) => {
169
165
  const headers = {};
170
166
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
171
167
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
172
- const query = map({
168
+ const query = (0, smithy_client_1.map)({
173
169
  ClientRequestToken: [, (0, smithy_client_1.expectNonNull)(input.ClientRequestToken, `ClientRequestToken`)],
174
170
  LensStatus: [, (0, smithy_client_1.expectNonNull)(input.LensStatus, `LensStatus`)],
175
171
  });
@@ -192,7 +188,7 @@ const se_DeleteLensShareCommand = async (input, context) => {
192
188
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares/{ShareId}";
193
189
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
194
190
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
195
- const query = map({
191
+ const query = (0, smithy_client_1.map)({
196
192
  ClientRequestToken: [, (0, smithy_client_1.expectNonNull)(input.ClientRequestToken, `ClientRequestToken`)],
197
193
  });
198
194
  let body;
@@ -213,7 +209,7 @@ const se_DeleteWorkloadCommand = async (input, context) => {
213
209
  const headers = {};
214
210
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
215
211
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
216
- const query = map({
212
+ const query = (0, smithy_client_1.map)({
217
213
  ClientRequestToken: [, (0, smithy_client_1.expectNonNull)(input.ClientRequestToken, `ClientRequestToken`)],
218
214
  });
219
215
  let body;
@@ -235,7 +231,7 @@ const se_DeleteWorkloadShareCommand = async (input, context) => {
235
231
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares/{ShareId}";
236
232
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
237
233
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
238
- const query = map({
234
+ const query = (0, smithy_client_1.map)({
239
235
  ClientRequestToken: [, (0, smithy_client_1.expectNonNull)(input.ClientRequestToken, `ClientRequestToken`)],
240
236
  });
241
237
  let body;
@@ -260,9 +256,9 @@ const se_DisassociateLensesCommand = async (input, context) => {
260
256
  "/workloads/{WorkloadId}/disassociateLenses";
261
257
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
262
258
  let body;
263
- body = JSON.stringify({
264
- ...(input.LensAliases != null && { LensAliases: se_LensAliases(input.LensAliases, context) }),
265
- });
259
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
260
+ LensAliases: (_) => (0, smithy_client_1._json)(_),
261
+ }));
266
262
  return new protocol_http_1.HttpRequest({
267
263
  protocol,
268
264
  hostname,
@@ -279,7 +275,7 @@ const se_ExportLensCommand = async (input, context) => {
279
275
  const headers = {};
280
276
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/export";
281
277
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
282
- const query = map({
278
+ const query = (0, smithy_client_1.map)({
283
279
  LensVersion: [, input.LensVersion],
284
280
  });
285
281
  let body;
@@ -303,7 +299,7 @@ const se_GetAnswerCommand = async (input, context) => {
303
299
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
304
300
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
305
301
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QuestionId", () => input.QuestionId, "{QuestionId}", false);
306
- const query = map({
302
+ const query = (0, smithy_client_1.map)({
307
303
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
308
304
  });
309
305
  let body;
@@ -323,7 +319,7 @@ const se_GetConsolidatedReportCommand = async (input, context) => {
323
319
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
324
320
  const headers = {};
325
321
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/consolidatedReport";
326
- const query = map({
322
+ const query = (0, smithy_client_1.map)({
327
323
  Format: [, (0, smithy_client_1.expectNonNull)(input.Format, `Format`)],
328
324
  IncludeSharedResources: [
329
325
  () => input.IncludeSharedResources !== void 0,
@@ -350,7 +346,7 @@ const se_GetLensCommand = async (input, context) => {
350
346
  const headers = {};
351
347
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
352
348
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
353
- const query = map({
349
+ const query = (0, smithy_client_1.map)({
354
350
  LensVersion: [, input.LensVersion],
355
351
  });
356
352
  let body;
@@ -373,7 +369,7 @@ const se_GetLensReviewCommand = async (input, context) => {
373
369
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}";
374
370
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
375
371
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
376
- const query = map({
372
+ const query = (0, smithy_client_1.map)({
377
373
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
378
374
  });
379
375
  let body;
@@ -396,7 +392,7 @@ const se_GetLensReviewReportCommand = async (input, context) => {
396
392
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/report";
397
393
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
398
394
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
399
- const query = map({
395
+ const query = (0, smithy_client_1.map)({
400
396
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
401
397
  });
402
398
  let body;
@@ -417,7 +413,7 @@ const se_GetLensVersionDifferenceCommand = async (input, context) => {
417
413
  const headers = {};
418
414
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versionDifference";
419
415
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
420
- const query = map({
416
+ const query = (0, smithy_client_1.map)({
421
417
  BaseLensVersion: [, input.BaseLensVersion],
422
418
  TargetLensVersion: [, input.TargetLensVersion],
423
419
  });
@@ -477,12 +473,12 @@ const se_ImportLensCommand = async (input, context) => {
477
473
  };
478
474
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importLens";
479
475
  let body;
480
- body = JSON.stringify({
481
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
482
- ...(input.JSONString != null && { JSONString: input.JSONString }),
483
- ...(input.LensAlias != null && { LensAlias: input.LensAlias }),
484
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
485
- });
476
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
477
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
478
+ JSONString: [],
479
+ LensAlias: [],
480
+ Tags: (_) => (0, smithy_client_1._json)(_),
481
+ }));
486
482
  return new protocol_http_1.HttpRequest({
487
483
  protocol,
488
484
  hostname,
@@ -501,7 +497,7 @@ const se_ListAnswersCommand = async (input, context) => {
501
497
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/answers";
502
498
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
503
499
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
504
- const query = map({
500
+ const query = (0, smithy_client_1.map)({
505
501
  PillarId: [, input.PillarId],
506
502
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
507
503
  NextToken: [, input.NextToken],
@@ -528,14 +524,14 @@ const se_ListCheckDetailsCommand = async (input, context) => {
528
524
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/checks";
529
525
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
530
526
  let body;
531
- body = JSON.stringify({
532
- ...(input.ChoiceId != null && { ChoiceId: input.ChoiceId }),
533
- ...(input.LensArn != null && { LensArn: input.LensArn }),
534
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
535
- ...(input.NextToken != null && { NextToken: input.NextToken }),
536
- ...(input.PillarId != null && { PillarId: input.PillarId }),
537
- ...(input.QuestionId != null && { QuestionId: input.QuestionId }),
538
- });
527
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
528
+ ChoiceId: [],
529
+ LensArn: [],
530
+ MaxResults: [],
531
+ NextToken: [],
532
+ PillarId: [],
533
+ QuestionId: [],
534
+ }));
539
535
  return new protocol_http_1.HttpRequest({
540
536
  protocol,
541
537
  hostname,
@@ -555,14 +551,14 @@ const se_ListCheckSummariesCommand = async (input, context) => {
555
551
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/checkSummaries";
556
552
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
557
553
  let body;
558
- body = JSON.stringify({
559
- ...(input.ChoiceId != null && { ChoiceId: input.ChoiceId }),
560
- ...(input.LensArn != null && { LensArn: input.LensArn }),
561
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
562
- ...(input.NextToken != null && { NextToken: input.NextToken }),
563
- ...(input.PillarId != null && { PillarId: input.PillarId }),
564
- ...(input.QuestionId != null && { QuestionId: input.QuestionId }),
565
- });
554
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
555
+ ChoiceId: [],
556
+ LensArn: [],
557
+ MaxResults: [],
558
+ NextToken: [],
559
+ PillarId: [],
560
+ QuestionId: [],
561
+ }));
566
562
  return new protocol_http_1.HttpRequest({
567
563
  protocol,
568
564
  hostname,
@@ -578,7 +574,7 @@ const se_ListLensesCommand = async (input, context) => {
578
574
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
579
575
  const headers = {};
580
576
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses";
581
- const query = map({
577
+ const query = (0, smithy_client_1.map)({
582
578
  NextToken: [, input.NextToken],
583
579
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
584
580
  LensType: [, input.LensType],
@@ -605,7 +601,7 @@ const se_ListLensReviewImprovementsCommand = async (input, context) => {
605
601
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/improvements";
606
602
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
607
603
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
608
- const query = map({
604
+ const query = (0, smithy_client_1.map)({
609
605
  PillarId: [, input.PillarId],
610
606
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
611
607
  NextToken: [, input.NextToken],
@@ -629,7 +625,7 @@ const se_ListLensReviewsCommand = async (input, context) => {
629
625
  const headers = {};
630
626
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/lensReviews";
631
627
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
632
- const query = map({
628
+ const query = (0, smithy_client_1.map)({
633
629
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
634
630
  NextToken: [, input.NextToken],
635
631
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -652,7 +648,7 @@ const se_ListLensSharesCommand = async (input, context) => {
652
648
  const headers = {};
653
649
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
654
650
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
655
- const query = map({
651
+ const query = (0, smithy_client_1.map)({
656
652
  SharedWithPrefix: [, input.SharedWithPrefix],
657
653
  NextToken: [, input.NextToken],
658
654
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -680,10 +676,10 @@ const se_ListMilestonesCommand = async (input, context) => {
680
676
  "/workloads/{WorkloadId}/milestonesSummaries";
681
677
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
682
678
  let body;
683
- body = JSON.stringify({
684
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
685
- ...(input.NextToken != null && { NextToken: input.NextToken }),
686
- });
679
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
680
+ MaxResults: [],
681
+ NextToken: [],
682
+ }));
687
683
  return new protocol_http_1.HttpRequest({
688
684
  protocol,
689
685
  hostname,
@@ -702,11 +698,11 @@ const se_ListNotificationsCommand = async (input, context) => {
702
698
  };
703
699
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/notifications";
704
700
  let body;
705
- body = JSON.stringify({
706
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
707
- ...(input.NextToken != null && { NextToken: input.NextToken }),
708
- ...(input.WorkloadId != null && { WorkloadId: input.WorkloadId }),
709
- });
701
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
702
+ MaxResults: [],
703
+ NextToken: [],
704
+ WorkloadId: [],
705
+ }));
710
706
  return new protocol_http_1.HttpRequest({
711
707
  protocol,
712
708
  hostname,
@@ -722,7 +718,7 @@ const se_ListShareInvitationsCommand = async (input, context) => {
722
718
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
723
719
  const headers = {};
724
720
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations";
725
- const query = map({
721
+ const query = (0, smithy_client_1.map)({
726
722
  WorkloadNamePrefix: [, input.WorkloadNamePrefix],
727
723
  LensNamePrefix: [, input.LensNamePrefix],
728
724
  ShareResourceType: [, input.ShareResourceType],
@@ -766,11 +762,11 @@ const se_ListWorkloadsCommand = async (input, context) => {
766
762
  };
767
763
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries";
768
764
  let body;
769
- body = JSON.stringify({
770
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
771
- ...(input.NextToken != null && { NextToken: input.NextToken }),
772
- ...(input.WorkloadNamePrefix != null && { WorkloadNamePrefix: input.WorkloadNamePrefix }),
773
- });
765
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
766
+ MaxResults: [],
767
+ NextToken: [],
768
+ WorkloadNamePrefix: [],
769
+ }));
774
770
  return new protocol_http_1.HttpRequest({
775
771
  protocol,
776
772
  hostname,
@@ -787,7 +783,7 @@ const se_ListWorkloadSharesCommand = async (input, context) => {
787
783
  const headers = {};
788
784
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
789
785
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
790
- const query = map({
786
+ const query = (0, smithy_client_1.map)({
791
787
  SharedWithPrefix: [, input.SharedWithPrefix],
792
788
  NextToken: [, input.NextToken],
793
789
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -814,9 +810,9 @@ const se_TagResourceCommand = async (input, context) => {
814
810
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
815
811
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn, "{WorkloadArn}", false);
816
812
  let body;
817
- body = JSON.stringify({
818
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
819
- });
813
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
814
+ Tags: (_) => (0, smithy_client_1._json)(_),
815
+ }));
820
816
  return new protocol_http_1.HttpRequest({
821
817
  protocol,
822
818
  hostname,
@@ -833,7 +829,7 @@ const se_UntagResourceCommand = async (input, context) => {
833
829
  const headers = {};
834
830
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
835
831
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn, "{WorkloadArn}", false);
836
- const query = map({
832
+ const query = (0, smithy_client_1.map)({
837
833
  tagKeys: [
838
834
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
839
835
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -863,13 +859,13 @@ const se_UpdateAnswerCommand = async (input, context) => {
863
859
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
864
860
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QuestionId", () => input.QuestionId, "{QuestionId}", false);
865
861
  let body;
866
- body = JSON.stringify({
867
- ...(input.ChoiceUpdates != null && { ChoiceUpdates: se_ChoiceUpdates(input.ChoiceUpdates, context) }),
868
- ...(input.IsApplicable != null && { IsApplicable: input.IsApplicable }),
869
- ...(input.Notes != null && { Notes: input.Notes }),
870
- ...(input.Reason != null && { Reason: input.Reason }),
871
- ...(input.SelectedChoices != null && { SelectedChoices: se_SelectedChoices(input.SelectedChoices, context) }),
872
- });
862
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
863
+ ChoiceUpdates: (_) => (0, smithy_client_1._json)(_),
864
+ IsApplicable: [],
865
+ Notes: [],
866
+ Reason: [],
867
+ SelectedChoices: (_) => (0, smithy_client_1._json)(_),
868
+ }));
873
869
  return new protocol_http_1.HttpRequest({
874
870
  protocol,
875
871
  hostname,
@@ -888,9 +884,9 @@ const se_UpdateGlobalSettingsCommand = async (input, context) => {
888
884
  };
889
885
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-settings";
890
886
  let body;
891
- body = JSON.stringify({
892
- ...(input.OrganizationSharingStatus != null && { OrganizationSharingStatus: input.OrganizationSharingStatus }),
893
- });
887
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
888
+ OrganizationSharingStatus: [],
889
+ }));
894
890
  return new protocol_http_1.HttpRequest({
895
891
  protocol,
896
892
  hostname,
@@ -912,10 +908,10 @@ const se_UpdateLensReviewCommand = async (input, context) => {
912
908
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
913
909
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
914
910
  let body;
915
- body = JSON.stringify({
916
- ...(input.LensNotes != null && { LensNotes: input.LensNotes }),
917
- ...(input.PillarNotes != null && { PillarNotes: se_PillarNotes(input.PillarNotes, context) }),
918
- });
911
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
912
+ LensNotes: [],
913
+ PillarNotes: (_) => (0, smithy_client_1._json)(_),
914
+ }));
919
915
  return new protocol_http_1.HttpRequest({
920
916
  protocol,
921
917
  hostname,
@@ -935,9 +931,9 @@ const se_UpdateShareInvitationCommand = async (input, context) => {
935
931
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations/{ShareInvitationId}";
936
932
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareInvitationId", () => input.ShareInvitationId, "{ShareInvitationId}", false);
937
933
  let body;
938
- body = JSON.stringify({
939
- ...(input.ShareInvitationAction != null && { ShareInvitationAction: input.ShareInvitationAction }),
940
- });
934
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
935
+ ShareInvitationAction: [],
936
+ }));
941
937
  return new protocol_http_1.HttpRequest({
942
938
  protocol,
943
939
  hostname,
@@ -957,30 +953,24 @@ const se_UpdateWorkloadCommand = async (input, context) => {
957
953
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
958
954
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
959
955
  let body;
960
- body = JSON.stringify({
961
- ...(input.AccountIds != null && { AccountIds: se_WorkloadAccountIds(input.AccountIds, context) }),
962
- ...(input.Applications != null && { Applications: se_WorkloadApplications(input.Applications, context) }),
963
- ...(input.ArchitecturalDesign != null && { ArchitecturalDesign: input.ArchitecturalDesign }),
964
- ...(input.AwsRegions != null && { AwsRegions: se_WorkloadAwsRegions(input.AwsRegions, context) }),
965
- ...(input.Description != null && { Description: input.Description }),
966
- ...(input.DiscoveryConfig != null && {
967
- DiscoveryConfig: se_WorkloadDiscoveryConfig(input.DiscoveryConfig, context),
968
- }),
969
- ...(input.Environment != null && { Environment: input.Environment }),
970
- ...(input.ImprovementStatus != null && { ImprovementStatus: input.ImprovementStatus }),
971
- ...(input.Industry != null && { Industry: input.Industry }),
972
- ...(input.IndustryType != null && { IndustryType: input.IndustryType }),
973
- ...(input.IsReviewOwnerUpdateAcknowledged != null && {
974
- IsReviewOwnerUpdateAcknowledged: input.IsReviewOwnerUpdateAcknowledged,
975
- }),
976
- ...(input.NonAwsRegions != null && { NonAwsRegions: se_WorkloadNonAwsRegions(input.NonAwsRegions, context) }),
977
- ...(input.Notes != null && { Notes: input.Notes }),
978
- ...(input.PillarPriorities != null && {
979
- PillarPriorities: se_WorkloadPillarPriorities(input.PillarPriorities, context),
980
- }),
981
- ...(input.ReviewOwner != null && { ReviewOwner: input.ReviewOwner }),
982
- ...(input.WorkloadName != null && { WorkloadName: input.WorkloadName }),
983
- });
956
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
957
+ AccountIds: (_) => (0, smithy_client_1._json)(_),
958
+ Applications: (_) => (0, smithy_client_1._json)(_),
959
+ ArchitecturalDesign: [],
960
+ AwsRegions: (_) => (0, smithy_client_1._json)(_),
961
+ Description: [],
962
+ DiscoveryConfig: (_) => (0, smithy_client_1._json)(_),
963
+ Environment: [],
964
+ ImprovementStatus: [],
965
+ Industry: [],
966
+ IndustryType: [],
967
+ IsReviewOwnerUpdateAcknowledged: [],
968
+ NonAwsRegions: (_) => (0, smithy_client_1._json)(_),
969
+ Notes: [],
970
+ PillarPriorities: (_) => (0, smithy_client_1._json)(_),
971
+ ReviewOwner: [],
972
+ WorkloadName: [],
973
+ }));
984
974
  return new protocol_http_1.HttpRequest({
985
975
  protocol,
986
976
  hostname,
@@ -1001,9 +991,9 @@ const se_UpdateWorkloadShareCommand = async (input, context) => {
1001
991
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
1002
992
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
1003
993
  let body;
1004
- body = JSON.stringify({
1005
- ...(input.PermissionType != null && { PermissionType: input.PermissionType }),
1006
- });
994
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
995
+ PermissionType: [],
996
+ }));
1007
997
  return new protocol_http_1.HttpRequest({
1008
998
  protocol,
1009
999
  hostname,
@@ -1025,10 +1015,10 @@ const se_UpgradeLensReviewCommand = async (input, context) => {
1025
1015
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
1026
1016
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
1027
1017
  let body;
1028
- body = JSON.stringify({
1029
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1030
- ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }),
1031
- });
1018
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1019
+ ClientRequestToken: [],
1020
+ MilestoneName: [],
1021
+ }));
1032
1022
  return new protocol_http_1.HttpRequest({
1033
1023
  protocol,
1034
1024
  hostname,
@@ -1044,7 +1034,7 @@ const de_AssociateLensesCommand = async (output, context) => {
1044
1034
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1045
1035
  return de_AssociateLensesCommandError(output, context);
1046
1036
  }
1047
- const contents = map({
1037
+ const contents = (0, smithy_client_1.map)({
1048
1038
  $metadata: deserializeMetadata(output),
1049
1039
  });
1050
1040
  await collectBody(output.body, context);
@@ -1078,10 +1068,9 @@ const de_AssociateLensesCommandError = async (output, context) => {
1078
1068
  throw await de_ValidationExceptionRes(parsedOutput, context);
1079
1069
  default:
1080
1070
  const parsedBody = parsedOutput.body;
1081
- (0, smithy_client_1.throwDefaultError)({
1071
+ return throwDefaultError({
1082
1072
  output,
1083
1073
  parsedBody,
1084
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1085
1074
  errorCode,
1086
1075
  });
1087
1076
  }
@@ -1090,13 +1079,14 @@ const de_CreateLensShareCommand = async (output, context) => {
1090
1079
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1091
1080
  return de_CreateLensShareCommandError(output, context);
1092
1081
  }
1093
- const contents = map({
1082
+ const contents = (0, smithy_client_1.map)({
1094
1083
  $metadata: deserializeMetadata(output),
1095
1084
  });
1096
1085
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1097
- if (data.ShareId != null) {
1098
- contents.ShareId = (0, smithy_client_1.expectString)(data.ShareId);
1099
- }
1086
+ const doc = (0, smithy_client_1.take)(data, {
1087
+ ShareId: smithy_client_1.expectString,
1088
+ });
1089
+ Object.assign(contents, doc);
1100
1090
  return contents;
1101
1091
  };
1102
1092
  exports.de_CreateLensShareCommand = de_CreateLensShareCommand;
@@ -1130,10 +1120,9 @@ const de_CreateLensShareCommandError = async (output, context) => {
1130
1120
  throw await de_ValidationExceptionRes(parsedOutput, context);
1131
1121
  default:
1132
1122
  const parsedBody = parsedOutput.body;
1133
- (0, smithy_client_1.throwDefaultError)({
1123
+ return throwDefaultError({
1134
1124
  output,
1135
1125
  parsedBody,
1136
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1137
1126
  errorCode,
1138
1127
  });
1139
1128
  }
@@ -1142,16 +1131,15 @@ const de_CreateLensVersionCommand = async (output, context) => {
1142
1131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1143
1132
  return de_CreateLensVersionCommandError(output, context);
1144
1133
  }
1145
- const contents = map({
1134
+ const contents = (0, smithy_client_1.map)({
1146
1135
  $metadata: deserializeMetadata(output),
1147
1136
  });
1148
1137
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1149
- if (data.LensArn != null) {
1150
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
1151
- }
1152
- if (data.LensVersion != null) {
1153
- contents.LensVersion = (0, smithy_client_1.expectString)(data.LensVersion);
1154
- }
1138
+ const doc = (0, smithy_client_1.take)(data, {
1139
+ LensArn: smithy_client_1.expectString,
1140
+ LensVersion: smithy_client_1.expectString,
1141
+ });
1142
+ Object.assign(contents, doc);
1155
1143
  return contents;
1156
1144
  };
1157
1145
  exports.de_CreateLensVersionCommand = de_CreateLensVersionCommand;
@@ -1185,10 +1173,9 @@ const de_CreateLensVersionCommandError = async (output, context) => {
1185
1173
  throw await de_ValidationExceptionRes(parsedOutput, context);
1186
1174
  default:
1187
1175
  const parsedBody = parsedOutput.body;
1188
- (0, smithy_client_1.throwDefaultError)({
1176
+ return throwDefaultError({
1189
1177
  output,
1190
1178
  parsedBody,
1191
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1192
1179
  errorCode,
1193
1180
  });
1194
1181
  }
@@ -1197,16 +1184,15 @@ const de_CreateMilestoneCommand = async (output, context) => {
1197
1184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1198
1185
  return de_CreateMilestoneCommandError(output, context);
1199
1186
  }
1200
- const contents = map({
1187
+ const contents = (0, smithy_client_1.map)({
1201
1188
  $metadata: deserializeMetadata(output),
1202
1189
  });
1203
1190
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1204
- if (data.MilestoneNumber != null) {
1205
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
1206
- }
1207
- if (data.WorkloadId != null) {
1208
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1209
- }
1191
+ const doc = (0, smithy_client_1.take)(data, {
1192
+ MilestoneNumber: smithy_client_1.expectInt32,
1193
+ WorkloadId: smithy_client_1.expectString,
1194
+ });
1195
+ Object.assign(contents, doc);
1210
1196
  return contents;
1211
1197
  };
1212
1198
  exports.de_CreateMilestoneCommand = de_CreateMilestoneCommand;
@@ -1240,10 +1226,9 @@ const de_CreateMilestoneCommandError = async (output, context) => {
1240
1226
  throw await de_ValidationExceptionRes(parsedOutput, context);
1241
1227
  default:
1242
1228
  const parsedBody = parsedOutput.body;
1243
- (0, smithy_client_1.throwDefaultError)({
1229
+ return throwDefaultError({
1244
1230
  output,
1245
1231
  parsedBody,
1246
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1247
1232
  errorCode,
1248
1233
  });
1249
1234
  }
@@ -1252,16 +1237,15 @@ const de_CreateWorkloadCommand = async (output, context) => {
1252
1237
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1253
1238
  return de_CreateWorkloadCommandError(output, context);
1254
1239
  }
1255
- const contents = map({
1240
+ const contents = (0, smithy_client_1.map)({
1256
1241
  $metadata: deserializeMetadata(output),
1257
1242
  });
1258
1243
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1259
- if (data.WorkloadArn != null) {
1260
- contents.WorkloadArn = (0, smithy_client_1.expectString)(data.WorkloadArn);
1261
- }
1262
- if (data.WorkloadId != null) {
1263
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1264
- }
1244
+ const doc = (0, smithy_client_1.take)(data, {
1245
+ WorkloadArn: smithy_client_1.expectString,
1246
+ WorkloadId: smithy_client_1.expectString,
1247
+ });
1248
+ Object.assign(contents, doc);
1265
1249
  return contents;
1266
1250
  };
1267
1251
  exports.de_CreateWorkloadCommand = de_CreateWorkloadCommand;
@@ -1295,10 +1279,9 @@ const de_CreateWorkloadCommandError = async (output, context) => {
1295
1279
  throw await de_ValidationExceptionRes(parsedOutput, context);
1296
1280
  default:
1297
1281
  const parsedBody = parsedOutput.body;
1298
- (0, smithy_client_1.throwDefaultError)({
1282
+ return throwDefaultError({
1299
1283
  output,
1300
1284
  parsedBody,
1301
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1302
1285
  errorCode,
1303
1286
  });
1304
1287
  }
@@ -1307,16 +1290,15 @@ const de_CreateWorkloadShareCommand = async (output, context) => {
1307
1290
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1308
1291
  return de_CreateWorkloadShareCommandError(output, context);
1309
1292
  }
1310
- const contents = map({
1293
+ const contents = (0, smithy_client_1.map)({
1311
1294
  $metadata: deserializeMetadata(output),
1312
1295
  });
1313
1296
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1314
- if (data.ShareId != null) {
1315
- contents.ShareId = (0, smithy_client_1.expectString)(data.ShareId);
1316
- }
1317
- if (data.WorkloadId != null) {
1318
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1319
- }
1297
+ const doc = (0, smithy_client_1.take)(data, {
1298
+ ShareId: smithy_client_1.expectString,
1299
+ WorkloadId: smithy_client_1.expectString,
1300
+ });
1301
+ Object.assign(contents, doc);
1320
1302
  return contents;
1321
1303
  };
1322
1304
  exports.de_CreateWorkloadShareCommand = de_CreateWorkloadShareCommand;
@@ -1350,10 +1332,9 @@ const de_CreateWorkloadShareCommandError = async (output, context) => {
1350
1332
  throw await de_ValidationExceptionRes(parsedOutput, context);
1351
1333
  default:
1352
1334
  const parsedBody = parsedOutput.body;
1353
- (0, smithy_client_1.throwDefaultError)({
1335
+ return throwDefaultError({
1354
1336
  output,
1355
1337
  parsedBody,
1356
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1357
1338
  errorCode,
1358
1339
  });
1359
1340
  }
@@ -1362,7 +1343,7 @@ const de_DeleteLensCommand = async (output, context) => {
1362
1343
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1363
1344
  return de_DeleteLensCommandError(output, context);
1364
1345
  }
1365
- const contents = map({
1346
+ const contents = (0, smithy_client_1.map)({
1366
1347
  $metadata: deserializeMetadata(output),
1367
1348
  });
1368
1349
  await collectBody(output.body, context);
@@ -1396,10 +1377,9 @@ const de_DeleteLensCommandError = async (output, context) => {
1396
1377
  throw await de_ValidationExceptionRes(parsedOutput, context);
1397
1378
  default:
1398
1379
  const parsedBody = parsedOutput.body;
1399
- (0, smithy_client_1.throwDefaultError)({
1380
+ return throwDefaultError({
1400
1381
  output,
1401
1382
  parsedBody,
1402
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1403
1383
  errorCode,
1404
1384
  });
1405
1385
  }
@@ -1408,7 +1388,7 @@ const de_DeleteLensShareCommand = async (output, context) => {
1408
1388
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1409
1389
  return de_DeleteLensShareCommandError(output, context);
1410
1390
  }
1411
- const contents = map({
1391
+ const contents = (0, smithy_client_1.map)({
1412
1392
  $metadata: deserializeMetadata(output),
1413
1393
  });
1414
1394
  await collectBody(output.body, context);
@@ -1442,10 +1422,9 @@ const de_DeleteLensShareCommandError = async (output, context) => {
1442
1422
  throw await de_ValidationExceptionRes(parsedOutput, context);
1443
1423
  default:
1444
1424
  const parsedBody = parsedOutput.body;
1445
- (0, smithy_client_1.throwDefaultError)({
1425
+ return throwDefaultError({
1446
1426
  output,
1447
1427
  parsedBody,
1448
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1449
1428
  errorCode,
1450
1429
  });
1451
1430
  }
@@ -1454,7 +1433,7 @@ const de_DeleteWorkloadCommand = async (output, context) => {
1454
1433
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1455
1434
  return de_DeleteWorkloadCommandError(output, context);
1456
1435
  }
1457
- const contents = map({
1436
+ const contents = (0, smithy_client_1.map)({
1458
1437
  $metadata: deserializeMetadata(output),
1459
1438
  });
1460
1439
  await collectBody(output.body, context);
@@ -1488,10 +1467,9 @@ const de_DeleteWorkloadCommandError = async (output, context) => {
1488
1467
  throw await de_ValidationExceptionRes(parsedOutput, context);
1489
1468
  default:
1490
1469
  const parsedBody = parsedOutput.body;
1491
- (0, smithy_client_1.throwDefaultError)({
1470
+ return throwDefaultError({
1492
1471
  output,
1493
1472
  parsedBody,
1494
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1495
1473
  errorCode,
1496
1474
  });
1497
1475
  }
@@ -1500,7 +1478,7 @@ const de_DeleteWorkloadShareCommand = async (output, context) => {
1500
1478
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1501
1479
  return de_DeleteWorkloadShareCommandError(output, context);
1502
1480
  }
1503
- const contents = map({
1481
+ const contents = (0, smithy_client_1.map)({
1504
1482
  $metadata: deserializeMetadata(output),
1505
1483
  });
1506
1484
  await collectBody(output.body, context);
@@ -1534,10 +1512,9 @@ const de_DeleteWorkloadShareCommandError = async (output, context) => {
1534
1512
  throw await de_ValidationExceptionRes(parsedOutput, context);
1535
1513
  default:
1536
1514
  const parsedBody = parsedOutput.body;
1537
- (0, smithy_client_1.throwDefaultError)({
1515
+ return throwDefaultError({
1538
1516
  output,
1539
1517
  parsedBody,
1540
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1541
1518
  errorCode,
1542
1519
  });
1543
1520
  }
@@ -1546,7 +1523,7 @@ const de_DisassociateLensesCommand = async (output, context) => {
1546
1523
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1547
1524
  return de_DisassociateLensesCommandError(output, context);
1548
1525
  }
1549
- const contents = map({
1526
+ const contents = (0, smithy_client_1.map)({
1550
1527
  $metadata: deserializeMetadata(output),
1551
1528
  });
1552
1529
  await collectBody(output.body, context);
@@ -1580,10 +1557,9 @@ const de_DisassociateLensesCommandError = async (output, context) => {
1580
1557
  throw await de_ValidationExceptionRes(parsedOutput, context);
1581
1558
  default:
1582
1559
  const parsedBody = parsedOutput.body;
1583
- (0, smithy_client_1.throwDefaultError)({
1560
+ return throwDefaultError({
1584
1561
  output,
1585
1562
  parsedBody,
1586
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1587
1563
  errorCode,
1588
1564
  });
1589
1565
  }
@@ -1592,13 +1568,14 @@ const de_ExportLensCommand = async (output, context) => {
1592
1568
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1593
1569
  return de_ExportLensCommandError(output, context);
1594
1570
  }
1595
- const contents = map({
1571
+ const contents = (0, smithy_client_1.map)({
1596
1572
  $metadata: deserializeMetadata(output),
1597
1573
  });
1598
1574
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1599
- if (data.LensJSON != null) {
1600
- contents.LensJSON = (0, smithy_client_1.expectString)(data.LensJSON);
1601
- }
1575
+ const doc = (0, smithy_client_1.take)(data, {
1576
+ LensJSON: smithy_client_1.expectString,
1577
+ });
1578
+ Object.assign(contents, doc);
1602
1579
  return contents;
1603
1580
  };
1604
1581
  exports.de_ExportLensCommand = de_ExportLensCommand;
@@ -1626,10 +1603,9 @@ const de_ExportLensCommandError = async (output, context) => {
1626
1603
  throw await de_ValidationExceptionRes(parsedOutput, context);
1627
1604
  default:
1628
1605
  const parsedBody = parsedOutput.body;
1629
- (0, smithy_client_1.throwDefaultError)({
1606
+ return throwDefaultError({
1630
1607
  output,
1631
1608
  parsedBody,
1632
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1633
1609
  errorCode,
1634
1610
  });
1635
1611
  }
@@ -1638,25 +1614,18 @@ const de_GetAnswerCommand = async (output, context) => {
1638
1614
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1639
1615
  return de_GetAnswerCommandError(output, context);
1640
1616
  }
1641
- const contents = map({
1617
+ const contents = (0, smithy_client_1.map)({
1642
1618
  $metadata: deserializeMetadata(output),
1643
1619
  });
1644
1620
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1645
- if (data.Answer != null) {
1646
- contents.Answer = de_Answer(data.Answer, context);
1647
- }
1648
- if (data.LensAlias != null) {
1649
- contents.LensAlias = (0, smithy_client_1.expectString)(data.LensAlias);
1650
- }
1651
- if (data.LensArn != null) {
1652
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
1653
- }
1654
- if (data.MilestoneNumber != null) {
1655
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
1656
- }
1657
- if (data.WorkloadId != null) {
1658
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1659
- }
1621
+ const doc = (0, smithy_client_1.take)(data, {
1622
+ Answer: smithy_client_1._json,
1623
+ LensAlias: smithy_client_1.expectString,
1624
+ LensArn: smithy_client_1.expectString,
1625
+ MilestoneNumber: smithy_client_1.expectInt32,
1626
+ WorkloadId: smithy_client_1.expectString,
1627
+ });
1628
+ Object.assign(contents, doc);
1660
1629
  return contents;
1661
1630
  };
1662
1631
  exports.de_GetAnswerCommand = de_GetAnswerCommand;
@@ -1684,10 +1653,9 @@ const de_GetAnswerCommandError = async (output, context) => {
1684
1653
  throw await de_ValidationExceptionRes(parsedOutput, context);
1685
1654
  default:
1686
1655
  const parsedBody = parsedOutput.body;
1687
- (0, smithy_client_1.throwDefaultError)({
1656
+ return throwDefaultError({
1688
1657
  output,
1689
1658
  parsedBody,
1690
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1691
1659
  errorCode,
1692
1660
  });
1693
1661
  }
@@ -1696,19 +1664,16 @@ const de_GetConsolidatedReportCommand = async (output, context) => {
1696
1664
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1697
1665
  return de_GetConsolidatedReportCommandError(output, context);
1698
1666
  }
1699
- const contents = map({
1667
+ const contents = (0, smithy_client_1.map)({
1700
1668
  $metadata: deserializeMetadata(output),
1701
1669
  });
1702
1670
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1703
- if (data.Base64String != null) {
1704
- contents.Base64String = (0, smithy_client_1.expectString)(data.Base64String);
1705
- }
1706
- if (data.Metrics != null) {
1707
- contents.Metrics = de_ConsolidatedReportMetrics(data.Metrics, context);
1708
- }
1709
- if (data.NextToken != null) {
1710
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1711
- }
1671
+ const doc = (0, smithy_client_1.take)(data, {
1672
+ Base64String: smithy_client_1.expectString,
1673
+ Metrics: (_) => de_ConsolidatedReportMetrics(_, context),
1674
+ NextToken: smithy_client_1.expectString,
1675
+ });
1676
+ Object.assign(contents, doc);
1712
1677
  return contents;
1713
1678
  };
1714
1679
  exports.de_GetConsolidatedReportCommand = de_GetConsolidatedReportCommand;
@@ -1736,10 +1701,9 @@ const de_GetConsolidatedReportCommandError = async (output, context) => {
1736
1701
  throw await de_ValidationExceptionRes(parsedOutput, context);
1737
1702
  default:
1738
1703
  const parsedBody = parsedOutput.body;
1739
- (0, smithy_client_1.throwDefaultError)({
1704
+ return throwDefaultError({
1740
1705
  output,
1741
1706
  parsedBody,
1742
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1743
1707
  errorCode,
1744
1708
  });
1745
1709
  }
@@ -1748,13 +1712,14 @@ const de_GetLensCommand = async (output, context) => {
1748
1712
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1749
1713
  return de_GetLensCommandError(output, context);
1750
1714
  }
1751
- const contents = map({
1715
+ const contents = (0, smithy_client_1.map)({
1752
1716
  $metadata: deserializeMetadata(output),
1753
1717
  });
1754
1718
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1755
- if (data.Lens != null) {
1756
- contents.Lens = de_Lens(data.Lens, context);
1757
- }
1719
+ const doc = (0, smithy_client_1.take)(data, {
1720
+ Lens: smithy_client_1._json,
1721
+ });
1722
+ Object.assign(contents, doc);
1758
1723
  return contents;
1759
1724
  };
1760
1725
  exports.de_GetLensCommand = de_GetLensCommand;
@@ -1782,10 +1747,9 @@ const de_GetLensCommandError = async (output, context) => {
1782
1747
  throw await de_ValidationExceptionRes(parsedOutput, context);
1783
1748
  default:
1784
1749
  const parsedBody = parsedOutput.body;
1785
- (0, smithy_client_1.throwDefaultError)({
1750
+ return throwDefaultError({
1786
1751
  output,
1787
1752
  parsedBody,
1788
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1789
1753
  errorCode,
1790
1754
  });
1791
1755
  }
@@ -1794,19 +1758,16 @@ const de_GetLensReviewCommand = async (output, context) => {
1794
1758
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1795
1759
  return de_GetLensReviewCommandError(output, context);
1796
1760
  }
1797
- const contents = map({
1761
+ const contents = (0, smithy_client_1.map)({
1798
1762
  $metadata: deserializeMetadata(output),
1799
1763
  });
1800
1764
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1801
- if (data.LensReview != null) {
1802
- contents.LensReview = de_LensReview(data.LensReview, context);
1803
- }
1804
- if (data.MilestoneNumber != null) {
1805
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
1806
- }
1807
- if (data.WorkloadId != null) {
1808
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1809
- }
1765
+ const doc = (0, smithy_client_1.take)(data, {
1766
+ LensReview: (_) => de_LensReview(_, context),
1767
+ MilestoneNumber: smithy_client_1.expectInt32,
1768
+ WorkloadId: smithy_client_1.expectString,
1769
+ });
1770
+ Object.assign(contents, doc);
1810
1771
  return contents;
1811
1772
  };
1812
1773
  exports.de_GetLensReviewCommand = de_GetLensReviewCommand;
@@ -1834,10 +1795,9 @@ const de_GetLensReviewCommandError = async (output, context) => {
1834
1795
  throw await de_ValidationExceptionRes(parsedOutput, context);
1835
1796
  default:
1836
1797
  const parsedBody = parsedOutput.body;
1837
- (0, smithy_client_1.throwDefaultError)({
1798
+ return throwDefaultError({
1838
1799
  output,
1839
1800
  parsedBody,
1840
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1841
1801
  errorCode,
1842
1802
  });
1843
1803
  }
@@ -1846,19 +1806,16 @@ const de_GetLensReviewReportCommand = async (output, context) => {
1846
1806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1847
1807
  return de_GetLensReviewReportCommandError(output, context);
1848
1808
  }
1849
- const contents = map({
1809
+ const contents = (0, smithy_client_1.map)({
1850
1810
  $metadata: deserializeMetadata(output),
1851
1811
  });
1852
1812
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1853
- if (data.LensReviewReport != null) {
1854
- contents.LensReviewReport = de_LensReviewReport(data.LensReviewReport, context);
1855
- }
1856
- if (data.MilestoneNumber != null) {
1857
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
1858
- }
1859
- if (data.WorkloadId != null) {
1860
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1861
- }
1813
+ const doc = (0, smithy_client_1.take)(data, {
1814
+ LensReviewReport: smithy_client_1._json,
1815
+ MilestoneNumber: smithy_client_1.expectInt32,
1816
+ WorkloadId: smithy_client_1.expectString,
1817
+ });
1818
+ Object.assign(contents, doc);
1862
1819
  return contents;
1863
1820
  };
1864
1821
  exports.de_GetLensReviewReportCommand = de_GetLensReviewReportCommand;
@@ -1886,10 +1843,9 @@ const de_GetLensReviewReportCommandError = async (output, context) => {
1886
1843
  throw await de_ValidationExceptionRes(parsedOutput, context);
1887
1844
  default:
1888
1845
  const parsedBody = parsedOutput.body;
1889
- (0, smithy_client_1.throwDefaultError)({
1846
+ return throwDefaultError({
1890
1847
  output,
1891
1848
  parsedBody,
1892
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1893
1849
  errorCode,
1894
1850
  });
1895
1851
  }
@@ -1898,28 +1854,19 @@ const de_GetLensVersionDifferenceCommand = async (output, context) => {
1898
1854
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1899
1855
  return de_GetLensVersionDifferenceCommandError(output, context);
1900
1856
  }
1901
- const contents = map({
1857
+ const contents = (0, smithy_client_1.map)({
1902
1858
  $metadata: deserializeMetadata(output),
1903
1859
  });
1904
1860
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1905
- if (data.BaseLensVersion != null) {
1906
- contents.BaseLensVersion = (0, smithy_client_1.expectString)(data.BaseLensVersion);
1907
- }
1908
- if (data.LatestLensVersion != null) {
1909
- contents.LatestLensVersion = (0, smithy_client_1.expectString)(data.LatestLensVersion);
1910
- }
1911
- if (data.LensAlias != null) {
1912
- contents.LensAlias = (0, smithy_client_1.expectString)(data.LensAlias);
1913
- }
1914
- if (data.LensArn != null) {
1915
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
1916
- }
1917
- if (data.TargetLensVersion != null) {
1918
- contents.TargetLensVersion = (0, smithy_client_1.expectString)(data.TargetLensVersion);
1919
- }
1920
- if (data.VersionDifferences != null) {
1921
- contents.VersionDifferences = de_VersionDifferences(data.VersionDifferences, context);
1922
- }
1861
+ const doc = (0, smithy_client_1.take)(data, {
1862
+ BaseLensVersion: smithy_client_1.expectString,
1863
+ LatestLensVersion: smithy_client_1.expectString,
1864
+ LensAlias: smithy_client_1.expectString,
1865
+ LensArn: smithy_client_1.expectString,
1866
+ TargetLensVersion: smithy_client_1.expectString,
1867
+ VersionDifferences: smithy_client_1._json,
1868
+ });
1869
+ Object.assign(contents, doc);
1923
1870
  return contents;
1924
1871
  };
1925
1872
  exports.de_GetLensVersionDifferenceCommand = de_GetLensVersionDifferenceCommand;
@@ -1947,10 +1894,9 @@ const de_GetLensVersionDifferenceCommandError = async (output, context) => {
1947
1894
  throw await de_ValidationExceptionRes(parsedOutput, context);
1948
1895
  default:
1949
1896
  const parsedBody = parsedOutput.body;
1950
- (0, smithy_client_1.throwDefaultError)({
1897
+ return throwDefaultError({
1951
1898
  output,
1952
1899
  parsedBody,
1953
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
1954
1900
  errorCode,
1955
1901
  });
1956
1902
  }
@@ -1959,16 +1905,15 @@ const de_GetMilestoneCommand = async (output, context) => {
1959
1905
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1960
1906
  return de_GetMilestoneCommandError(output, context);
1961
1907
  }
1962
- const contents = map({
1908
+ const contents = (0, smithy_client_1.map)({
1963
1909
  $metadata: deserializeMetadata(output),
1964
1910
  });
1965
1911
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1966
- if (data.Milestone != null) {
1967
- contents.Milestone = de_Milestone(data.Milestone, context);
1968
- }
1969
- if (data.WorkloadId != null) {
1970
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
1971
- }
1912
+ const doc = (0, smithy_client_1.take)(data, {
1913
+ Milestone: (_) => de_Milestone(_, context),
1914
+ WorkloadId: smithy_client_1.expectString,
1915
+ });
1916
+ Object.assign(contents, doc);
1972
1917
  return contents;
1973
1918
  };
1974
1919
  exports.de_GetMilestoneCommand = de_GetMilestoneCommand;
@@ -1996,10 +1941,9 @@ const de_GetMilestoneCommandError = async (output, context) => {
1996
1941
  throw await de_ValidationExceptionRes(parsedOutput, context);
1997
1942
  default:
1998
1943
  const parsedBody = parsedOutput.body;
1999
- (0, smithy_client_1.throwDefaultError)({
1944
+ return throwDefaultError({
2000
1945
  output,
2001
1946
  parsedBody,
2002
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2003
1947
  errorCode,
2004
1948
  });
2005
1949
  }
@@ -2008,13 +1952,14 @@ const de_GetWorkloadCommand = async (output, context) => {
2008
1952
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2009
1953
  return de_GetWorkloadCommandError(output, context);
2010
1954
  }
2011
- const contents = map({
1955
+ const contents = (0, smithy_client_1.map)({
2012
1956
  $metadata: deserializeMetadata(output),
2013
1957
  });
2014
1958
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2015
- if (data.Workload != null) {
2016
- contents.Workload = de_Workload(data.Workload, context);
2017
- }
1959
+ const doc = (0, smithy_client_1.take)(data, {
1960
+ Workload: (_) => de_Workload(_, context),
1961
+ });
1962
+ Object.assign(contents, doc);
2018
1963
  return contents;
2019
1964
  };
2020
1965
  exports.de_GetWorkloadCommand = de_GetWorkloadCommand;
@@ -2042,10 +1987,9 @@ const de_GetWorkloadCommandError = async (output, context) => {
2042
1987
  throw await de_ValidationExceptionRes(parsedOutput, context);
2043
1988
  default:
2044
1989
  const parsedBody = parsedOutput.body;
2045
- (0, smithy_client_1.throwDefaultError)({
1990
+ return throwDefaultError({
2046
1991
  output,
2047
1992
  parsedBody,
2048
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2049
1993
  errorCode,
2050
1994
  });
2051
1995
  }
@@ -2054,16 +1998,15 @@ const de_ImportLensCommand = async (output, context) => {
2054
1998
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2055
1999
  return de_ImportLensCommandError(output, context);
2056
2000
  }
2057
- const contents = map({
2001
+ const contents = (0, smithy_client_1.map)({
2058
2002
  $metadata: deserializeMetadata(output),
2059
2003
  });
2060
2004
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2061
- if (data.LensArn != null) {
2062
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
2063
- }
2064
- if (data.Status != null) {
2065
- contents.Status = (0, smithy_client_1.expectString)(data.Status);
2066
- }
2005
+ const doc = (0, smithy_client_1.take)(data, {
2006
+ LensArn: smithy_client_1.expectString,
2007
+ Status: smithy_client_1.expectString,
2008
+ });
2009
+ Object.assign(contents, doc);
2067
2010
  return contents;
2068
2011
  };
2069
2012
  exports.de_ImportLensCommand = de_ImportLensCommand;
@@ -2097,10 +2040,9 @@ const de_ImportLensCommandError = async (output, context) => {
2097
2040
  throw await de_ValidationExceptionRes(parsedOutput, context);
2098
2041
  default:
2099
2042
  const parsedBody = parsedOutput.body;
2100
- (0, smithy_client_1.throwDefaultError)({
2043
+ return throwDefaultError({
2101
2044
  output,
2102
2045
  parsedBody,
2103
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2104
2046
  errorCode,
2105
2047
  });
2106
2048
  }
@@ -2109,28 +2051,19 @@ const de_ListAnswersCommand = async (output, context) => {
2109
2051
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2110
2052
  return de_ListAnswersCommandError(output, context);
2111
2053
  }
2112
- const contents = map({
2054
+ const contents = (0, smithy_client_1.map)({
2113
2055
  $metadata: deserializeMetadata(output),
2114
2056
  });
2115
2057
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2116
- if (data.AnswerSummaries != null) {
2117
- contents.AnswerSummaries = de_AnswerSummaries(data.AnswerSummaries, context);
2118
- }
2119
- if (data.LensAlias != null) {
2120
- contents.LensAlias = (0, smithy_client_1.expectString)(data.LensAlias);
2121
- }
2122
- if (data.LensArn != null) {
2123
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
2124
- }
2125
- if (data.MilestoneNumber != null) {
2126
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
2127
- }
2128
- if (data.NextToken != null) {
2129
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2130
- }
2131
- if (data.WorkloadId != null) {
2132
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2133
- }
2058
+ const doc = (0, smithy_client_1.take)(data, {
2059
+ AnswerSummaries: smithy_client_1._json,
2060
+ LensAlias: smithy_client_1.expectString,
2061
+ LensArn: smithy_client_1.expectString,
2062
+ MilestoneNumber: smithy_client_1.expectInt32,
2063
+ NextToken: smithy_client_1.expectString,
2064
+ WorkloadId: smithy_client_1.expectString,
2065
+ });
2066
+ Object.assign(contents, doc);
2134
2067
  return contents;
2135
2068
  };
2136
2069
  exports.de_ListAnswersCommand = de_ListAnswersCommand;
@@ -2158,10 +2091,9 @@ const de_ListAnswersCommandError = async (output, context) => {
2158
2091
  throw await de_ValidationExceptionRes(parsedOutput, context);
2159
2092
  default:
2160
2093
  const parsedBody = parsedOutput.body;
2161
- (0, smithy_client_1.throwDefaultError)({
2094
+ return throwDefaultError({
2162
2095
  output,
2163
2096
  parsedBody,
2164
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2165
2097
  errorCode,
2166
2098
  });
2167
2099
  }
@@ -2170,16 +2102,15 @@ const de_ListCheckDetailsCommand = async (output, context) => {
2170
2102
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2171
2103
  return de_ListCheckDetailsCommandError(output, context);
2172
2104
  }
2173
- const contents = map({
2105
+ const contents = (0, smithy_client_1.map)({
2174
2106
  $metadata: deserializeMetadata(output),
2175
2107
  });
2176
2108
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2177
- if (data.CheckDetails != null) {
2178
- contents.CheckDetails = de_CheckDetails(data.CheckDetails, context);
2179
- }
2180
- if (data.NextToken != null) {
2181
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2182
- }
2109
+ const doc = (0, smithy_client_1.take)(data, {
2110
+ CheckDetails: (_) => de_CheckDetails(_, context),
2111
+ NextToken: smithy_client_1.expectString,
2112
+ });
2113
+ Object.assign(contents, doc);
2183
2114
  return contents;
2184
2115
  };
2185
2116
  exports.de_ListCheckDetailsCommand = de_ListCheckDetailsCommand;
@@ -2207,10 +2138,9 @@ const de_ListCheckDetailsCommandError = async (output, context) => {
2207
2138
  throw await de_ValidationExceptionRes(parsedOutput, context);
2208
2139
  default:
2209
2140
  const parsedBody = parsedOutput.body;
2210
- (0, smithy_client_1.throwDefaultError)({
2141
+ return throwDefaultError({
2211
2142
  output,
2212
2143
  parsedBody,
2213
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2214
2144
  errorCode,
2215
2145
  });
2216
2146
  }
@@ -2219,16 +2149,15 @@ const de_ListCheckSummariesCommand = async (output, context) => {
2219
2149
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2220
2150
  return de_ListCheckSummariesCommandError(output, context);
2221
2151
  }
2222
- const contents = map({
2152
+ const contents = (0, smithy_client_1.map)({
2223
2153
  $metadata: deserializeMetadata(output),
2224
2154
  });
2225
2155
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2226
- if (data.CheckSummaries != null) {
2227
- contents.CheckSummaries = de_CheckSummaries(data.CheckSummaries, context);
2228
- }
2229
- if (data.NextToken != null) {
2230
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2231
- }
2156
+ const doc = (0, smithy_client_1.take)(data, {
2157
+ CheckSummaries: (_) => de_CheckSummaries(_, context),
2158
+ NextToken: smithy_client_1.expectString,
2159
+ });
2160
+ Object.assign(contents, doc);
2232
2161
  return contents;
2233
2162
  };
2234
2163
  exports.de_ListCheckSummariesCommand = de_ListCheckSummariesCommand;
@@ -2256,10 +2185,9 @@ const de_ListCheckSummariesCommandError = async (output, context) => {
2256
2185
  throw await de_ValidationExceptionRes(parsedOutput, context);
2257
2186
  default:
2258
2187
  const parsedBody = parsedOutput.body;
2259
- (0, smithy_client_1.throwDefaultError)({
2188
+ return throwDefaultError({
2260
2189
  output,
2261
2190
  parsedBody,
2262
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2263
2191
  errorCode,
2264
2192
  });
2265
2193
  }
@@ -2268,16 +2196,15 @@ const de_ListLensesCommand = async (output, context) => {
2268
2196
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2269
2197
  return de_ListLensesCommandError(output, context);
2270
2198
  }
2271
- const contents = map({
2199
+ const contents = (0, smithy_client_1.map)({
2272
2200
  $metadata: deserializeMetadata(output),
2273
2201
  });
2274
2202
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2275
- if (data.LensSummaries != null) {
2276
- contents.LensSummaries = de_LensSummaries(data.LensSummaries, context);
2277
- }
2278
- if (data.NextToken != null) {
2279
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2280
- }
2203
+ const doc = (0, smithy_client_1.take)(data, {
2204
+ LensSummaries: (_) => de_LensSummaries(_, context),
2205
+ NextToken: smithy_client_1.expectString,
2206
+ });
2207
+ Object.assign(contents, doc);
2281
2208
  return contents;
2282
2209
  };
2283
2210
  exports.de_ListLensesCommand = de_ListLensesCommand;
@@ -2302,10 +2229,9 @@ const de_ListLensesCommandError = async (output, context) => {
2302
2229
  throw await de_ValidationExceptionRes(parsedOutput, context);
2303
2230
  default:
2304
2231
  const parsedBody = parsedOutput.body;
2305
- (0, smithy_client_1.throwDefaultError)({
2232
+ return throwDefaultError({
2306
2233
  output,
2307
2234
  parsedBody,
2308
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2309
2235
  errorCode,
2310
2236
  });
2311
2237
  }
@@ -2314,28 +2240,19 @@ const de_ListLensReviewImprovementsCommand = async (output, context) => {
2314
2240
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2315
2241
  return de_ListLensReviewImprovementsCommandError(output, context);
2316
2242
  }
2317
- const contents = map({
2243
+ const contents = (0, smithy_client_1.map)({
2318
2244
  $metadata: deserializeMetadata(output),
2319
2245
  });
2320
2246
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2321
- if (data.ImprovementSummaries != null) {
2322
- contents.ImprovementSummaries = de_ImprovementSummaries(data.ImprovementSummaries, context);
2323
- }
2324
- if (data.LensAlias != null) {
2325
- contents.LensAlias = (0, smithy_client_1.expectString)(data.LensAlias);
2326
- }
2327
- if (data.LensArn != null) {
2328
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
2329
- }
2330
- if (data.MilestoneNumber != null) {
2331
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
2332
- }
2333
- if (data.NextToken != null) {
2334
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2335
- }
2336
- if (data.WorkloadId != null) {
2337
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2338
- }
2247
+ const doc = (0, smithy_client_1.take)(data, {
2248
+ ImprovementSummaries: smithy_client_1._json,
2249
+ LensAlias: smithy_client_1.expectString,
2250
+ LensArn: smithy_client_1.expectString,
2251
+ MilestoneNumber: smithy_client_1.expectInt32,
2252
+ NextToken: smithy_client_1.expectString,
2253
+ WorkloadId: smithy_client_1.expectString,
2254
+ });
2255
+ Object.assign(contents, doc);
2339
2256
  return contents;
2340
2257
  };
2341
2258
  exports.de_ListLensReviewImprovementsCommand = de_ListLensReviewImprovementsCommand;
@@ -2363,10 +2280,9 @@ const de_ListLensReviewImprovementsCommandError = async (output, context) => {
2363
2280
  throw await de_ValidationExceptionRes(parsedOutput, context);
2364
2281
  default:
2365
2282
  const parsedBody = parsedOutput.body;
2366
- (0, smithy_client_1.throwDefaultError)({
2283
+ return throwDefaultError({
2367
2284
  output,
2368
2285
  parsedBody,
2369
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2370
2286
  errorCode,
2371
2287
  });
2372
2288
  }
@@ -2375,22 +2291,17 @@ const de_ListLensReviewsCommand = async (output, context) => {
2375
2291
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2376
2292
  return de_ListLensReviewsCommandError(output, context);
2377
2293
  }
2378
- const contents = map({
2294
+ const contents = (0, smithy_client_1.map)({
2379
2295
  $metadata: deserializeMetadata(output),
2380
2296
  });
2381
2297
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2382
- if (data.LensReviewSummaries != null) {
2383
- contents.LensReviewSummaries = de_LensReviewSummaries(data.LensReviewSummaries, context);
2384
- }
2385
- if (data.MilestoneNumber != null) {
2386
- contents.MilestoneNumber = (0, smithy_client_1.expectInt32)(data.MilestoneNumber);
2387
- }
2388
- if (data.NextToken != null) {
2389
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2390
- }
2391
- if (data.WorkloadId != null) {
2392
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2393
- }
2298
+ const doc = (0, smithy_client_1.take)(data, {
2299
+ LensReviewSummaries: (_) => de_LensReviewSummaries(_, context),
2300
+ MilestoneNumber: smithy_client_1.expectInt32,
2301
+ NextToken: smithy_client_1.expectString,
2302
+ WorkloadId: smithy_client_1.expectString,
2303
+ });
2304
+ Object.assign(contents, doc);
2394
2305
  return contents;
2395
2306
  };
2396
2307
  exports.de_ListLensReviewsCommand = de_ListLensReviewsCommand;
@@ -2418,10 +2329,9 @@ const de_ListLensReviewsCommandError = async (output, context) => {
2418
2329
  throw await de_ValidationExceptionRes(parsedOutput, context);
2419
2330
  default:
2420
2331
  const parsedBody = parsedOutput.body;
2421
- (0, smithy_client_1.throwDefaultError)({
2332
+ return throwDefaultError({
2422
2333
  output,
2423
2334
  parsedBody,
2424
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2425
2335
  errorCode,
2426
2336
  });
2427
2337
  }
@@ -2430,16 +2340,15 @@ const de_ListLensSharesCommand = async (output, context) => {
2430
2340
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2431
2341
  return de_ListLensSharesCommandError(output, context);
2432
2342
  }
2433
- const contents = map({
2343
+ const contents = (0, smithy_client_1.map)({
2434
2344
  $metadata: deserializeMetadata(output),
2435
2345
  });
2436
2346
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2437
- if (data.LensShareSummaries != null) {
2438
- contents.LensShareSummaries = de_LensShareSummaries(data.LensShareSummaries, context);
2439
- }
2440
- if (data.NextToken != null) {
2441
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2442
- }
2347
+ const doc = (0, smithy_client_1.take)(data, {
2348
+ LensShareSummaries: smithy_client_1._json,
2349
+ NextToken: smithy_client_1.expectString,
2350
+ });
2351
+ Object.assign(contents, doc);
2443
2352
  return contents;
2444
2353
  };
2445
2354
  exports.de_ListLensSharesCommand = de_ListLensSharesCommand;
@@ -2467,10 +2376,9 @@ const de_ListLensSharesCommandError = async (output, context) => {
2467
2376
  throw await de_ValidationExceptionRes(parsedOutput, context);
2468
2377
  default:
2469
2378
  const parsedBody = parsedOutput.body;
2470
- (0, smithy_client_1.throwDefaultError)({
2379
+ return throwDefaultError({
2471
2380
  output,
2472
2381
  parsedBody,
2473
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2474
2382
  errorCode,
2475
2383
  });
2476
2384
  }
@@ -2479,19 +2387,16 @@ const de_ListMilestonesCommand = async (output, context) => {
2479
2387
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2480
2388
  return de_ListMilestonesCommandError(output, context);
2481
2389
  }
2482
- const contents = map({
2390
+ const contents = (0, smithy_client_1.map)({
2483
2391
  $metadata: deserializeMetadata(output),
2484
2392
  });
2485
2393
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2486
- if (data.MilestoneSummaries != null) {
2487
- contents.MilestoneSummaries = de_MilestoneSummaries(data.MilestoneSummaries, context);
2488
- }
2489
- if (data.NextToken != null) {
2490
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2491
- }
2492
- if (data.WorkloadId != null) {
2493
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2494
- }
2394
+ const doc = (0, smithy_client_1.take)(data, {
2395
+ MilestoneSummaries: (_) => de_MilestoneSummaries(_, context),
2396
+ NextToken: smithy_client_1.expectString,
2397
+ WorkloadId: smithy_client_1.expectString,
2398
+ });
2399
+ Object.assign(contents, doc);
2495
2400
  return contents;
2496
2401
  };
2497
2402
  exports.de_ListMilestonesCommand = de_ListMilestonesCommand;
@@ -2519,10 +2424,9 @@ const de_ListMilestonesCommandError = async (output, context) => {
2519
2424
  throw await de_ValidationExceptionRes(parsedOutput, context);
2520
2425
  default:
2521
2426
  const parsedBody = parsedOutput.body;
2522
- (0, smithy_client_1.throwDefaultError)({
2427
+ return throwDefaultError({
2523
2428
  output,
2524
2429
  parsedBody,
2525
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2526
2430
  errorCode,
2527
2431
  });
2528
2432
  }
@@ -2531,16 +2435,15 @@ const de_ListNotificationsCommand = async (output, context) => {
2531
2435
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2532
2436
  return de_ListNotificationsCommandError(output, context);
2533
2437
  }
2534
- const contents = map({
2438
+ const contents = (0, smithy_client_1.map)({
2535
2439
  $metadata: deserializeMetadata(output),
2536
2440
  });
2537
2441
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2538
- if (data.NextToken != null) {
2539
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2540
- }
2541
- if (data.NotificationSummaries != null) {
2542
- contents.NotificationSummaries = de_NotificationSummaries(data.NotificationSummaries, context);
2543
- }
2442
+ const doc = (0, smithy_client_1.take)(data, {
2443
+ NextToken: smithy_client_1.expectString,
2444
+ NotificationSummaries: smithy_client_1._json,
2445
+ });
2446
+ Object.assign(contents, doc);
2544
2447
  return contents;
2545
2448
  };
2546
2449
  exports.de_ListNotificationsCommand = de_ListNotificationsCommand;
@@ -2565,10 +2468,9 @@ const de_ListNotificationsCommandError = async (output, context) => {
2565
2468
  throw await de_ValidationExceptionRes(parsedOutput, context);
2566
2469
  default:
2567
2470
  const parsedBody = parsedOutput.body;
2568
- (0, smithy_client_1.throwDefaultError)({
2471
+ return throwDefaultError({
2569
2472
  output,
2570
2473
  parsedBody,
2571
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2572
2474
  errorCode,
2573
2475
  });
2574
2476
  }
@@ -2577,16 +2479,15 @@ const de_ListShareInvitationsCommand = async (output, context) => {
2577
2479
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2578
2480
  return de_ListShareInvitationsCommandError(output, context);
2579
2481
  }
2580
- const contents = map({
2482
+ const contents = (0, smithy_client_1.map)({
2581
2483
  $metadata: deserializeMetadata(output),
2582
2484
  });
2583
2485
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2584
- if (data.NextToken != null) {
2585
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2586
- }
2587
- if (data.ShareInvitationSummaries != null) {
2588
- contents.ShareInvitationSummaries = de_ShareInvitationSummaries(data.ShareInvitationSummaries, context);
2589
- }
2486
+ const doc = (0, smithy_client_1.take)(data, {
2487
+ NextToken: smithy_client_1.expectString,
2488
+ ShareInvitationSummaries: smithy_client_1._json,
2489
+ });
2490
+ Object.assign(contents, doc);
2590
2491
  return contents;
2591
2492
  };
2592
2493
  exports.de_ListShareInvitationsCommand = de_ListShareInvitationsCommand;
@@ -2611,10 +2512,9 @@ const de_ListShareInvitationsCommandError = async (output, context) => {
2611
2512
  throw await de_ValidationExceptionRes(parsedOutput, context);
2612
2513
  default:
2613
2514
  const parsedBody = parsedOutput.body;
2614
- (0, smithy_client_1.throwDefaultError)({
2515
+ return throwDefaultError({
2615
2516
  output,
2616
2517
  parsedBody,
2617
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2618
2518
  errorCode,
2619
2519
  });
2620
2520
  }
@@ -2623,13 +2523,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2623
2523
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2624
2524
  return de_ListTagsForResourceCommandError(output, context);
2625
2525
  }
2626
- const contents = map({
2526
+ const contents = (0, smithy_client_1.map)({
2627
2527
  $metadata: deserializeMetadata(output),
2628
2528
  });
2629
2529
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2630
- if (data.Tags != null) {
2631
- contents.Tags = de_TagMap(data.Tags, context);
2632
- }
2530
+ const doc = (0, smithy_client_1.take)(data, {
2531
+ Tags: smithy_client_1._json,
2532
+ });
2533
+ Object.assign(contents, doc);
2633
2534
  return contents;
2634
2535
  };
2635
2536
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2648,10 +2549,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2648
2549
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2649
2550
  default:
2650
2551
  const parsedBody = parsedOutput.body;
2651
- (0, smithy_client_1.throwDefaultError)({
2552
+ return throwDefaultError({
2652
2553
  output,
2653
2554
  parsedBody,
2654
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2655
2555
  errorCode,
2656
2556
  });
2657
2557
  }
@@ -2660,16 +2560,15 @@ const de_ListWorkloadsCommand = async (output, context) => {
2660
2560
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2661
2561
  return de_ListWorkloadsCommandError(output, context);
2662
2562
  }
2663
- const contents = map({
2563
+ const contents = (0, smithy_client_1.map)({
2664
2564
  $metadata: deserializeMetadata(output),
2665
2565
  });
2666
2566
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2667
- if (data.NextToken != null) {
2668
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2669
- }
2670
- if (data.WorkloadSummaries != null) {
2671
- contents.WorkloadSummaries = de_WorkloadSummaries(data.WorkloadSummaries, context);
2672
- }
2567
+ const doc = (0, smithy_client_1.take)(data, {
2568
+ NextToken: smithy_client_1.expectString,
2569
+ WorkloadSummaries: (_) => de_WorkloadSummaries(_, context),
2570
+ });
2571
+ Object.assign(contents, doc);
2673
2572
  return contents;
2674
2573
  };
2675
2574
  exports.de_ListWorkloadsCommand = de_ListWorkloadsCommand;
@@ -2694,10 +2593,9 @@ const de_ListWorkloadsCommandError = async (output, context) => {
2694
2593
  throw await de_ValidationExceptionRes(parsedOutput, context);
2695
2594
  default:
2696
2595
  const parsedBody = parsedOutput.body;
2697
- (0, smithy_client_1.throwDefaultError)({
2596
+ return throwDefaultError({
2698
2597
  output,
2699
2598
  parsedBody,
2700
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2701
2599
  errorCode,
2702
2600
  });
2703
2601
  }
@@ -2706,19 +2604,16 @@ const de_ListWorkloadSharesCommand = async (output, context) => {
2706
2604
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2707
2605
  return de_ListWorkloadSharesCommandError(output, context);
2708
2606
  }
2709
- const contents = map({
2607
+ const contents = (0, smithy_client_1.map)({
2710
2608
  $metadata: deserializeMetadata(output),
2711
2609
  });
2712
2610
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2713
- if (data.NextToken != null) {
2714
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2715
- }
2716
- if (data.WorkloadId != null) {
2717
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2718
- }
2719
- if (data.WorkloadShareSummaries != null) {
2720
- contents.WorkloadShareSummaries = de_WorkloadShareSummaries(data.WorkloadShareSummaries, context);
2721
- }
2611
+ const doc = (0, smithy_client_1.take)(data, {
2612
+ NextToken: smithy_client_1.expectString,
2613
+ WorkloadId: smithy_client_1.expectString,
2614
+ WorkloadShareSummaries: smithy_client_1._json,
2615
+ });
2616
+ Object.assign(contents, doc);
2722
2617
  return contents;
2723
2618
  };
2724
2619
  exports.de_ListWorkloadSharesCommand = de_ListWorkloadSharesCommand;
@@ -2746,10 +2641,9 @@ const de_ListWorkloadSharesCommandError = async (output, context) => {
2746
2641
  throw await de_ValidationExceptionRes(parsedOutput, context);
2747
2642
  default:
2748
2643
  const parsedBody = parsedOutput.body;
2749
- (0, smithy_client_1.throwDefaultError)({
2644
+ return throwDefaultError({
2750
2645
  output,
2751
2646
  parsedBody,
2752
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2753
2647
  errorCode,
2754
2648
  });
2755
2649
  }
@@ -2758,7 +2652,7 @@ const de_TagResourceCommand = async (output, context) => {
2758
2652
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2759
2653
  return de_TagResourceCommandError(output, context);
2760
2654
  }
2761
- const contents = map({
2655
+ const contents = (0, smithy_client_1.map)({
2762
2656
  $metadata: deserializeMetadata(output),
2763
2657
  });
2764
2658
  await collectBody(output.body, context);
@@ -2780,10 +2674,9 @@ const de_TagResourceCommandError = async (output, context) => {
2780
2674
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2781
2675
  default:
2782
2676
  const parsedBody = parsedOutput.body;
2783
- (0, smithy_client_1.throwDefaultError)({
2677
+ return throwDefaultError({
2784
2678
  output,
2785
2679
  parsedBody,
2786
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2787
2680
  errorCode,
2788
2681
  });
2789
2682
  }
@@ -2792,7 +2685,7 @@ const de_UntagResourceCommand = async (output, context) => {
2792
2685
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2793
2686
  return de_UntagResourceCommandError(output, context);
2794
2687
  }
2795
- const contents = map({
2688
+ const contents = (0, smithy_client_1.map)({
2796
2689
  $metadata: deserializeMetadata(output),
2797
2690
  });
2798
2691
  await collectBody(output.body, context);
@@ -2814,10 +2707,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2814
2707
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2815
2708
  default:
2816
2709
  const parsedBody = parsedOutput.body;
2817
- (0, smithy_client_1.throwDefaultError)({
2710
+ return throwDefaultError({
2818
2711
  output,
2819
2712
  parsedBody,
2820
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2821
2713
  errorCode,
2822
2714
  });
2823
2715
  }
@@ -2826,22 +2718,17 @@ const de_UpdateAnswerCommand = async (output, context) => {
2826
2718
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2827
2719
  return de_UpdateAnswerCommandError(output, context);
2828
2720
  }
2829
- const contents = map({
2721
+ const contents = (0, smithy_client_1.map)({
2830
2722
  $metadata: deserializeMetadata(output),
2831
2723
  });
2832
2724
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2833
- if (data.Answer != null) {
2834
- contents.Answer = de_Answer(data.Answer, context);
2835
- }
2836
- if (data.LensAlias != null) {
2837
- contents.LensAlias = (0, smithy_client_1.expectString)(data.LensAlias);
2838
- }
2839
- if (data.LensArn != null) {
2840
- contents.LensArn = (0, smithy_client_1.expectString)(data.LensArn);
2841
- }
2842
- if (data.WorkloadId != null) {
2843
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2844
- }
2725
+ const doc = (0, smithy_client_1.take)(data, {
2726
+ Answer: smithy_client_1._json,
2727
+ LensAlias: smithy_client_1.expectString,
2728
+ LensArn: smithy_client_1.expectString,
2729
+ WorkloadId: smithy_client_1.expectString,
2730
+ });
2731
+ Object.assign(contents, doc);
2845
2732
  return contents;
2846
2733
  };
2847
2734
  exports.de_UpdateAnswerCommand = de_UpdateAnswerCommand;
@@ -2872,10 +2759,9 @@ const de_UpdateAnswerCommandError = async (output, context) => {
2872
2759
  throw await de_ValidationExceptionRes(parsedOutput, context);
2873
2760
  default:
2874
2761
  const parsedBody = parsedOutput.body;
2875
- (0, smithy_client_1.throwDefaultError)({
2762
+ return throwDefaultError({
2876
2763
  output,
2877
2764
  parsedBody,
2878
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2879
2765
  errorCode,
2880
2766
  });
2881
2767
  }
@@ -2884,7 +2770,7 @@ const de_UpdateGlobalSettingsCommand = async (output, context) => {
2884
2770
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2885
2771
  return de_UpdateGlobalSettingsCommandError(output, context);
2886
2772
  }
2887
- const contents = map({
2773
+ const contents = (0, smithy_client_1.map)({
2888
2774
  $metadata: deserializeMetadata(output),
2889
2775
  });
2890
2776
  await collectBody(output.body, context);
@@ -2915,10 +2801,9 @@ const de_UpdateGlobalSettingsCommandError = async (output, context) => {
2915
2801
  throw await de_ValidationExceptionRes(parsedOutput, context);
2916
2802
  default:
2917
2803
  const parsedBody = parsedOutput.body;
2918
- (0, smithy_client_1.throwDefaultError)({
2804
+ return throwDefaultError({
2919
2805
  output,
2920
2806
  parsedBody,
2921
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2922
2807
  errorCode,
2923
2808
  });
2924
2809
  }
@@ -2927,16 +2812,15 @@ const de_UpdateLensReviewCommand = async (output, context) => {
2927
2812
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2928
2813
  return de_UpdateLensReviewCommandError(output, context);
2929
2814
  }
2930
- const contents = map({
2815
+ const contents = (0, smithy_client_1.map)({
2931
2816
  $metadata: deserializeMetadata(output),
2932
2817
  });
2933
2818
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2934
- if (data.LensReview != null) {
2935
- contents.LensReview = de_LensReview(data.LensReview, context);
2936
- }
2937
- if (data.WorkloadId != null) {
2938
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
2939
- }
2819
+ const doc = (0, smithy_client_1.take)(data, {
2820
+ LensReview: (_) => de_LensReview(_, context),
2821
+ WorkloadId: smithy_client_1.expectString,
2822
+ });
2823
+ Object.assign(contents, doc);
2940
2824
  return contents;
2941
2825
  };
2942
2826
  exports.de_UpdateLensReviewCommand = de_UpdateLensReviewCommand;
@@ -2967,10 +2851,9 @@ const de_UpdateLensReviewCommandError = async (output, context) => {
2967
2851
  throw await de_ValidationExceptionRes(parsedOutput, context);
2968
2852
  default:
2969
2853
  const parsedBody = parsedOutput.body;
2970
- (0, smithy_client_1.throwDefaultError)({
2854
+ return throwDefaultError({
2971
2855
  output,
2972
2856
  parsedBody,
2973
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
2974
2857
  errorCode,
2975
2858
  });
2976
2859
  }
@@ -2979,13 +2862,14 @@ const de_UpdateShareInvitationCommand = async (output, context) => {
2979
2862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2980
2863
  return de_UpdateShareInvitationCommandError(output, context);
2981
2864
  }
2982
- const contents = map({
2865
+ const contents = (0, smithy_client_1.map)({
2983
2866
  $metadata: deserializeMetadata(output),
2984
2867
  });
2985
2868
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2986
- if (data.ShareInvitation != null) {
2987
- contents.ShareInvitation = de_ShareInvitation(data.ShareInvitation, context);
2988
- }
2869
+ const doc = (0, smithy_client_1.take)(data, {
2870
+ ShareInvitation: smithy_client_1._json,
2871
+ });
2872
+ Object.assign(contents, doc);
2989
2873
  return contents;
2990
2874
  };
2991
2875
  exports.de_UpdateShareInvitationCommand = de_UpdateShareInvitationCommand;
@@ -3016,10 +2900,9 @@ const de_UpdateShareInvitationCommandError = async (output, context) => {
3016
2900
  throw await de_ValidationExceptionRes(parsedOutput, context);
3017
2901
  default:
3018
2902
  const parsedBody = parsedOutput.body;
3019
- (0, smithy_client_1.throwDefaultError)({
2903
+ return throwDefaultError({
3020
2904
  output,
3021
2905
  parsedBody,
3022
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
3023
2906
  errorCode,
3024
2907
  });
3025
2908
  }
@@ -3028,13 +2911,14 @@ const de_UpdateWorkloadCommand = async (output, context) => {
3028
2911
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3029
2912
  return de_UpdateWorkloadCommandError(output, context);
3030
2913
  }
3031
- const contents = map({
2914
+ const contents = (0, smithy_client_1.map)({
3032
2915
  $metadata: deserializeMetadata(output),
3033
2916
  });
3034
2917
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3035
- if (data.Workload != null) {
3036
- contents.Workload = de_Workload(data.Workload, context);
3037
- }
2918
+ const doc = (0, smithy_client_1.take)(data, {
2919
+ Workload: (_) => de_Workload(_, context),
2920
+ });
2921
+ Object.assign(contents, doc);
3038
2922
  return contents;
3039
2923
  };
3040
2924
  exports.de_UpdateWorkloadCommand = de_UpdateWorkloadCommand;
@@ -3065,10 +2949,9 @@ const de_UpdateWorkloadCommandError = async (output, context) => {
3065
2949
  throw await de_ValidationExceptionRes(parsedOutput, context);
3066
2950
  default:
3067
2951
  const parsedBody = parsedOutput.body;
3068
- (0, smithy_client_1.throwDefaultError)({
2952
+ return throwDefaultError({
3069
2953
  output,
3070
2954
  parsedBody,
3071
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
3072
2955
  errorCode,
3073
2956
  });
3074
2957
  }
@@ -3077,16 +2960,15 @@ const de_UpdateWorkloadShareCommand = async (output, context) => {
3077
2960
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3078
2961
  return de_UpdateWorkloadShareCommandError(output, context);
3079
2962
  }
3080
- const contents = map({
2963
+ const contents = (0, smithy_client_1.map)({
3081
2964
  $metadata: deserializeMetadata(output),
3082
2965
  });
3083
2966
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3084
- if (data.WorkloadId != null) {
3085
- contents.WorkloadId = (0, smithy_client_1.expectString)(data.WorkloadId);
3086
- }
3087
- if (data.WorkloadShare != null) {
3088
- contents.WorkloadShare = de_WorkloadShare(data.WorkloadShare, context);
3089
- }
2967
+ const doc = (0, smithy_client_1.take)(data, {
2968
+ WorkloadId: smithy_client_1.expectString,
2969
+ WorkloadShare: smithy_client_1._json,
2970
+ });
2971
+ Object.assign(contents, doc);
3090
2972
  return contents;
3091
2973
  };
3092
2974
  exports.de_UpdateWorkloadShareCommand = de_UpdateWorkloadShareCommand;
@@ -3117,10 +2999,9 @@ const de_UpdateWorkloadShareCommandError = async (output, context) => {
3117
2999
  throw await de_ValidationExceptionRes(parsedOutput, context);
3118
3000
  default:
3119
3001
  const parsedBody = parsedOutput.body;
3120
- (0, smithy_client_1.throwDefaultError)({
3002
+ return throwDefaultError({
3121
3003
  output,
3122
3004
  parsedBody,
3123
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
3124
3005
  errorCode,
3125
3006
  });
3126
3007
  }
@@ -3129,7 +3010,7 @@ const de_UpgradeLensReviewCommand = async (output, context) => {
3129
3010
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3130
3011
  return de_UpgradeLensReviewCommandError(output, context);
3131
3012
  }
3132
- const contents = map({
3013
+ const contents = (0, smithy_client_1.map)({
3133
3014
  $metadata: deserializeMetadata(output),
3134
3015
  });
3135
3016
  await collectBody(output.body, context);
@@ -3163,21 +3044,21 @@ const de_UpgradeLensReviewCommandError = async (output, context) => {
3163
3044
  throw await de_ValidationExceptionRes(parsedOutput, context);
3164
3045
  default:
3165
3046
  const parsedBody = parsedOutput.body;
3166
- (0, smithy_client_1.throwDefaultError)({
3047
+ return throwDefaultError({
3167
3048
  output,
3168
3049
  parsedBody,
3169
- exceptionCtor: WellArchitectedServiceException_1.WellArchitectedServiceException,
3170
3050
  errorCode,
3171
3051
  });
3172
3052
  }
3173
3053
  };
3174
- const map = smithy_client_1.map;
3054
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(WellArchitectedServiceException_1.WellArchitectedServiceException);
3175
3055
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3176
- const contents = map({});
3056
+ const contents = (0, smithy_client_1.map)({});
3177
3057
  const data = parsedOutput.body;
3178
- if (data.Message != null) {
3179
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3180
- }
3058
+ const doc = (0, smithy_client_1.take)(data, {
3059
+ Message: smithy_client_1.expectString,
3060
+ });
3061
+ Object.assign(contents, doc);
3181
3062
  const exception = new models_0_1.AccessDeniedException({
3182
3063
  $metadata: deserializeMetadata(parsedOutput),
3183
3064
  ...contents,
@@ -3185,17 +3066,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3185
3066
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3186
3067
  };
3187
3068
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3188
- const contents = map({});
3069
+ const contents = (0, smithy_client_1.map)({});
3189
3070
  const data = parsedOutput.body;
3190
- if (data.Message != null) {
3191
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3192
- }
3193
- if (data.ResourceId != null) {
3194
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
3195
- }
3196
- if (data.ResourceType != null) {
3197
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
3198
- }
3071
+ const doc = (0, smithy_client_1.take)(data, {
3072
+ Message: smithy_client_1.expectString,
3073
+ ResourceId: smithy_client_1.expectString,
3074
+ ResourceType: smithy_client_1.expectString,
3075
+ });
3076
+ Object.assign(contents, doc);
3199
3077
  const exception = new models_0_1.ConflictException({
3200
3078
  $metadata: deserializeMetadata(parsedOutput),
3201
3079
  ...contents,
@@ -3203,11 +3081,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3203
3081
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3204
3082
  };
3205
3083
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3206
- const contents = map({});
3084
+ const contents = (0, smithy_client_1.map)({});
3207
3085
  const data = parsedOutput.body;
3208
- if (data.Message != null) {
3209
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3210
- }
3086
+ const doc = (0, smithy_client_1.take)(data, {
3087
+ Message: smithy_client_1.expectString,
3088
+ });
3089
+ Object.assign(contents, doc);
3211
3090
  const exception = new models_0_1.InternalServerException({
3212
3091
  $metadata: deserializeMetadata(parsedOutput),
3213
3092
  ...contents,
@@ -3215,17 +3094,14 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3215
3094
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3216
3095
  };
3217
3096
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3218
- const contents = map({});
3097
+ const contents = (0, smithy_client_1.map)({});
3219
3098
  const data = parsedOutput.body;
3220
- if (data.Message != null) {
3221
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3222
- }
3223
- if (data.ResourceId != null) {
3224
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
3225
- }
3226
- if (data.ResourceType != null) {
3227
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
3228
- }
3099
+ const doc = (0, smithy_client_1.take)(data, {
3100
+ Message: smithy_client_1.expectString,
3101
+ ResourceId: smithy_client_1.expectString,
3102
+ ResourceType: smithy_client_1.expectString,
3103
+ });
3104
+ Object.assign(contents, doc);
3229
3105
  const exception = new models_0_1.ResourceNotFoundException({
3230
3106
  $metadata: deserializeMetadata(parsedOutput),
3231
3107
  ...contents,
@@ -3233,23 +3109,16 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3233
3109
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3234
3110
  };
3235
3111
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3236
- const contents = map({});
3112
+ const contents = (0, smithy_client_1.map)({});
3237
3113
  const data = parsedOutput.body;
3238
- if (data.Message != null) {
3239
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3240
- }
3241
- if (data.QuotaCode != null) {
3242
- contents.QuotaCode = (0, smithy_client_1.expectString)(data.QuotaCode);
3243
- }
3244
- if (data.ResourceId != null) {
3245
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
3246
- }
3247
- if (data.ResourceType != null) {
3248
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
3249
- }
3250
- if (data.ServiceCode != null) {
3251
- contents.ServiceCode = (0, smithy_client_1.expectString)(data.ServiceCode);
3252
- }
3114
+ const doc = (0, smithy_client_1.take)(data, {
3115
+ Message: smithy_client_1.expectString,
3116
+ QuotaCode: smithy_client_1.expectString,
3117
+ ResourceId: smithy_client_1.expectString,
3118
+ ResourceType: smithy_client_1.expectString,
3119
+ ServiceCode: smithy_client_1.expectString,
3120
+ });
3121
+ Object.assign(contents, doc);
3253
3122
  const exception = new models_0_1.ServiceQuotaExceededException({
3254
3123
  $metadata: deserializeMetadata(parsedOutput),
3255
3124
  ...contents,
@@ -3257,17 +3126,14 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3257
3126
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3258
3127
  };
3259
3128
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3260
- const contents = map({});
3129
+ const contents = (0, smithy_client_1.map)({});
3261
3130
  const data = parsedOutput.body;
3262
- if (data.Message != null) {
3263
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3264
- }
3265
- if (data.QuotaCode != null) {
3266
- contents.QuotaCode = (0, smithy_client_1.expectString)(data.QuotaCode);
3267
- }
3268
- if (data.ServiceCode != null) {
3269
- contents.ServiceCode = (0, smithy_client_1.expectString)(data.ServiceCode);
3270
- }
3131
+ const doc = (0, smithy_client_1.take)(data, {
3132
+ Message: smithy_client_1.expectString,
3133
+ QuotaCode: smithy_client_1.expectString,
3134
+ ServiceCode: smithy_client_1.expectString,
3135
+ });
3136
+ Object.assign(contents, doc);
3271
3137
  const exception = new models_0_1.ThrottlingException({
3272
3138
  $metadata: deserializeMetadata(parsedOutput),
3273
3139
  ...contents,
@@ -3275,231 +3141,41 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3275
3141
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3276
3142
  };
3277
3143
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
3278
- const contents = map({});
3144
+ const contents = (0, smithy_client_1.map)({});
3279
3145
  const data = parsedOutput.body;
3280
- if (data.Fields != null) {
3281
- contents.Fields = de_ValidationExceptionFieldList(data.Fields, context);
3282
- }
3283
- if (data.Message != null) {
3284
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3285
- }
3286
- if (data.Reason != null) {
3287
- contents.Reason = (0, smithy_client_1.expectString)(data.Reason);
3288
- }
3146
+ const doc = (0, smithy_client_1.take)(data, {
3147
+ Fields: smithy_client_1._json,
3148
+ Message: smithy_client_1.expectString,
3149
+ Reason: smithy_client_1.expectString,
3150
+ });
3151
+ Object.assign(contents, doc);
3289
3152
  const exception = new models_0_1.ValidationException({
3290
3153
  $metadata: deserializeMetadata(parsedOutput),
3291
3154
  ...contents,
3292
3155
  });
3293
3156
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3294
3157
  };
3295
- const se_ChoiceUpdate = (input, context) => {
3296
- return {
3297
- ...(input.Notes != null && { Notes: input.Notes }),
3298
- ...(input.Reason != null && { Reason: input.Reason }),
3299
- ...(input.Status != null && { Status: input.Status }),
3300
- };
3301
- };
3302
- const se_ChoiceUpdates = (input, context) => {
3303
- return Object.entries(input).reduce((acc, [key, value]) => {
3304
- if (value === null) {
3305
- return acc;
3306
- }
3307
- acc[key] = se_ChoiceUpdate(value, context);
3308
- return acc;
3309
- }, {});
3310
- };
3311
- const se_LensAliases = (input, context) => {
3312
- return input
3313
- .filter((e) => e != null)
3314
- .map((entry) => {
3315
- return entry;
3316
- });
3317
- };
3318
- const se_PillarNotes = (input, context) => {
3319
- return Object.entries(input).reduce((acc, [key, value]) => {
3320
- if (value === null) {
3321
- return acc;
3322
- }
3323
- acc[key] = value;
3324
- return acc;
3325
- }, {});
3326
- };
3327
- const se_SelectedChoices = (input, context) => {
3328
- return input
3329
- .filter((e) => e != null)
3330
- .map((entry) => {
3331
- return entry;
3332
- });
3333
- };
3334
- const se_TagMap = (input, context) => {
3335
- return Object.entries(input).reduce((acc, [key, value]) => {
3336
- if (value === null) {
3337
- return acc;
3338
- }
3339
- acc[key] = value;
3340
- return acc;
3341
- }, {});
3342
- };
3343
- const se_WorkloadAccountIds = (input, context) => {
3344
- return input
3345
- .filter((e) => e != null)
3346
- .map((entry) => {
3347
- return entry;
3348
- });
3349
- };
3350
- const se_WorkloadApplications = (input, context) => {
3351
- return input
3352
- .filter((e) => e != null)
3353
- .map((entry) => {
3354
- return entry;
3355
- });
3356
- };
3357
- const se_WorkloadAwsRegions = (input, context) => {
3358
- return input
3359
- .filter((e) => e != null)
3360
- .map((entry) => {
3361
- return entry;
3362
- });
3363
- };
3364
- const se_WorkloadDiscoveryConfig = (input, context) => {
3365
- return {
3366
- ...(input.TrustedAdvisorIntegrationStatus != null && {
3367
- TrustedAdvisorIntegrationStatus: input.TrustedAdvisorIntegrationStatus,
3368
- }),
3369
- };
3370
- };
3371
- const se_WorkloadLenses = (input, context) => {
3372
- return input
3373
- .filter((e) => e != null)
3374
- .map((entry) => {
3375
- return entry;
3376
- });
3377
- };
3378
- const se_WorkloadNonAwsRegions = (input, context) => {
3379
- return input
3380
- .filter((e) => e != null)
3381
- .map((entry) => {
3382
- return entry;
3383
- });
3384
- };
3385
- const se_WorkloadPillarPriorities = (input, context) => {
3386
- return input
3387
- .filter((e) => e != null)
3388
- .map((entry) => {
3389
- return entry;
3390
- });
3391
- };
3392
- const de_AccountSummary = (output, context) => {
3393
- return Object.entries(output).reduce((acc, [key, value]) => {
3394
- if (value === null) {
3395
- return acc;
3396
- }
3397
- acc[key] = (0, smithy_client_1.expectInt32)(value);
3398
- return acc;
3399
- }, {});
3400
- };
3401
- const de_AdditionalResources = (output, context) => {
3402
- return {
3403
- Content: output.Content != null ? de_Urls(output.Content, context) : undefined,
3404
- Type: (0, smithy_client_1.expectString)(output.Type),
3405
- };
3406
- };
3407
- const de_AdditionalResourcesList = (output, context) => {
3408
- const retVal = (output || [])
3409
- .filter((e) => e != null)
3410
- .map((entry) => {
3411
- if (entry === null) {
3412
- return null;
3413
- }
3414
- return de_AdditionalResources(entry, context);
3415
- });
3416
- return retVal;
3417
- };
3418
- const de_Answer = (output, context) => {
3419
- return {
3420
- ChoiceAnswers: output.ChoiceAnswers != null ? de_ChoiceAnswers(output.ChoiceAnswers, context) : undefined,
3421
- Choices: output.Choices != null ? de_Choices(output.Choices, context) : undefined,
3422
- HelpfulResourceDisplayText: (0, smithy_client_1.expectString)(output.HelpfulResourceDisplayText),
3423
- HelpfulResourceUrl: (0, smithy_client_1.expectString)(output.HelpfulResourceUrl),
3424
- ImprovementPlanUrl: (0, smithy_client_1.expectString)(output.ImprovementPlanUrl),
3425
- IsApplicable: (0, smithy_client_1.expectBoolean)(output.IsApplicable),
3426
- Notes: (0, smithy_client_1.expectString)(output.Notes),
3427
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3428
- QuestionDescription: (0, smithy_client_1.expectString)(output.QuestionDescription),
3429
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3430
- QuestionTitle: (0, smithy_client_1.expectString)(output.QuestionTitle),
3431
- Reason: (0, smithy_client_1.expectString)(output.Reason),
3432
- Risk: (0, smithy_client_1.expectString)(output.Risk),
3433
- SelectedChoices: output.SelectedChoices != null ? de_SelectedChoices(output.SelectedChoices, context) : undefined,
3434
- };
3435
- };
3436
- const de_AnswerSummaries = (output, context) => {
3437
- const retVal = (output || [])
3438
- .filter((e) => e != null)
3439
- .map((entry) => {
3440
- if (entry === null) {
3441
- return null;
3442
- }
3443
- return de_AnswerSummary(entry, context);
3444
- });
3445
- return retVal;
3446
- };
3447
- const de_AnswerSummary = (output, context) => {
3448
- return {
3449
- ChoiceAnswerSummaries: output.ChoiceAnswerSummaries != null
3450
- ? de_ChoiceAnswerSummaries(output.ChoiceAnswerSummaries, context)
3451
- : undefined,
3452
- Choices: output.Choices != null ? de_Choices(output.Choices, context) : undefined,
3453
- IsApplicable: (0, smithy_client_1.expectBoolean)(output.IsApplicable),
3454
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3455
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3456
- QuestionTitle: (0, smithy_client_1.expectString)(output.QuestionTitle),
3457
- Reason: (0, smithy_client_1.expectString)(output.Reason),
3458
- Risk: (0, smithy_client_1.expectString)(output.Risk),
3459
- SelectedChoices: output.SelectedChoices != null ? de_SelectedChoices(output.SelectedChoices, context) : undefined,
3460
- };
3461
- };
3462
- const de_BestPractice = (output, context) => {
3463
- return {
3464
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3465
- ChoiceTitle: (0, smithy_client_1.expectString)(output.ChoiceTitle),
3466
- };
3467
- };
3468
- const de_BestPractices = (output, context) => {
3469
- const retVal = (output || [])
3470
- .filter((e) => e != null)
3471
- .map((entry) => {
3472
- if (entry === null) {
3473
- return null;
3474
- }
3475
- return de_BestPractice(entry, context);
3476
- });
3477
- return retVal;
3478
- };
3479
3158
  const de_CheckDetail = (output, context) => {
3480
- return {
3481
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
3482
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3483
- Description: (0, smithy_client_1.expectString)(output.Description),
3484
- FlaggedResources: (0, smithy_client_1.expectInt32)(output.FlaggedResources),
3485
- Id: (0, smithy_client_1.expectString)(output.Id),
3486
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3487
- Name: (0, smithy_client_1.expectString)(output.Name),
3488
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3489
- Provider: (0, smithy_client_1.expectString)(output.Provider),
3490
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3491
- Reason: (0, smithy_client_1.expectString)(output.Reason),
3492
- Status: (0, smithy_client_1.expectString)(output.Status),
3493
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
3494
- };
3159
+ return (0, smithy_client_1.take)(output, {
3160
+ AccountId: smithy_client_1.expectString,
3161
+ ChoiceId: smithy_client_1.expectString,
3162
+ Description: smithy_client_1.expectString,
3163
+ FlaggedResources: smithy_client_1.expectInt32,
3164
+ Id: smithy_client_1.expectString,
3165
+ LensArn: smithy_client_1.expectString,
3166
+ Name: smithy_client_1.expectString,
3167
+ PillarId: smithy_client_1.expectString,
3168
+ Provider: smithy_client_1.expectString,
3169
+ QuestionId: smithy_client_1.expectString,
3170
+ Reason: smithy_client_1.expectString,
3171
+ Status: smithy_client_1.expectString,
3172
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3173
+ });
3495
3174
  };
3496
3175
  const de_CheckDetails = (output, context) => {
3497
3176
  const retVal = (output || [])
3498
3177
  .filter((e) => e != null)
3499
3178
  .map((entry) => {
3500
- if (entry === null) {
3501
- return null;
3502
- }
3503
3179
  return de_CheckDetail(entry, context);
3504
3180
  });
3505
3181
  return retVal;
@@ -3508,668 +3184,172 @@ const de_CheckSummaries = (output, context) => {
3508
3184
  const retVal = (output || [])
3509
3185
  .filter((e) => e != null)
3510
3186
  .map((entry) => {
3511
- if (entry === null) {
3512
- return null;
3513
- }
3514
3187
  return de_CheckSummary(entry, context);
3515
3188
  });
3516
3189
  return retVal;
3517
3190
  };
3518
3191
  const de_CheckSummary = (output, context) => {
3519
- return {
3520
- AccountSummary: output.AccountSummary != null ? de_AccountSummary(output.AccountSummary, context) : undefined,
3521
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3522
- Description: (0, smithy_client_1.expectString)(output.Description),
3523
- Id: (0, smithy_client_1.expectString)(output.Id),
3524
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3525
- Name: (0, smithy_client_1.expectString)(output.Name),
3526
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3527
- Provider: (0, smithy_client_1.expectString)(output.Provider),
3528
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3529
- Status: (0, smithy_client_1.expectString)(output.Status),
3530
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
3531
- };
3532
- };
3533
- const de_Choice = (output, context) => {
3534
- return {
3535
- AdditionalResources: output.AdditionalResources != null ? de_AdditionalResourcesList(output.AdditionalResources, context) : undefined,
3536
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3537
- Description: (0, smithy_client_1.expectString)(output.Description),
3538
- HelpfulResource: output.HelpfulResource != null ? de_ChoiceContent(output.HelpfulResource, context) : undefined,
3539
- ImprovementPlan: output.ImprovementPlan != null ? de_ChoiceContent(output.ImprovementPlan, context) : undefined,
3540
- Title: (0, smithy_client_1.expectString)(output.Title),
3541
- };
3542
- };
3543
- const de_ChoiceAnswer = (output, context) => {
3544
- return {
3545
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3546
- Notes: (0, smithy_client_1.expectString)(output.Notes),
3547
- Reason: (0, smithy_client_1.expectString)(output.Reason),
3548
- Status: (0, smithy_client_1.expectString)(output.Status),
3549
- };
3550
- };
3551
- const de_ChoiceAnswers = (output, context) => {
3552
- const retVal = (output || [])
3553
- .filter((e) => e != null)
3554
- .map((entry) => {
3555
- if (entry === null) {
3556
- return null;
3557
- }
3558
- return de_ChoiceAnswer(entry, context);
3559
- });
3560
- return retVal;
3561
- };
3562
- const de_ChoiceAnswerSummaries = (output, context) => {
3563
- const retVal = (output || [])
3564
- .filter((e) => e != null)
3565
- .map((entry) => {
3566
- if (entry === null) {
3567
- return null;
3568
- }
3569
- return de_ChoiceAnswerSummary(entry, context);
3192
+ return (0, smithy_client_1.take)(output, {
3193
+ AccountSummary: smithy_client_1._json,
3194
+ ChoiceId: smithy_client_1.expectString,
3195
+ Description: smithy_client_1.expectString,
3196
+ Id: smithy_client_1.expectString,
3197
+ LensArn: smithy_client_1.expectString,
3198
+ Name: smithy_client_1.expectString,
3199
+ PillarId: smithy_client_1.expectString,
3200
+ Provider: smithy_client_1.expectString,
3201
+ QuestionId: smithy_client_1.expectString,
3202
+ Status: smithy_client_1.expectString,
3203
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3570
3204
  });
3571
- return retVal;
3572
- };
3573
- const de_ChoiceAnswerSummary = (output, context) => {
3574
- return {
3575
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3576
- Reason: (0, smithy_client_1.expectString)(output.Reason),
3577
- Status: (0, smithy_client_1.expectString)(output.Status),
3578
- };
3579
- };
3580
- const de_ChoiceContent = (output, context) => {
3581
- return {
3582
- DisplayText: (0, smithy_client_1.expectString)(output.DisplayText),
3583
- Url: (0, smithy_client_1.expectString)(output.Url),
3584
- };
3585
- };
3586
- const de_ChoiceImprovementPlan = (output, context) => {
3587
- return {
3588
- ChoiceId: (0, smithy_client_1.expectString)(output.ChoiceId),
3589
- DisplayText: (0, smithy_client_1.expectString)(output.DisplayText),
3590
- ImprovementPlanUrl: (0, smithy_client_1.expectString)(output.ImprovementPlanUrl),
3591
- };
3592
- };
3593
- const de_ChoiceImprovementPlans = (output, context) => {
3594
- const retVal = (output || [])
3595
- .filter((e) => e != null)
3596
- .map((entry) => {
3597
- if (entry === null) {
3598
- return null;
3599
- }
3600
- return de_ChoiceImprovementPlan(entry, context);
3601
- });
3602
- return retVal;
3603
- };
3604
- const de_Choices = (output, context) => {
3605
- const retVal = (output || [])
3606
- .filter((e) => e != null)
3607
- .map((entry) => {
3608
- if (entry === null) {
3609
- return null;
3610
- }
3611
- return de_Choice(entry, context);
3612
- });
3613
- return retVal;
3614
3205
  };
3615
3206
  const de_ConsolidatedReportMetric = (output, context) => {
3616
- return {
3617
- Lenses: output.Lenses != null ? de_LensMetrics(output.Lenses, context) : undefined,
3618
- LensesAppliedCount: (0, smithy_client_1.expectInt32)(output.LensesAppliedCount),
3619
- MetricType: (0, smithy_client_1.expectString)(output.MetricType),
3620
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3621
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
3622
- WorkloadArn: (0, smithy_client_1.expectString)(output.WorkloadArn),
3623
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
3624
- WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
3625
- };
3207
+ return (0, smithy_client_1.take)(output, {
3208
+ Lenses: smithy_client_1._json,
3209
+ LensesAppliedCount: smithy_client_1.expectInt32,
3210
+ MetricType: smithy_client_1.expectString,
3211
+ RiskCounts: smithy_client_1._json,
3212
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3213
+ WorkloadArn: smithy_client_1.expectString,
3214
+ WorkloadId: smithy_client_1.expectString,
3215
+ WorkloadName: smithy_client_1.expectString,
3216
+ });
3626
3217
  };
3627
3218
  const de_ConsolidatedReportMetrics = (output, context) => {
3628
3219
  const retVal = (output || [])
3629
3220
  .filter((e) => e != null)
3630
3221
  .map((entry) => {
3631
- if (entry === null) {
3632
- return null;
3633
- }
3634
3222
  return de_ConsolidatedReportMetric(entry, context);
3635
3223
  });
3636
3224
  return retVal;
3637
3225
  };
3638
- const de_ImprovementSummaries = (output, context) => {
3639
- const retVal = (output || [])
3640
- .filter((e) => e != null)
3641
- .map((entry) => {
3642
- if (entry === null) {
3643
- return null;
3644
- }
3645
- return de_ImprovementSummary(entry, context);
3646
- });
3647
- return retVal;
3648
- };
3649
- const de_ImprovementSummary = (output, context) => {
3650
- return {
3651
- ImprovementPlanUrl: (0, smithy_client_1.expectString)(output.ImprovementPlanUrl),
3652
- ImprovementPlans: output.ImprovementPlans != null ? de_ChoiceImprovementPlans(output.ImprovementPlans, context) : undefined,
3653
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3654
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3655
- QuestionTitle: (0, smithy_client_1.expectString)(output.QuestionTitle),
3656
- Risk: (0, smithy_client_1.expectString)(output.Risk),
3657
- };
3658
- };
3659
- const de_Lens = (output, context) => {
3660
- return {
3661
- Description: (0, smithy_client_1.expectString)(output.Description),
3662
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3663
- LensVersion: (0, smithy_client_1.expectString)(output.LensVersion),
3664
- Name: (0, smithy_client_1.expectString)(output.Name),
3665
- Owner: (0, smithy_client_1.expectString)(output.Owner),
3666
- ShareInvitationId: (0, smithy_client_1.expectString)(output.ShareInvitationId),
3667
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
3668
- };
3669
- };
3670
- const de_LensMetric = (output, context) => {
3671
- return {
3672
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3673
- Pillars: output.Pillars != null ? de_PillarMetrics(output.Pillars, context) : undefined,
3674
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3675
- };
3676
- };
3677
- const de_LensMetrics = (output, context) => {
3678
- const retVal = (output || [])
3679
- .filter((e) => e != null)
3680
- .map((entry) => {
3681
- if (entry === null) {
3682
- return null;
3683
- }
3684
- return de_LensMetric(entry, context);
3685
- });
3686
- return retVal;
3687
- };
3688
3226
  const de_LensReview = (output, context) => {
3689
- return {
3690
- LensAlias: (0, smithy_client_1.expectString)(output.LensAlias),
3691
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3692
- LensName: (0, smithy_client_1.expectString)(output.LensName),
3693
- LensStatus: (0, smithy_client_1.expectString)(output.LensStatus),
3694
- LensVersion: (0, smithy_client_1.expectString)(output.LensVersion),
3695
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
3696
- Notes: (0, smithy_client_1.expectString)(output.Notes),
3697
- PillarReviewSummaries: output.PillarReviewSummaries != null
3698
- ? de_PillarReviewSummaries(output.PillarReviewSummaries, context)
3699
- : undefined,
3700
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3701
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
3702
- };
3703
- };
3704
- const de_LensReviewReport = (output, context) => {
3705
- return {
3706
- Base64String: (0, smithy_client_1.expectString)(output.Base64String),
3707
- LensAlias: (0, smithy_client_1.expectString)(output.LensAlias),
3708
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3709
- };
3227
+ return (0, smithy_client_1.take)(output, {
3228
+ LensAlias: smithy_client_1.expectString,
3229
+ LensArn: smithy_client_1.expectString,
3230
+ LensName: smithy_client_1.expectString,
3231
+ LensStatus: smithy_client_1.expectString,
3232
+ LensVersion: smithy_client_1.expectString,
3233
+ NextToken: smithy_client_1.expectString,
3234
+ Notes: smithy_client_1.expectString,
3235
+ PillarReviewSummaries: smithy_client_1._json,
3236
+ RiskCounts: smithy_client_1._json,
3237
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3238
+ });
3710
3239
  };
3711
3240
  const de_LensReviewSummaries = (output, context) => {
3712
3241
  const retVal = (output || [])
3713
3242
  .filter((e) => e != null)
3714
3243
  .map((entry) => {
3715
- if (entry === null) {
3716
- return null;
3717
- }
3718
3244
  return de_LensReviewSummary(entry, context);
3719
3245
  });
3720
3246
  return retVal;
3721
3247
  };
3722
3248
  const de_LensReviewSummary = (output, context) => {
3723
- return {
3724
- LensAlias: (0, smithy_client_1.expectString)(output.LensAlias),
3725
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3726
- LensName: (0, smithy_client_1.expectString)(output.LensName),
3727
- LensStatus: (0, smithy_client_1.expectString)(output.LensStatus),
3728
- LensVersion: (0, smithy_client_1.expectString)(output.LensVersion),
3729
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3730
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
3731
- };
3732
- };
3733
- const de_LensShareSummaries = (output, context) => {
3734
- const retVal = (output || [])
3735
- .filter((e) => e != null)
3736
- .map((entry) => {
3737
- if (entry === null) {
3738
- return null;
3739
- }
3740
- return de_LensShareSummary(entry, context);
3249
+ return (0, smithy_client_1.take)(output, {
3250
+ LensAlias: smithy_client_1.expectString,
3251
+ LensArn: smithy_client_1.expectString,
3252
+ LensName: smithy_client_1.expectString,
3253
+ LensStatus: smithy_client_1.expectString,
3254
+ LensVersion: smithy_client_1.expectString,
3255
+ RiskCounts: smithy_client_1._json,
3256
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3741
3257
  });
3742
- return retVal;
3743
- };
3744
- const de_LensShareSummary = (output, context) => {
3745
- return {
3746
- ShareId: (0, smithy_client_1.expectString)(output.ShareId),
3747
- SharedWith: (0, smithy_client_1.expectString)(output.SharedWith),
3748
- Status: (0, smithy_client_1.expectString)(output.Status),
3749
- StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
3750
- };
3751
3258
  };
3752
3259
  const de_LensSummaries = (output, context) => {
3753
3260
  const retVal = (output || [])
3754
3261
  .filter((e) => e != null)
3755
3262
  .map((entry) => {
3756
- if (entry === null) {
3757
- return null;
3758
- }
3759
3263
  return de_LensSummary(entry, context);
3760
3264
  });
3761
3265
  return retVal;
3762
3266
  };
3763
3267
  const de_LensSummary = (output, context) => {
3764
- return {
3765
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
3766
- Description: (0, smithy_client_1.expectString)(output.Description),
3767
- LensAlias: (0, smithy_client_1.expectString)(output.LensAlias),
3768
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3769
- LensName: (0, smithy_client_1.expectString)(output.LensName),
3770
- LensStatus: (0, smithy_client_1.expectString)(output.LensStatus),
3771
- LensType: (0, smithy_client_1.expectString)(output.LensType),
3772
- LensVersion: (0, smithy_client_1.expectString)(output.LensVersion),
3773
- Owner: (0, smithy_client_1.expectString)(output.Owner),
3774
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
3775
- };
3776
- };
3777
- const de_LensUpgradeSummary = (output, context) => {
3778
- return {
3779
- CurrentLensVersion: (0, smithy_client_1.expectString)(output.CurrentLensVersion),
3780
- LatestLensVersion: (0, smithy_client_1.expectString)(output.LatestLensVersion),
3781
- LensAlias: (0, smithy_client_1.expectString)(output.LensAlias),
3782
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3783
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
3784
- WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
3785
- };
3268
+ return (0, smithy_client_1.take)(output, {
3269
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3270
+ Description: smithy_client_1.expectString,
3271
+ LensAlias: smithy_client_1.expectString,
3272
+ LensArn: smithy_client_1.expectString,
3273
+ LensName: smithy_client_1.expectString,
3274
+ LensStatus: smithy_client_1.expectString,
3275
+ LensType: smithy_client_1.expectString,
3276
+ LensVersion: smithy_client_1.expectString,
3277
+ Owner: smithy_client_1.expectString,
3278
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3279
+ });
3786
3280
  };
3787
3281
  const de_Milestone = (output, context) => {
3788
- return {
3789
- MilestoneName: (0, smithy_client_1.expectString)(output.MilestoneName),
3790
- MilestoneNumber: (0, smithy_client_1.expectInt32)(output.MilestoneNumber),
3791
- RecordedAt: output.RecordedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.RecordedAt))) : undefined,
3792
- Workload: output.Workload != null ? de_Workload(output.Workload, context) : undefined,
3793
- };
3282
+ return (0, smithy_client_1.take)(output, {
3283
+ MilestoneName: smithy_client_1.expectString,
3284
+ MilestoneNumber: smithy_client_1.expectInt32,
3285
+ RecordedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3286
+ Workload: (_) => de_Workload(_, context),
3287
+ });
3794
3288
  };
3795
3289
  const de_MilestoneSummaries = (output, context) => {
3796
3290
  const retVal = (output || [])
3797
3291
  .filter((e) => e != null)
3798
3292
  .map((entry) => {
3799
- if (entry === null) {
3800
- return null;
3801
- }
3802
3293
  return de_MilestoneSummary(entry, context);
3803
3294
  });
3804
3295
  return retVal;
3805
3296
  };
3806
3297
  const de_MilestoneSummary = (output, context) => {
3807
- return {
3808
- MilestoneName: (0, smithy_client_1.expectString)(output.MilestoneName),
3809
- MilestoneNumber: (0, smithy_client_1.expectInt32)(output.MilestoneNumber),
3810
- RecordedAt: output.RecordedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.RecordedAt))) : undefined,
3811
- WorkloadSummary: output.WorkloadSummary != null ? de_WorkloadSummary(output.WorkloadSummary, context) : undefined,
3812
- };
3813
- };
3814
- const de_NotificationSummaries = (output, context) => {
3815
- const retVal = (output || [])
3816
- .filter((e) => e != null)
3817
- .map((entry) => {
3818
- if (entry === null) {
3819
- return null;
3820
- }
3821
- return de_NotificationSummary(entry, context);
3822
- });
3823
- return retVal;
3824
- };
3825
- const de_NotificationSummary = (output, context) => {
3826
- return {
3827
- LensUpgradeSummary: output.LensUpgradeSummary != null ? de_LensUpgradeSummary(output.LensUpgradeSummary, context) : undefined,
3828
- Type: (0, smithy_client_1.expectString)(output.Type),
3829
- };
3830
- };
3831
- const de_PillarDifference = (output, context) => {
3832
- return {
3833
- DifferenceStatus: (0, smithy_client_1.expectString)(output.DifferenceStatus),
3834
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3835
- PillarName: (0, smithy_client_1.expectString)(output.PillarName),
3836
- QuestionDifferences: output.QuestionDifferences != null ? de_QuestionDifferences(output.QuestionDifferences, context) : undefined,
3837
- };
3838
- };
3839
- const de_PillarDifferences = (output, context) => {
3840
- const retVal = (output || [])
3841
- .filter((e) => e != null)
3842
- .map((entry) => {
3843
- if (entry === null) {
3844
- return null;
3845
- }
3846
- return de_PillarDifference(entry, context);
3847
- });
3848
- return retVal;
3849
- };
3850
- const de_PillarMetric = (output, context) => {
3851
- return {
3852
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3853
- Questions: output.Questions != null ? de_QuestionMetrics(output.Questions, context) : undefined,
3854
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3855
- };
3856
- };
3857
- const de_PillarMetrics = (output, context) => {
3858
- const retVal = (output || [])
3859
- .filter((e) => e != null)
3860
- .map((entry) => {
3861
- if (entry === null) {
3862
- return null;
3863
- }
3864
- return de_PillarMetric(entry, context);
3865
- });
3866
- return retVal;
3867
- };
3868
- const de_PillarReviewSummaries = (output, context) => {
3869
- const retVal = (output || [])
3870
- .filter((e) => e != null)
3871
- .map((entry) => {
3872
- if (entry === null) {
3873
- return null;
3874
- }
3875
- return de_PillarReviewSummary(entry, context);
3876
- });
3877
- return retVal;
3878
- };
3879
- const de_PillarReviewSummary = (output, context) => {
3880
- return {
3881
- Notes: (0, smithy_client_1.expectString)(output.Notes),
3882
- PillarId: (0, smithy_client_1.expectString)(output.PillarId),
3883
- PillarName: (0, smithy_client_1.expectString)(output.PillarName),
3884
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3885
- };
3886
- };
3887
- const de_QuestionDifference = (output, context) => {
3888
- return {
3889
- DifferenceStatus: (0, smithy_client_1.expectString)(output.DifferenceStatus),
3890
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3891
- QuestionTitle: (0, smithy_client_1.expectString)(output.QuestionTitle),
3892
- };
3893
- };
3894
- const de_QuestionDifferences = (output, context) => {
3895
- const retVal = (output || [])
3896
- .filter((e) => e != null)
3897
- .map((entry) => {
3898
- if (entry === null) {
3899
- return null;
3900
- }
3901
- return de_QuestionDifference(entry, context);
3902
- });
3903
- return retVal;
3904
- };
3905
- const de_QuestionMetric = (output, context) => {
3906
- return {
3907
- BestPractices: output.BestPractices != null ? de_BestPractices(output.BestPractices, context) : undefined,
3908
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
3909
- Risk: (0, smithy_client_1.expectString)(output.Risk),
3910
- };
3911
- };
3912
- const de_QuestionMetrics = (output, context) => {
3913
- const retVal = (output || [])
3914
- .filter((e) => e != null)
3915
- .map((entry) => {
3916
- if (entry === null) {
3917
- return null;
3918
- }
3919
- return de_QuestionMetric(entry, context);
3298
+ return (0, smithy_client_1.take)(output, {
3299
+ MilestoneName: smithy_client_1.expectString,
3300
+ MilestoneNumber: smithy_client_1.expectInt32,
3301
+ RecordedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3302
+ WorkloadSummary: (_) => de_WorkloadSummary(_, context),
3920
3303
  });
3921
- return retVal;
3922
- };
3923
- const de_RiskCounts = (output, context) => {
3924
- return Object.entries(output).reduce((acc, [key, value]) => {
3925
- if (value === null) {
3926
- return acc;
3927
- }
3928
- acc[key] = (0, smithy_client_1.expectInt32)(value);
3929
- return acc;
3930
- }, {});
3931
- };
3932
- const de_SelectedChoices = (output, context) => {
3933
- const retVal = (output || [])
3934
- .filter((e) => e != null)
3935
- .map((entry) => {
3936
- if (entry === null) {
3937
- return null;
3938
- }
3939
- return (0, smithy_client_1.expectString)(entry);
3940
- });
3941
- return retVal;
3942
- };
3943
- const de_ShareInvitation = (output, context) => {
3944
- return {
3945
- LensAlias: (0, smithy_client_1.expectString)(output.LensAlias),
3946
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3947
- ShareInvitationId: (0, smithy_client_1.expectString)(output.ShareInvitationId),
3948
- ShareResourceType: (0, smithy_client_1.expectString)(output.ShareResourceType),
3949
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
3950
- };
3951
- };
3952
- const de_ShareInvitationSummaries = (output, context) => {
3953
- const retVal = (output || [])
3954
- .filter((e) => e != null)
3955
- .map((entry) => {
3956
- if (entry === null) {
3957
- return null;
3958
- }
3959
- return de_ShareInvitationSummary(entry, context);
3960
- });
3961
- return retVal;
3962
- };
3963
- const de_ShareInvitationSummary = (output, context) => {
3964
- return {
3965
- LensArn: (0, smithy_client_1.expectString)(output.LensArn),
3966
- LensName: (0, smithy_client_1.expectString)(output.LensName),
3967
- PermissionType: (0, smithy_client_1.expectString)(output.PermissionType),
3968
- ShareInvitationId: (0, smithy_client_1.expectString)(output.ShareInvitationId),
3969
- ShareResourceType: (0, smithy_client_1.expectString)(output.ShareResourceType),
3970
- SharedBy: (0, smithy_client_1.expectString)(output.SharedBy),
3971
- SharedWith: (0, smithy_client_1.expectString)(output.SharedWith),
3972
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
3973
- WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
3974
- };
3975
- };
3976
- const de_TagMap = (output, context) => {
3977
- return Object.entries(output).reduce((acc, [key, value]) => {
3978
- if (value === null) {
3979
- return acc;
3980
- }
3981
- acc[key] = (0, smithy_client_1.expectString)(value);
3982
- return acc;
3983
- }, {});
3984
- };
3985
- const de_Urls = (output, context) => {
3986
- const retVal = (output || [])
3987
- .filter((e) => e != null)
3988
- .map((entry) => {
3989
- if (entry === null) {
3990
- return null;
3991
- }
3992
- return de_ChoiceContent(entry, context);
3993
- });
3994
- return retVal;
3995
- };
3996
- const de_ValidationExceptionField = (output, context) => {
3997
- return {
3998
- Message: (0, smithy_client_1.expectString)(output.Message),
3999
- Name: (0, smithy_client_1.expectString)(output.Name),
4000
- };
4001
- };
4002
- const de_ValidationExceptionFieldList = (output, context) => {
4003
- const retVal = (output || [])
4004
- .filter((e) => e != null)
4005
- .map((entry) => {
4006
- if (entry === null) {
4007
- return null;
4008
- }
4009
- return de_ValidationExceptionField(entry, context);
4010
- });
4011
- return retVal;
4012
- };
4013
- const de_VersionDifferences = (output, context) => {
4014
- return {
4015
- PillarDifferences: output.PillarDifferences != null ? de_PillarDifferences(output.PillarDifferences, context) : undefined,
4016
- };
4017
3304
  };
4018
3305
  const de_Workload = (output, context) => {
4019
- return {
4020
- AccountIds: output.AccountIds != null ? de_WorkloadAccountIds(output.AccountIds, context) : undefined,
4021
- Applications: output.Applications != null ? de_WorkloadApplications(output.Applications, context) : undefined,
4022
- ArchitecturalDesign: (0, smithy_client_1.expectString)(output.ArchitecturalDesign),
4023
- AwsRegions: output.AwsRegions != null ? de_WorkloadAwsRegions(output.AwsRegions, context) : undefined,
4024
- Description: (0, smithy_client_1.expectString)(output.Description),
4025
- DiscoveryConfig: output.DiscoveryConfig != null ? de_WorkloadDiscoveryConfig(output.DiscoveryConfig, context) : undefined,
4026
- Environment: (0, smithy_client_1.expectString)(output.Environment),
4027
- ImprovementStatus: (0, smithy_client_1.expectString)(output.ImprovementStatus),
4028
- Industry: (0, smithy_client_1.expectString)(output.Industry),
4029
- IndustryType: (0, smithy_client_1.expectString)(output.IndustryType),
4030
- IsReviewOwnerUpdateAcknowledged: (0, smithy_client_1.expectBoolean)(output.IsReviewOwnerUpdateAcknowledged),
4031
- Lenses: output.Lenses != null ? de_WorkloadLenses(output.Lenses, context) : undefined,
4032
- NonAwsRegions: output.NonAwsRegions != null ? de_WorkloadNonAwsRegions(output.NonAwsRegions, context) : undefined,
4033
- Notes: (0, smithy_client_1.expectString)(output.Notes),
4034
- Owner: (0, smithy_client_1.expectString)(output.Owner),
4035
- PillarPriorities: output.PillarPriorities != null ? de_WorkloadPillarPriorities(output.PillarPriorities, context) : undefined,
4036
- ReviewOwner: (0, smithy_client_1.expectString)(output.ReviewOwner),
4037
- ReviewRestrictionDate: output.ReviewRestrictionDate != null
4038
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ReviewRestrictionDate)))
4039
- : undefined,
4040
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
4041
- ShareInvitationId: (0, smithy_client_1.expectString)(output.ShareInvitationId),
4042
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
4043
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
4044
- WorkloadArn: (0, smithy_client_1.expectString)(output.WorkloadArn),
4045
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
4046
- WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
4047
- };
4048
- };
4049
- const de_WorkloadAccountIds = (output, context) => {
4050
- const retVal = (output || [])
4051
- .filter((e) => e != null)
4052
- .map((entry) => {
4053
- if (entry === null) {
4054
- return null;
4055
- }
4056
- return (0, smithy_client_1.expectString)(entry);
4057
- });
4058
- return retVal;
4059
- };
4060
- const de_WorkloadApplications = (output, context) => {
4061
- const retVal = (output || [])
4062
- .filter((e) => e != null)
4063
- .map((entry) => {
4064
- if (entry === null) {
4065
- return null;
4066
- }
4067
- return (0, smithy_client_1.expectString)(entry);
4068
- });
4069
- return retVal;
4070
- };
4071
- const de_WorkloadAwsRegions = (output, context) => {
4072
- const retVal = (output || [])
4073
- .filter((e) => e != null)
4074
- .map((entry) => {
4075
- if (entry === null) {
4076
- return null;
4077
- }
4078
- return (0, smithy_client_1.expectString)(entry);
4079
- });
4080
- return retVal;
4081
- };
4082
- const de_WorkloadDiscoveryConfig = (output, context) => {
4083
- return {
4084
- TrustedAdvisorIntegrationStatus: (0, smithy_client_1.expectString)(output.TrustedAdvisorIntegrationStatus),
4085
- };
4086
- };
4087
- const de_WorkloadLenses = (output, context) => {
4088
- const retVal = (output || [])
4089
- .filter((e) => e != null)
4090
- .map((entry) => {
4091
- if (entry === null) {
4092
- return null;
4093
- }
4094
- return (0, smithy_client_1.expectString)(entry);
3306
+ return (0, smithy_client_1.take)(output, {
3307
+ AccountIds: smithy_client_1._json,
3308
+ Applications: smithy_client_1._json,
3309
+ ArchitecturalDesign: smithy_client_1.expectString,
3310
+ AwsRegions: smithy_client_1._json,
3311
+ Description: smithy_client_1.expectString,
3312
+ DiscoveryConfig: smithy_client_1._json,
3313
+ Environment: smithy_client_1.expectString,
3314
+ ImprovementStatus: smithy_client_1.expectString,
3315
+ Industry: smithy_client_1.expectString,
3316
+ IndustryType: smithy_client_1.expectString,
3317
+ IsReviewOwnerUpdateAcknowledged: smithy_client_1.expectBoolean,
3318
+ Lenses: smithy_client_1._json,
3319
+ NonAwsRegions: smithy_client_1._json,
3320
+ Notes: smithy_client_1.expectString,
3321
+ Owner: smithy_client_1.expectString,
3322
+ PillarPriorities: smithy_client_1._json,
3323
+ ReviewOwner: smithy_client_1.expectString,
3324
+ ReviewRestrictionDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3325
+ RiskCounts: smithy_client_1._json,
3326
+ ShareInvitationId: smithy_client_1.expectString,
3327
+ Tags: smithy_client_1._json,
3328
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3329
+ WorkloadArn: smithy_client_1.expectString,
3330
+ WorkloadId: smithy_client_1.expectString,
3331
+ WorkloadName: smithy_client_1.expectString,
4095
3332
  });
4096
- return retVal;
4097
- };
4098
- const de_WorkloadNonAwsRegions = (output, context) => {
4099
- const retVal = (output || [])
4100
- .filter((e) => e != null)
4101
- .map((entry) => {
4102
- if (entry === null) {
4103
- return null;
4104
- }
4105
- return (0, smithy_client_1.expectString)(entry);
4106
- });
4107
- return retVal;
4108
- };
4109
- const de_WorkloadPillarPriorities = (output, context) => {
4110
- const retVal = (output || [])
4111
- .filter((e) => e != null)
4112
- .map((entry) => {
4113
- if (entry === null) {
4114
- return null;
4115
- }
4116
- return (0, smithy_client_1.expectString)(entry);
4117
- });
4118
- return retVal;
4119
- };
4120
- const de_WorkloadShare = (output, context) => {
4121
- return {
4122
- PermissionType: (0, smithy_client_1.expectString)(output.PermissionType),
4123
- ShareId: (0, smithy_client_1.expectString)(output.ShareId),
4124
- SharedBy: (0, smithy_client_1.expectString)(output.SharedBy),
4125
- SharedWith: (0, smithy_client_1.expectString)(output.SharedWith),
4126
- Status: (0, smithy_client_1.expectString)(output.Status),
4127
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
4128
- WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
4129
- };
4130
- };
4131
- const de_WorkloadShareSummaries = (output, context) => {
4132
- const retVal = (output || [])
4133
- .filter((e) => e != null)
4134
- .map((entry) => {
4135
- if (entry === null) {
4136
- return null;
4137
- }
4138
- return de_WorkloadShareSummary(entry, context);
4139
- });
4140
- return retVal;
4141
- };
4142
- const de_WorkloadShareSummary = (output, context) => {
4143
- return {
4144
- PermissionType: (0, smithy_client_1.expectString)(output.PermissionType),
4145
- ShareId: (0, smithy_client_1.expectString)(output.ShareId),
4146
- SharedWith: (0, smithy_client_1.expectString)(output.SharedWith),
4147
- Status: (0, smithy_client_1.expectString)(output.Status),
4148
- StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
4149
- };
4150
3333
  };
4151
3334
  const de_WorkloadSummaries = (output, context) => {
4152
3335
  const retVal = (output || [])
4153
3336
  .filter((e) => e != null)
4154
3337
  .map((entry) => {
4155
- if (entry === null) {
4156
- return null;
4157
- }
4158
3338
  return de_WorkloadSummary(entry, context);
4159
3339
  });
4160
3340
  return retVal;
4161
3341
  };
4162
3342
  const de_WorkloadSummary = (output, context) => {
4163
- return {
4164
- ImprovementStatus: (0, smithy_client_1.expectString)(output.ImprovementStatus),
4165
- Lenses: output.Lenses != null ? de_WorkloadLenses(output.Lenses, context) : undefined,
4166
- Owner: (0, smithy_client_1.expectString)(output.Owner),
4167
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
4168
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
4169
- WorkloadArn: (0, smithy_client_1.expectString)(output.WorkloadArn),
4170
- WorkloadId: (0, smithy_client_1.expectString)(output.WorkloadId),
4171
- WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
4172
- };
3343
+ return (0, smithy_client_1.take)(output, {
3344
+ ImprovementStatus: smithy_client_1.expectString,
3345
+ Lenses: smithy_client_1._json,
3346
+ Owner: smithy_client_1.expectString,
3347
+ RiskCounts: smithy_client_1._json,
3348
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3349
+ WorkloadArn: smithy_client_1.expectString,
3350
+ WorkloadId: smithy_client_1.expectString,
3351
+ WorkloadName: smithy_client_1.expectString,
3352
+ });
4173
3353
  };
4174
3354
  const deserializeMetadata = (output) => ({
4175
3355
  httpStatusCode: output.statusCode,