@aws-sdk/client-wellarchitected 3.312.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  import { WellArchitectedServiceException as __BaseException } from "../models/WellArchitectedServiceException";
@@ -11,9 +11,9 @@ export const se_AssociateLensesCommand = async (input, context) => {
11
11
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/associateLenses";
12
12
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
13
13
  let body;
14
- body = JSON.stringify({
15
- ...(input.LensAliases != null && { LensAliases: se_LensAliases(input.LensAliases, context) }),
16
- });
14
+ body = JSON.stringify(take(input, {
15
+ LensAliases: (_) => _json(_),
16
+ }));
17
17
  return new __HttpRequest({
18
18
  protocol,
19
19
  hostname,
@@ -32,10 +32,10 @@ export const se_CreateLensShareCommand = async (input, context) => {
32
32
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
33
33
  resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
34
34
  let body;
35
- body = JSON.stringify({
36
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
37
- ...(input.SharedWith != null && { SharedWith: input.SharedWith }),
38
- });
35
+ body = JSON.stringify(take(input, {
36
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
37
+ SharedWith: [],
38
+ }));
39
39
  return new __HttpRequest({
40
40
  protocol,
41
41
  hostname,
@@ -54,11 +54,11 @@ export const se_CreateLensVersionCommand = async (input, context) => {
54
54
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versions";
55
55
  resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
56
56
  let body;
57
- body = JSON.stringify({
58
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
59
- ...(input.IsMajorVersion != null && { IsMajorVersion: input.IsMajorVersion }),
60
- ...(input.LensVersion != null && { LensVersion: input.LensVersion }),
61
- });
57
+ body = JSON.stringify(take(input, {
58
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
59
+ IsMajorVersion: [],
60
+ LensVersion: [],
61
+ }));
62
62
  return new __HttpRequest({
63
63
  protocol,
64
64
  hostname,
@@ -77,10 +77,10 @@ export const se_CreateMilestoneCommand = async (input, context) => {
77
77
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/milestones";
78
78
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
79
79
  let body;
80
- body = JSON.stringify({
81
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
82
- ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }),
83
- });
80
+ body = JSON.stringify(take(input, {
81
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
82
+ MilestoneName: [],
83
+ }));
84
84
  return new __HttpRequest({
85
85
  protocol,
86
86
  hostname,
@@ -98,29 +98,25 @@ export const se_CreateWorkloadCommand = async (input, context) => {
98
98
  };
99
99
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads";
100
100
  let body;
101
- body = JSON.stringify({
102
- ...(input.AccountIds != null && { AccountIds: se_WorkloadAccountIds(input.AccountIds, context) }),
103
- ...(input.Applications != null && { Applications: se_WorkloadApplications(input.Applications, context) }),
104
- ...(input.ArchitecturalDesign != null && { ArchitecturalDesign: input.ArchitecturalDesign }),
105
- ...(input.AwsRegions != null && { AwsRegions: se_WorkloadAwsRegions(input.AwsRegions, context) }),
106
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
107
- ...(input.Description != null && { Description: input.Description }),
108
- ...(input.DiscoveryConfig != null && {
109
- DiscoveryConfig: se_WorkloadDiscoveryConfig(input.DiscoveryConfig, context),
110
- }),
111
- ...(input.Environment != null && { Environment: input.Environment }),
112
- ...(input.Industry != null && { Industry: input.Industry }),
113
- ...(input.IndustryType != null && { IndustryType: input.IndustryType }),
114
- ...(input.Lenses != null && { Lenses: se_WorkloadLenses(input.Lenses, context) }),
115
- ...(input.NonAwsRegions != null && { NonAwsRegions: se_WorkloadNonAwsRegions(input.NonAwsRegions, context) }),
116
- ...(input.Notes != null && { Notes: input.Notes }),
117
- ...(input.PillarPriorities != null && {
118
- PillarPriorities: se_WorkloadPillarPriorities(input.PillarPriorities, context),
119
- }),
120
- ...(input.ReviewOwner != null && { ReviewOwner: input.ReviewOwner }),
121
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
122
- ...(input.WorkloadName != null && { WorkloadName: input.WorkloadName }),
123
- });
101
+ body = JSON.stringify(take(input, {
102
+ AccountIds: (_) => _json(_),
103
+ Applications: (_) => _json(_),
104
+ ArchitecturalDesign: [],
105
+ AwsRegions: (_) => _json(_),
106
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
107
+ Description: [],
108
+ DiscoveryConfig: (_) => _json(_),
109
+ Environment: [],
110
+ Industry: [],
111
+ IndustryType: [],
112
+ Lenses: (_) => _json(_),
113
+ NonAwsRegions: (_) => _json(_),
114
+ Notes: [],
115
+ PillarPriorities: (_) => _json(_),
116
+ ReviewOwner: [],
117
+ Tags: (_) => _json(_),
118
+ WorkloadName: [],
119
+ }));
124
120
  return new __HttpRequest({
125
121
  protocol,
126
122
  hostname,
@@ -139,11 +135,11 @@ export const se_CreateWorkloadShareCommand = async (input, context) => {
139
135
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
140
136
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
141
137
  let body;
142
- body = JSON.stringify({
143
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
144
- ...(input.PermissionType != null && { PermissionType: input.PermissionType }),
145
- ...(input.SharedWith != null && { SharedWith: input.SharedWith }),
146
- });
138
+ body = JSON.stringify(take(input, {
139
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
140
+ PermissionType: [],
141
+ SharedWith: [],
142
+ }));
147
143
  return new __HttpRequest({
148
144
  protocol,
149
145
  hostname,
@@ -246,9 +242,9 @@ export const se_DisassociateLensesCommand = async (input, context) => {
246
242
  "/workloads/{WorkloadId}/disassociateLenses";
247
243
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
248
244
  let body;
249
- body = JSON.stringify({
250
- ...(input.LensAliases != null && { LensAliases: se_LensAliases(input.LensAliases, context) }),
251
- });
245
+ body = JSON.stringify(take(input, {
246
+ LensAliases: (_) => _json(_),
247
+ }));
252
248
  return new __HttpRequest({
253
249
  protocol,
254
250
  hostname,
@@ -453,12 +449,12 @@ export const se_ImportLensCommand = async (input, context) => {
453
449
  };
454
450
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importLens";
455
451
  let body;
456
- body = JSON.stringify({
457
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
458
- ...(input.JSONString != null && { JSONString: input.JSONString }),
459
- ...(input.LensAlias != null && { LensAlias: input.LensAlias }),
460
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
461
- });
452
+ body = JSON.stringify(take(input, {
453
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
454
+ JSONString: [],
455
+ LensAlias: [],
456
+ Tags: (_) => _json(_),
457
+ }));
462
458
  return new __HttpRequest({
463
459
  protocol,
464
460
  hostname,
@@ -502,14 +498,14 @@ export const se_ListCheckDetailsCommand = async (input, context) => {
502
498
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/checks";
503
499
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
504
500
  let body;
505
- body = JSON.stringify({
506
- ...(input.ChoiceId != null && { ChoiceId: input.ChoiceId }),
507
- ...(input.LensArn != null && { LensArn: input.LensArn }),
508
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
509
- ...(input.NextToken != null && { NextToken: input.NextToken }),
510
- ...(input.PillarId != null && { PillarId: input.PillarId }),
511
- ...(input.QuestionId != null && { QuestionId: input.QuestionId }),
512
- });
501
+ body = JSON.stringify(take(input, {
502
+ ChoiceId: [],
503
+ LensArn: [],
504
+ MaxResults: [],
505
+ NextToken: [],
506
+ PillarId: [],
507
+ QuestionId: [],
508
+ }));
513
509
  return new __HttpRequest({
514
510
  protocol,
515
511
  hostname,
@@ -528,14 +524,14 @@ export const se_ListCheckSummariesCommand = async (input, context) => {
528
524
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/checkSummaries";
529
525
  resolvedPath = __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(take(input, {
528
+ ChoiceId: [],
529
+ LensArn: [],
530
+ MaxResults: [],
531
+ NextToken: [],
532
+ PillarId: [],
533
+ QuestionId: [],
534
+ }));
539
535
  return new __HttpRequest({
540
536
  protocol,
541
537
  hostname,
@@ -648,10 +644,10 @@ export const se_ListMilestonesCommand = async (input, context) => {
648
644
  "/workloads/{WorkloadId}/milestonesSummaries";
649
645
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
650
646
  let body;
651
- body = JSON.stringify({
652
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
653
- ...(input.NextToken != null && { NextToken: input.NextToken }),
654
- });
647
+ body = JSON.stringify(take(input, {
648
+ MaxResults: [],
649
+ NextToken: [],
650
+ }));
655
651
  return new __HttpRequest({
656
652
  protocol,
657
653
  hostname,
@@ -669,11 +665,11 @@ export const se_ListNotificationsCommand = async (input, context) => {
669
665
  };
670
666
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/notifications";
671
667
  let body;
672
- body = JSON.stringify({
673
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
674
- ...(input.NextToken != null && { NextToken: input.NextToken }),
675
- ...(input.WorkloadId != null && { WorkloadId: input.WorkloadId }),
676
- });
668
+ body = JSON.stringify(take(input, {
669
+ MaxResults: [],
670
+ NextToken: [],
671
+ WorkloadId: [],
672
+ }));
677
673
  return new __HttpRequest({
678
674
  protocol,
679
675
  hostname,
@@ -730,11 +726,11 @@ export const se_ListWorkloadsCommand = async (input, context) => {
730
726
  };
731
727
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries";
732
728
  let body;
733
- body = JSON.stringify({
734
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
735
- ...(input.NextToken != null && { NextToken: input.NextToken }),
736
- ...(input.WorkloadNamePrefix != null && { WorkloadNamePrefix: input.WorkloadNamePrefix }),
737
- });
729
+ body = JSON.stringify(take(input, {
730
+ MaxResults: [],
731
+ NextToken: [],
732
+ WorkloadNamePrefix: [],
733
+ }));
738
734
  return new __HttpRequest({
739
735
  protocol,
740
736
  hostname,
@@ -776,9 +772,9 @@ export const se_TagResourceCommand = async (input, context) => {
776
772
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
777
773
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn, "{WorkloadArn}", false);
778
774
  let body;
779
- body = JSON.stringify({
780
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
781
- });
775
+ body = JSON.stringify(take(input, {
776
+ Tags: (_) => _json(_),
777
+ }));
782
778
  return new __HttpRequest({
783
779
  protocol,
784
780
  hostname,
@@ -823,13 +819,13 @@ export const se_UpdateAnswerCommand = async (input, context) => {
823
819
  resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
824
820
  resolvedPath = __resolvedPath(resolvedPath, input, "QuestionId", () => input.QuestionId, "{QuestionId}", false);
825
821
  let body;
826
- body = JSON.stringify({
827
- ...(input.ChoiceUpdates != null && { ChoiceUpdates: se_ChoiceUpdates(input.ChoiceUpdates, context) }),
828
- ...(input.IsApplicable != null && { IsApplicable: input.IsApplicable }),
829
- ...(input.Notes != null && { Notes: input.Notes }),
830
- ...(input.Reason != null && { Reason: input.Reason }),
831
- ...(input.SelectedChoices != null && { SelectedChoices: se_SelectedChoices(input.SelectedChoices, context) }),
832
- });
822
+ body = JSON.stringify(take(input, {
823
+ ChoiceUpdates: (_) => _json(_),
824
+ IsApplicable: [],
825
+ Notes: [],
826
+ Reason: [],
827
+ SelectedChoices: (_) => _json(_),
828
+ }));
833
829
  return new __HttpRequest({
834
830
  protocol,
835
831
  hostname,
@@ -847,9 +843,9 @@ export const se_UpdateGlobalSettingsCommand = async (input, context) => {
847
843
  };
848
844
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-settings";
849
845
  let body;
850
- body = JSON.stringify({
851
- ...(input.OrganizationSharingStatus != null && { OrganizationSharingStatus: input.OrganizationSharingStatus }),
852
- });
846
+ body = JSON.stringify(take(input, {
847
+ OrganizationSharingStatus: [],
848
+ }));
853
849
  return new __HttpRequest({
854
850
  protocol,
855
851
  hostname,
@@ -870,10 +866,10 @@ export const se_UpdateLensReviewCommand = async (input, context) => {
870
866
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
871
867
  resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
872
868
  let body;
873
- body = JSON.stringify({
874
- ...(input.LensNotes != null && { LensNotes: input.LensNotes }),
875
- ...(input.PillarNotes != null && { PillarNotes: se_PillarNotes(input.PillarNotes, context) }),
876
- });
869
+ body = JSON.stringify(take(input, {
870
+ LensNotes: [],
871
+ PillarNotes: (_) => _json(_),
872
+ }));
877
873
  return new __HttpRequest({
878
874
  protocol,
879
875
  hostname,
@@ -892,9 +888,9 @@ export const se_UpdateShareInvitationCommand = async (input, context) => {
892
888
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations/{ShareInvitationId}";
893
889
  resolvedPath = __resolvedPath(resolvedPath, input, "ShareInvitationId", () => input.ShareInvitationId, "{ShareInvitationId}", false);
894
890
  let body;
895
- body = JSON.stringify({
896
- ...(input.ShareInvitationAction != null && { ShareInvitationAction: input.ShareInvitationAction }),
897
- });
891
+ body = JSON.stringify(take(input, {
892
+ ShareInvitationAction: [],
893
+ }));
898
894
  return new __HttpRequest({
899
895
  protocol,
900
896
  hostname,
@@ -913,30 +909,24 @@ export const se_UpdateWorkloadCommand = async (input, context) => {
913
909
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
914
910
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
915
911
  let body;
916
- body = JSON.stringify({
917
- ...(input.AccountIds != null && { AccountIds: se_WorkloadAccountIds(input.AccountIds, context) }),
918
- ...(input.Applications != null && { Applications: se_WorkloadApplications(input.Applications, context) }),
919
- ...(input.ArchitecturalDesign != null && { ArchitecturalDesign: input.ArchitecturalDesign }),
920
- ...(input.AwsRegions != null && { AwsRegions: se_WorkloadAwsRegions(input.AwsRegions, context) }),
921
- ...(input.Description != null && { Description: input.Description }),
922
- ...(input.DiscoveryConfig != null && {
923
- DiscoveryConfig: se_WorkloadDiscoveryConfig(input.DiscoveryConfig, context),
924
- }),
925
- ...(input.Environment != null && { Environment: input.Environment }),
926
- ...(input.ImprovementStatus != null && { ImprovementStatus: input.ImprovementStatus }),
927
- ...(input.Industry != null && { Industry: input.Industry }),
928
- ...(input.IndustryType != null && { IndustryType: input.IndustryType }),
929
- ...(input.IsReviewOwnerUpdateAcknowledged != null && {
930
- IsReviewOwnerUpdateAcknowledged: input.IsReviewOwnerUpdateAcknowledged,
931
- }),
932
- ...(input.NonAwsRegions != null && { NonAwsRegions: se_WorkloadNonAwsRegions(input.NonAwsRegions, context) }),
933
- ...(input.Notes != null && { Notes: input.Notes }),
934
- ...(input.PillarPriorities != null && {
935
- PillarPriorities: se_WorkloadPillarPriorities(input.PillarPriorities, context),
936
- }),
937
- ...(input.ReviewOwner != null && { ReviewOwner: input.ReviewOwner }),
938
- ...(input.WorkloadName != null && { WorkloadName: input.WorkloadName }),
939
- });
912
+ body = JSON.stringify(take(input, {
913
+ AccountIds: (_) => _json(_),
914
+ Applications: (_) => _json(_),
915
+ ArchitecturalDesign: [],
916
+ AwsRegions: (_) => _json(_),
917
+ Description: [],
918
+ DiscoveryConfig: (_) => _json(_),
919
+ Environment: [],
920
+ ImprovementStatus: [],
921
+ Industry: [],
922
+ IndustryType: [],
923
+ IsReviewOwnerUpdateAcknowledged: [],
924
+ NonAwsRegions: (_) => _json(_),
925
+ Notes: [],
926
+ PillarPriorities: (_) => _json(_),
927
+ ReviewOwner: [],
928
+ WorkloadName: [],
929
+ }));
940
930
  return new __HttpRequest({
941
931
  protocol,
942
932
  hostname,
@@ -956,9 +946,9 @@ export const se_UpdateWorkloadShareCommand = async (input, context) => {
956
946
  resolvedPath = __resolvedPath(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
957
947
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
958
948
  let body;
959
- body = JSON.stringify({
960
- ...(input.PermissionType != null && { PermissionType: input.PermissionType }),
961
- });
949
+ body = JSON.stringify(take(input, {
950
+ PermissionType: [],
951
+ }));
962
952
  return new __HttpRequest({
963
953
  protocol,
964
954
  hostname,
@@ -979,10 +969,10 @@ export const se_UpgradeLensReviewCommand = async (input, context) => {
979
969
  resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
980
970
  resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
981
971
  let body;
982
- body = JSON.stringify({
983
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
984
- ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }),
985
- });
972
+ body = JSON.stringify(take(input, {
973
+ ClientRequestToken: [],
974
+ MilestoneName: [],
975
+ }));
986
976
  return new __HttpRequest({
987
977
  protocol,
988
978
  hostname,
@@ -1030,10 +1020,9 @@ const de_AssociateLensesCommandError = async (output, context) => {
1030
1020
  throw await de_ValidationExceptionRes(parsedOutput, context);
1031
1021
  default:
1032
1022
  const parsedBody = parsedOutput.body;
1033
- throwDefaultError({
1023
+ return throwDefaultError({
1034
1024
  output,
1035
1025
  parsedBody,
1036
- exceptionCtor: __BaseException,
1037
1026
  errorCode,
1038
1027
  });
1039
1028
  }
@@ -1046,9 +1035,10 @@ export const de_CreateLensShareCommand = async (output, context) => {
1046
1035
  $metadata: deserializeMetadata(output),
1047
1036
  });
1048
1037
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1049
- if (data.ShareId != null) {
1050
- contents.ShareId = __expectString(data.ShareId);
1051
- }
1038
+ const doc = take(data, {
1039
+ ShareId: __expectString,
1040
+ });
1041
+ Object.assign(contents, doc);
1052
1042
  return contents;
1053
1043
  };
1054
1044
  const de_CreateLensShareCommandError = async (output, context) => {
@@ -1081,10 +1071,9 @@ const de_CreateLensShareCommandError = async (output, context) => {
1081
1071
  throw await de_ValidationExceptionRes(parsedOutput, context);
1082
1072
  default:
1083
1073
  const parsedBody = parsedOutput.body;
1084
- throwDefaultError({
1074
+ return throwDefaultError({
1085
1075
  output,
1086
1076
  parsedBody,
1087
- exceptionCtor: __BaseException,
1088
1077
  errorCode,
1089
1078
  });
1090
1079
  }
@@ -1097,12 +1086,11 @@ export const de_CreateLensVersionCommand = async (output, context) => {
1097
1086
  $metadata: deserializeMetadata(output),
1098
1087
  });
1099
1088
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1100
- if (data.LensArn != null) {
1101
- contents.LensArn = __expectString(data.LensArn);
1102
- }
1103
- if (data.LensVersion != null) {
1104
- contents.LensVersion = __expectString(data.LensVersion);
1105
- }
1089
+ const doc = take(data, {
1090
+ LensArn: __expectString,
1091
+ LensVersion: __expectString,
1092
+ });
1093
+ Object.assign(contents, doc);
1106
1094
  return contents;
1107
1095
  };
1108
1096
  const de_CreateLensVersionCommandError = async (output, context) => {
@@ -1135,10 +1123,9 @@ const de_CreateLensVersionCommandError = async (output, context) => {
1135
1123
  throw await de_ValidationExceptionRes(parsedOutput, context);
1136
1124
  default:
1137
1125
  const parsedBody = parsedOutput.body;
1138
- throwDefaultError({
1126
+ return throwDefaultError({
1139
1127
  output,
1140
1128
  parsedBody,
1141
- exceptionCtor: __BaseException,
1142
1129
  errorCode,
1143
1130
  });
1144
1131
  }
@@ -1151,12 +1138,11 @@ export const de_CreateMilestoneCommand = async (output, context) => {
1151
1138
  $metadata: deserializeMetadata(output),
1152
1139
  });
1153
1140
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1154
- if (data.MilestoneNumber != null) {
1155
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
1156
- }
1157
- if (data.WorkloadId != null) {
1158
- contents.WorkloadId = __expectString(data.WorkloadId);
1159
- }
1141
+ const doc = take(data, {
1142
+ MilestoneNumber: __expectInt32,
1143
+ WorkloadId: __expectString,
1144
+ });
1145
+ Object.assign(contents, doc);
1160
1146
  return contents;
1161
1147
  };
1162
1148
  const de_CreateMilestoneCommandError = async (output, context) => {
@@ -1189,10 +1175,9 @@ const de_CreateMilestoneCommandError = async (output, context) => {
1189
1175
  throw await de_ValidationExceptionRes(parsedOutput, context);
1190
1176
  default:
1191
1177
  const parsedBody = parsedOutput.body;
1192
- throwDefaultError({
1178
+ return throwDefaultError({
1193
1179
  output,
1194
1180
  parsedBody,
1195
- exceptionCtor: __BaseException,
1196
1181
  errorCode,
1197
1182
  });
1198
1183
  }
@@ -1205,12 +1190,11 @@ export const de_CreateWorkloadCommand = async (output, context) => {
1205
1190
  $metadata: deserializeMetadata(output),
1206
1191
  });
1207
1192
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1208
- if (data.WorkloadArn != null) {
1209
- contents.WorkloadArn = __expectString(data.WorkloadArn);
1210
- }
1211
- if (data.WorkloadId != null) {
1212
- contents.WorkloadId = __expectString(data.WorkloadId);
1213
- }
1193
+ const doc = take(data, {
1194
+ WorkloadArn: __expectString,
1195
+ WorkloadId: __expectString,
1196
+ });
1197
+ Object.assign(contents, doc);
1214
1198
  return contents;
1215
1199
  };
1216
1200
  const de_CreateWorkloadCommandError = async (output, context) => {
@@ -1243,10 +1227,9 @@ const de_CreateWorkloadCommandError = async (output, context) => {
1243
1227
  throw await de_ValidationExceptionRes(parsedOutput, context);
1244
1228
  default:
1245
1229
  const parsedBody = parsedOutput.body;
1246
- throwDefaultError({
1230
+ return throwDefaultError({
1247
1231
  output,
1248
1232
  parsedBody,
1249
- exceptionCtor: __BaseException,
1250
1233
  errorCode,
1251
1234
  });
1252
1235
  }
@@ -1259,12 +1242,11 @@ export const de_CreateWorkloadShareCommand = async (output, context) => {
1259
1242
  $metadata: deserializeMetadata(output),
1260
1243
  });
1261
1244
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1262
- if (data.ShareId != null) {
1263
- contents.ShareId = __expectString(data.ShareId);
1264
- }
1265
- if (data.WorkloadId != null) {
1266
- contents.WorkloadId = __expectString(data.WorkloadId);
1267
- }
1245
+ const doc = take(data, {
1246
+ ShareId: __expectString,
1247
+ WorkloadId: __expectString,
1248
+ });
1249
+ Object.assign(contents, doc);
1268
1250
  return contents;
1269
1251
  };
1270
1252
  const de_CreateWorkloadShareCommandError = async (output, context) => {
@@ -1297,10 +1279,9 @@ const de_CreateWorkloadShareCommandError = async (output, context) => {
1297
1279
  throw await de_ValidationExceptionRes(parsedOutput, context);
1298
1280
  default:
1299
1281
  const parsedBody = parsedOutput.body;
1300
- throwDefaultError({
1282
+ return throwDefaultError({
1301
1283
  output,
1302
1284
  parsedBody,
1303
- exceptionCtor: __BaseException,
1304
1285
  errorCode,
1305
1286
  });
1306
1287
  }
@@ -1342,10 +1323,9 @@ const de_DeleteLensCommandError = async (output, context) => {
1342
1323
  throw await de_ValidationExceptionRes(parsedOutput, context);
1343
1324
  default:
1344
1325
  const parsedBody = parsedOutput.body;
1345
- throwDefaultError({
1326
+ return throwDefaultError({
1346
1327
  output,
1347
1328
  parsedBody,
1348
- exceptionCtor: __BaseException,
1349
1329
  errorCode,
1350
1330
  });
1351
1331
  }
@@ -1387,10 +1367,9 @@ const de_DeleteLensShareCommandError = async (output, context) => {
1387
1367
  throw await de_ValidationExceptionRes(parsedOutput, context);
1388
1368
  default:
1389
1369
  const parsedBody = parsedOutput.body;
1390
- throwDefaultError({
1370
+ return throwDefaultError({
1391
1371
  output,
1392
1372
  parsedBody,
1393
- exceptionCtor: __BaseException,
1394
1373
  errorCode,
1395
1374
  });
1396
1375
  }
@@ -1432,10 +1411,9 @@ const de_DeleteWorkloadCommandError = async (output, context) => {
1432
1411
  throw await de_ValidationExceptionRes(parsedOutput, context);
1433
1412
  default:
1434
1413
  const parsedBody = parsedOutput.body;
1435
- throwDefaultError({
1414
+ return throwDefaultError({
1436
1415
  output,
1437
1416
  parsedBody,
1438
- exceptionCtor: __BaseException,
1439
1417
  errorCode,
1440
1418
  });
1441
1419
  }
@@ -1477,10 +1455,9 @@ const de_DeleteWorkloadShareCommandError = async (output, context) => {
1477
1455
  throw await de_ValidationExceptionRes(parsedOutput, context);
1478
1456
  default:
1479
1457
  const parsedBody = parsedOutput.body;
1480
- throwDefaultError({
1458
+ return throwDefaultError({
1481
1459
  output,
1482
1460
  parsedBody,
1483
- exceptionCtor: __BaseException,
1484
1461
  errorCode,
1485
1462
  });
1486
1463
  }
@@ -1522,10 +1499,9 @@ const de_DisassociateLensesCommandError = async (output, context) => {
1522
1499
  throw await de_ValidationExceptionRes(parsedOutput, context);
1523
1500
  default:
1524
1501
  const parsedBody = parsedOutput.body;
1525
- throwDefaultError({
1502
+ return throwDefaultError({
1526
1503
  output,
1527
1504
  parsedBody,
1528
- exceptionCtor: __BaseException,
1529
1505
  errorCode,
1530
1506
  });
1531
1507
  }
@@ -1538,9 +1514,10 @@ export const de_ExportLensCommand = async (output, context) => {
1538
1514
  $metadata: deserializeMetadata(output),
1539
1515
  });
1540
1516
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1541
- if (data.LensJSON != null) {
1542
- contents.LensJSON = __expectString(data.LensJSON);
1543
- }
1517
+ const doc = take(data, {
1518
+ LensJSON: __expectString,
1519
+ });
1520
+ Object.assign(contents, doc);
1544
1521
  return contents;
1545
1522
  };
1546
1523
  const de_ExportLensCommandError = async (output, context) => {
@@ -1567,10 +1544,9 @@ const de_ExportLensCommandError = async (output, context) => {
1567
1544
  throw await de_ValidationExceptionRes(parsedOutput, context);
1568
1545
  default:
1569
1546
  const parsedBody = parsedOutput.body;
1570
- throwDefaultError({
1547
+ return throwDefaultError({
1571
1548
  output,
1572
1549
  parsedBody,
1573
- exceptionCtor: __BaseException,
1574
1550
  errorCode,
1575
1551
  });
1576
1552
  }
@@ -1583,21 +1559,14 @@ export const de_GetAnswerCommand = async (output, context) => {
1583
1559
  $metadata: deserializeMetadata(output),
1584
1560
  });
1585
1561
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1586
- if (data.Answer != null) {
1587
- contents.Answer = de_Answer(data.Answer, context);
1588
- }
1589
- if (data.LensAlias != null) {
1590
- contents.LensAlias = __expectString(data.LensAlias);
1591
- }
1592
- if (data.LensArn != null) {
1593
- contents.LensArn = __expectString(data.LensArn);
1594
- }
1595
- if (data.MilestoneNumber != null) {
1596
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
1597
- }
1598
- if (data.WorkloadId != null) {
1599
- contents.WorkloadId = __expectString(data.WorkloadId);
1600
- }
1562
+ const doc = take(data, {
1563
+ Answer: _json,
1564
+ LensAlias: __expectString,
1565
+ LensArn: __expectString,
1566
+ MilestoneNumber: __expectInt32,
1567
+ WorkloadId: __expectString,
1568
+ });
1569
+ Object.assign(contents, doc);
1601
1570
  return contents;
1602
1571
  };
1603
1572
  const de_GetAnswerCommandError = async (output, context) => {
@@ -1624,10 +1593,9 @@ const de_GetAnswerCommandError = async (output, context) => {
1624
1593
  throw await de_ValidationExceptionRes(parsedOutput, context);
1625
1594
  default:
1626
1595
  const parsedBody = parsedOutput.body;
1627
- throwDefaultError({
1596
+ return throwDefaultError({
1628
1597
  output,
1629
1598
  parsedBody,
1630
- exceptionCtor: __BaseException,
1631
1599
  errorCode,
1632
1600
  });
1633
1601
  }
@@ -1640,15 +1608,12 @@ export const de_GetConsolidatedReportCommand = async (output, context) => {
1640
1608
  $metadata: deserializeMetadata(output),
1641
1609
  });
1642
1610
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1643
- if (data.Base64String != null) {
1644
- contents.Base64String = __expectString(data.Base64String);
1645
- }
1646
- if (data.Metrics != null) {
1647
- contents.Metrics = de_ConsolidatedReportMetrics(data.Metrics, context);
1648
- }
1649
- if (data.NextToken != null) {
1650
- contents.NextToken = __expectString(data.NextToken);
1651
- }
1611
+ const doc = take(data, {
1612
+ Base64String: __expectString,
1613
+ Metrics: (_) => de_ConsolidatedReportMetrics(_, context),
1614
+ NextToken: __expectString,
1615
+ });
1616
+ Object.assign(contents, doc);
1652
1617
  return contents;
1653
1618
  };
1654
1619
  const de_GetConsolidatedReportCommandError = async (output, context) => {
@@ -1675,10 +1640,9 @@ const de_GetConsolidatedReportCommandError = async (output, context) => {
1675
1640
  throw await de_ValidationExceptionRes(parsedOutput, context);
1676
1641
  default:
1677
1642
  const parsedBody = parsedOutput.body;
1678
- throwDefaultError({
1643
+ return throwDefaultError({
1679
1644
  output,
1680
1645
  parsedBody,
1681
- exceptionCtor: __BaseException,
1682
1646
  errorCode,
1683
1647
  });
1684
1648
  }
@@ -1691,9 +1655,10 @@ export const de_GetLensCommand = async (output, context) => {
1691
1655
  $metadata: deserializeMetadata(output),
1692
1656
  });
1693
1657
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1694
- if (data.Lens != null) {
1695
- contents.Lens = de_Lens(data.Lens, context);
1696
- }
1658
+ const doc = take(data, {
1659
+ Lens: _json,
1660
+ });
1661
+ Object.assign(contents, doc);
1697
1662
  return contents;
1698
1663
  };
1699
1664
  const de_GetLensCommandError = async (output, context) => {
@@ -1720,10 +1685,9 @@ const de_GetLensCommandError = async (output, context) => {
1720
1685
  throw await de_ValidationExceptionRes(parsedOutput, context);
1721
1686
  default:
1722
1687
  const parsedBody = parsedOutput.body;
1723
- throwDefaultError({
1688
+ return throwDefaultError({
1724
1689
  output,
1725
1690
  parsedBody,
1726
- exceptionCtor: __BaseException,
1727
1691
  errorCode,
1728
1692
  });
1729
1693
  }
@@ -1736,15 +1700,12 @@ export const de_GetLensReviewCommand = async (output, context) => {
1736
1700
  $metadata: deserializeMetadata(output),
1737
1701
  });
1738
1702
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1739
- if (data.LensReview != null) {
1740
- contents.LensReview = de_LensReview(data.LensReview, context);
1741
- }
1742
- if (data.MilestoneNumber != null) {
1743
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
1744
- }
1745
- if (data.WorkloadId != null) {
1746
- contents.WorkloadId = __expectString(data.WorkloadId);
1747
- }
1703
+ const doc = take(data, {
1704
+ LensReview: (_) => de_LensReview(_, context),
1705
+ MilestoneNumber: __expectInt32,
1706
+ WorkloadId: __expectString,
1707
+ });
1708
+ Object.assign(contents, doc);
1748
1709
  return contents;
1749
1710
  };
1750
1711
  const de_GetLensReviewCommandError = async (output, context) => {
@@ -1771,10 +1732,9 @@ const de_GetLensReviewCommandError = async (output, context) => {
1771
1732
  throw await de_ValidationExceptionRes(parsedOutput, context);
1772
1733
  default:
1773
1734
  const parsedBody = parsedOutput.body;
1774
- throwDefaultError({
1735
+ return throwDefaultError({
1775
1736
  output,
1776
1737
  parsedBody,
1777
- exceptionCtor: __BaseException,
1778
1738
  errorCode,
1779
1739
  });
1780
1740
  }
@@ -1787,15 +1747,12 @@ export const de_GetLensReviewReportCommand = async (output, context) => {
1787
1747
  $metadata: deserializeMetadata(output),
1788
1748
  });
1789
1749
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1790
- if (data.LensReviewReport != null) {
1791
- contents.LensReviewReport = de_LensReviewReport(data.LensReviewReport, context);
1792
- }
1793
- if (data.MilestoneNumber != null) {
1794
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
1795
- }
1796
- if (data.WorkloadId != null) {
1797
- contents.WorkloadId = __expectString(data.WorkloadId);
1798
- }
1750
+ const doc = take(data, {
1751
+ LensReviewReport: _json,
1752
+ MilestoneNumber: __expectInt32,
1753
+ WorkloadId: __expectString,
1754
+ });
1755
+ Object.assign(contents, doc);
1799
1756
  return contents;
1800
1757
  };
1801
1758
  const de_GetLensReviewReportCommandError = async (output, context) => {
@@ -1822,10 +1779,9 @@ const de_GetLensReviewReportCommandError = async (output, context) => {
1822
1779
  throw await de_ValidationExceptionRes(parsedOutput, context);
1823
1780
  default:
1824
1781
  const parsedBody = parsedOutput.body;
1825
- throwDefaultError({
1782
+ return throwDefaultError({
1826
1783
  output,
1827
1784
  parsedBody,
1828
- exceptionCtor: __BaseException,
1829
1785
  errorCode,
1830
1786
  });
1831
1787
  }
@@ -1838,24 +1794,15 @@ export const de_GetLensVersionDifferenceCommand = async (output, context) => {
1838
1794
  $metadata: deserializeMetadata(output),
1839
1795
  });
1840
1796
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1841
- if (data.BaseLensVersion != null) {
1842
- contents.BaseLensVersion = __expectString(data.BaseLensVersion);
1843
- }
1844
- if (data.LatestLensVersion != null) {
1845
- contents.LatestLensVersion = __expectString(data.LatestLensVersion);
1846
- }
1847
- if (data.LensAlias != null) {
1848
- contents.LensAlias = __expectString(data.LensAlias);
1849
- }
1850
- if (data.LensArn != null) {
1851
- contents.LensArn = __expectString(data.LensArn);
1852
- }
1853
- if (data.TargetLensVersion != null) {
1854
- contents.TargetLensVersion = __expectString(data.TargetLensVersion);
1855
- }
1856
- if (data.VersionDifferences != null) {
1857
- contents.VersionDifferences = de_VersionDifferences(data.VersionDifferences, context);
1858
- }
1797
+ const doc = take(data, {
1798
+ BaseLensVersion: __expectString,
1799
+ LatestLensVersion: __expectString,
1800
+ LensAlias: __expectString,
1801
+ LensArn: __expectString,
1802
+ TargetLensVersion: __expectString,
1803
+ VersionDifferences: _json,
1804
+ });
1805
+ Object.assign(contents, doc);
1859
1806
  return contents;
1860
1807
  };
1861
1808
  const de_GetLensVersionDifferenceCommandError = async (output, context) => {
@@ -1882,10 +1829,9 @@ const de_GetLensVersionDifferenceCommandError = async (output, context) => {
1882
1829
  throw await de_ValidationExceptionRes(parsedOutput, context);
1883
1830
  default:
1884
1831
  const parsedBody = parsedOutput.body;
1885
- throwDefaultError({
1832
+ return throwDefaultError({
1886
1833
  output,
1887
1834
  parsedBody,
1888
- exceptionCtor: __BaseException,
1889
1835
  errorCode,
1890
1836
  });
1891
1837
  }
@@ -1898,12 +1844,11 @@ export const de_GetMilestoneCommand = async (output, context) => {
1898
1844
  $metadata: deserializeMetadata(output),
1899
1845
  });
1900
1846
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1901
- if (data.Milestone != null) {
1902
- contents.Milestone = de_Milestone(data.Milestone, context);
1903
- }
1904
- if (data.WorkloadId != null) {
1905
- contents.WorkloadId = __expectString(data.WorkloadId);
1906
- }
1847
+ const doc = take(data, {
1848
+ Milestone: (_) => de_Milestone(_, context),
1849
+ WorkloadId: __expectString,
1850
+ });
1851
+ Object.assign(contents, doc);
1907
1852
  return contents;
1908
1853
  };
1909
1854
  const de_GetMilestoneCommandError = async (output, context) => {
@@ -1930,10 +1875,9 @@ const de_GetMilestoneCommandError = async (output, context) => {
1930
1875
  throw await de_ValidationExceptionRes(parsedOutput, context);
1931
1876
  default:
1932
1877
  const parsedBody = parsedOutput.body;
1933
- throwDefaultError({
1878
+ return throwDefaultError({
1934
1879
  output,
1935
1880
  parsedBody,
1936
- exceptionCtor: __BaseException,
1937
1881
  errorCode,
1938
1882
  });
1939
1883
  }
@@ -1946,9 +1890,10 @@ export const de_GetWorkloadCommand = async (output, context) => {
1946
1890
  $metadata: deserializeMetadata(output),
1947
1891
  });
1948
1892
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1949
- if (data.Workload != null) {
1950
- contents.Workload = de_Workload(data.Workload, context);
1951
- }
1893
+ const doc = take(data, {
1894
+ Workload: (_) => de_Workload(_, context),
1895
+ });
1896
+ Object.assign(contents, doc);
1952
1897
  return contents;
1953
1898
  };
1954
1899
  const de_GetWorkloadCommandError = async (output, context) => {
@@ -1975,10 +1920,9 @@ const de_GetWorkloadCommandError = async (output, context) => {
1975
1920
  throw await de_ValidationExceptionRes(parsedOutput, context);
1976
1921
  default:
1977
1922
  const parsedBody = parsedOutput.body;
1978
- throwDefaultError({
1923
+ return throwDefaultError({
1979
1924
  output,
1980
1925
  parsedBody,
1981
- exceptionCtor: __BaseException,
1982
1926
  errorCode,
1983
1927
  });
1984
1928
  }
@@ -1991,12 +1935,11 @@ export const de_ImportLensCommand = async (output, context) => {
1991
1935
  $metadata: deserializeMetadata(output),
1992
1936
  });
1993
1937
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1994
- if (data.LensArn != null) {
1995
- contents.LensArn = __expectString(data.LensArn);
1996
- }
1997
- if (data.Status != null) {
1998
- contents.Status = __expectString(data.Status);
1999
- }
1938
+ const doc = take(data, {
1939
+ LensArn: __expectString,
1940
+ Status: __expectString,
1941
+ });
1942
+ Object.assign(contents, doc);
2000
1943
  return contents;
2001
1944
  };
2002
1945
  const de_ImportLensCommandError = async (output, context) => {
@@ -2029,10 +1972,9 @@ const de_ImportLensCommandError = async (output, context) => {
2029
1972
  throw await de_ValidationExceptionRes(parsedOutput, context);
2030
1973
  default:
2031
1974
  const parsedBody = parsedOutput.body;
2032
- throwDefaultError({
1975
+ return throwDefaultError({
2033
1976
  output,
2034
1977
  parsedBody,
2035
- exceptionCtor: __BaseException,
2036
1978
  errorCode,
2037
1979
  });
2038
1980
  }
@@ -2045,24 +1987,15 @@ export const de_ListAnswersCommand = async (output, context) => {
2045
1987
  $metadata: deserializeMetadata(output),
2046
1988
  });
2047
1989
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2048
- if (data.AnswerSummaries != null) {
2049
- contents.AnswerSummaries = de_AnswerSummaries(data.AnswerSummaries, context);
2050
- }
2051
- if (data.LensAlias != null) {
2052
- contents.LensAlias = __expectString(data.LensAlias);
2053
- }
2054
- if (data.LensArn != null) {
2055
- contents.LensArn = __expectString(data.LensArn);
2056
- }
2057
- if (data.MilestoneNumber != null) {
2058
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
2059
- }
2060
- if (data.NextToken != null) {
2061
- contents.NextToken = __expectString(data.NextToken);
2062
- }
2063
- if (data.WorkloadId != null) {
2064
- contents.WorkloadId = __expectString(data.WorkloadId);
2065
- }
1990
+ const doc = take(data, {
1991
+ AnswerSummaries: _json,
1992
+ LensAlias: __expectString,
1993
+ LensArn: __expectString,
1994
+ MilestoneNumber: __expectInt32,
1995
+ NextToken: __expectString,
1996
+ WorkloadId: __expectString,
1997
+ });
1998
+ Object.assign(contents, doc);
2066
1999
  return contents;
2067
2000
  };
2068
2001
  const de_ListAnswersCommandError = async (output, context) => {
@@ -2089,10 +2022,9 @@ const de_ListAnswersCommandError = async (output, context) => {
2089
2022
  throw await de_ValidationExceptionRes(parsedOutput, context);
2090
2023
  default:
2091
2024
  const parsedBody = parsedOutput.body;
2092
- throwDefaultError({
2025
+ return throwDefaultError({
2093
2026
  output,
2094
2027
  parsedBody,
2095
- exceptionCtor: __BaseException,
2096
2028
  errorCode,
2097
2029
  });
2098
2030
  }
@@ -2105,12 +2037,11 @@ export const de_ListCheckDetailsCommand = async (output, context) => {
2105
2037
  $metadata: deserializeMetadata(output),
2106
2038
  });
2107
2039
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2108
- if (data.CheckDetails != null) {
2109
- contents.CheckDetails = de_CheckDetails(data.CheckDetails, context);
2110
- }
2111
- if (data.NextToken != null) {
2112
- contents.NextToken = __expectString(data.NextToken);
2113
- }
2040
+ const doc = take(data, {
2041
+ CheckDetails: (_) => de_CheckDetails(_, context),
2042
+ NextToken: __expectString,
2043
+ });
2044
+ Object.assign(contents, doc);
2114
2045
  return contents;
2115
2046
  };
2116
2047
  const de_ListCheckDetailsCommandError = async (output, context) => {
@@ -2137,10 +2068,9 @@ const de_ListCheckDetailsCommandError = async (output, context) => {
2137
2068
  throw await de_ValidationExceptionRes(parsedOutput, context);
2138
2069
  default:
2139
2070
  const parsedBody = parsedOutput.body;
2140
- throwDefaultError({
2071
+ return throwDefaultError({
2141
2072
  output,
2142
2073
  parsedBody,
2143
- exceptionCtor: __BaseException,
2144
2074
  errorCode,
2145
2075
  });
2146
2076
  }
@@ -2153,12 +2083,11 @@ export const de_ListCheckSummariesCommand = async (output, context) => {
2153
2083
  $metadata: deserializeMetadata(output),
2154
2084
  });
2155
2085
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2156
- if (data.CheckSummaries != null) {
2157
- contents.CheckSummaries = de_CheckSummaries(data.CheckSummaries, context);
2158
- }
2159
- if (data.NextToken != null) {
2160
- contents.NextToken = __expectString(data.NextToken);
2161
- }
2086
+ const doc = take(data, {
2087
+ CheckSummaries: (_) => de_CheckSummaries(_, context),
2088
+ NextToken: __expectString,
2089
+ });
2090
+ Object.assign(contents, doc);
2162
2091
  return contents;
2163
2092
  };
2164
2093
  const de_ListCheckSummariesCommandError = async (output, context) => {
@@ -2185,10 +2114,9 @@ const de_ListCheckSummariesCommandError = async (output, context) => {
2185
2114
  throw await de_ValidationExceptionRes(parsedOutput, context);
2186
2115
  default:
2187
2116
  const parsedBody = parsedOutput.body;
2188
- throwDefaultError({
2117
+ return throwDefaultError({
2189
2118
  output,
2190
2119
  parsedBody,
2191
- exceptionCtor: __BaseException,
2192
2120
  errorCode,
2193
2121
  });
2194
2122
  }
@@ -2201,12 +2129,11 @@ export const de_ListLensesCommand = async (output, context) => {
2201
2129
  $metadata: deserializeMetadata(output),
2202
2130
  });
2203
2131
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2204
- if (data.LensSummaries != null) {
2205
- contents.LensSummaries = de_LensSummaries(data.LensSummaries, context);
2206
- }
2207
- if (data.NextToken != null) {
2208
- contents.NextToken = __expectString(data.NextToken);
2209
- }
2132
+ const doc = take(data, {
2133
+ LensSummaries: (_) => de_LensSummaries(_, context),
2134
+ NextToken: __expectString,
2135
+ });
2136
+ Object.assign(contents, doc);
2210
2137
  return contents;
2211
2138
  };
2212
2139
  const de_ListLensesCommandError = async (output, context) => {
@@ -2230,10 +2157,9 @@ const de_ListLensesCommandError = async (output, context) => {
2230
2157
  throw await de_ValidationExceptionRes(parsedOutput, context);
2231
2158
  default:
2232
2159
  const parsedBody = parsedOutput.body;
2233
- throwDefaultError({
2160
+ return throwDefaultError({
2234
2161
  output,
2235
2162
  parsedBody,
2236
- exceptionCtor: __BaseException,
2237
2163
  errorCode,
2238
2164
  });
2239
2165
  }
@@ -2246,24 +2172,15 @@ export const de_ListLensReviewImprovementsCommand = async (output, context) => {
2246
2172
  $metadata: deserializeMetadata(output),
2247
2173
  });
2248
2174
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2249
- if (data.ImprovementSummaries != null) {
2250
- contents.ImprovementSummaries = de_ImprovementSummaries(data.ImprovementSummaries, context);
2251
- }
2252
- if (data.LensAlias != null) {
2253
- contents.LensAlias = __expectString(data.LensAlias);
2254
- }
2255
- if (data.LensArn != null) {
2256
- contents.LensArn = __expectString(data.LensArn);
2257
- }
2258
- if (data.MilestoneNumber != null) {
2259
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
2260
- }
2261
- if (data.NextToken != null) {
2262
- contents.NextToken = __expectString(data.NextToken);
2263
- }
2264
- if (data.WorkloadId != null) {
2265
- contents.WorkloadId = __expectString(data.WorkloadId);
2266
- }
2175
+ const doc = take(data, {
2176
+ ImprovementSummaries: _json,
2177
+ LensAlias: __expectString,
2178
+ LensArn: __expectString,
2179
+ MilestoneNumber: __expectInt32,
2180
+ NextToken: __expectString,
2181
+ WorkloadId: __expectString,
2182
+ });
2183
+ Object.assign(contents, doc);
2267
2184
  return contents;
2268
2185
  };
2269
2186
  const de_ListLensReviewImprovementsCommandError = async (output, context) => {
@@ -2290,10 +2207,9 @@ const de_ListLensReviewImprovementsCommandError = async (output, context) => {
2290
2207
  throw await de_ValidationExceptionRes(parsedOutput, context);
2291
2208
  default:
2292
2209
  const parsedBody = parsedOutput.body;
2293
- throwDefaultError({
2210
+ return throwDefaultError({
2294
2211
  output,
2295
2212
  parsedBody,
2296
- exceptionCtor: __BaseException,
2297
2213
  errorCode,
2298
2214
  });
2299
2215
  }
@@ -2306,18 +2222,13 @@ export const de_ListLensReviewsCommand = async (output, context) => {
2306
2222
  $metadata: deserializeMetadata(output),
2307
2223
  });
2308
2224
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2309
- if (data.LensReviewSummaries != null) {
2310
- contents.LensReviewSummaries = de_LensReviewSummaries(data.LensReviewSummaries, context);
2311
- }
2312
- if (data.MilestoneNumber != null) {
2313
- contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
2314
- }
2315
- if (data.NextToken != null) {
2316
- contents.NextToken = __expectString(data.NextToken);
2317
- }
2318
- if (data.WorkloadId != null) {
2319
- contents.WorkloadId = __expectString(data.WorkloadId);
2320
- }
2225
+ const doc = take(data, {
2226
+ LensReviewSummaries: (_) => de_LensReviewSummaries(_, context),
2227
+ MilestoneNumber: __expectInt32,
2228
+ NextToken: __expectString,
2229
+ WorkloadId: __expectString,
2230
+ });
2231
+ Object.assign(contents, doc);
2321
2232
  return contents;
2322
2233
  };
2323
2234
  const de_ListLensReviewsCommandError = async (output, context) => {
@@ -2344,10 +2255,9 @@ const de_ListLensReviewsCommandError = async (output, context) => {
2344
2255
  throw await de_ValidationExceptionRes(parsedOutput, context);
2345
2256
  default:
2346
2257
  const parsedBody = parsedOutput.body;
2347
- throwDefaultError({
2258
+ return throwDefaultError({
2348
2259
  output,
2349
2260
  parsedBody,
2350
- exceptionCtor: __BaseException,
2351
2261
  errorCode,
2352
2262
  });
2353
2263
  }
@@ -2360,12 +2270,11 @@ export const de_ListLensSharesCommand = async (output, context) => {
2360
2270
  $metadata: deserializeMetadata(output),
2361
2271
  });
2362
2272
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2363
- if (data.LensShareSummaries != null) {
2364
- contents.LensShareSummaries = de_LensShareSummaries(data.LensShareSummaries, context);
2365
- }
2366
- if (data.NextToken != null) {
2367
- contents.NextToken = __expectString(data.NextToken);
2368
- }
2273
+ const doc = take(data, {
2274
+ LensShareSummaries: _json,
2275
+ NextToken: __expectString,
2276
+ });
2277
+ Object.assign(contents, doc);
2369
2278
  return contents;
2370
2279
  };
2371
2280
  const de_ListLensSharesCommandError = async (output, context) => {
@@ -2392,10 +2301,9 @@ const de_ListLensSharesCommandError = async (output, context) => {
2392
2301
  throw await de_ValidationExceptionRes(parsedOutput, context);
2393
2302
  default:
2394
2303
  const parsedBody = parsedOutput.body;
2395
- throwDefaultError({
2304
+ return throwDefaultError({
2396
2305
  output,
2397
2306
  parsedBody,
2398
- exceptionCtor: __BaseException,
2399
2307
  errorCode,
2400
2308
  });
2401
2309
  }
@@ -2408,15 +2316,12 @@ export const de_ListMilestonesCommand = async (output, context) => {
2408
2316
  $metadata: deserializeMetadata(output),
2409
2317
  });
2410
2318
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2411
- if (data.MilestoneSummaries != null) {
2412
- contents.MilestoneSummaries = de_MilestoneSummaries(data.MilestoneSummaries, context);
2413
- }
2414
- if (data.NextToken != null) {
2415
- contents.NextToken = __expectString(data.NextToken);
2416
- }
2417
- if (data.WorkloadId != null) {
2418
- contents.WorkloadId = __expectString(data.WorkloadId);
2419
- }
2319
+ const doc = take(data, {
2320
+ MilestoneSummaries: (_) => de_MilestoneSummaries(_, context),
2321
+ NextToken: __expectString,
2322
+ WorkloadId: __expectString,
2323
+ });
2324
+ Object.assign(contents, doc);
2420
2325
  return contents;
2421
2326
  };
2422
2327
  const de_ListMilestonesCommandError = async (output, context) => {
@@ -2443,10 +2348,9 @@ const de_ListMilestonesCommandError = async (output, context) => {
2443
2348
  throw await de_ValidationExceptionRes(parsedOutput, context);
2444
2349
  default:
2445
2350
  const parsedBody = parsedOutput.body;
2446
- throwDefaultError({
2351
+ return throwDefaultError({
2447
2352
  output,
2448
2353
  parsedBody,
2449
- exceptionCtor: __BaseException,
2450
2354
  errorCode,
2451
2355
  });
2452
2356
  }
@@ -2459,12 +2363,11 @@ export const de_ListNotificationsCommand = async (output, context) => {
2459
2363
  $metadata: deserializeMetadata(output),
2460
2364
  });
2461
2365
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2462
- if (data.NextToken != null) {
2463
- contents.NextToken = __expectString(data.NextToken);
2464
- }
2465
- if (data.NotificationSummaries != null) {
2466
- contents.NotificationSummaries = de_NotificationSummaries(data.NotificationSummaries, context);
2467
- }
2366
+ const doc = take(data, {
2367
+ NextToken: __expectString,
2368
+ NotificationSummaries: _json,
2369
+ });
2370
+ Object.assign(contents, doc);
2468
2371
  return contents;
2469
2372
  };
2470
2373
  const de_ListNotificationsCommandError = async (output, context) => {
@@ -2488,10 +2391,9 @@ const de_ListNotificationsCommandError = async (output, context) => {
2488
2391
  throw await de_ValidationExceptionRes(parsedOutput, context);
2489
2392
  default:
2490
2393
  const parsedBody = parsedOutput.body;
2491
- throwDefaultError({
2394
+ return throwDefaultError({
2492
2395
  output,
2493
2396
  parsedBody,
2494
- exceptionCtor: __BaseException,
2495
2397
  errorCode,
2496
2398
  });
2497
2399
  }
@@ -2504,12 +2406,11 @@ export const de_ListShareInvitationsCommand = async (output, context) => {
2504
2406
  $metadata: deserializeMetadata(output),
2505
2407
  });
2506
2408
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2507
- if (data.NextToken != null) {
2508
- contents.NextToken = __expectString(data.NextToken);
2509
- }
2510
- if (data.ShareInvitationSummaries != null) {
2511
- contents.ShareInvitationSummaries = de_ShareInvitationSummaries(data.ShareInvitationSummaries, context);
2512
- }
2409
+ const doc = take(data, {
2410
+ NextToken: __expectString,
2411
+ ShareInvitationSummaries: _json,
2412
+ });
2413
+ Object.assign(contents, doc);
2513
2414
  return contents;
2514
2415
  };
2515
2416
  const de_ListShareInvitationsCommandError = async (output, context) => {
@@ -2533,10 +2434,9 @@ const de_ListShareInvitationsCommandError = async (output, context) => {
2533
2434
  throw await de_ValidationExceptionRes(parsedOutput, context);
2534
2435
  default:
2535
2436
  const parsedBody = parsedOutput.body;
2536
- throwDefaultError({
2437
+ return throwDefaultError({
2537
2438
  output,
2538
2439
  parsedBody,
2539
- exceptionCtor: __BaseException,
2540
2440
  errorCode,
2541
2441
  });
2542
2442
  }
@@ -2549,9 +2449,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2549
2449
  $metadata: deserializeMetadata(output),
2550
2450
  });
2551
2451
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2552
- if (data.Tags != null) {
2553
- contents.Tags = de_TagMap(data.Tags, context);
2554
- }
2452
+ const doc = take(data, {
2453
+ Tags: _json,
2454
+ });
2455
+ Object.assign(contents, doc);
2555
2456
  return contents;
2556
2457
  };
2557
2458
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -2569,10 +2470,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2569
2470
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2570
2471
  default:
2571
2472
  const parsedBody = parsedOutput.body;
2572
- throwDefaultError({
2473
+ return throwDefaultError({
2573
2474
  output,
2574
2475
  parsedBody,
2575
- exceptionCtor: __BaseException,
2576
2476
  errorCode,
2577
2477
  });
2578
2478
  }
@@ -2585,12 +2485,11 @@ export const de_ListWorkloadsCommand = async (output, context) => {
2585
2485
  $metadata: deserializeMetadata(output),
2586
2486
  });
2587
2487
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2588
- if (data.NextToken != null) {
2589
- contents.NextToken = __expectString(data.NextToken);
2590
- }
2591
- if (data.WorkloadSummaries != null) {
2592
- contents.WorkloadSummaries = de_WorkloadSummaries(data.WorkloadSummaries, context);
2593
- }
2488
+ const doc = take(data, {
2489
+ NextToken: __expectString,
2490
+ WorkloadSummaries: (_) => de_WorkloadSummaries(_, context),
2491
+ });
2492
+ Object.assign(contents, doc);
2594
2493
  return contents;
2595
2494
  };
2596
2495
  const de_ListWorkloadsCommandError = async (output, context) => {
@@ -2614,10 +2513,9 @@ const de_ListWorkloadsCommandError = async (output, context) => {
2614
2513
  throw await de_ValidationExceptionRes(parsedOutput, context);
2615
2514
  default:
2616
2515
  const parsedBody = parsedOutput.body;
2617
- throwDefaultError({
2516
+ return throwDefaultError({
2618
2517
  output,
2619
2518
  parsedBody,
2620
- exceptionCtor: __BaseException,
2621
2519
  errorCode,
2622
2520
  });
2623
2521
  }
@@ -2630,15 +2528,12 @@ export const de_ListWorkloadSharesCommand = async (output, context) => {
2630
2528
  $metadata: deserializeMetadata(output),
2631
2529
  });
2632
2530
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2633
- if (data.NextToken != null) {
2634
- contents.NextToken = __expectString(data.NextToken);
2635
- }
2636
- if (data.WorkloadId != null) {
2637
- contents.WorkloadId = __expectString(data.WorkloadId);
2638
- }
2639
- if (data.WorkloadShareSummaries != null) {
2640
- contents.WorkloadShareSummaries = de_WorkloadShareSummaries(data.WorkloadShareSummaries, context);
2641
- }
2531
+ const doc = take(data, {
2532
+ NextToken: __expectString,
2533
+ WorkloadId: __expectString,
2534
+ WorkloadShareSummaries: _json,
2535
+ });
2536
+ Object.assign(contents, doc);
2642
2537
  return contents;
2643
2538
  };
2644
2539
  const de_ListWorkloadSharesCommandError = async (output, context) => {
@@ -2665,10 +2560,9 @@ const de_ListWorkloadSharesCommandError = async (output, context) => {
2665
2560
  throw await de_ValidationExceptionRes(parsedOutput, context);
2666
2561
  default:
2667
2562
  const parsedBody = parsedOutput.body;
2668
- throwDefaultError({
2563
+ return throwDefaultError({
2669
2564
  output,
2670
2565
  parsedBody,
2671
- exceptionCtor: __BaseException,
2672
2566
  errorCode,
2673
2567
  });
2674
2568
  }
@@ -2698,10 +2592,9 @@ const de_TagResourceCommandError = async (output, context) => {
2698
2592
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2699
2593
  default:
2700
2594
  const parsedBody = parsedOutput.body;
2701
- throwDefaultError({
2595
+ return throwDefaultError({
2702
2596
  output,
2703
2597
  parsedBody,
2704
- exceptionCtor: __BaseException,
2705
2598
  errorCode,
2706
2599
  });
2707
2600
  }
@@ -2731,10 +2624,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2731
2624
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2732
2625
  default:
2733
2626
  const parsedBody = parsedOutput.body;
2734
- throwDefaultError({
2627
+ return throwDefaultError({
2735
2628
  output,
2736
2629
  parsedBody,
2737
- exceptionCtor: __BaseException,
2738
2630
  errorCode,
2739
2631
  });
2740
2632
  }
@@ -2747,18 +2639,13 @@ export const de_UpdateAnswerCommand = async (output, context) => {
2747
2639
  $metadata: deserializeMetadata(output),
2748
2640
  });
2749
2641
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2750
- if (data.Answer != null) {
2751
- contents.Answer = de_Answer(data.Answer, context);
2752
- }
2753
- if (data.LensAlias != null) {
2754
- contents.LensAlias = __expectString(data.LensAlias);
2755
- }
2756
- if (data.LensArn != null) {
2757
- contents.LensArn = __expectString(data.LensArn);
2758
- }
2759
- if (data.WorkloadId != null) {
2760
- contents.WorkloadId = __expectString(data.WorkloadId);
2761
- }
2642
+ const doc = take(data, {
2643
+ Answer: _json,
2644
+ LensAlias: __expectString,
2645
+ LensArn: __expectString,
2646
+ WorkloadId: __expectString,
2647
+ });
2648
+ Object.assign(contents, doc);
2762
2649
  return contents;
2763
2650
  };
2764
2651
  const de_UpdateAnswerCommandError = async (output, context) => {
@@ -2788,10 +2675,9 @@ const de_UpdateAnswerCommandError = async (output, context) => {
2788
2675
  throw await de_ValidationExceptionRes(parsedOutput, context);
2789
2676
  default:
2790
2677
  const parsedBody = parsedOutput.body;
2791
- throwDefaultError({
2678
+ return throwDefaultError({
2792
2679
  output,
2793
2680
  parsedBody,
2794
- exceptionCtor: __BaseException,
2795
2681
  errorCode,
2796
2682
  });
2797
2683
  }
@@ -2830,10 +2716,9 @@ const de_UpdateGlobalSettingsCommandError = async (output, context) => {
2830
2716
  throw await de_ValidationExceptionRes(parsedOutput, context);
2831
2717
  default:
2832
2718
  const parsedBody = parsedOutput.body;
2833
- throwDefaultError({
2719
+ return throwDefaultError({
2834
2720
  output,
2835
2721
  parsedBody,
2836
- exceptionCtor: __BaseException,
2837
2722
  errorCode,
2838
2723
  });
2839
2724
  }
@@ -2846,12 +2731,11 @@ export const de_UpdateLensReviewCommand = async (output, context) => {
2846
2731
  $metadata: deserializeMetadata(output),
2847
2732
  });
2848
2733
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2849
- if (data.LensReview != null) {
2850
- contents.LensReview = de_LensReview(data.LensReview, context);
2851
- }
2852
- if (data.WorkloadId != null) {
2853
- contents.WorkloadId = __expectString(data.WorkloadId);
2854
- }
2734
+ const doc = take(data, {
2735
+ LensReview: (_) => de_LensReview(_, context),
2736
+ WorkloadId: __expectString,
2737
+ });
2738
+ Object.assign(contents, doc);
2855
2739
  return contents;
2856
2740
  };
2857
2741
  const de_UpdateLensReviewCommandError = async (output, context) => {
@@ -2881,10 +2765,9 @@ const de_UpdateLensReviewCommandError = async (output, context) => {
2881
2765
  throw await de_ValidationExceptionRes(parsedOutput, context);
2882
2766
  default:
2883
2767
  const parsedBody = parsedOutput.body;
2884
- throwDefaultError({
2768
+ return throwDefaultError({
2885
2769
  output,
2886
2770
  parsedBody,
2887
- exceptionCtor: __BaseException,
2888
2771
  errorCode,
2889
2772
  });
2890
2773
  }
@@ -2897,9 +2780,10 @@ export const de_UpdateShareInvitationCommand = async (output, context) => {
2897
2780
  $metadata: deserializeMetadata(output),
2898
2781
  });
2899
2782
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2900
- if (data.ShareInvitation != null) {
2901
- contents.ShareInvitation = de_ShareInvitation(data.ShareInvitation, context);
2902
- }
2783
+ const doc = take(data, {
2784
+ ShareInvitation: _json,
2785
+ });
2786
+ Object.assign(contents, doc);
2903
2787
  return contents;
2904
2788
  };
2905
2789
  const de_UpdateShareInvitationCommandError = async (output, context) => {
@@ -2929,10 +2813,9 @@ const de_UpdateShareInvitationCommandError = async (output, context) => {
2929
2813
  throw await de_ValidationExceptionRes(parsedOutput, context);
2930
2814
  default:
2931
2815
  const parsedBody = parsedOutput.body;
2932
- throwDefaultError({
2816
+ return throwDefaultError({
2933
2817
  output,
2934
2818
  parsedBody,
2935
- exceptionCtor: __BaseException,
2936
2819
  errorCode,
2937
2820
  });
2938
2821
  }
@@ -2945,9 +2828,10 @@ export const de_UpdateWorkloadCommand = async (output, context) => {
2945
2828
  $metadata: deserializeMetadata(output),
2946
2829
  });
2947
2830
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2948
- if (data.Workload != null) {
2949
- contents.Workload = de_Workload(data.Workload, context);
2950
- }
2831
+ const doc = take(data, {
2832
+ Workload: (_) => de_Workload(_, context),
2833
+ });
2834
+ Object.assign(contents, doc);
2951
2835
  return contents;
2952
2836
  };
2953
2837
  const de_UpdateWorkloadCommandError = async (output, context) => {
@@ -2977,10 +2861,9 @@ const de_UpdateWorkloadCommandError = async (output, context) => {
2977
2861
  throw await de_ValidationExceptionRes(parsedOutput, context);
2978
2862
  default:
2979
2863
  const parsedBody = parsedOutput.body;
2980
- throwDefaultError({
2864
+ return throwDefaultError({
2981
2865
  output,
2982
2866
  parsedBody,
2983
- exceptionCtor: __BaseException,
2984
2867
  errorCode,
2985
2868
  });
2986
2869
  }
@@ -2993,12 +2876,11 @@ export const de_UpdateWorkloadShareCommand = async (output, context) => {
2993
2876
  $metadata: deserializeMetadata(output),
2994
2877
  });
2995
2878
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2996
- if (data.WorkloadId != null) {
2997
- contents.WorkloadId = __expectString(data.WorkloadId);
2998
- }
2999
- if (data.WorkloadShare != null) {
3000
- contents.WorkloadShare = de_WorkloadShare(data.WorkloadShare, context);
3001
- }
2879
+ const doc = take(data, {
2880
+ WorkloadId: __expectString,
2881
+ WorkloadShare: _json,
2882
+ });
2883
+ Object.assign(contents, doc);
3002
2884
  return contents;
3003
2885
  };
3004
2886
  const de_UpdateWorkloadShareCommandError = async (output, context) => {
@@ -3028,10 +2910,9 @@ const de_UpdateWorkloadShareCommandError = async (output, context) => {
3028
2910
  throw await de_ValidationExceptionRes(parsedOutput, context);
3029
2911
  default:
3030
2912
  const parsedBody = parsedOutput.body;
3031
- throwDefaultError({
2913
+ return throwDefaultError({
3032
2914
  output,
3033
2915
  parsedBody,
3034
- exceptionCtor: __BaseException,
3035
2916
  errorCode,
3036
2917
  });
3037
2918
  }
@@ -3073,21 +2954,21 @@ const de_UpgradeLensReviewCommandError = async (output, context) => {
3073
2954
  throw await de_ValidationExceptionRes(parsedOutput, context);
3074
2955
  default:
3075
2956
  const parsedBody = parsedOutput.body;
3076
- throwDefaultError({
2957
+ return throwDefaultError({
3077
2958
  output,
3078
2959
  parsedBody,
3079
- exceptionCtor: __BaseException,
3080
2960
  errorCode,
3081
2961
  });
3082
2962
  }
3083
2963
  };
3084
- const map = __map;
2964
+ const throwDefaultError = withBaseException(__BaseException);
3085
2965
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3086
2966
  const contents = map({});
3087
2967
  const data = parsedOutput.body;
3088
- if (data.Message != null) {
3089
- contents.Message = __expectString(data.Message);
3090
- }
2968
+ const doc = take(data, {
2969
+ Message: __expectString,
2970
+ });
2971
+ Object.assign(contents, doc);
3091
2972
  const exception = new AccessDeniedException({
3092
2973
  $metadata: deserializeMetadata(parsedOutput),
3093
2974
  ...contents,
@@ -3097,15 +2978,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3097
2978
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3098
2979
  const contents = map({});
3099
2980
  const data = parsedOutput.body;
3100
- if (data.Message != null) {
3101
- contents.Message = __expectString(data.Message);
3102
- }
3103
- if (data.ResourceId != null) {
3104
- contents.ResourceId = __expectString(data.ResourceId);
3105
- }
3106
- if (data.ResourceType != null) {
3107
- contents.ResourceType = __expectString(data.ResourceType);
3108
- }
2981
+ const doc = take(data, {
2982
+ Message: __expectString,
2983
+ ResourceId: __expectString,
2984
+ ResourceType: __expectString,
2985
+ });
2986
+ Object.assign(contents, doc);
3109
2987
  const exception = new ConflictException({
3110
2988
  $metadata: deserializeMetadata(parsedOutput),
3111
2989
  ...contents,
@@ -3115,9 +2993,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3115
2993
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3116
2994
  const contents = map({});
3117
2995
  const data = parsedOutput.body;
3118
- if (data.Message != null) {
3119
- contents.Message = __expectString(data.Message);
3120
- }
2996
+ const doc = take(data, {
2997
+ Message: __expectString,
2998
+ });
2999
+ Object.assign(contents, doc);
3121
3000
  const exception = new InternalServerException({
3122
3001
  $metadata: deserializeMetadata(parsedOutput),
3123
3002
  ...contents,
@@ -3127,15 +3006,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3127
3006
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3128
3007
  const contents = map({});
3129
3008
  const data = parsedOutput.body;
3130
- if (data.Message != null) {
3131
- contents.Message = __expectString(data.Message);
3132
- }
3133
- if (data.ResourceId != null) {
3134
- contents.ResourceId = __expectString(data.ResourceId);
3135
- }
3136
- if (data.ResourceType != null) {
3137
- contents.ResourceType = __expectString(data.ResourceType);
3138
- }
3009
+ const doc = take(data, {
3010
+ Message: __expectString,
3011
+ ResourceId: __expectString,
3012
+ ResourceType: __expectString,
3013
+ });
3014
+ Object.assign(contents, doc);
3139
3015
  const exception = new ResourceNotFoundException({
3140
3016
  $metadata: deserializeMetadata(parsedOutput),
3141
3017
  ...contents,
@@ -3145,21 +3021,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3145
3021
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3146
3022
  const contents = map({});
3147
3023
  const data = parsedOutput.body;
3148
- if (data.Message != null) {
3149
- contents.Message = __expectString(data.Message);
3150
- }
3151
- if (data.QuotaCode != null) {
3152
- contents.QuotaCode = __expectString(data.QuotaCode);
3153
- }
3154
- if (data.ResourceId != null) {
3155
- contents.ResourceId = __expectString(data.ResourceId);
3156
- }
3157
- if (data.ResourceType != null) {
3158
- contents.ResourceType = __expectString(data.ResourceType);
3159
- }
3160
- if (data.ServiceCode != null) {
3161
- contents.ServiceCode = __expectString(data.ServiceCode);
3162
- }
3024
+ const doc = take(data, {
3025
+ Message: __expectString,
3026
+ QuotaCode: __expectString,
3027
+ ResourceId: __expectString,
3028
+ ResourceType: __expectString,
3029
+ ServiceCode: __expectString,
3030
+ });
3031
+ Object.assign(contents, doc);
3163
3032
  const exception = new ServiceQuotaExceededException({
3164
3033
  $metadata: deserializeMetadata(parsedOutput),
3165
3034
  ...contents,
@@ -3169,15 +3038,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3169
3038
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3170
3039
  const contents = map({});
3171
3040
  const data = parsedOutput.body;
3172
- if (data.Message != null) {
3173
- contents.Message = __expectString(data.Message);
3174
- }
3175
- if (data.QuotaCode != null) {
3176
- contents.QuotaCode = __expectString(data.QuotaCode);
3177
- }
3178
- if (data.ServiceCode != null) {
3179
- contents.ServiceCode = __expectString(data.ServiceCode);
3180
- }
3041
+ const doc = take(data, {
3042
+ Message: __expectString,
3043
+ QuotaCode: __expectString,
3044
+ ServiceCode: __expectString,
3045
+ });
3046
+ Object.assign(contents, doc);
3181
3047
  const exception = new ThrottlingException({
3182
3048
  $metadata: deserializeMetadata(parsedOutput),
3183
3049
  ...contents,
@@ -3187,229 +3053,39 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3187
3053
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
3188
3054
  const contents = map({});
3189
3055
  const data = parsedOutput.body;
3190
- if (data.Fields != null) {
3191
- contents.Fields = de_ValidationExceptionFieldList(data.Fields, context);
3192
- }
3193
- if (data.Message != null) {
3194
- contents.Message = __expectString(data.Message);
3195
- }
3196
- if (data.Reason != null) {
3197
- contents.Reason = __expectString(data.Reason);
3198
- }
3056
+ const doc = take(data, {
3057
+ Fields: _json,
3058
+ Message: __expectString,
3059
+ Reason: __expectString,
3060
+ });
3061
+ Object.assign(contents, doc);
3199
3062
  const exception = new ValidationException({
3200
3063
  $metadata: deserializeMetadata(parsedOutput),
3201
3064
  ...contents,
3202
3065
  });
3203
3066
  return __decorateServiceException(exception, parsedOutput.body);
3204
3067
  };
3205
- const se_ChoiceUpdate = (input, context) => {
3206
- return {
3207
- ...(input.Notes != null && { Notes: input.Notes }),
3208
- ...(input.Reason != null && { Reason: input.Reason }),
3209
- ...(input.Status != null && { Status: input.Status }),
3210
- };
3211
- };
3212
- const se_ChoiceUpdates = (input, context) => {
3213
- return Object.entries(input).reduce((acc, [key, value]) => {
3214
- if (value === null) {
3215
- return acc;
3216
- }
3217
- acc[key] = se_ChoiceUpdate(value, context);
3218
- return acc;
3219
- }, {});
3220
- };
3221
- const se_LensAliases = (input, context) => {
3222
- return input
3223
- .filter((e) => e != null)
3224
- .map((entry) => {
3225
- return entry;
3226
- });
3227
- };
3228
- const se_PillarNotes = (input, context) => {
3229
- return Object.entries(input).reduce((acc, [key, value]) => {
3230
- if (value === null) {
3231
- return acc;
3232
- }
3233
- acc[key] = value;
3234
- return acc;
3235
- }, {});
3236
- };
3237
- const se_SelectedChoices = (input, context) => {
3238
- return input
3239
- .filter((e) => e != null)
3240
- .map((entry) => {
3241
- return entry;
3242
- });
3243
- };
3244
- const se_TagMap = (input, context) => {
3245
- return Object.entries(input).reduce((acc, [key, value]) => {
3246
- if (value === null) {
3247
- return acc;
3248
- }
3249
- acc[key] = value;
3250
- return acc;
3251
- }, {});
3252
- };
3253
- const se_WorkloadAccountIds = (input, context) => {
3254
- return input
3255
- .filter((e) => e != null)
3256
- .map((entry) => {
3257
- return entry;
3258
- });
3259
- };
3260
- const se_WorkloadApplications = (input, context) => {
3261
- return input
3262
- .filter((e) => e != null)
3263
- .map((entry) => {
3264
- return entry;
3265
- });
3266
- };
3267
- const se_WorkloadAwsRegions = (input, context) => {
3268
- return input
3269
- .filter((e) => e != null)
3270
- .map((entry) => {
3271
- return entry;
3272
- });
3273
- };
3274
- const se_WorkloadDiscoveryConfig = (input, context) => {
3275
- return {
3276
- ...(input.TrustedAdvisorIntegrationStatus != null && {
3277
- TrustedAdvisorIntegrationStatus: input.TrustedAdvisorIntegrationStatus,
3278
- }),
3279
- };
3280
- };
3281
- const se_WorkloadLenses = (input, context) => {
3282
- return input
3283
- .filter((e) => e != null)
3284
- .map((entry) => {
3285
- return entry;
3286
- });
3287
- };
3288
- const se_WorkloadNonAwsRegions = (input, context) => {
3289
- return input
3290
- .filter((e) => e != null)
3291
- .map((entry) => {
3292
- return entry;
3293
- });
3294
- };
3295
- const se_WorkloadPillarPriorities = (input, context) => {
3296
- return input
3297
- .filter((e) => e != null)
3298
- .map((entry) => {
3299
- return entry;
3300
- });
3301
- };
3302
- const de_AccountSummary = (output, context) => {
3303
- return Object.entries(output).reduce((acc, [key, value]) => {
3304
- if (value === null) {
3305
- return acc;
3306
- }
3307
- acc[key] = __expectInt32(value);
3308
- return acc;
3309
- }, {});
3310
- };
3311
- const de_AdditionalResources = (output, context) => {
3312
- return {
3313
- Content: output.Content != null ? de_Urls(output.Content, context) : undefined,
3314
- Type: __expectString(output.Type),
3315
- };
3316
- };
3317
- const de_AdditionalResourcesList = (output, context) => {
3318
- const retVal = (output || [])
3319
- .filter((e) => e != null)
3320
- .map((entry) => {
3321
- if (entry === null) {
3322
- return null;
3323
- }
3324
- return de_AdditionalResources(entry, context);
3325
- });
3326
- return retVal;
3327
- };
3328
- const de_Answer = (output, context) => {
3329
- return {
3330
- ChoiceAnswers: output.ChoiceAnswers != null ? de_ChoiceAnswers(output.ChoiceAnswers, context) : undefined,
3331
- Choices: output.Choices != null ? de_Choices(output.Choices, context) : undefined,
3332
- HelpfulResourceDisplayText: __expectString(output.HelpfulResourceDisplayText),
3333
- HelpfulResourceUrl: __expectString(output.HelpfulResourceUrl),
3334
- ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl),
3335
- IsApplicable: __expectBoolean(output.IsApplicable),
3336
- Notes: __expectString(output.Notes),
3337
- PillarId: __expectString(output.PillarId),
3338
- QuestionDescription: __expectString(output.QuestionDescription),
3339
- QuestionId: __expectString(output.QuestionId),
3340
- QuestionTitle: __expectString(output.QuestionTitle),
3341
- Reason: __expectString(output.Reason),
3342
- Risk: __expectString(output.Risk),
3343
- SelectedChoices: output.SelectedChoices != null ? de_SelectedChoices(output.SelectedChoices, context) : undefined,
3344
- };
3345
- };
3346
- const de_AnswerSummaries = (output, context) => {
3347
- const retVal = (output || [])
3348
- .filter((e) => e != null)
3349
- .map((entry) => {
3350
- if (entry === null) {
3351
- return null;
3352
- }
3353
- return de_AnswerSummary(entry, context);
3354
- });
3355
- return retVal;
3356
- };
3357
- const de_AnswerSummary = (output, context) => {
3358
- return {
3359
- ChoiceAnswerSummaries: output.ChoiceAnswerSummaries != null
3360
- ? de_ChoiceAnswerSummaries(output.ChoiceAnswerSummaries, context)
3361
- : undefined,
3362
- Choices: output.Choices != null ? de_Choices(output.Choices, context) : undefined,
3363
- IsApplicable: __expectBoolean(output.IsApplicable),
3364
- PillarId: __expectString(output.PillarId),
3365
- QuestionId: __expectString(output.QuestionId),
3366
- QuestionTitle: __expectString(output.QuestionTitle),
3367
- Reason: __expectString(output.Reason),
3368
- Risk: __expectString(output.Risk),
3369
- SelectedChoices: output.SelectedChoices != null ? de_SelectedChoices(output.SelectedChoices, context) : undefined,
3370
- };
3371
- };
3372
- const de_BestPractice = (output, context) => {
3373
- return {
3374
- ChoiceId: __expectString(output.ChoiceId),
3375
- ChoiceTitle: __expectString(output.ChoiceTitle),
3376
- };
3377
- };
3378
- const de_BestPractices = (output, context) => {
3379
- const retVal = (output || [])
3380
- .filter((e) => e != null)
3381
- .map((entry) => {
3382
- if (entry === null) {
3383
- return null;
3384
- }
3385
- return de_BestPractice(entry, context);
3386
- });
3387
- return retVal;
3388
- };
3389
3068
  const de_CheckDetail = (output, context) => {
3390
- return {
3391
- AccountId: __expectString(output.AccountId),
3392
- ChoiceId: __expectString(output.ChoiceId),
3393
- Description: __expectString(output.Description),
3394
- FlaggedResources: __expectInt32(output.FlaggedResources),
3395
- Id: __expectString(output.Id),
3396
- LensArn: __expectString(output.LensArn),
3397
- Name: __expectString(output.Name),
3398
- PillarId: __expectString(output.PillarId),
3399
- Provider: __expectString(output.Provider),
3400
- QuestionId: __expectString(output.QuestionId),
3401
- Reason: __expectString(output.Reason),
3402
- Status: __expectString(output.Status),
3403
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3404
- };
3069
+ return take(output, {
3070
+ AccountId: __expectString,
3071
+ ChoiceId: __expectString,
3072
+ Description: __expectString,
3073
+ FlaggedResources: __expectInt32,
3074
+ Id: __expectString,
3075
+ LensArn: __expectString,
3076
+ Name: __expectString,
3077
+ PillarId: __expectString,
3078
+ Provider: __expectString,
3079
+ QuestionId: __expectString,
3080
+ Reason: __expectString,
3081
+ Status: __expectString,
3082
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3083
+ });
3405
3084
  };
3406
3085
  const de_CheckDetails = (output, context) => {
3407
3086
  const retVal = (output || [])
3408
3087
  .filter((e) => e != null)
3409
3088
  .map((entry) => {
3410
- if (entry === null) {
3411
- return null;
3412
- }
3413
3089
  return de_CheckDetail(entry, context);
3414
3090
  });
3415
3091
  return retVal;
@@ -3418,668 +3094,172 @@ const de_CheckSummaries = (output, context) => {
3418
3094
  const retVal = (output || [])
3419
3095
  .filter((e) => e != null)
3420
3096
  .map((entry) => {
3421
- if (entry === null) {
3422
- return null;
3423
- }
3424
3097
  return de_CheckSummary(entry, context);
3425
3098
  });
3426
3099
  return retVal;
3427
3100
  };
3428
3101
  const de_CheckSummary = (output, context) => {
3429
- return {
3430
- AccountSummary: output.AccountSummary != null ? de_AccountSummary(output.AccountSummary, context) : undefined,
3431
- ChoiceId: __expectString(output.ChoiceId),
3432
- Description: __expectString(output.Description),
3433
- Id: __expectString(output.Id),
3434
- LensArn: __expectString(output.LensArn),
3435
- Name: __expectString(output.Name),
3436
- PillarId: __expectString(output.PillarId),
3437
- Provider: __expectString(output.Provider),
3438
- QuestionId: __expectString(output.QuestionId),
3439
- Status: __expectString(output.Status),
3440
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3441
- };
3442
- };
3443
- const de_Choice = (output, context) => {
3444
- return {
3445
- AdditionalResources: output.AdditionalResources != null ? de_AdditionalResourcesList(output.AdditionalResources, context) : undefined,
3446
- ChoiceId: __expectString(output.ChoiceId),
3447
- Description: __expectString(output.Description),
3448
- HelpfulResource: output.HelpfulResource != null ? de_ChoiceContent(output.HelpfulResource, context) : undefined,
3449
- ImprovementPlan: output.ImprovementPlan != null ? de_ChoiceContent(output.ImprovementPlan, context) : undefined,
3450
- Title: __expectString(output.Title),
3451
- };
3452
- };
3453
- const de_ChoiceAnswer = (output, context) => {
3454
- return {
3455
- ChoiceId: __expectString(output.ChoiceId),
3456
- Notes: __expectString(output.Notes),
3457
- Reason: __expectString(output.Reason),
3458
- Status: __expectString(output.Status),
3459
- };
3460
- };
3461
- const de_ChoiceAnswers = (output, context) => {
3462
- const retVal = (output || [])
3463
- .filter((e) => e != null)
3464
- .map((entry) => {
3465
- if (entry === null) {
3466
- return null;
3467
- }
3468
- return de_ChoiceAnswer(entry, context);
3469
- });
3470
- return retVal;
3471
- };
3472
- const de_ChoiceAnswerSummaries = (output, context) => {
3473
- const retVal = (output || [])
3474
- .filter((e) => e != null)
3475
- .map((entry) => {
3476
- if (entry === null) {
3477
- return null;
3478
- }
3479
- return de_ChoiceAnswerSummary(entry, context);
3102
+ return take(output, {
3103
+ AccountSummary: _json,
3104
+ ChoiceId: __expectString,
3105
+ Description: __expectString,
3106
+ Id: __expectString,
3107
+ LensArn: __expectString,
3108
+ Name: __expectString,
3109
+ PillarId: __expectString,
3110
+ Provider: __expectString,
3111
+ QuestionId: __expectString,
3112
+ Status: __expectString,
3113
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3480
3114
  });
3481
- return retVal;
3482
- };
3483
- const de_ChoiceAnswerSummary = (output, context) => {
3484
- return {
3485
- ChoiceId: __expectString(output.ChoiceId),
3486
- Reason: __expectString(output.Reason),
3487
- Status: __expectString(output.Status),
3488
- };
3489
- };
3490
- const de_ChoiceContent = (output, context) => {
3491
- return {
3492
- DisplayText: __expectString(output.DisplayText),
3493
- Url: __expectString(output.Url),
3494
- };
3495
- };
3496
- const de_ChoiceImprovementPlan = (output, context) => {
3497
- return {
3498
- ChoiceId: __expectString(output.ChoiceId),
3499
- DisplayText: __expectString(output.DisplayText),
3500
- ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl),
3501
- };
3502
- };
3503
- const de_ChoiceImprovementPlans = (output, context) => {
3504
- const retVal = (output || [])
3505
- .filter((e) => e != null)
3506
- .map((entry) => {
3507
- if (entry === null) {
3508
- return null;
3509
- }
3510
- return de_ChoiceImprovementPlan(entry, context);
3511
- });
3512
- return retVal;
3513
- };
3514
- const de_Choices = (output, context) => {
3515
- const retVal = (output || [])
3516
- .filter((e) => e != null)
3517
- .map((entry) => {
3518
- if (entry === null) {
3519
- return null;
3520
- }
3521
- return de_Choice(entry, context);
3522
- });
3523
- return retVal;
3524
3115
  };
3525
3116
  const de_ConsolidatedReportMetric = (output, context) => {
3526
- return {
3527
- Lenses: output.Lenses != null ? de_LensMetrics(output.Lenses, context) : undefined,
3528
- LensesAppliedCount: __expectInt32(output.LensesAppliedCount),
3529
- MetricType: __expectString(output.MetricType),
3530
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3531
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3532
- WorkloadArn: __expectString(output.WorkloadArn),
3533
- WorkloadId: __expectString(output.WorkloadId),
3534
- WorkloadName: __expectString(output.WorkloadName),
3535
- };
3117
+ return take(output, {
3118
+ Lenses: _json,
3119
+ LensesAppliedCount: __expectInt32,
3120
+ MetricType: __expectString,
3121
+ RiskCounts: _json,
3122
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3123
+ WorkloadArn: __expectString,
3124
+ WorkloadId: __expectString,
3125
+ WorkloadName: __expectString,
3126
+ });
3536
3127
  };
3537
3128
  const de_ConsolidatedReportMetrics = (output, context) => {
3538
3129
  const retVal = (output || [])
3539
3130
  .filter((e) => e != null)
3540
3131
  .map((entry) => {
3541
- if (entry === null) {
3542
- return null;
3543
- }
3544
3132
  return de_ConsolidatedReportMetric(entry, context);
3545
3133
  });
3546
3134
  return retVal;
3547
3135
  };
3548
- const de_ImprovementSummaries = (output, context) => {
3549
- const retVal = (output || [])
3550
- .filter((e) => e != null)
3551
- .map((entry) => {
3552
- if (entry === null) {
3553
- return null;
3554
- }
3555
- return de_ImprovementSummary(entry, context);
3556
- });
3557
- return retVal;
3558
- };
3559
- const de_ImprovementSummary = (output, context) => {
3560
- return {
3561
- ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl),
3562
- ImprovementPlans: output.ImprovementPlans != null ? de_ChoiceImprovementPlans(output.ImprovementPlans, context) : undefined,
3563
- PillarId: __expectString(output.PillarId),
3564
- QuestionId: __expectString(output.QuestionId),
3565
- QuestionTitle: __expectString(output.QuestionTitle),
3566
- Risk: __expectString(output.Risk),
3567
- };
3568
- };
3569
- const de_Lens = (output, context) => {
3570
- return {
3571
- Description: __expectString(output.Description),
3572
- LensArn: __expectString(output.LensArn),
3573
- LensVersion: __expectString(output.LensVersion),
3574
- Name: __expectString(output.Name),
3575
- Owner: __expectString(output.Owner),
3576
- ShareInvitationId: __expectString(output.ShareInvitationId),
3577
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
3578
- };
3579
- };
3580
- const de_LensMetric = (output, context) => {
3581
- return {
3582
- LensArn: __expectString(output.LensArn),
3583
- Pillars: output.Pillars != null ? de_PillarMetrics(output.Pillars, context) : undefined,
3584
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3585
- };
3586
- };
3587
- const de_LensMetrics = (output, context) => {
3588
- const retVal = (output || [])
3589
- .filter((e) => e != null)
3590
- .map((entry) => {
3591
- if (entry === null) {
3592
- return null;
3593
- }
3594
- return de_LensMetric(entry, context);
3595
- });
3596
- return retVal;
3597
- };
3598
3136
  const de_LensReview = (output, context) => {
3599
- return {
3600
- LensAlias: __expectString(output.LensAlias),
3601
- LensArn: __expectString(output.LensArn),
3602
- LensName: __expectString(output.LensName),
3603
- LensStatus: __expectString(output.LensStatus),
3604
- LensVersion: __expectString(output.LensVersion),
3605
- NextToken: __expectString(output.NextToken),
3606
- Notes: __expectString(output.Notes),
3607
- PillarReviewSummaries: output.PillarReviewSummaries != null
3608
- ? de_PillarReviewSummaries(output.PillarReviewSummaries, context)
3609
- : undefined,
3610
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3611
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3612
- };
3613
- };
3614
- const de_LensReviewReport = (output, context) => {
3615
- return {
3616
- Base64String: __expectString(output.Base64String),
3617
- LensAlias: __expectString(output.LensAlias),
3618
- LensArn: __expectString(output.LensArn),
3619
- };
3137
+ return take(output, {
3138
+ LensAlias: __expectString,
3139
+ LensArn: __expectString,
3140
+ LensName: __expectString,
3141
+ LensStatus: __expectString,
3142
+ LensVersion: __expectString,
3143
+ NextToken: __expectString,
3144
+ Notes: __expectString,
3145
+ PillarReviewSummaries: _json,
3146
+ RiskCounts: _json,
3147
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3148
+ });
3620
3149
  };
3621
3150
  const de_LensReviewSummaries = (output, context) => {
3622
3151
  const retVal = (output || [])
3623
3152
  .filter((e) => e != null)
3624
3153
  .map((entry) => {
3625
- if (entry === null) {
3626
- return null;
3627
- }
3628
3154
  return de_LensReviewSummary(entry, context);
3629
3155
  });
3630
3156
  return retVal;
3631
3157
  };
3632
3158
  const de_LensReviewSummary = (output, context) => {
3633
- return {
3634
- LensAlias: __expectString(output.LensAlias),
3635
- LensArn: __expectString(output.LensArn),
3636
- LensName: __expectString(output.LensName),
3637
- LensStatus: __expectString(output.LensStatus),
3638
- LensVersion: __expectString(output.LensVersion),
3639
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3640
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3641
- };
3642
- };
3643
- const de_LensShareSummaries = (output, context) => {
3644
- const retVal = (output || [])
3645
- .filter((e) => e != null)
3646
- .map((entry) => {
3647
- if (entry === null) {
3648
- return null;
3649
- }
3650
- return de_LensShareSummary(entry, context);
3159
+ return take(output, {
3160
+ LensAlias: __expectString,
3161
+ LensArn: __expectString,
3162
+ LensName: __expectString,
3163
+ LensStatus: __expectString,
3164
+ LensVersion: __expectString,
3165
+ RiskCounts: _json,
3166
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3651
3167
  });
3652
- return retVal;
3653
- };
3654
- const de_LensShareSummary = (output, context) => {
3655
- return {
3656
- ShareId: __expectString(output.ShareId),
3657
- SharedWith: __expectString(output.SharedWith),
3658
- Status: __expectString(output.Status),
3659
- StatusMessage: __expectString(output.StatusMessage),
3660
- };
3661
3168
  };
3662
3169
  const de_LensSummaries = (output, context) => {
3663
3170
  const retVal = (output || [])
3664
3171
  .filter((e) => e != null)
3665
3172
  .map((entry) => {
3666
- if (entry === null) {
3667
- return null;
3668
- }
3669
3173
  return de_LensSummary(entry, context);
3670
3174
  });
3671
3175
  return retVal;
3672
3176
  };
3673
3177
  const de_LensSummary = (output, context) => {
3674
- return {
3675
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
3676
- Description: __expectString(output.Description),
3677
- LensAlias: __expectString(output.LensAlias),
3678
- LensArn: __expectString(output.LensArn),
3679
- LensName: __expectString(output.LensName),
3680
- LensStatus: __expectString(output.LensStatus),
3681
- LensType: __expectString(output.LensType),
3682
- LensVersion: __expectString(output.LensVersion),
3683
- Owner: __expectString(output.Owner),
3684
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3685
- };
3686
- };
3687
- const de_LensUpgradeSummary = (output, context) => {
3688
- return {
3689
- CurrentLensVersion: __expectString(output.CurrentLensVersion),
3690
- LatestLensVersion: __expectString(output.LatestLensVersion),
3691
- LensAlias: __expectString(output.LensAlias),
3692
- LensArn: __expectString(output.LensArn),
3693
- WorkloadId: __expectString(output.WorkloadId),
3694
- WorkloadName: __expectString(output.WorkloadName),
3695
- };
3178
+ return take(output, {
3179
+ CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3180
+ Description: __expectString,
3181
+ LensAlias: __expectString,
3182
+ LensArn: __expectString,
3183
+ LensName: __expectString,
3184
+ LensStatus: __expectString,
3185
+ LensType: __expectString,
3186
+ LensVersion: __expectString,
3187
+ Owner: __expectString,
3188
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3189
+ });
3696
3190
  };
3697
3191
  const de_Milestone = (output, context) => {
3698
- return {
3699
- MilestoneName: __expectString(output.MilestoneName),
3700
- MilestoneNumber: __expectInt32(output.MilestoneNumber),
3701
- RecordedAt: output.RecordedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RecordedAt))) : undefined,
3702
- Workload: output.Workload != null ? de_Workload(output.Workload, context) : undefined,
3703
- };
3192
+ return take(output, {
3193
+ MilestoneName: __expectString,
3194
+ MilestoneNumber: __expectInt32,
3195
+ RecordedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3196
+ Workload: (_) => de_Workload(_, context),
3197
+ });
3704
3198
  };
3705
3199
  const de_MilestoneSummaries = (output, context) => {
3706
3200
  const retVal = (output || [])
3707
3201
  .filter((e) => e != null)
3708
3202
  .map((entry) => {
3709
- if (entry === null) {
3710
- return null;
3711
- }
3712
3203
  return de_MilestoneSummary(entry, context);
3713
3204
  });
3714
3205
  return retVal;
3715
3206
  };
3716
3207
  const de_MilestoneSummary = (output, context) => {
3717
- return {
3718
- MilestoneName: __expectString(output.MilestoneName),
3719
- MilestoneNumber: __expectInt32(output.MilestoneNumber),
3720
- RecordedAt: output.RecordedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RecordedAt))) : undefined,
3721
- WorkloadSummary: output.WorkloadSummary != null ? de_WorkloadSummary(output.WorkloadSummary, context) : undefined,
3722
- };
3723
- };
3724
- const de_NotificationSummaries = (output, context) => {
3725
- const retVal = (output || [])
3726
- .filter((e) => e != null)
3727
- .map((entry) => {
3728
- if (entry === null) {
3729
- return null;
3730
- }
3731
- return de_NotificationSummary(entry, context);
3732
- });
3733
- return retVal;
3734
- };
3735
- const de_NotificationSummary = (output, context) => {
3736
- return {
3737
- LensUpgradeSummary: output.LensUpgradeSummary != null ? de_LensUpgradeSummary(output.LensUpgradeSummary, context) : undefined,
3738
- Type: __expectString(output.Type),
3739
- };
3740
- };
3741
- const de_PillarDifference = (output, context) => {
3742
- return {
3743
- DifferenceStatus: __expectString(output.DifferenceStatus),
3744
- PillarId: __expectString(output.PillarId),
3745
- PillarName: __expectString(output.PillarName),
3746
- QuestionDifferences: output.QuestionDifferences != null ? de_QuestionDifferences(output.QuestionDifferences, context) : undefined,
3747
- };
3748
- };
3749
- const de_PillarDifferences = (output, context) => {
3750
- const retVal = (output || [])
3751
- .filter((e) => e != null)
3752
- .map((entry) => {
3753
- if (entry === null) {
3754
- return null;
3755
- }
3756
- return de_PillarDifference(entry, context);
3757
- });
3758
- return retVal;
3759
- };
3760
- const de_PillarMetric = (output, context) => {
3761
- return {
3762
- PillarId: __expectString(output.PillarId),
3763
- Questions: output.Questions != null ? de_QuestionMetrics(output.Questions, context) : undefined,
3764
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3765
- };
3766
- };
3767
- const de_PillarMetrics = (output, context) => {
3768
- const retVal = (output || [])
3769
- .filter((e) => e != null)
3770
- .map((entry) => {
3771
- if (entry === null) {
3772
- return null;
3773
- }
3774
- return de_PillarMetric(entry, context);
3775
- });
3776
- return retVal;
3777
- };
3778
- const de_PillarReviewSummaries = (output, context) => {
3779
- const retVal = (output || [])
3780
- .filter((e) => e != null)
3781
- .map((entry) => {
3782
- if (entry === null) {
3783
- return null;
3784
- }
3785
- return de_PillarReviewSummary(entry, context);
3786
- });
3787
- return retVal;
3788
- };
3789
- const de_PillarReviewSummary = (output, context) => {
3790
- return {
3791
- Notes: __expectString(output.Notes),
3792
- PillarId: __expectString(output.PillarId),
3793
- PillarName: __expectString(output.PillarName),
3794
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3795
- };
3796
- };
3797
- const de_QuestionDifference = (output, context) => {
3798
- return {
3799
- DifferenceStatus: __expectString(output.DifferenceStatus),
3800
- QuestionId: __expectString(output.QuestionId),
3801
- QuestionTitle: __expectString(output.QuestionTitle),
3802
- };
3803
- };
3804
- const de_QuestionDifferences = (output, context) => {
3805
- const retVal = (output || [])
3806
- .filter((e) => e != null)
3807
- .map((entry) => {
3808
- if (entry === null) {
3809
- return null;
3810
- }
3811
- return de_QuestionDifference(entry, context);
3812
- });
3813
- return retVal;
3814
- };
3815
- const de_QuestionMetric = (output, context) => {
3816
- return {
3817
- BestPractices: output.BestPractices != null ? de_BestPractices(output.BestPractices, context) : undefined,
3818
- QuestionId: __expectString(output.QuestionId),
3819
- Risk: __expectString(output.Risk),
3820
- };
3821
- };
3822
- const de_QuestionMetrics = (output, context) => {
3823
- const retVal = (output || [])
3824
- .filter((e) => e != null)
3825
- .map((entry) => {
3826
- if (entry === null) {
3827
- return null;
3828
- }
3829
- return de_QuestionMetric(entry, context);
3208
+ return take(output, {
3209
+ MilestoneName: __expectString,
3210
+ MilestoneNumber: __expectInt32,
3211
+ RecordedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3212
+ WorkloadSummary: (_) => de_WorkloadSummary(_, context),
3830
3213
  });
3831
- return retVal;
3832
- };
3833
- const de_RiskCounts = (output, context) => {
3834
- return Object.entries(output).reduce((acc, [key, value]) => {
3835
- if (value === null) {
3836
- return acc;
3837
- }
3838
- acc[key] = __expectInt32(value);
3839
- return acc;
3840
- }, {});
3841
- };
3842
- const de_SelectedChoices = (output, context) => {
3843
- const retVal = (output || [])
3844
- .filter((e) => e != null)
3845
- .map((entry) => {
3846
- if (entry === null) {
3847
- return null;
3848
- }
3849
- return __expectString(entry);
3850
- });
3851
- return retVal;
3852
- };
3853
- const de_ShareInvitation = (output, context) => {
3854
- return {
3855
- LensAlias: __expectString(output.LensAlias),
3856
- LensArn: __expectString(output.LensArn),
3857
- ShareInvitationId: __expectString(output.ShareInvitationId),
3858
- ShareResourceType: __expectString(output.ShareResourceType),
3859
- WorkloadId: __expectString(output.WorkloadId),
3860
- };
3861
- };
3862
- const de_ShareInvitationSummaries = (output, context) => {
3863
- const retVal = (output || [])
3864
- .filter((e) => e != null)
3865
- .map((entry) => {
3866
- if (entry === null) {
3867
- return null;
3868
- }
3869
- return de_ShareInvitationSummary(entry, context);
3870
- });
3871
- return retVal;
3872
- };
3873
- const de_ShareInvitationSummary = (output, context) => {
3874
- return {
3875
- LensArn: __expectString(output.LensArn),
3876
- LensName: __expectString(output.LensName),
3877
- PermissionType: __expectString(output.PermissionType),
3878
- ShareInvitationId: __expectString(output.ShareInvitationId),
3879
- ShareResourceType: __expectString(output.ShareResourceType),
3880
- SharedBy: __expectString(output.SharedBy),
3881
- SharedWith: __expectString(output.SharedWith),
3882
- WorkloadId: __expectString(output.WorkloadId),
3883
- WorkloadName: __expectString(output.WorkloadName),
3884
- };
3885
- };
3886
- const de_TagMap = (output, context) => {
3887
- return Object.entries(output).reduce((acc, [key, value]) => {
3888
- if (value === null) {
3889
- return acc;
3890
- }
3891
- acc[key] = __expectString(value);
3892
- return acc;
3893
- }, {});
3894
- };
3895
- const de_Urls = (output, context) => {
3896
- const retVal = (output || [])
3897
- .filter((e) => e != null)
3898
- .map((entry) => {
3899
- if (entry === null) {
3900
- return null;
3901
- }
3902
- return de_ChoiceContent(entry, context);
3903
- });
3904
- return retVal;
3905
- };
3906
- const de_ValidationExceptionField = (output, context) => {
3907
- return {
3908
- Message: __expectString(output.Message),
3909
- Name: __expectString(output.Name),
3910
- };
3911
- };
3912
- const de_ValidationExceptionFieldList = (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_ValidationExceptionField(entry, context);
3920
- });
3921
- return retVal;
3922
- };
3923
- const de_VersionDifferences = (output, context) => {
3924
- return {
3925
- PillarDifferences: output.PillarDifferences != null ? de_PillarDifferences(output.PillarDifferences, context) : undefined,
3926
- };
3927
3214
  };
3928
3215
  const de_Workload = (output, context) => {
3929
- return {
3930
- AccountIds: output.AccountIds != null ? de_WorkloadAccountIds(output.AccountIds, context) : undefined,
3931
- Applications: output.Applications != null ? de_WorkloadApplications(output.Applications, context) : undefined,
3932
- ArchitecturalDesign: __expectString(output.ArchitecturalDesign),
3933
- AwsRegions: output.AwsRegions != null ? de_WorkloadAwsRegions(output.AwsRegions, context) : undefined,
3934
- Description: __expectString(output.Description),
3935
- DiscoveryConfig: output.DiscoveryConfig != null ? de_WorkloadDiscoveryConfig(output.DiscoveryConfig, context) : undefined,
3936
- Environment: __expectString(output.Environment),
3937
- ImprovementStatus: __expectString(output.ImprovementStatus),
3938
- Industry: __expectString(output.Industry),
3939
- IndustryType: __expectString(output.IndustryType),
3940
- IsReviewOwnerUpdateAcknowledged: __expectBoolean(output.IsReviewOwnerUpdateAcknowledged),
3941
- Lenses: output.Lenses != null ? de_WorkloadLenses(output.Lenses, context) : undefined,
3942
- NonAwsRegions: output.NonAwsRegions != null ? de_WorkloadNonAwsRegions(output.NonAwsRegions, context) : undefined,
3943
- Notes: __expectString(output.Notes),
3944
- Owner: __expectString(output.Owner),
3945
- PillarPriorities: output.PillarPriorities != null ? de_WorkloadPillarPriorities(output.PillarPriorities, context) : undefined,
3946
- ReviewOwner: __expectString(output.ReviewOwner),
3947
- ReviewRestrictionDate: output.ReviewRestrictionDate != null
3948
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReviewRestrictionDate)))
3949
- : undefined,
3950
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
3951
- ShareInvitationId: __expectString(output.ShareInvitationId),
3952
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
3953
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3954
- WorkloadArn: __expectString(output.WorkloadArn),
3955
- WorkloadId: __expectString(output.WorkloadId),
3956
- WorkloadName: __expectString(output.WorkloadName),
3957
- };
3958
- };
3959
- const de_WorkloadAccountIds = (output, context) => {
3960
- const retVal = (output || [])
3961
- .filter((e) => e != null)
3962
- .map((entry) => {
3963
- if (entry === null) {
3964
- return null;
3965
- }
3966
- return __expectString(entry);
3967
- });
3968
- return retVal;
3969
- };
3970
- const de_WorkloadApplications = (output, context) => {
3971
- const retVal = (output || [])
3972
- .filter((e) => e != null)
3973
- .map((entry) => {
3974
- if (entry === null) {
3975
- return null;
3976
- }
3977
- return __expectString(entry);
3978
- });
3979
- return retVal;
3980
- };
3981
- const de_WorkloadAwsRegions = (output, context) => {
3982
- const retVal = (output || [])
3983
- .filter((e) => e != null)
3984
- .map((entry) => {
3985
- if (entry === null) {
3986
- return null;
3987
- }
3988
- return __expectString(entry);
3989
- });
3990
- return retVal;
3991
- };
3992
- const de_WorkloadDiscoveryConfig = (output, context) => {
3993
- return {
3994
- TrustedAdvisorIntegrationStatus: __expectString(output.TrustedAdvisorIntegrationStatus),
3995
- };
3996
- };
3997
- const de_WorkloadLenses = (output, context) => {
3998
- const retVal = (output || [])
3999
- .filter((e) => e != null)
4000
- .map((entry) => {
4001
- if (entry === null) {
4002
- return null;
4003
- }
4004
- return __expectString(entry);
3216
+ return take(output, {
3217
+ AccountIds: _json,
3218
+ Applications: _json,
3219
+ ArchitecturalDesign: __expectString,
3220
+ AwsRegions: _json,
3221
+ Description: __expectString,
3222
+ DiscoveryConfig: _json,
3223
+ Environment: __expectString,
3224
+ ImprovementStatus: __expectString,
3225
+ Industry: __expectString,
3226
+ IndustryType: __expectString,
3227
+ IsReviewOwnerUpdateAcknowledged: __expectBoolean,
3228
+ Lenses: _json,
3229
+ NonAwsRegions: _json,
3230
+ Notes: __expectString,
3231
+ Owner: __expectString,
3232
+ PillarPriorities: _json,
3233
+ ReviewOwner: __expectString,
3234
+ ReviewRestrictionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3235
+ RiskCounts: _json,
3236
+ ShareInvitationId: __expectString,
3237
+ Tags: _json,
3238
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3239
+ WorkloadArn: __expectString,
3240
+ WorkloadId: __expectString,
3241
+ WorkloadName: __expectString,
4005
3242
  });
4006
- return retVal;
4007
- };
4008
- const de_WorkloadNonAwsRegions = (output, context) => {
4009
- const retVal = (output || [])
4010
- .filter((e) => e != null)
4011
- .map((entry) => {
4012
- if (entry === null) {
4013
- return null;
4014
- }
4015
- return __expectString(entry);
4016
- });
4017
- return retVal;
4018
- };
4019
- const de_WorkloadPillarPriorities = (output, context) => {
4020
- const retVal = (output || [])
4021
- .filter((e) => e != null)
4022
- .map((entry) => {
4023
- if (entry === null) {
4024
- return null;
4025
- }
4026
- return __expectString(entry);
4027
- });
4028
- return retVal;
4029
- };
4030
- const de_WorkloadShare = (output, context) => {
4031
- return {
4032
- PermissionType: __expectString(output.PermissionType),
4033
- ShareId: __expectString(output.ShareId),
4034
- SharedBy: __expectString(output.SharedBy),
4035
- SharedWith: __expectString(output.SharedWith),
4036
- Status: __expectString(output.Status),
4037
- WorkloadId: __expectString(output.WorkloadId),
4038
- WorkloadName: __expectString(output.WorkloadName),
4039
- };
4040
- };
4041
- const de_WorkloadShareSummaries = (output, context) => {
4042
- const retVal = (output || [])
4043
- .filter((e) => e != null)
4044
- .map((entry) => {
4045
- if (entry === null) {
4046
- return null;
4047
- }
4048
- return de_WorkloadShareSummary(entry, context);
4049
- });
4050
- return retVal;
4051
- };
4052
- const de_WorkloadShareSummary = (output, context) => {
4053
- return {
4054
- PermissionType: __expectString(output.PermissionType),
4055
- ShareId: __expectString(output.ShareId),
4056
- SharedWith: __expectString(output.SharedWith),
4057
- Status: __expectString(output.Status),
4058
- StatusMessage: __expectString(output.StatusMessage),
4059
- };
4060
3243
  };
4061
3244
  const de_WorkloadSummaries = (output, context) => {
4062
3245
  const retVal = (output || [])
4063
3246
  .filter((e) => e != null)
4064
3247
  .map((entry) => {
4065
- if (entry === null) {
4066
- return null;
4067
- }
4068
3248
  return de_WorkloadSummary(entry, context);
4069
3249
  });
4070
3250
  return retVal;
4071
3251
  };
4072
3252
  const de_WorkloadSummary = (output, context) => {
4073
- return {
4074
- ImprovementStatus: __expectString(output.ImprovementStatus),
4075
- Lenses: output.Lenses != null ? de_WorkloadLenses(output.Lenses, context) : undefined,
4076
- Owner: __expectString(output.Owner),
4077
- RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined,
4078
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
4079
- WorkloadArn: __expectString(output.WorkloadArn),
4080
- WorkloadId: __expectString(output.WorkloadId),
4081
- WorkloadName: __expectString(output.WorkloadName),
4082
- };
3253
+ return take(output, {
3254
+ ImprovementStatus: __expectString,
3255
+ Lenses: _json,
3256
+ Owner: __expectString,
3257
+ RiskCounts: _json,
3258
+ UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3259
+ WorkloadArn: __expectString,
3260
+ WorkloadId: __expectString,
3261
+ WorkloadName: __expectString,
3262
+ });
4083
3263
  };
4084
3264
  const deserializeMetadata = (output) => ({
4085
3265
  httpStatusCode: output.statusCode,