@aws-sdk/client-greengrassv2 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, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { GreengrassV2ServiceException as __BaseException } from "../models/GreengrassV2ServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, RequestAlreadyInProgressException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
@@ -10,9 +10,9 @@ export const se_AssociateServiceRoleToAccountCommand = async (input, context) =>
10
10
  };
11
11
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
12
12
  let body;
13
- body = JSON.stringify({
14
- ...(input.roleArn != null && { RoleArn: input.roleArn }),
15
- });
13
+ body = JSON.stringify(take(input, {
14
+ RoleArn: [, , `roleArn`],
15
+ }));
16
16
  return new __HttpRequest({
17
17
  protocol,
18
18
  hostname,
@@ -32,9 +32,9 @@ export const se_BatchAssociateClientDeviceWithCoreDeviceCommand = async (input,
32
32
  "/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices";
33
33
  resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
34
34
  let body;
35
- body = JSON.stringify({
36
- ...(input.entries != null && { entries: se_AssociateClientDeviceWithCoreDeviceEntryList(input.entries, context) }),
37
- });
35
+ body = JSON.stringify(take(input, {
36
+ entries: (_) => _json(_),
37
+ }));
38
38
  return new __HttpRequest({
39
39
  protocol,
40
40
  hostname,
@@ -54,11 +54,9 @@ export const se_BatchDisassociateClientDeviceFromCoreDeviceCommand = async (inpu
54
54
  "/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices";
55
55
  resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
56
56
  let body;
57
- body = JSON.stringify({
58
- ...(input.entries != null && {
59
- entries: se_DisassociateClientDeviceFromCoreDeviceEntryList(input.entries, context),
60
- }),
61
- });
57
+ body = JSON.stringify(take(input, {
58
+ entries: (_) => _json(_),
59
+ }));
62
60
  return new __HttpRequest({
63
61
  protocol,
64
62
  hostname,
@@ -93,14 +91,12 @@ export const se_CreateComponentVersionCommand = async (input, context) => {
93
91
  };
94
92
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/createComponentVersion";
95
93
  let body;
96
- body = JSON.stringify({
97
- clientToken: input.clientToken ?? generateIdempotencyToken(),
98
- ...(input.inlineRecipe != null && { inlineRecipe: context.base64Encoder(input.inlineRecipe) }),
99
- ...(input.lambdaFunction != null && {
100
- lambdaFunction: se_LambdaFunctionRecipeSource(input.lambdaFunction, context),
101
- }),
102
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
103
- });
94
+ body = JSON.stringify(take(input, {
95
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
96
+ inlineRecipe: (_) => context.base64Encoder(_),
97
+ lambdaFunction: (_) => _json(_),
98
+ tags: (_) => _json(_),
99
+ }));
104
100
  return new __HttpRequest({
105
101
  protocol,
106
102
  hostname,
@@ -118,20 +114,16 @@ export const se_CreateDeploymentCommand = async (input, context) => {
118
114
  };
119
115
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments";
120
116
  let body;
121
- body = JSON.stringify({
122
- clientToken: input.clientToken ?? generateIdempotencyToken(),
123
- ...(input.components != null && { components: se_ComponentDeploymentSpecifications(input.components, context) }),
124
- ...(input.deploymentName != null && { deploymentName: input.deploymentName }),
125
- ...(input.deploymentPolicies != null && {
126
- deploymentPolicies: se_DeploymentPolicies(input.deploymentPolicies, context),
127
- }),
128
- ...(input.iotJobConfiguration != null && {
129
- iotJobConfiguration: se_DeploymentIoTJobConfiguration(input.iotJobConfiguration, context),
130
- }),
131
- ...(input.parentTargetArn != null && { parentTargetArn: input.parentTargetArn }),
132
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
133
- ...(input.targetArn != null && { targetArn: input.targetArn }),
134
- });
117
+ body = JSON.stringify(take(input, {
118
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
119
+ components: (_) => se_ComponentDeploymentSpecifications(_, context),
120
+ deploymentName: [],
121
+ deploymentPolicies: (_) => _json(_),
122
+ iotJobConfiguration: (_) => se_DeploymentIoTJobConfiguration(_, context),
123
+ parentTargetArn: [],
124
+ tags: (_) => _json(_),
125
+ targetArn: [],
126
+ }));
135
127
  return new __HttpRequest({
136
128
  protocol,
137
129
  hostname,
@@ -508,12 +500,10 @@ export const se_ResolveComponentCandidatesCommand = async (input, context) => {
508
500
  };
509
501
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/resolveComponentCandidates";
510
502
  let body;
511
- body = JSON.stringify({
512
- ...(input.componentCandidates != null && {
513
- componentCandidates: se_ComponentCandidateList(input.componentCandidates, context),
514
- }),
515
- ...(input.platform != null && { platform: se_ComponentPlatform(input.platform, context) }),
516
- });
503
+ body = JSON.stringify(take(input, {
504
+ componentCandidates: (_) => _json(_),
505
+ platform: (_) => _json(_),
506
+ }));
517
507
  return new __HttpRequest({
518
508
  protocol,
519
509
  hostname,
@@ -532,9 +522,9 @@ export const se_TagResourceCommand = async (input, context) => {
532
522
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
533
523
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
534
524
  let body;
535
- body = JSON.stringify({
536
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
537
- });
525
+ body = JSON.stringify(take(input, {
526
+ tags: (_) => _json(_),
527
+ }));
538
528
  return new __HttpRequest({
539
529
  protocol,
540
530
  hostname,
@@ -577,11 +567,9 @@ export const se_UpdateConnectivityInfoCommand = async (input, context) => {
577
567
  "/greengrass/things/{thingName}/connectivityInfo";
578
568
  resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
579
569
  let body;
580
- body = JSON.stringify({
581
- ...(input.connectivityInfo != null && {
582
- ConnectivityInfo: se_connectivityInfoList(input.connectivityInfo, context),
583
- }),
584
- });
570
+ body = JSON.stringify(take(input, {
571
+ ConnectivityInfo: [, (_) => se_connectivityInfoList(_, context), `connectivityInfo`],
572
+ }));
585
573
  return new __HttpRequest({
586
574
  protocol,
587
575
  hostname,
@@ -600,9 +588,10 @@ export const de_AssociateServiceRoleToAccountCommand = async (output, context) =
600
588
  $metadata: deserializeMetadata(output),
601
589
  });
602
590
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
603
- if (data.AssociatedAt != null) {
604
- contents.associatedAt = __expectString(data.AssociatedAt);
605
- }
591
+ const doc = take(data, {
592
+ associatedAt: [, __expectString, `AssociatedAt`],
593
+ });
594
+ Object.assign(contents, doc);
606
595
  return contents;
607
596
  };
608
597
  const de_AssociateServiceRoleToAccountCommandError = async (output, context) => {
@@ -620,10 +609,9 @@ const de_AssociateServiceRoleToAccountCommandError = async (output, context) =>
620
609
  throw await de_ValidationExceptionRes(parsedOutput, context);
621
610
  default:
622
611
  const parsedBody = parsedOutput.body;
623
- throwDefaultError({
612
+ return throwDefaultError({
624
613
  output,
625
614
  parsedBody,
626
- exceptionCtor: __BaseException,
627
615
  errorCode,
628
616
  });
629
617
  }
@@ -636,9 +624,10 @@ export const de_BatchAssociateClientDeviceWithCoreDeviceCommand = async (output,
636
624
  $metadata: deserializeMetadata(output),
637
625
  });
638
626
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
639
- if (data.errorEntries != null) {
640
- contents.errorEntries = de_AssociateClientDeviceWithCoreDeviceErrorList(data.errorEntries, context);
641
- }
627
+ const doc = take(data, {
628
+ errorEntries: _json,
629
+ });
630
+ Object.assign(contents, doc);
642
631
  return contents;
643
632
  };
644
633
  const de_BatchAssociateClientDeviceWithCoreDeviceCommandError = async (output, context) => {
@@ -665,10 +654,9 @@ const de_BatchAssociateClientDeviceWithCoreDeviceCommandError = async (output, c
665
654
  throw await de_ValidationExceptionRes(parsedOutput, context);
666
655
  default:
667
656
  const parsedBody = parsedOutput.body;
668
- throwDefaultError({
657
+ return throwDefaultError({
669
658
  output,
670
659
  parsedBody,
671
- exceptionCtor: __BaseException,
672
660
  errorCode,
673
661
  });
674
662
  }
@@ -681,9 +669,10 @@ export const de_BatchDisassociateClientDeviceFromCoreDeviceCommand = async (outp
681
669
  $metadata: deserializeMetadata(output),
682
670
  });
683
671
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
684
- if (data.errorEntries != null) {
685
- contents.errorEntries = de_DisassociateClientDeviceFromCoreDeviceErrorList(data.errorEntries, context);
686
- }
672
+ const doc = take(data, {
673
+ errorEntries: _json,
674
+ });
675
+ Object.assign(contents, doc);
687
676
  return contents;
688
677
  };
689
678
  const de_BatchDisassociateClientDeviceFromCoreDeviceCommandError = async (output, context) => {
@@ -710,10 +699,9 @@ const de_BatchDisassociateClientDeviceFromCoreDeviceCommandError = async (output
710
699
  throw await de_ValidationExceptionRes(parsedOutput, context);
711
700
  default:
712
701
  const parsedBody = parsedOutput.body;
713
- throwDefaultError({
702
+ return throwDefaultError({
714
703
  output,
715
704
  parsedBody,
716
- exceptionCtor: __BaseException,
717
705
  errorCode,
718
706
  });
719
707
  }
@@ -726,9 +714,10 @@ export const de_CancelDeploymentCommand = async (output, context) => {
726
714
  $metadata: deserializeMetadata(output),
727
715
  });
728
716
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
729
- if (data.message != null) {
730
- contents.message = __expectString(data.message);
731
- }
717
+ const doc = take(data, {
718
+ message: __expectString,
719
+ });
720
+ Object.assign(contents, doc);
732
721
  return contents;
733
722
  };
734
723
  const de_CancelDeploymentCommandError = async (output, context) => {
@@ -758,10 +747,9 @@ const de_CancelDeploymentCommandError = async (output, context) => {
758
747
  throw await de_ValidationExceptionRes(parsedOutput, context);
759
748
  default:
760
749
  const parsedBody = parsedOutput.body;
761
- throwDefaultError({
750
+ return throwDefaultError({
762
751
  output,
763
752
  parsedBody,
764
- exceptionCtor: __BaseException,
765
753
  errorCode,
766
754
  });
767
755
  }
@@ -774,21 +762,14 @@ export const de_CreateComponentVersionCommand = async (output, context) => {
774
762
  $metadata: deserializeMetadata(output),
775
763
  });
776
764
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
777
- if (data.arn != null) {
778
- contents.arn = __expectString(data.arn);
779
- }
780
- if (data.componentName != null) {
781
- contents.componentName = __expectString(data.componentName);
782
- }
783
- if (data.componentVersion != null) {
784
- contents.componentVersion = __expectString(data.componentVersion);
785
- }
786
- if (data.creationTimestamp != null) {
787
- contents.creationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTimestamp)));
788
- }
789
- if (data.status != null) {
790
- contents.status = de_CloudComponentStatus(data.status, context);
791
- }
765
+ const doc = take(data, {
766
+ arn: __expectString,
767
+ componentName: __expectString,
768
+ componentVersion: __expectString,
769
+ creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
770
+ status: _json,
771
+ });
772
+ Object.assign(contents, doc);
792
773
  return contents;
793
774
  };
794
775
  const de_CreateComponentVersionCommandError = async (output, context) => {
@@ -821,10 +802,9 @@ const de_CreateComponentVersionCommandError = async (output, context) => {
821
802
  throw await de_ValidationExceptionRes(parsedOutput, context);
822
803
  default:
823
804
  const parsedBody = parsedOutput.body;
824
- throwDefaultError({
805
+ return throwDefaultError({
825
806
  output,
826
807
  parsedBody,
827
- exceptionCtor: __BaseException,
828
808
  errorCode,
829
809
  });
830
810
  }
@@ -837,15 +817,12 @@ export const de_CreateDeploymentCommand = async (output, context) => {
837
817
  $metadata: deserializeMetadata(output),
838
818
  });
839
819
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
840
- if (data.deploymentId != null) {
841
- contents.deploymentId = __expectString(data.deploymentId);
842
- }
843
- if (data.iotJobArn != null) {
844
- contents.iotJobArn = __expectString(data.iotJobArn);
845
- }
846
- if (data.iotJobId != null) {
847
- contents.iotJobId = __expectString(data.iotJobId);
848
- }
820
+ const doc = take(data, {
821
+ deploymentId: __expectString,
822
+ iotJobArn: __expectString,
823
+ iotJobId: __expectString,
824
+ });
825
+ Object.assign(contents, doc);
849
826
  return contents;
850
827
  };
851
828
  const de_CreateDeploymentCommandError = async (output, context) => {
@@ -878,10 +855,9 @@ const de_CreateDeploymentCommandError = async (output, context) => {
878
855
  throw await de_ValidationExceptionRes(parsedOutput, context);
879
856
  default:
880
857
  const parsedBody = parsedOutput.body;
881
- throwDefaultError({
858
+ return throwDefaultError({
882
859
  output,
883
860
  parsedBody,
884
- exceptionCtor: __BaseException,
885
861
  errorCode,
886
862
  });
887
863
  }
@@ -923,10 +899,9 @@ const de_DeleteComponentCommandError = async (output, context) => {
923
899
  throw await de_ValidationExceptionRes(parsedOutput, context);
924
900
  default:
925
901
  const parsedBody = parsedOutput.body;
926
- throwDefaultError({
902
+ return throwDefaultError({
927
903
  output,
928
904
  parsedBody,
929
- exceptionCtor: __BaseException,
930
905
  errorCode,
931
906
  });
932
907
  }
@@ -968,10 +943,9 @@ const de_DeleteCoreDeviceCommandError = async (output, context) => {
968
943
  throw await de_ValidationExceptionRes(parsedOutput, context);
969
944
  default:
970
945
  const parsedBody = parsedOutput.body;
971
- throwDefaultError({
946
+ return throwDefaultError({
972
947
  output,
973
948
  parsedBody,
974
- exceptionCtor: __BaseException,
975
949
  errorCode,
976
950
  });
977
951
  }
@@ -1013,10 +987,9 @@ const de_DeleteDeploymentCommandError = async (output, context) => {
1013
987
  throw await de_ValidationExceptionRes(parsedOutput, context);
1014
988
  default:
1015
989
  const parsedBody = parsedOutput.body;
1016
- throwDefaultError({
990
+ return throwDefaultError({
1017
991
  output,
1018
992
  parsedBody,
1019
- exceptionCtor: __BaseException,
1020
993
  errorCode,
1021
994
  });
1022
995
  }
@@ -1029,33 +1002,18 @@ export const de_DescribeComponentCommand = async (output, context) => {
1029
1002
  $metadata: deserializeMetadata(output),
1030
1003
  });
1031
1004
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1032
- if (data.arn != null) {
1033
- contents.arn = __expectString(data.arn);
1034
- }
1035
- if (data.componentName != null) {
1036
- contents.componentName = __expectString(data.componentName);
1037
- }
1038
- if (data.componentVersion != null) {
1039
- contents.componentVersion = __expectString(data.componentVersion);
1040
- }
1041
- if (data.creationTimestamp != null) {
1042
- contents.creationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTimestamp)));
1043
- }
1044
- if (data.description != null) {
1045
- contents.description = __expectString(data.description);
1046
- }
1047
- if (data.platforms != null) {
1048
- contents.platforms = de_ComponentPlatformList(data.platforms, context);
1049
- }
1050
- if (data.publisher != null) {
1051
- contents.publisher = __expectString(data.publisher);
1052
- }
1053
- if (data.status != null) {
1054
- contents.status = de_CloudComponentStatus(data.status, context);
1055
- }
1056
- if (data.tags != null) {
1057
- contents.tags = de_TagMap(data.tags, context);
1058
- }
1005
+ const doc = take(data, {
1006
+ arn: __expectString,
1007
+ componentName: __expectString,
1008
+ componentVersion: __expectString,
1009
+ creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1010
+ description: __expectString,
1011
+ platforms: _json,
1012
+ publisher: __expectString,
1013
+ status: _json,
1014
+ tags: _json,
1015
+ });
1016
+ Object.assign(contents, doc);
1059
1017
  return contents;
1060
1018
  };
1061
1019
  const de_DescribeComponentCommandError = async (output, context) => {
@@ -1082,10 +1040,9 @@ const de_DescribeComponentCommandError = async (output, context) => {
1082
1040
  throw await de_ValidationExceptionRes(parsedOutput, context);
1083
1041
  default:
1084
1042
  const parsedBody = parsedOutput.body;
1085
- throwDefaultError({
1043
+ return throwDefaultError({
1086
1044
  output,
1087
1045
  parsedBody,
1088
- exceptionCtor: __BaseException,
1089
1046
  errorCode,
1090
1047
  });
1091
1048
  }
@@ -1098,9 +1055,10 @@ export const de_DisassociateServiceRoleFromAccountCommand = async (output, conte
1098
1055
  $metadata: deserializeMetadata(output),
1099
1056
  });
1100
1057
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1101
- if (data.DisassociatedAt != null) {
1102
- contents.disassociatedAt = __expectString(data.DisassociatedAt);
1103
- }
1058
+ const doc = take(data, {
1059
+ disassociatedAt: [, __expectString, `DisassociatedAt`],
1060
+ });
1061
+ Object.assign(contents, doc);
1104
1062
  return contents;
1105
1063
  };
1106
1064
  const de_DisassociateServiceRoleFromAccountCommandError = async (output, context) => {
@@ -1115,10 +1073,9 @@ const de_DisassociateServiceRoleFromAccountCommandError = async (output, context
1115
1073
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1116
1074
  default:
1117
1075
  const parsedBody = parsedOutput.body;
1118
- throwDefaultError({
1076
+ return throwDefaultError({
1119
1077
  output,
1120
1078
  parsedBody,
1121
- exceptionCtor: __BaseException,
1122
1079
  errorCode,
1123
1080
  });
1124
1081
  }
@@ -1131,15 +1088,12 @@ export const de_GetComponentCommand = async (output, context) => {
1131
1088
  $metadata: deserializeMetadata(output),
1132
1089
  });
1133
1090
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1134
- if (data.recipe != null) {
1135
- contents.recipe = context.base64Decoder(data.recipe);
1136
- }
1137
- if (data.recipeOutputFormat != null) {
1138
- contents.recipeOutputFormat = __expectString(data.recipeOutputFormat);
1139
- }
1140
- if (data.tags != null) {
1141
- contents.tags = de_TagMap(data.tags, context);
1142
- }
1091
+ const doc = take(data, {
1092
+ recipe: context.base64Decoder,
1093
+ recipeOutputFormat: __expectString,
1094
+ tags: _json,
1095
+ });
1096
+ Object.assign(contents, doc);
1143
1097
  return contents;
1144
1098
  };
1145
1099
  const de_GetComponentCommandError = async (output, context) => {
@@ -1166,10 +1120,9 @@ const de_GetComponentCommandError = async (output, context) => {
1166
1120
  throw await de_ValidationExceptionRes(parsedOutput, context);
1167
1121
  default:
1168
1122
  const parsedBody = parsedOutput.body;
1169
- throwDefaultError({
1123
+ return throwDefaultError({
1170
1124
  output,
1171
1125
  parsedBody,
1172
- exceptionCtor: __BaseException,
1173
1126
  errorCode,
1174
1127
  });
1175
1128
  }
@@ -1182,9 +1135,10 @@ export const de_GetComponentVersionArtifactCommand = async (output, context) =>
1182
1135
  $metadata: deserializeMetadata(output),
1183
1136
  });
1184
1137
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1185
- if (data.preSignedUrl != null) {
1186
- contents.preSignedUrl = __expectString(data.preSignedUrl);
1187
- }
1138
+ const doc = take(data, {
1139
+ preSignedUrl: __expectString,
1140
+ });
1141
+ Object.assign(contents, doc);
1188
1142
  return contents;
1189
1143
  };
1190
1144
  const de_GetComponentVersionArtifactCommandError = async (output, context) => {
@@ -1211,10 +1165,9 @@ const de_GetComponentVersionArtifactCommandError = async (output, context) => {
1211
1165
  throw await de_ValidationExceptionRes(parsedOutput, context);
1212
1166
  default:
1213
1167
  const parsedBody = parsedOutput.body;
1214
- throwDefaultError({
1168
+ return throwDefaultError({
1215
1169
  output,
1216
1170
  parsedBody,
1217
- exceptionCtor: __BaseException,
1218
1171
  errorCode,
1219
1172
  });
1220
1173
  }
@@ -1227,12 +1180,11 @@ export const de_GetConnectivityInfoCommand = async (output, context) => {
1227
1180
  $metadata: deserializeMetadata(output),
1228
1181
  });
1229
1182
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1230
- if (data.ConnectivityInfo != null) {
1231
- contents.connectivityInfo = de_connectivityInfoList(data.ConnectivityInfo, context);
1232
- }
1233
- if (data.Message != null) {
1234
- contents.message = __expectString(data.Message);
1235
- }
1183
+ const doc = take(data, {
1184
+ connectivityInfo: [, (_) => de_connectivityInfoList(_, context), `ConnectivityInfo`],
1185
+ message: [, __expectString, `Message`],
1186
+ });
1187
+ Object.assign(contents, doc);
1236
1188
  return contents;
1237
1189
  };
1238
1190
  const de_GetConnectivityInfoCommandError = async (output, context) => {
@@ -1250,10 +1202,9 @@ const de_GetConnectivityInfoCommandError = async (output, context) => {
1250
1202
  throw await de_ValidationExceptionRes(parsedOutput, context);
1251
1203
  default:
1252
1204
  const parsedBody = parsedOutput.body;
1253
- throwDefaultError({
1205
+ return throwDefaultError({
1254
1206
  output,
1255
1207
  parsedBody,
1256
- exceptionCtor: __BaseException,
1257
1208
  errorCode,
1258
1209
  });
1259
1210
  }
@@ -1266,27 +1217,16 @@ export const de_GetCoreDeviceCommand = async (output, context) => {
1266
1217
  $metadata: deserializeMetadata(output),
1267
1218
  });
1268
1219
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1269
- if (data.architecture != null) {
1270
- contents.architecture = __expectString(data.architecture);
1271
- }
1272
- if (data.coreDeviceThingName != null) {
1273
- contents.coreDeviceThingName = __expectString(data.coreDeviceThingName);
1274
- }
1275
- if (data.coreVersion != null) {
1276
- contents.coreVersion = __expectString(data.coreVersion);
1277
- }
1278
- if (data.lastStatusUpdateTimestamp != null) {
1279
- contents.lastStatusUpdateTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStatusUpdateTimestamp)));
1280
- }
1281
- if (data.platform != null) {
1282
- contents.platform = __expectString(data.platform);
1283
- }
1284
- if (data.status != null) {
1285
- contents.status = __expectString(data.status);
1286
- }
1287
- if (data.tags != null) {
1288
- contents.tags = de_TagMap(data.tags, context);
1289
- }
1220
+ const doc = take(data, {
1221
+ architecture: __expectString,
1222
+ coreDeviceThingName: __expectString,
1223
+ coreVersion: __expectString,
1224
+ lastStatusUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1225
+ platform: __expectString,
1226
+ status: __expectString,
1227
+ tags: _json,
1228
+ });
1229
+ Object.assign(contents, doc);
1290
1230
  return contents;
1291
1231
  };
1292
1232
  const de_GetCoreDeviceCommandError = async (output, context) => {
@@ -1313,10 +1253,9 @@ const de_GetCoreDeviceCommandError = async (output, context) => {
1313
1253
  throw await de_ValidationExceptionRes(parsedOutput, context);
1314
1254
  default:
1315
1255
  const parsedBody = parsedOutput.body;
1316
- throwDefaultError({
1256
+ return throwDefaultError({
1317
1257
  output,
1318
1258
  parsedBody,
1319
- exceptionCtor: __BaseException,
1320
1259
  errorCode,
1321
1260
  });
1322
1261
  }
@@ -1329,48 +1268,23 @@ export const de_GetDeploymentCommand = async (output, context) => {
1329
1268
  $metadata: deserializeMetadata(output),
1330
1269
  });
1331
1270
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1332
- if (data.components != null) {
1333
- contents.components = de_ComponentDeploymentSpecifications(data.components, context);
1334
- }
1335
- if (data.creationTimestamp != null) {
1336
- contents.creationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTimestamp)));
1337
- }
1338
- if (data.deploymentId != null) {
1339
- contents.deploymentId = __expectString(data.deploymentId);
1340
- }
1341
- if (data.deploymentName != null) {
1342
- contents.deploymentName = __expectString(data.deploymentName);
1343
- }
1344
- if (data.deploymentPolicies != null) {
1345
- contents.deploymentPolicies = de_DeploymentPolicies(data.deploymentPolicies, context);
1346
- }
1347
- if (data.deploymentStatus != null) {
1348
- contents.deploymentStatus = __expectString(data.deploymentStatus);
1349
- }
1350
- if (data.iotJobArn != null) {
1351
- contents.iotJobArn = __expectString(data.iotJobArn);
1352
- }
1353
- if (data.iotJobConfiguration != null) {
1354
- contents.iotJobConfiguration = de_DeploymentIoTJobConfiguration(data.iotJobConfiguration, context);
1355
- }
1356
- if (data.iotJobId != null) {
1357
- contents.iotJobId = __expectString(data.iotJobId);
1358
- }
1359
- if (data.isLatestForTarget != null) {
1360
- contents.isLatestForTarget = __expectBoolean(data.isLatestForTarget);
1361
- }
1362
- if (data.parentTargetArn != null) {
1363
- contents.parentTargetArn = __expectString(data.parentTargetArn);
1364
- }
1365
- if (data.revisionId != null) {
1366
- contents.revisionId = __expectString(data.revisionId);
1367
- }
1368
- if (data.tags != null) {
1369
- contents.tags = de_TagMap(data.tags, context);
1370
- }
1371
- if (data.targetArn != null) {
1372
- contents.targetArn = __expectString(data.targetArn);
1373
- }
1271
+ const doc = take(data, {
1272
+ components: (_) => de_ComponentDeploymentSpecifications(_, context),
1273
+ creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1274
+ deploymentId: __expectString,
1275
+ deploymentName: __expectString,
1276
+ deploymentPolicies: _json,
1277
+ deploymentStatus: __expectString,
1278
+ iotJobArn: __expectString,
1279
+ iotJobConfiguration: (_) => de_DeploymentIoTJobConfiguration(_, context),
1280
+ iotJobId: __expectString,
1281
+ isLatestForTarget: __expectBoolean,
1282
+ parentTargetArn: __expectString,
1283
+ revisionId: __expectString,
1284
+ tags: _json,
1285
+ targetArn: __expectString,
1286
+ });
1287
+ Object.assign(contents, doc);
1374
1288
  return contents;
1375
1289
  };
1376
1290
  const de_GetDeploymentCommandError = async (output, context) => {
@@ -1397,10 +1311,9 @@ const de_GetDeploymentCommandError = async (output, context) => {
1397
1311
  throw await de_ValidationExceptionRes(parsedOutput, context);
1398
1312
  default:
1399
1313
  const parsedBody = parsedOutput.body;
1400
- throwDefaultError({
1314
+ return throwDefaultError({
1401
1315
  output,
1402
1316
  parsedBody,
1403
- exceptionCtor: __BaseException,
1404
1317
  errorCode,
1405
1318
  });
1406
1319
  }
@@ -1413,12 +1326,11 @@ export const de_GetServiceRoleForAccountCommand = async (output, context) => {
1413
1326
  $metadata: deserializeMetadata(output),
1414
1327
  });
1415
1328
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1416
- if (data.AssociatedAt != null) {
1417
- contents.associatedAt = __expectString(data.AssociatedAt);
1418
- }
1419
- if (data.RoleArn != null) {
1420
- contents.roleArn = __expectString(data.RoleArn);
1421
- }
1329
+ const doc = take(data, {
1330
+ associatedAt: [, __expectString, `AssociatedAt`],
1331
+ roleArn: [, __expectString, `RoleArn`],
1332
+ });
1333
+ Object.assign(contents, doc);
1422
1334
  return contents;
1423
1335
  };
1424
1336
  const de_GetServiceRoleForAccountCommandError = async (output, context) => {
@@ -1433,10 +1345,9 @@ const de_GetServiceRoleForAccountCommandError = async (output, context) => {
1433
1345
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1434
1346
  default:
1435
1347
  const parsedBody = parsedOutput.body;
1436
- throwDefaultError({
1348
+ return throwDefaultError({
1437
1349
  output,
1438
1350
  parsedBody,
1439
- exceptionCtor: __BaseException,
1440
1351
  errorCode,
1441
1352
  });
1442
1353
  }
@@ -1449,12 +1360,11 @@ export const de_ListClientDevicesAssociatedWithCoreDeviceCommand = async (output
1449
1360
  $metadata: deserializeMetadata(output),
1450
1361
  });
1451
1362
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1452
- if (data.associatedClientDevices != null) {
1453
- contents.associatedClientDevices = de_AssociatedClientDeviceList(data.associatedClientDevices, context);
1454
- }
1455
- if (data.nextToken != null) {
1456
- contents.nextToken = __expectString(data.nextToken);
1457
- }
1363
+ const doc = take(data, {
1364
+ associatedClientDevices: (_) => de_AssociatedClientDeviceList(_, context),
1365
+ nextToken: __expectString,
1366
+ });
1367
+ Object.assign(contents, doc);
1458
1368
  return contents;
1459
1369
  };
1460
1370
  const de_ListClientDevicesAssociatedWithCoreDeviceCommandError = async (output, context) => {
@@ -1481,10 +1391,9 @@ const de_ListClientDevicesAssociatedWithCoreDeviceCommandError = async (output,
1481
1391
  throw await de_ValidationExceptionRes(parsedOutput, context);
1482
1392
  default:
1483
1393
  const parsedBody = parsedOutput.body;
1484
- throwDefaultError({
1394
+ return throwDefaultError({
1485
1395
  output,
1486
1396
  parsedBody,
1487
- exceptionCtor: __BaseException,
1488
1397
  errorCode,
1489
1398
  });
1490
1399
  }
@@ -1497,12 +1406,11 @@ export const de_ListComponentsCommand = async (output, context) => {
1497
1406
  $metadata: deserializeMetadata(output),
1498
1407
  });
1499
1408
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1500
- if (data.components != null) {
1501
- contents.components = de_ComponentList(data.components, context);
1502
- }
1503
- if (data.nextToken != null) {
1504
- contents.nextToken = __expectString(data.nextToken);
1505
- }
1409
+ const doc = take(data, {
1410
+ components: (_) => de_ComponentList(_, context),
1411
+ nextToken: __expectString,
1412
+ });
1413
+ Object.assign(contents, doc);
1506
1414
  return contents;
1507
1415
  };
1508
1416
  const de_ListComponentsCommandError = async (output, context) => {
@@ -1529,10 +1437,9 @@ const de_ListComponentsCommandError = async (output, context) => {
1529
1437
  throw await de_ValidationExceptionRes(parsedOutput, context);
1530
1438
  default:
1531
1439
  const parsedBody = parsedOutput.body;
1532
- throwDefaultError({
1440
+ return throwDefaultError({
1533
1441
  output,
1534
1442
  parsedBody,
1535
- exceptionCtor: __BaseException,
1536
1443
  errorCode,
1537
1444
  });
1538
1445
  }
@@ -1545,12 +1452,11 @@ export const de_ListComponentVersionsCommand = async (output, context) => {
1545
1452
  $metadata: deserializeMetadata(output),
1546
1453
  });
1547
1454
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1548
- if (data.componentVersions != null) {
1549
- contents.componentVersions = de_ComponentVersionList(data.componentVersions, context);
1550
- }
1551
- if (data.nextToken != null) {
1552
- contents.nextToken = __expectString(data.nextToken);
1553
- }
1455
+ const doc = take(data, {
1456
+ componentVersions: _json,
1457
+ nextToken: __expectString,
1458
+ });
1459
+ Object.assign(contents, doc);
1554
1460
  return contents;
1555
1461
  };
1556
1462
  const de_ListComponentVersionsCommandError = async (output, context) => {
@@ -1577,10 +1483,9 @@ const de_ListComponentVersionsCommandError = async (output, context) => {
1577
1483
  throw await de_ValidationExceptionRes(parsedOutput, context);
1578
1484
  default:
1579
1485
  const parsedBody = parsedOutput.body;
1580
- throwDefaultError({
1486
+ return throwDefaultError({
1581
1487
  output,
1582
1488
  parsedBody,
1583
- exceptionCtor: __BaseException,
1584
1489
  errorCode,
1585
1490
  });
1586
1491
  }
@@ -1593,12 +1498,11 @@ export const de_ListCoreDevicesCommand = async (output, context) => {
1593
1498
  $metadata: deserializeMetadata(output),
1594
1499
  });
1595
1500
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1596
- if (data.coreDevices != null) {
1597
- contents.coreDevices = de_CoreDevicesList(data.coreDevices, context);
1598
- }
1599
- if (data.nextToken != null) {
1600
- contents.nextToken = __expectString(data.nextToken);
1601
- }
1501
+ const doc = take(data, {
1502
+ coreDevices: (_) => de_CoreDevicesList(_, context),
1503
+ nextToken: __expectString,
1504
+ });
1505
+ Object.assign(contents, doc);
1602
1506
  return contents;
1603
1507
  };
1604
1508
  const de_ListCoreDevicesCommandError = async (output, context) => {
@@ -1622,10 +1526,9 @@ const de_ListCoreDevicesCommandError = async (output, context) => {
1622
1526
  throw await de_ValidationExceptionRes(parsedOutput, context);
1623
1527
  default:
1624
1528
  const parsedBody = parsedOutput.body;
1625
- throwDefaultError({
1529
+ return throwDefaultError({
1626
1530
  output,
1627
1531
  parsedBody,
1628
- exceptionCtor: __BaseException,
1629
1532
  errorCode,
1630
1533
  });
1631
1534
  }
@@ -1638,12 +1541,11 @@ export const de_ListDeploymentsCommand = async (output, context) => {
1638
1541
  $metadata: deserializeMetadata(output),
1639
1542
  });
1640
1543
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1641
- if (data.deployments != null) {
1642
- contents.deployments = de_DeploymentList(data.deployments, context);
1643
- }
1644
- if (data.nextToken != null) {
1645
- contents.nextToken = __expectString(data.nextToken);
1646
- }
1544
+ const doc = take(data, {
1545
+ deployments: (_) => de_DeploymentList(_, context),
1546
+ nextToken: __expectString,
1547
+ });
1548
+ Object.assign(contents, doc);
1647
1549
  return contents;
1648
1550
  };
1649
1551
  const de_ListDeploymentsCommandError = async (output, context) => {
@@ -1667,10 +1569,9 @@ const de_ListDeploymentsCommandError = async (output, context) => {
1667
1569
  throw await de_ValidationExceptionRes(parsedOutput, context);
1668
1570
  default:
1669
1571
  const parsedBody = parsedOutput.body;
1670
- throwDefaultError({
1572
+ return throwDefaultError({
1671
1573
  output,
1672
1574
  parsedBody,
1673
- exceptionCtor: __BaseException,
1674
1575
  errorCode,
1675
1576
  });
1676
1577
  }
@@ -1683,12 +1584,11 @@ export const de_ListEffectiveDeploymentsCommand = async (output, context) => {
1683
1584
  $metadata: deserializeMetadata(output),
1684
1585
  });
1685
1586
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1686
- if (data.effectiveDeployments != null) {
1687
- contents.effectiveDeployments = de_EffectiveDeploymentsList(data.effectiveDeployments, context);
1688
- }
1689
- if (data.nextToken != null) {
1690
- contents.nextToken = __expectString(data.nextToken);
1691
- }
1587
+ const doc = take(data, {
1588
+ effectiveDeployments: (_) => de_EffectiveDeploymentsList(_, context),
1589
+ nextToken: __expectString,
1590
+ });
1591
+ Object.assign(contents, doc);
1692
1592
  return contents;
1693
1593
  };
1694
1594
  const de_ListEffectiveDeploymentsCommandError = async (output, context) => {
@@ -1715,10 +1615,9 @@ const de_ListEffectiveDeploymentsCommandError = async (output, context) => {
1715
1615
  throw await de_ValidationExceptionRes(parsedOutput, context);
1716
1616
  default:
1717
1617
  const parsedBody = parsedOutput.body;
1718
- throwDefaultError({
1618
+ return throwDefaultError({
1719
1619
  output,
1720
1620
  parsedBody,
1721
- exceptionCtor: __BaseException,
1722
1621
  errorCode,
1723
1622
  });
1724
1623
  }
@@ -1731,12 +1630,11 @@ export const de_ListInstalledComponentsCommand = async (output, context) => {
1731
1630
  $metadata: deserializeMetadata(output),
1732
1631
  });
1733
1632
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1734
- if (data.installedComponents != null) {
1735
- contents.installedComponents = de_InstalledComponentList(data.installedComponents, context);
1736
- }
1737
- if (data.nextToken != null) {
1738
- contents.nextToken = __expectString(data.nextToken);
1739
- }
1633
+ const doc = take(data, {
1634
+ installedComponents: (_) => de_InstalledComponentList(_, context),
1635
+ nextToken: __expectString,
1636
+ });
1637
+ Object.assign(contents, doc);
1740
1638
  return contents;
1741
1639
  };
1742
1640
  const de_ListInstalledComponentsCommandError = async (output, context) => {
@@ -1763,10 +1661,9 @@ const de_ListInstalledComponentsCommandError = async (output, context) => {
1763
1661
  throw await de_ValidationExceptionRes(parsedOutput, context);
1764
1662
  default:
1765
1663
  const parsedBody = parsedOutput.body;
1766
- throwDefaultError({
1664
+ return throwDefaultError({
1767
1665
  output,
1768
1666
  parsedBody,
1769
- exceptionCtor: __BaseException,
1770
1667
  errorCode,
1771
1668
  });
1772
1669
  }
@@ -1779,9 +1676,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1779
1676
  $metadata: deserializeMetadata(output),
1780
1677
  });
1781
1678
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1782
- if (data.tags != null) {
1783
- contents.tags = de_TagMap(data.tags, context);
1784
- }
1679
+ const doc = take(data, {
1680
+ tags: _json,
1681
+ });
1682
+ Object.assign(contents, doc);
1785
1683
  return contents;
1786
1684
  };
1787
1685
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1802,10 +1700,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1802
1700
  throw await de_ValidationExceptionRes(parsedOutput, context);
1803
1701
  default:
1804
1702
  const parsedBody = parsedOutput.body;
1805
- throwDefaultError({
1703
+ return throwDefaultError({
1806
1704
  output,
1807
1705
  parsedBody,
1808
- exceptionCtor: __BaseException,
1809
1706
  errorCode,
1810
1707
  });
1811
1708
  }
@@ -1818,9 +1715,10 @@ export const de_ResolveComponentCandidatesCommand = async (output, context) => {
1818
1715
  $metadata: deserializeMetadata(output),
1819
1716
  });
1820
1717
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1821
- if (data.resolvedComponentVersions != null) {
1822
- contents.resolvedComponentVersions = de_ResolvedComponentVersionsList(data.resolvedComponentVersions, context);
1823
- }
1718
+ const doc = take(data, {
1719
+ resolvedComponentVersions: (_) => de_ResolvedComponentVersionsList(_, context),
1720
+ });
1721
+ Object.assign(contents, doc);
1824
1722
  return contents;
1825
1723
  };
1826
1724
  const de_ResolveComponentCandidatesCommandError = async (output, context) => {
@@ -1850,10 +1748,9 @@ const de_ResolveComponentCandidatesCommandError = async (output, context) => {
1850
1748
  throw await de_ValidationExceptionRes(parsedOutput, context);
1851
1749
  default:
1852
1750
  const parsedBody = parsedOutput.body;
1853
- throwDefaultError({
1751
+ return throwDefaultError({
1854
1752
  output,
1855
1753
  parsedBody,
1856
- exceptionCtor: __BaseException,
1857
1754
  errorCode,
1858
1755
  });
1859
1756
  }
@@ -1886,10 +1783,9 @@ const de_TagResourceCommandError = async (output, context) => {
1886
1783
  throw await de_ValidationExceptionRes(parsedOutput, context);
1887
1784
  default:
1888
1785
  const parsedBody = parsedOutput.body;
1889
- throwDefaultError({
1786
+ return throwDefaultError({
1890
1787
  output,
1891
1788
  parsedBody,
1892
- exceptionCtor: __BaseException,
1893
1789
  errorCode,
1894
1790
  });
1895
1791
  }
@@ -1922,10 +1818,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1922
1818
  throw await de_ValidationExceptionRes(parsedOutput, context);
1923
1819
  default:
1924
1820
  const parsedBody = parsedOutput.body;
1925
- throwDefaultError({
1821
+ return throwDefaultError({
1926
1822
  output,
1927
1823
  parsedBody,
1928
- exceptionCtor: __BaseException,
1929
1824
  errorCode,
1930
1825
  });
1931
1826
  }
@@ -1938,12 +1833,11 @@ export const de_UpdateConnectivityInfoCommand = async (output, context) => {
1938
1833
  $metadata: deserializeMetadata(output),
1939
1834
  });
1940
1835
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1941
- if (data.Message != null) {
1942
- contents.message = __expectString(data.Message);
1943
- }
1944
- if (data.Version != null) {
1945
- contents.version = __expectString(data.Version);
1946
- }
1836
+ const doc = take(data, {
1837
+ message: [, __expectString, `Message`],
1838
+ version: [, __expectString, `Version`],
1839
+ });
1840
+ Object.assign(contents, doc);
1947
1841
  return contents;
1948
1842
  };
1949
1843
  const de_UpdateConnectivityInfoCommandError = async (output, context) => {
@@ -1961,21 +1855,21 @@ const de_UpdateConnectivityInfoCommandError = async (output, context) => {
1961
1855
  throw await de_ValidationExceptionRes(parsedOutput, context);
1962
1856
  default:
1963
1857
  const parsedBody = parsedOutput.body;
1964
- throwDefaultError({
1858
+ return throwDefaultError({
1965
1859
  output,
1966
1860
  parsedBody,
1967
- exceptionCtor: __BaseException,
1968
1861
  errorCode,
1969
1862
  });
1970
1863
  }
1971
1864
  };
1972
- const map = __map;
1865
+ const throwDefaultError = withBaseException(__BaseException);
1973
1866
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1974
1867
  const contents = map({});
1975
1868
  const data = parsedOutput.body;
1976
- if (data.message != null) {
1977
- contents.message = __expectString(data.message);
1978
- }
1869
+ const doc = take(data, {
1870
+ message: __expectString,
1871
+ });
1872
+ Object.assign(contents, doc);
1979
1873
  const exception = new AccessDeniedException({
1980
1874
  $metadata: deserializeMetadata(parsedOutput),
1981
1875
  ...contents,
@@ -1985,15 +1879,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1985
1879
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1986
1880
  const contents = map({});
1987
1881
  const data = parsedOutput.body;
1988
- if (data.message != null) {
1989
- contents.message = __expectString(data.message);
1990
- }
1991
- if (data.resourceId != null) {
1992
- contents.resourceId = __expectString(data.resourceId);
1993
- }
1994
- if (data.resourceType != null) {
1995
- contents.resourceType = __expectString(data.resourceType);
1996
- }
1882
+ const doc = take(data, {
1883
+ message: __expectString,
1884
+ resourceId: __expectString,
1885
+ resourceType: __expectString,
1886
+ });
1887
+ Object.assign(contents, doc);
1997
1888
  const exception = new ConflictException({
1998
1889
  $metadata: deserializeMetadata(parsedOutput),
1999
1890
  ...contents,
@@ -2008,9 +1899,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2008
1899
  ],
2009
1900
  });
2010
1901
  const data = parsedOutput.body;
2011
- if (data.message != null) {
2012
- contents.message = __expectString(data.message);
2013
- }
1902
+ const doc = take(data, {
1903
+ message: __expectString,
1904
+ });
1905
+ Object.assign(contents, doc);
2014
1906
  const exception = new InternalServerException({
2015
1907
  $metadata: deserializeMetadata(parsedOutput),
2016
1908
  ...contents,
@@ -2020,9 +1912,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2020
1912
  const de_RequestAlreadyInProgressExceptionRes = async (parsedOutput, context) => {
2021
1913
  const contents = map({});
2022
1914
  const data = parsedOutput.body;
2023
- if (data.message != null) {
2024
- contents.message = __expectString(data.message);
2025
- }
1915
+ const doc = take(data, {
1916
+ message: __expectString,
1917
+ });
1918
+ Object.assign(contents, doc);
2026
1919
  const exception = new RequestAlreadyInProgressException({
2027
1920
  $metadata: deserializeMetadata(parsedOutput),
2028
1921
  ...contents,
@@ -2032,15 +1925,12 @@ const de_RequestAlreadyInProgressExceptionRes = async (parsedOutput, context) =>
2032
1925
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2033
1926
  const contents = map({});
2034
1927
  const data = parsedOutput.body;
2035
- if (data.message != null) {
2036
- contents.message = __expectString(data.message);
2037
- }
2038
- if (data.resourceId != null) {
2039
- contents.resourceId = __expectString(data.resourceId);
2040
- }
2041
- if (data.resourceType != null) {
2042
- contents.resourceType = __expectString(data.resourceType);
2043
- }
1928
+ const doc = take(data, {
1929
+ message: __expectString,
1930
+ resourceId: __expectString,
1931
+ resourceType: __expectString,
1932
+ });
1933
+ Object.assign(contents, doc);
2044
1934
  const exception = new ResourceNotFoundException({
2045
1935
  $metadata: deserializeMetadata(parsedOutput),
2046
1936
  ...contents,
@@ -2050,21 +1940,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2050
1940
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2051
1941
  const contents = map({});
2052
1942
  const data = parsedOutput.body;
2053
- if (data.message != null) {
2054
- contents.message = __expectString(data.message);
2055
- }
2056
- if (data.quotaCode != null) {
2057
- contents.quotaCode = __expectString(data.quotaCode);
2058
- }
2059
- if (data.resourceId != null) {
2060
- contents.resourceId = __expectString(data.resourceId);
2061
- }
2062
- if (data.resourceType != null) {
2063
- contents.resourceType = __expectString(data.resourceType);
2064
- }
2065
- if (data.serviceCode != null) {
2066
- contents.serviceCode = __expectString(data.serviceCode);
2067
- }
1943
+ const doc = take(data, {
1944
+ message: __expectString,
1945
+ quotaCode: __expectString,
1946
+ resourceId: __expectString,
1947
+ resourceType: __expectString,
1948
+ serviceCode: __expectString,
1949
+ });
1950
+ Object.assign(contents, doc);
2068
1951
  const exception = new ServiceQuotaExceededException({
2069
1952
  $metadata: deserializeMetadata(parsedOutput),
2070
1953
  ...contents,
@@ -2079,15 +1962,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2079
1962
  ],
2080
1963
  });
2081
1964
  const data = parsedOutput.body;
2082
- if (data.message != null) {
2083
- contents.message = __expectString(data.message);
2084
- }
2085
- if (data.quotaCode != null) {
2086
- contents.quotaCode = __expectString(data.quotaCode);
2087
- }
2088
- if (data.serviceCode != null) {
2089
- contents.serviceCode = __expectString(data.serviceCode);
2090
- }
1965
+ const doc = take(data, {
1966
+ message: __expectString,
1967
+ quotaCode: __expectString,
1968
+ serviceCode: __expectString,
1969
+ });
1970
+ Object.assign(contents, doc);
2091
1971
  const exception = new ThrottlingException({
2092
1972
  $metadata: deserializeMetadata(parsedOutput),
2093
1973
  ...contents,
@@ -2097,85 +1977,24 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2097
1977
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2098
1978
  const contents = map({});
2099
1979
  const data = parsedOutput.body;
2100
- if (data.fields != null) {
2101
- contents.fields = de_ValidationExceptionFieldList(data.fields, context);
2102
- }
2103
- if (data.message != null) {
2104
- contents.message = __expectString(data.message);
2105
- }
2106
- if (data.reason != null) {
2107
- contents.reason = __expectString(data.reason);
2108
- }
1980
+ const doc = take(data, {
1981
+ fields: _json,
1982
+ message: __expectString,
1983
+ reason: __expectString,
1984
+ });
1985
+ Object.assign(contents, doc);
2109
1986
  const exception = new ValidationException({
2110
1987
  $metadata: deserializeMetadata(parsedOutput),
2111
1988
  ...contents,
2112
1989
  });
2113
1990
  return __decorateServiceException(exception, parsedOutput.body);
2114
1991
  };
2115
- const se_AssociateClientDeviceWithCoreDeviceEntry = (input, context) => {
2116
- return {
2117
- ...(input.thingName != null && { thingName: input.thingName }),
2118
- };
2119
- };
2120
- const se_AssociateClientDeviceWithCoreDeviceEntryList = (input, context) => {
2121
- return input
2122
- .filter((e) => e != null)
2123
- .map((entry) => {
2124
- return se_AssociateClientDeviceWithCoreDeviceEntry(entry, context);
2125
- });
2126
- };
2127
- const se_ComponentCandidate = (input, context) => {
2128
- return {
2129
- ...(input.componentName != null && { componentName: input.componentName }),
2130
- ...(input.componentVersion != null && { componentVersion: input.componentVersion }),
2131
- ...(input.versionRequirements != null && {
2132
- versionRequirements: se_ComponentVersionRequirementMap(input.versionRequirements, context),
2133
- }),
2134
- };
2135
- };
2136
- const se_ComponentCandidateList = (input, context) => {
2137
- return input
2138
- .filter((e) => e != null)
2139
- .map((entry) => {
2140
- return se_ComponentCandidate(entry, context);
2141
- });
2142
- };
2143
- const se_ComponentConfigurationPathList = (input, context) => {
2144
- return input
2145
- .filter((e) => e != null)
2146
- .map((entry) => {
2147
- return entry;
2148
- });
2149
- };
2150
- const se_ComponentConfigurationUpdate = (input, context) => {
2151
- return {
2152
- ...(input.merge != null && { merge: input.merge }),
2153
- ...(input.reset != null && { reset: se_ComponentConfigurationPathList(input.reset, context) }),
2154
- };
2155
- };
2156
- const se_ComponentDependencyMap = (input, context) => {
2157
- return Object.entries(input).reduce((acc, [key, value]) => {
2158
- if (value === null) {
2159
- return acc;
2160
- }
2161
- acc[key] = se_ComponentDependencyRequirement(value, context);
2162
- return acc;
2163
- }, {});
2164
- };
2165
- const se_ComponentDependencyRequirement = (input, context) => {
2166
- return {
2167
- ...(input.dependencyType != null && { dependencyType: input.dependencyType }),
2168
- ...(input.versionRequirement != null && { versionRequirement: input.versionRequirement }),
2169
- };
2170
- };
2171
1992
  const se_ComponentDeploymentSpecification = (input, context) => {
2172
- return {
2173
- ...(input.componentVersion != null && { componentVersion: input.componentVersion }),
2174
- ...(input.configurationUpdate != null && {
2175
- configurationUpdate: se_ComponentConfigurationUpdate(input.configurationUpdate, context),
2176
- }),
2177
- ...(input.runWith != null && { runWith: se_ComponentRunWith(input.runWith, context) }),
2178
- };
1993
+ return take(input, {
1994
+ componentVersion: [],
1995
+ configurationUpdate: _json,
1996
+ runWith: (_) => se_ComponentRunWith(_, context),
1997
+ });
2179
1998
  };
2180
1999
  const se_ComponentDeploymentSpecifications = (input, context) => {
2181
2000
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -2186,44 +2005,20 @@ const se_ComponentDeploymentSpecifications = (input, context) => {
2186
2005
  return acc;
2187
2006
  }, {});
2188
2007
  };
2189
- const se_ComponentPlatform = (input, context) => {
2190
- return {
2191
- ...(input.attributes != null && { attributes: se_PlatformAttributesMap(input.attributes, context) }),
2192
- ...(input.name != null && { name: input.name }),
2193
- };
2194
- };
2195
- const se_ComponentPlatformList = (input, context) => {
2196
- return input
2197
- .filter((e) => e != null)
2198
- .map((entry) => {
2199
- return se_ComponentPlatform(entry, context);
2200
- });
2201
- };
2202
2008
  const se_ComponentRunWith = (input, context) => {
2203
- return {
2204
- ...(input.posixUser != null && { posixUser: input.posixUser }),
2205
- ...(input.systemResourceLimits != null && {
2206
- systemResourceLimits: se_SystemResourceLimits(input.systemResourceLimits, context),
2207
- }),
2208
- ...(input.windowsUser != null && { windowsUser: input.windowsUser }),
2209
- };
2210
- };
2211
- const se_ComponentVersionRequirementMap = (input, context) => {
2212
- return Object.entries(input).reduce((acc, [key, value]) => {
2213
- if (value === null) {
2214
- return acc;
2215
- }
2216
- acc[key] = value;
2217
- return acc;
2218
- }, {});
2009
+ return take(input, {
2010
+ posixUser: [],
2011
+ systemResourceLimits: (_) => se_SystemResourceLimits(_, context),
2012
+ windowsUser: [],
2013
+ });
2219
2014
  };
2220
2015
  const se_ConnectivityInfo = (input, context) => {
2221
- return {
2222
- ...(input.hostAddress != null && { HostAddress: input.hostAddress }),
2223
- ...(input.id != null && { Id: input.id }),
2224
- ...(input.metadata != null && { Metadata: input.metadata }),
2225
- ...(input.portNumber != null && { PortNumber: input.portNumber }),
2226
- };
2016
+ return take(input, {
2017
+ HostAddress: [, , `hostAddress`],
2018
+ Id: [, , `id`],
2019
+ Metadata: [, , `metadata`],
2020
+ PortNumber: [, , `portNumber`],
2021
+ });
2227
2022
  };
2228
2023
  const se_connectivityInfoList = (input, context) => {
2229
2024
  return input
@@ -2232,61 +2027,25 @@ const se_connectivityInfoList = (input, context) => {
2232
2027
  return se_ConnectivityInfo(entry, context);
2233
2028
  });
2234
2029
  };
2235
- const se_DeploymentComponentUpdatePolicy = (input, context) => {
2236
- return {
2237
- ...(input.action != null && { action: input.action }),
2238
- ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }),
2239
- };
2240
- };
2241
- const se_DeploymentConfigurationValidationPolicy = (input, context) => {
2242
- return {
2243
- ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }),
2244
- };
2245
- };
2246
2030
  const se_DeploymentIoTJobConfiguration = (input, context) => {
2247
- return {
2248
- ...(input.abortConfig != null && { abortConfig: se_IoTJobAbortConfig(input.abortConfig, context) }),
2249
- ...(input.jobExecutionsRolloutConfig != null && {
2250
- jobExecutionsRolloutConfig: se_IoTJobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context),
2251
- }),
2252
- ...(input.timeoutConfig != null && { timeoutConfig: se_IoTJobTimeoutConfig(input.timeoutConfig, context) }),
2253
- };
2254
- };
2255
- const se_DeploymentPolicies = (input, context) => {
2256
- return {
2257
- ...(input.componentUpdatePolicy != null && {
2258
- componentUpdatePolicy: se_DeploymentComponentUpdatePolicy(input.componentUpdatePolicy, context),
2259
- }),
2260
- ...(input.configurationValidationPolicy != null && {
2261
- configurationValidationPolicy: se_DeploymentConfigurationValidationPolicy(input.configurationValidationPolicy, context),
2262
- }),
2263
- ...(input.failureHandlingPolicy != null && { failureHandlingPolicy: input.failureHandlingPolicy }),
2264
- };
2265
- };
2266
- const se_DisassociateClientDeviceFromCoreDeviceEntry = (input, context) => {
2267
- return {
2268
- ...(input.thingName != null && { thingName: input.thingName }),
2269
- };
2270
- };
2271
- const se_DisassociateClientDeviceFromCoreDeviceEntryList = (input, context) => {
2272
- return input
2273
- .filter((e) => e != null)
2274
- .map((entry) => {
2275
- return se_DisassociateClientDeviceFromCoreDeviceEntry(entry, context);
2031
+ return take(input, {
2032
+ abortConfig: (_) => se_IoTJobAbortConfig(_, context),
2033
+ jobExecutionsRolloutConfig: (_) => se_IoTJobExecutionsRolloutConfig(_, context),
2034
+ timeoutConfig: _json,
2276
2035
  });
2277
2036
  };
2278
2037
  const se_IoTJobAbortConfig = (input, context) => {
2279
- return {
2280
- ...(input.criteriaList != null && { criteriaList: se_IoTJobAbortCriteriaList(input.criteriaList, context) }),
2281
- };
2038
+ return take(input, {
2039
+ criteriaList: (_) => se_IoTJobAbortCriteriaList(_, context),
2040
+ });
2282
2041
  };
2283
2042
  const se_IoTJobAbortCriteria = (input, context) => {
2284
- return {
2285
- ...(input.action != null && { action: input.action }),
2286
- ...(input.failureType != null && { failureType: input.failureType }),
2287
- ...(input.minNumberOfExecutedThings != null && { minNumberOfExecutedThings: input.minNumberOfExecutedThings }),
2288
- ...(input.thresholdPercentage != null && { thresholdPercentage: __serializeFloat(input.thresholdPercentage) }),
2289
- };
2043
+ return take(input, {
2044
+ action: [],
2045
+ failureType: [],
2046
+ minNumberOfExecutedThings: [],
2047
+ thresholdPercentage: __serializeFloat,
2048
+ });
2290
2049
  };
2291
2050
  const se_IoTJobAbortCriteriaList = (input, context) => {
2292
2051
  return input
@@ -2296,242 +2055,51 @@ const se_IoTJobAbortCriteriaList = (input, context) => {
2296
2055
  });
2297
2056
  };
2298
2057
  const se_IoTJobExecutionsRolloutConfig = (input, context) => {
2299
- return {
2300
- ...(input.exponentialRate != null && {
2301
- exponentialRate: se_IoTJobExponentialRolloutRate(input.exponentialRate, context),
2302
- }),
2303
- ...(input.maximumPerMinute != null && { maximumPerMinute: input.maximumPerMinute }),
2304
- };
2305
- };
2306
- const se_IoTJobExponentialRolloutRate = (input, context) => {
2307
- return {
2308
- ...(input.baseRatePerMinute != null && { baseRatePerMinute: input.baseRatePerMinute }),
2309
- ...(input.incrementFactor != null && { incrementFactor: __serializeFloat(input.incrementFactor) }),
2310
- ...(input.rateIncreaseCriteria != null && {
2311
- rateIncreaseCriteria: se_IoTJobRateIncreaseCriteria(input.rateIncreaseCriteria, context),
2312
- }),
2313
- };
2314
- };
2315
- const se_IoTJobRateIncreaseCriteria = (input, context) => {
2316
- return {
2317
- ...(input.numberOfNotifiedThings != null && { numberOfNotifiedThings: input.numberOfNotifiedThings }),
2318
- ...(input.numberOfSucceededThings != null && { numberOfSucceededThings: input.numberOfSucceededThings }),
2319
- };
2320
- };
2321
- const se_IoTJobTimeoutConfig = (input, context) => {
2322
- return {
2323
- ...(input.inProgressTimeoutInMinutes != null && { inProgressTimeoutInMinutes: input.inProgressTimeoutInMinutes }),
2324
- };
2325
- };
2326
- const se_LambdaContainerParams = (input, context) => {
2327
- return {
2328
- ...(input.devices != null && { devices: se_LambdaDeviceList(input.devices, context) }),
2329
- ...(input.memorySizeInKB != null && { memorySizeInKB: input.memorySizeInKB }),
2330
- ...(input.mountROSysfs != null && { mountROSysfs: input.mountROSysfs }),
2331
- ...(input.volumes != null && { volumes: se_LambdaVolumeList(input.volumes, context) }),
2332
- };
2333
- };
2334
- const se_LambdaDeviceList = (input, context) => {
2335
- return input
2336
- .filter((e) => e != null)
2337
- .map((entry) => {
2338
- return se_LambdaDeviceMount(entry, context);
2058
+ return take(input, {
2059
+ exponentialRate: (_) => se_IoTJobExponentialRolloutRate(_, context),
2060
+ maximumPerMinute: [],
2339
2061
  });
2340
2062
  };
2341
- const se_LambdaDeviceMount = (input, context) => {
2342
- return {
2343
- ...(input.addGroupOwner != null && { addGroupOwner: input.addGroupOwner }),
2344
- ...(input.path != null && { path: input.path }),
2345
- ...(input.permission != null && { permission: input.permission }),
2346
- };
2347
- };
2348
- const se_LambdaEnvironmentVariables = (input, context) => {
2349
- return Object.entries(input).reduce((acc, [key, value]) => {
2350
- if (value === null) {
2351
- return acc;
2352
- }
2353
- acc[key] = value;
2354
- return acc;
2355
- }, {});
2356
- };
2357
- const se_LambdaEventSource = (input, context) => {
2358
- return {
2359
- ...(input.topic != null && { topic: input.topic }),
2360
- ...(input.type != null && { type: input.type }),
2361
- };
2362
- };
2363
- const se_LambdaEventSourceList = (input, context) => {
2364
- return input
2365
- .filter((e) => e != null)
2366
- .map((entry) => {
2367
- return se_LambdaEventSource(entry, context);
2368
- });
2369
- };
2370
- const se_LambdaExecArgsList = (input, context) => {
2371
- return input
2372
- .filter((e) => e != null)
2373
- .map((entry) => {
2374
- return entry;
2375
- });
2376
- };
2377
- const se_LambdaExecutionParameters = (input, context) => {
2378
- return {
2379
- ...(input.environmentVariables != null && {
2380
- environmentVariables: se_LambdaEnvironmentVariables(input.environmentVariables, context),
2381
- }),
2382
- ...(input.eventSources != null && { eventSources: se_LambdaEventSourceList(input.eventSources, context) }),
2383
- ...(input.execArgs != null && { execArgs: se_LambdaExecArgsList(input.execArgs, context) }),
2384
- ...(input.inputPayloadEncodingType != null && { inputPayloadEncodingType: input.inputPayloadEncodingType }),
2385
- ...(input.linuxProcessParams != null && {
2386
- linuxProcessParams: se_LambdaLinuxProcessParams(input.linuxProcessParams, context),
2387
- }),
2388
- ...(input.maxIdleTimeInSeconds != null && { maxIdleTimeInSeconds: input.maxIdleTimeInSeconds }),
2389
- ...(input.maxInstancesCount != null && { maxInstancesCount: input.maxInstancesCount }),
2390
- ...(input.maxQueueSize != null && { maxQueueSize: input.maxQueueSize }),
2391
- ...(input.pinned != null && { pinned: input.pinned }),
2392
- ...(input.statusTimeoutInSeconds != null && { statusTimeoutInSeconds: input.statusTimeoutInSeconds }),
2393
- ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }),
2394
- };
2395
- };
2396
- const se_LambdaFunctionRecipeSource = (input, context) => {
2397
- return {
2398
- ...(input.componentDependencies != null && {
2399
- componentDependencies: se_ComponentDependencyMap(input.componentDependencies, context),
2400
- }),
2401
- ...(input.componentLambdaParameters != null && {
2402
- componentLambdaParameters: se_LambdaExecutionParameters(input.componentLambdaParameters, context),
2403
- }),
2404
- ...(input.componentName != null && { componentName: input.componentName }),
2405
- ...(input.componentPlatforms != null && {
2406
- componentPlatforms: se_ComponentPlatformList(input.componentPlatforms, context),
2407
- }),
2408
- ...(input.componentVersion != null && { componentVersion: input.componentVersion }),
2409
- ...(input.lambdaArn != null && { lambdaArn: input.lambdaArn }),
2410
- };
2411
- };
2412
- const se_LambdaLinuxProcessParams = (input, context) => {
2413
- return {
2414
- ...(input.containerParams != null && { containerParams: se_LambdaContainerParams(input.containerParams, context) }),
2415
- ...(input.isolationMode != null && { isolationMode: input.isolationMode }),
2416
- };
2417
- };
2418
- const se_LambdaVolumeList = (input, context) => {
2419
- return input
2420
- .filter((e) => e != null)
2421
- .map((entry) => {
2422
- return se_LambdaVolumeMount(entry, context);
2063
+ const se_IoTJobExponentialRolloutRate = (input, context) => {
2064
+ return take(input, {
2065
+ baseRatePerMinute: [],
2066
+ incrementFactor: __serializeFloat,
2067
+ rateIncreaseCriteria: _json,
2423
2068
  });
2424
2069
  };
2425
- const se_LambdaVolumeMount = (input, context) => {
2426
- return {
2427
- ...(input.addGroupOwner != null && { addGroupOwner: input.addGroupOwner }),
2428
- ...(input.destinationPath != null && { destinationPath: input.destinationPath }),
2429
- ...(input.permission != null && { permission: input.permission }),
2430
- ...(input.sourcePath != null && { sourcePath: input.sourcePath }),
2431
- };
2432
- };
2433
- const se_PlatformAttributesMap = (input, context) => {
2434
- return Object.entries(input).reduce((acc, [key, value]) => {
2435
- if (value === null) {
2436
- return acc;
2437
- }
2438
- acc[key] = value;
2439
- return acc;
2440
- }, {});
2441
- };
2442
2070
  const se_SystemResourceLimits = (input, context) => {
2443
- return {
2444
- ...(input.cpus != null && { cpus: __serializeFloat(input.cpus) }),
2445
- ...(input.memory != null && { memory: input.memory }),
2446
- };
2447
- };
2448
- const se_TagMap = (input, context) => {
2449
- return Object.entries(input).reduce((acc, [key, value]) => {
2450
- if (value === null) {
2451
- return acc;
2452
- }
2453
- acc[key] = value;
2454
- return acc;
2455
- }, {});
2456
- };
2457
- const de_AssociateClientDeviceWithCoreDeviceErrorEntry = (output, context) => {
2458
- return {
2459
- code: __expectString(output.code),
2460
- message: __expectString(output.message),
2461
- thingName: __expectString(output.thingName),
2462
- };
2463
- };
2464
- const de_AssociateClientDeviceWithCoreDeviceErrorList = (output, context) => {
2465
- const retVal = (output || [])
2466
- .filter((e) => e != null)
2467
- .map((entry) => {
2468
- if (entry === null) {
2469
- return null;
2470
- }
2471
- return de_AssociateClientDeviceWithCoreDeviceErrorEntry(entry, context);
2071
+ return take(input, {
2072
+ cpus: __serializeFloat,
2073
+ memory: [],
2472
2074
  });
2473
- return retVal;
2474
2075
  };
2475
2076
  const de_AssociatedClientDevice = (output, context) => {
2476
- return {
2477
- associationTimestamp: output.associationTimestamp != null
2478
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.associationTimestamp)))
2479
- : undefined,
2480
- thingName: __expectString(output.thingName),
2481
- };
2077
+ return take(output, {
2078
+ associationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2079
+ thingName: __expectString,
2080
+ });
2482
2081
  };
2483
2082
  const de_AssociatedClientDeviceList = (output, context) => {
2484
2083
  const retVal = (output || [])
2485
2084
  .filter((e) => e != null)
2486
2085
  .map((entry) => {
2487
- if (entry === null) {
2488
- return null;
2489
- }
2490
2086
  return de_AssociatedClientDevice(entry, context);
2491
2087
  });
2492
2088
  return retVal;
2493
2089
  };
2494
- const de_CloudComponentStatus = (output, context) => {
2495
- return {
2496
- componentState: __expectString(output.componentState),
2497
- errors: output.errors != null ? de_StringMap(output.errors, context) : undefined,
2498
- message: __expectString(output.message),
2499
- vendorGuidance: __expectString(output.vendorGuidance),
2500
- vendorGuidanceMessage: __expectString(output.vendorGuidanceMessage),
2501
- };
2502
- };
2503
2090
  const de_Component = (output, context) => {
2504
- return {
2505
- arn: __expectString(output.arn),
2506
- componentName: __expectString(output.componentName),
2507
- latestVersion: output.latestVersion != null ? de_ComponentLatestVersion(output.latestVersion, context) : undefined,
2508
- };
2509
- };
2510
- const de_ComponentConfigurationPathList = (output, context) => {
2511
- const retVal = (output || [])
2512
- .filter((e) => e != null)
2513
- .map((entry) => {
2514
- if (entry === null) {
2515
- return null;
2516
- }
2517
- return __expectString(entry);
2091
+ return take(output, {
2092
+ arn: __expectString,
2093
+ componentName: __expectString,
2094
+ latestVersion: (_) => de_ComponentLatestVersion(_, context),
2518
2095
  });
2519
- return retVal;
2520
- };
2521
- const de_ComponentConfigurationUpdate = (output, context) => {
2522
- return {
2523
- merge: __expectString(output.merge),
2524
- reset: output.reset != null ? de_ComponentConfigurationPathList(output.reset, context) : undefined,
2525
- };
2526
2096
  };
2527
2097
  const de_ComponentDeploymentSpecification = (output, context) => {
2528
- return {
2529
- componentVersion: __expectString(output.componentVersion),
2530
- configurationUpdate: output.configurationUpdate != null
2531
- ? de_ComponentConfigurationUpdate(output.configurationUpdate, context)
2532
- : undefined,
2533
- runWith: output.runWith != null ? de_ComponentRunWith(output.runWith, context) : undefined,
2534
- };
2098
+ return take(output, {
2099
+ componentVersion: __expectString,
2100
+ configurationUpdate: _json,
2101
+ runWith: (_) => de_ComponentRunWith(_, context),
2102
+ });
2535
2103
  };
2536
2104
  const de_ComponentDeploymentSpecifications = (output, context) => {
2537
2105
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2543,402 +2111,189 @@ const de_ComponentDeploymentSpecifications = (output, context) => {
2543
2111
  }, {});
2544
2112
  };
2545
2113
  const de_ComponentLatestVersion = (output, context) => {
2546
- return {
2547
- arn: __expectString(output.arn),
2548
- componentVersion: __expectString(output.componentVersion),
2549
- creationTimestamp: output.creationTimestamp != null
2550
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp)))
2551
- : undefined,
2552
- description: __expectString(output.description),
2553
- platforms: output.platforms != null ? de_ComponentPlatformList(output.platforms, context) : undefined,
2554
- publisher: __expectString(output.publisher),
2555
- };
2114
+ return take(output, {
2115
+ arn: __expectString,
2116
+ componentVersion: __expectString,
2117
+ creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2118
+ description: __expectString,
2119
+ platforms: _json,
2120
+ publisher: __expectString,
2121
+ });
2556
2122
  };
2557
2123
  const de_ComponentList = (output, context) => {
2558
2124
  const retVal = (output || [])
2559
2125
  .filter((e) => e != null)
2560
2126
  .map((entry) => {
2561
- if (entry === null) {
2562
- return null;
2563
- }
2564
2127
  return de_Component(entry, context);
2565
2128
  });
2566
2129
  return retVal;
2567
2130
  };
2568
- const de_ComponentPlatform = (output, context) => {
2569
- return {
2570
- attributes: output.attributes != null ? de_PlatformAttributesMap(output.attributes, context) : undefined,
2571
- name: __expectString(output.name),
2572
- };
2573
- };
2574
- const de_ComponentPlatformList = (output, context) => {
2575
- const retVal = (output || [])
2576
- .filter((e) => e != null)
2577
- .map((entry) => {
2578
- if (entry === null) {
2579
- return null;
2580
- }
2581
- return de_ComponentPlatform(entry, context);
2582
- });
2583
- return retVal;
2584
- };
2585
2131
  const de_ComponentRunWith = (output, context) => {
2586
- return {
2587
- posixUser: __expectString(output.posixUser),
2588
- systemResourceLimits: output.systemResourceLimits != null ? de_SystemResourceLimits(output.systemResourceLimits, context) : undefined,
2589
- windowsUser: __expectString(output.windowsUser),
2590
- };
2591
- };
2592
- const de_ComponentVersionList = (output, context) => {
2593
- const retVal = (output || [])
2594
- .filter((e) => e != null)
2595
- .map((entry) => {
2596
- if (entry === null) {
2597
- return null;
2598
- }
2599
- return de_ComponentVersionListItem(entry, context);
2132
+ return take(output, {
2133
+ posixUser: __expectString,
2134
+ systemResourceLimits: (_) => de_SystemResourceLimits(_, context),
2135
+ windowsUser: __expectString,
2600
2136
  });
2601
- return retVal;
2602
- };
2603
- const de_ComponentVersionListItem = (output, context) => {
2604
- return {
2605
- arn: __expectString(output.arn),
2606
- componentName: __expectString(output.componentName),
2607
- componentVersion: __expectString(output.componentVersion),
2608
- };
2609
2137
  };
2610
2138
  const de_ConnectivityInfo = (output, context) => {
2611
- return {
2612
- hostAddress: __expectString(output.HostAddress),
2613
- id: __expectString(output.Id),
2614
- metadata: __expectString(output.Metadata),
2615
- portNumber: __expectInt32(output.PortNumber),
2616
- };
2139
+ return take(output, {
2140
+ hostAddress: [, __expectString, `HostAddress`],
2141
+ id: [, __expectString, `Id`],
2142
+ metadata: [, __expectString, `Metadata`],
2143
+ portNumber: [, __expectInt32, `PortNumber`],
2144
+ });
2617
2145
  };
2618
2146
  const de_connectivityInfoList = (output, context) => {
2619
2147
  const retVal = (output || [])
2620
2148
  .filter((e) => e != null)
2621
2149
  .map((entry) => {
2622
- if (entry === null) {
2623
- return null;
2624
- }
2625
2150
  return de_ConnectivityInfo(entry, context);
2626
2151
  });
2627
2152
  return retVal;
2628
2153
  };
2629
2154
  const de_CoreDevice = (output, context) => {
2630
- return {
2631
- coreDeviceThingName: __expectString(output.coreDeviceThingName),
2632
- lastStatusUpdateTimestamp: output.lastStatusUpdateTimestamp != null
2633
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusUpdateTimestamp)))
2634
- : undefined,
2635
- status: __expectString(output.status),
2636
- };
2155
+ return take(output, {
2156
+ coreDeviceThingName: __expectString,
2157
+ lastStatusUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2158
+ status: __expectString,
2159
+ });
2637
2160
  };
2638
2161
  const de_CoreDevicesList = (output, context) => {
2639
2162
  const retVal = (output || [])
2640
2163
  .filter((e) => e != null)
2641
2164
  .map((entry) => {
2642
- if (entry === null) {
2643
- return null;
2644
- }
2645
2165
  return de_CoreDevice(entry, context);
2646
2166
  });
2647
2167
  return retVal;
2648
2168
  };
2649
2169
  const de_Deployment = (output, context) => {
2650
- return {
2651
- creationTimestamp: output.creationTimestamp != null
2652
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp)))
2653
- : undefined,
2654
- deploymentId: __expectString(output.deploymentId),
2655
- deploymentName: __expectString(output.deploymentName),
2656
- deploymentStatus: __expectString(output.deploymentStatus),
2657
- isLatestForTarget: __expectBoolean(output.isLatestForTarget),
2658
- parentTargetArn: __expectString(output.parentTargetArn),
2659
- revisionId: __expectString(output.revisionId),
2660
- targetArn: __expectString(output.targetArn),
2661
- };
2662
- };
2663
- const de_DeploymentComponentUpdatePolicy = (output, context) => {
2664
- return {
2665
- action: __expectString(output.action),
2666
- timeoutInSeconds: __expectInt32(output.timeoutInSeconds),
2667
- };
2668
- };
2669
- const de_DeploymentConfigurationValidationPolicy = (output, context) => {
2670
- return {
2671
- timeoutInSeconds: __expectInt32(output.timeoutInSeconds),
2672
- };
2170
+ return take(output, {
2171
+ creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2172
+ deploymentId: __expectString,
2173
+ deploymentName: __expectString,
2174
+ deploymentStatus: __expectString,
2175
+ isLatestForTarget: __expectBoolean,
2176
+ parentTargetArn: __expectString,
2177
+ revisionId: __expectString,
2178
+ targetArn: __expectString,
2179
+ });
2673
2180
  };
2674
2181
  const de_DeploymentIoTJobConfiguration = (output, context) => {
2675
- return {
2676
- abortConfig: output.abortConfig != null ? de_IoTJobAbortConfig(output.abortConfig, context) : undefined,
2677
- jobExecutionsRolloutConfig: output.jobExecutionsRolloutConfig != null
2678
- ? de_IoTJobExecutionsRolloutConfig(output.jobExecutionsRolloutConfig, context)
2679
- : undefined,
2680
- timeoutConfig: output.timeoutConfig != null ? de_IoTJobTimeoutConfig(output.timeoutConfig, context) : undefined,
2681
- };
2182
+ return take(output, {
2183
+ abortConfig: (_) => de_IoTJobAbortConfig(_, context),
2184
+ jobExecutionsRolloutConfig: (_) => de_IoTJobExecutionsRolloutConfig(_, context),
2185
+ timeoutConfig: _json,
2186
+ });
2682
2187
  };
2683
2188
  const de_DeploymentList = (output, context) => {
2684
2189
  const retVal = (output || [])
2685
2190
  .filter((e) => e != null)
2686
2191
  .map((entry) => {
2687
- if (entry === null) {
2688
- return null;
2689
- }
2690
2192
  return de_Deployment(entry, context);
2691
2193
  });
2692
2194
  return retVal;
2693
2195
  };
2694
- const de_DeploymentPolicies = (output, context) => {
2695
- return {
2696
- componentUpdatePolicy: output.componentUpdatePolicy != null
2697
- ? de_DeploymentComponentUpdatePolicy(output.componentUpdatePolicy, context)
2698
- : undefined,
2699
- configurationValidationPolicy: output.configurationValidationPolicy != null
2700
- ? de_DeploymentConfigurationValidationPolicy(output.configurationValidationPolicy, context)
2701
- : undefined,
2702
- failureHandlingPolicy: __expectString(output.failureHandlingPolicy),
2703
- };
2704
- };
2705
- const de_DisassociateClientDeviceFromCoreDeviceErrorEntry = (output, context) => {
2706
- return {
2707
- code: __expectString(output.code),
2708
- message: __expectString(output.message),
2709
- thingName: __expectString(output.thingName),
2710
- };
2711
- };
2712
- const de_DisassociateClientDeviceFromCoreDeviceErrorList = (output, context) => {
2713
- const retVal = (output || [])
2714
- .filter((e) => e != null)
2715
- .map((entry) => {
2716
- if (entry === null) {
2717
- return null;
2718
- }
2719
- return de_DisassociateClientDeviceFromCoreDeviceErrorEntry(entry, context);
2720
- });
2721
- return retVal;
2722
- };
2723
2196
  const de_EffectiveDeployment = (output, context) => {
2724
- return {
2725
- coreDeviceExecutionStatus: __expectString(output.coreDeviceExecutionStatus),
2726
- creationTimestamp: output.creationTimestamp != null
2727
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp)))
2728
- : undefined,
2729
- deploymentId: __expectString(output.deploymentId),
2730
- deploymentName: __expectString(output.deploymentName),
2731
- description: __expectString(output.description),
2732
- iotJobArn: __expectString(output.iotJobArn),
2733
- iotJobId: __expectString(output.iotJobId),
2734
- modifiedTimestamp: output.modifiedTimestamp != null
2735
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedTimestamp)))
2736
- : undefined,
2737
- reason: __expectString(output.reason),
2738
- statusDetails: output.statusDetails != null ? de_EffectiveDeploymentStatusDetails(output.statusDetails, context) : undefined,
2739
- targetArn: __expectString(output.targetArn),
2740
- };
2741
- };
2742
- const de_EffectiveDeploymentErrorStack = (output, context) => {
2743
- const retVal = (output || [])
2744
- .filter((e) => e != null)
2745
- .map((entry) => {
2746
- if (entry === null) {
2747
- return null;
2748
- }
2749
- return __expectString(entry);
2750
- });
2751
- return retVal;
2752
- };
2753
- const de_EffectiveDeploymentErrorTypeList = (output, context) => {
2754
- const retVal = (output || [])
2755
- .filter((e) => e != null)
2756
- .map((entry) => {
2757
- if (entry === null) {
2758
- return null;
2759
- }
2760
- return __expectString(entry);
2197
+ return take(output, {
2198
+ coreDeviceExecutionStatus: __expectString,
2199
+ creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2200
+ deploymentId: __expectString,
2201
+ deploymentName: __expectString,
2202
+ description: __expectString,
2203
+ iotJobArn: __expectString,
2204
+ iotJobId: __expectString,
2205
+ modifiedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2206
+ reason: __expectString,
2207
+ statusDetails: _json,
2208
+ targetArn: __expectString,
2761
2209
  });
2762
- return retVal;
2763
2210
  };
2764
2211
  const de_EffectiveDeploymentsList = (output, context) => {
2765
2212
  const retVal = (output || [])
2766
2213
  .filter((e) => e != null)
2767
2214
  .map((entry) => {
2768
- if (entry === null) {
2769
- return null;
2770
- }
2771
2215
  return de_EffectiveDeployment(entry, context);
2772
2216
  });
2773
2217
  return retVal;
2774
2218
  };
2775
- const de_EffectiveDeploymentStatusDetails = (output, context) => {
2776
- return {
2777
- errorStack: output.errorStack != null ? de_EffectiveDeploymentErrorStack(output.errorStack, context) : undefined,
2778
- errorTypes: output.errorTypes != null ? de_EffectiveDeploymentErrorTypeList(output.errorTypes, context) : undefined,
2779
- };
2780
- };
2781
2219
  const de_InstalledComponent = (output, context) => {
2782
- return {
2783
- componentName: __expectString(output.componentName),
2784
- componentVersion: __expectString(output.componentVersion),
2785
- isRoot: __expectBoolean(output.isRoot),
2786
- lastInstallationSource: __expectString(output.lastInstallationSource),
2787
- lastReportedTimestamp: output.lastReportedTimestamp != null
2788
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastReportedTimestamp)))
2789
- : undefined,
2790
- lastStatusChangeTimestamp: output.lastStatusChangeTimestamp != null
2791
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusChangeTimestamp)))
2792
- : undefined,
2793
- lifecycleState: __expectString(output.lifecycleState),
2794
- lifecycleStateDetails: __expectString(output.lifecycleStateDetails),
2795
- lifecycleStatusCodes: output.lifecycleStatusCodes != null
2796
- ? de_InstalledComponentLifecycleStatusCodeList(output.lifecycleStatusCodes, context)
2797
- : undefined,
2798
- };
2799
- };
2800
- const de_InstalledComponentLifecycleStatusCodeList = (output, context) => {
2801
- const retVal = (output || [])
2802
- .filter((e) => e != null)
2803
- .map((entry) => {
2804
- if (entry === null) {
2805
- return null;
2806
- }
2807
- return __expectString(entry);
2220
+ return take(output, {
2221
+ componentName: __expectString,
2222
+ componentVersion: __expectString,
2223
+ isRoot: __expectBoolean,
2224
+ lastInstallationSource: __expectString,
2225
+ lastReportedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2226
+ lastStatusChangeTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2227
+ lifecycleState: __expectString,
2228
+ lifecycleStateDetails: __expectString,
2229
+ lifecycleStatusCodes: _json,
2808
2230
  });
2809
- return retVal;
2810
2231
  };
2811
2232
  const de_InstalledComponentList = (output, context) => {
2812
2233
  const retVal = (output || [])
2813
2234
  .filter((e) => e != null)
2814
2235
  .map((entry) => {
2815
- if (entry === null) {
2816
- return null;
2817
- }
2818
2236
  return de_InstalledComponent(entry, context);
2819
2237
  });
2820
2238
  return retVal;
2821
2239
  };
2822
2240
  const de_IoTJobAbortConfig = (output, context) => {
2823
- return {
2824
- criteriaList: output.criteriaList != null ? de_IoTJobAbortCriteriaList(output.criteriaList, context) : undefined,
2825
- };
2241
+ return take(output, {
2242
+ criteriaList: (_) => de_IoTJobAbortCriteriaList(_, context),
2243
+ });
2826
2244
  };
2827
2245
  const de_IoTJobAbortCriteria = (output, context) => {
2828
- return {
2829
- action: __expectString(output.action),
2830
- failureType: __expectString(output.failureType),
2831
- minNumberOfExecutedThings: __expectInt32(output.minNumberOfExecutedThings),
2832
- thresholdPercentage: __limitedParseDouble(output.thresholdPercentage),
2833
- };
2246
+ return take(output, {
2247
+ action: __expectString,
2248
+ failureType: __expectString,
2249
+ minNumberOfExecutedThings: __expectInt32,
2250
+ thresholdPercentage: __limitedParseDouble,
2251
+ });
2834
2252
  };
2835
2253
  const de_IoTJobAbortCriteriaList = (output, context) => {
2836
2254
  const retVal = (output || [])
2837
2255
  .filter((e) => e != null)
2838
2256
  .map((entry) => {
2839
- if (entry === null) {
2840
- return null;
2841
- }
2842
2257
  return de_IoTJobAbortCriteria(entry, context);
2843
2258
  });
2844
2259
  return retVal;
2845
2260
  };
2846
2261
  const de_IoTJobExecutionsRolloutConfig = (output, context) => {
2847
- return {
2848
- exponentialRate: output.exponentialRate != null ? de_IoTJobExponentialRolloutRate(output.exponentialRate, context) : undefined,
2849
- maximumPerMinute: __expectInt32(output.maximumPerMinute),
2850
- };
2262
+ return take(output, {
2263
+ exponentialRate: (_) => de_IoTJobExponentialRolloutRate(_, context),
2264
+ maximumPerMinute: __expectInt32,
2265
+ });
2851
2266
  };
2852
2267
  const de_IoTJobExponentialRolloutRate = (output, context) => {
2853
- return {
2854
- baseRatePerMinute: __expectInt32(output.baseRatePerMinute),
2855
- incrementFactor: __limitedParseDouble(output.incrementFactor),
2856
- rateIncreaseCriteria: output.rateIncreaseCriteria != null
2857
- ? de_IoTJobRateIncreaseCriteria(output.rateIncreaseCriteria, context)
2858
- : undefined,
2859
- };
2860
- };
2861
- const de_IoTJobRateIncreaseCriteria = (output, context) => {
2862
- return {
2863
- numberOfNotifiedThings: __expectInt32(output.numberOfNotifiedThings),
2864
- numberOfSucceededThings: __expectInt32(output.numberOfSucceededThings),
2865
- };
2866
- };
2867
- const de_IoTJobTimeoutConfig = (output, context) => {
2868
- return {
2869
- inProgressTimeoutInMinutes: __expectLong(output.inProgressTimeoutInMinutes),
2870
- };
2871
- };
2872
- const de_PlatformAttributesMap = (output, context) => {
2873
- return Object.entries(output).reduce((acc, [key, value]) => {
2874
- if (value === null) {
2875
- return acc;
2876
- }
2877
- acc[key] = __expectString(value);
2878
- return acc;
2879
- }, {});
2268
+ return take(output, {
2269
+ baseRatePerMinute: __expectInt32,
2270
+ incrementFactor: __limitedParseDouble,
2271
+ rateIncreaseCriteria: _json,
2272
+ });
2880
2273
  };
2881
2274
  const de_ResolvedComponentVersion = (output, context) => {
2882
- return {
2883
- arn: __expectString(output.arn),
2884
- componentName: __expectString(output.componentName),
2885
- componentVersion: __expectString(output.componentVersion),
2886
- message: __expectString(output.message),
2887
- recipe: output.recipe != null ? context.base64Decoder(output.recipe) : undefined,
2888
- vendorGuidance: __expectString(output.vendorGuidance),
2889
- };
2275
+ return take(output, {
2276
+ arn: __expectString,
2277
+ componentName: __expectString,
2278
+ componentVersion: __expectString,
2279
+ message: __expectString,
2280
+ recipe: context.base64Decoder,
2281
+ vendorGuidance: __expectString,
2282
+ });
2890
2283
  };
2891
2284
  const de_ResolvedComponentVersionsList = (output, context) => {
2892
2285
  const retVal = (output || [])
2893
2286
  .filter((e) => e != null)
2894
2287
  .map((entry) => {
2895
- if (entry === null) {
2896
- return null;
2897
- }
2898
2288
  return de_ResolvedComponentVersion(entry, context);
2899
2289
  });
2900
2290
  return retVal;
2901
2291
  };
2902
- const de_StringMap = (output, context) => {
2903
- return Object.entries(output).reduce((acc, [key, value]) => {
2904
- if (value === null) {
2905
- return acc;
2906
- }
2907
- acc[key] = __expectString(value);
2908
- return acc;
2909
- }, {});
2910
- };
2911
2292
  const de_SystemResourceLimits = (output, context) => {
2912
- return {
2913
- cpus: __limitedParseDouble(output.cpus),
2914
- memory: __expectLong(output.memory),
2915
- };
2916
- };
2917
- const de_TagMap = (output, context) => {
2918
- return Object.entries(output).reduce((acc, [key, value]) => {
2919
- if (value === null) {
2920
- return acc;
2921
- }
2922
- acc[key] = __expectString(value);
2923
- return acc;
2924
- }, {});
2925
- };
2926
- const de_ValidationExceptionField = (output, context) => {
2927
- return {
2928
- message: __expectString(output.message),
2929
- name: __expectString(output.name),
2930
- };
2931
- };
2932
- const de_ValidationExceptionFieldList = (output, context) => {
2933
- const retVal = (output || [])
2934
- .filter((e) => e != null)
2935
- .map((entry) => {
2936
- if (entry === null) {
2937
- return null;
2938
- }
2939
- return de_ValidationExceptionField(entry, context);
2293
+ return take(output, {
2294
+ cpus: __limitedParseDouble,
2295
+ memory: __expectLong,
2940
2296
  });
2941
- return retVal;
2942
2297
  };
2943
2298
  const deserializeMetadata = (output) => ({
2944
2299
  httpStatusCode: output.statusCode,