@aws-sdk/client-batch 3.137.0 → 3.145.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,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map as __map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { BatchServiceException as __BaseException } from "../models/BatchServiceException";
5
5
  import { ClientException, ServerException, } from "../models/models_0";
6
6
  export var serializeAws_restJson1CancelJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -374,7 +374,7 @@ export var serializeAws_restJson1ListSchedulingPoliciesCommand = function (input
374
374
  });
375
375
  }); };
376
376
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
377
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
377
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
378
378
  return __generator(this, function (_c) {
379
379
  switch (_c.label) {
380
380
  case 0: return [4, context.endpoint()];
@@ -382,16 +382,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
382
382
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
383
383
  headers = {};
384
384
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/tags/{resourceArn}";
385
- if (input.resourceArn !== undefined) {
386
- labelValue = input.resourceArn;
387
- if (labelValue.length <= 0) {
388
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
389
- }
390
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
391
- }
392
- else {
393
- throw new Error("No value provided for input HTTP label: resourceArn.");
394
- }
385
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
395
386
  return [2, new __HttpRequest({
396
387
  protocol: protocol,
397
388
  hostname: hostname,
@@ -469,7 +460,7 @@ export var serializeAws_restJson1SubmitJobCommand = function (input, context) {
469
460
  });
470
461
  }); };
471
462
  export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
472
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
463
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
473
464
  return __generator(this, function (_c) {
474
465
  switch (_c.label) {
475
466
  case 0: return [4, context.endpoint()];
@@ -479,16 +470,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
479
470
  "content-type": "application/json",
480
471
  };
481
472
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/tags/{resourceArn}";
482
- if (input.resourceArn !== undefined) {
483
- labelValue = input.resourceArn;
484
- if (labelValue.length <= 0) {
485
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
486
- }
487
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
488
- }
489
- else {
490
- throw new Error("No value provided for input HTTP label: resourceArn.");
491
- }
473
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
492
474
  body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagrisTagsMap(input.tags, context) })));
493
475
  return [2, new __HttpRequest({
494
476
  protocol: protocol,
@@ -527,7 +509,7 @@ export var serializeAws_restJson1TerminateJobCommand = function (input, context)
527
509
  });
528
510
  }); };
529
511
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
530
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
512
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
531
513
  return __generator(this, function (_c) {
532
514
  switch (_c.label) {
533
515
  case 0: return [4, context.endpoint()];
@@ -535,17 +517,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
535
517
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
536
518
  headers = {};
537
519
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/tags/{resourceArn}";
538
- if (input.resourceArn !== undefined) {
539
- labelValue = input.resourceArn;
540
- if (labelValue.length <= 0) {
541
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
542
- }
543
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
544
- }
545
- else {
546
- throw new Error("No value provided for input HTTP label: resourceArn.");
547
- }
548
- query = __assign({}, (input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map(function (_entry) { return _entry; }) }));
520
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
521
+ query = map({
522
+ tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
523
+ });
549
524
  return [2, new __HttpRequest({
550
525
  protocol: protocol,
551
526
  hostname: hostname,
@@ -647,18 +622,18 @@ export var deserializeAws_restJson1CancelJobCommand = function (output, context)
647
622
  if (output.statusCode !== 200 && output.statusCode >= 300) {
648
623
  return [2, deserializeAws_restJson1CancelJobCommandError(output, context)];
649
624
  }
650
- contents = {
625
+ contents = map({
651
626
  $metadata: deserializeMetadata(output),
652
- };
627
+ });
653
628
  return [4, collectBody(output.body, context)];
654
629
  case 1:
655
630
  _a.sent();
656
- return [2, Promise.resolve(contents)];
631
+ return [2, contents];
657
632
  }
658
633
  });
659
634
  }); };
660
635
  var deserializeAws_restJson1CancelJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
661
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
636
+ var parsedOutput, _a, errorCode, _b, parsedBody;
662
637
  var _c;
663
638
  return __generator(this, function (_d) {
664
639
  switch (_d.label) {
@@ -683,14 +658,14 @@ var deserializeAws_restJson1CancelJobCommandError = function (output, context) {
683
658
  case 5: throw _d.sent();
684
659
  case 6:
685
660
  parsedBody = parsedOutput.body;
686
- $metadata = deserializeMetadata(output);
687
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
688
- response = new __BaseException({
689
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
690
- $fault: "client",
691
- $metadata: $metadata,
661
+ throwDefaultError({
662
+ output: output,
663
+ parsedBody: parsedBody,
664
+ exceptionCtor: __BaseException,
665
+ errorCode: errorCode,
692
666
  });
693
- throw __decorateServiceException(response, parsedBody);
667
+ _d.label = 7;
668
+ case 7: return [2];
694
669
  }
695
670
  });
696
671
  }); };
@@ -702,28 +677,26 @@ export var deserializeAws_restJson1CreateComputeEnvironmentCommand = function (o
702
677
  if (output.statusCode !== 200 && output.statusCode >= 300) {
703
678
  return [2, deserializeAws_restJson1CreateComputeEnvironmentCommandError(output, context)];
704
679
  }
705
- contents = {
680
+ contents = map({
706
681
  $metadata: deserializeMetadata(output),
707
- computeEnvironmentArn: undefined,
708
- computeEnvironmentName: undefined,
709
- };
682
+ });
710
683
  _a = __expectNonNull;
711
684
  _b = __expectObject;
712
685
  return [4, parseBody(output.body, context)];
713
686
  case 1:
714
687
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
715
- if (data.computeEnvironmentArn !== undefined && data.computeEnvironmentArn !== null) {
688
+ if (data.computeEnvironmentArn != null) {
716
689
  contents.computeEnvironmentArn = __expectString(data.computeEnvironmentArn);
717
690
  }
718
- if (data.computeEnvironmentName !== undefined && data.computeEnvironmentName !== null) {
691
+ if (data.computeEnvironmentName != null) {
719
692
  contents.computeEnvironmentName = __expectString(data.computeEnvironmentName);
720
693
  }
721
- return [2, Promise.resolve(contents)];
694
+ return [2, contents];
722
695
  }
723
696
  });
724
697
  }); };
725
698
  var deserializeAws_restJson1CreateComputeEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
726
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
699
+ var parsedOutput, _a, errorCode, _b, parsedBody;
727
700
  var _c;
728
701
  return __generator(this, function (_d) {
729
702
  switch (_d.label) {
@@ -748,14 +721,14 @@ var deserializeAws_restJson1CreateComputeEnvironmentCommandError = function (out
748
721
  case 5: throw _d.sent();
749
722
  case 6:
750
723
  parsedBody = parsedOutput.body;
751
- $metadata = deserializeMetadata(output);
752
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
753
- response = new __BaseException({
754
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
755
- $fault: "client",
756
- $metadata: $metadata,
724
+ throwDefaultError({
725
+ output: output,
726
+ parsedBody: parsedBody,
727
+ exceptionCtor: __BaseException,
728
+ errorCode: errorCode,
757
729
  });
758
- throw __decorateServiceException(response, parsedBody);
730
+ _d.label = 7;
731
+ case 7: return [2];
759
732
  }
760
733
  });
761
734
  }); };
@@ -767,28 +740,26 @@ export var deserializeAws_restJson1CreateJobQueueCommand = function (output, con
767
740
  if (output.statusCode !== 200 && output.statusCode >= 300) {
768
741
  return [2, deserializeAws_restJson1CreateJobQueueCommandError(output, context)];
769
742
  }
770
- contents = {
743
+ contents = map({
771
744
  $metadata: deserializeMetadata(output),
772
- jobQueueArn: undefined,
773
- jobQueueName: undefined,
774
- };
745
+ });
775
746
  _a = __expectNonNull;
776
747
  _b = __expectObject;
777
748
  return [4, parseBody(output.body, context)];
778
749
  case 1:
779
750
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
780
- if (data.jobQueueArn !== undefined && data.jobQueueArn !== null) {
751
+ if (data.jobQueueArn != null) {
781
752
  contents.jobQueueArn = __expectString(data.jobQueueArn);
782
753
  }
783
- if (data.jobQueueName !== undefined && data.jobQueueName !== null) {
754
+ if (data.jobQueueName != null) {
784
755
  contents.jobQueueName = __expectString(data.jobQueueName);
785
756
  }
786
- return [2, Promise.resolve(contents)];
757
+ return [2, contents];
787
758
  }
788
759
  });
789
760
  }); };
790
761
  var deserializeAws_restJson1CreateJobQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
791
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
762
+ var parsedOutput, _a, errorCode, _b, parsedBody;
792
763
  var _c;
793
764
  return __generator(this, function (_d) {
794
765
  switch (_d.label) {
@@ -813,14 +784,14 @@ var deserializeAws_restJson1CreateJobQueueCommandError = function (output, conte
813
784
  case 5: throw _d.sent();
814
785
  case 6:
815
786
  parsedBody = parsedOutput.body;
816
- $metadata = deserializeMetadata(output);
817
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
818
- response = new __BaseException({
819
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
820
- $fault: "client",
821
- $metadata: $metadata,
787
+ throwDefaultError({
788
+ output: output,
789
+ parsedBody: parsedBody,
790
+ exceptionCtor: __BaseException,
791
+ errorCode: errorCode,
822
792
  });
823
- throw __decorateServiceException(response, parsedBody);
793
+ _d.label = 7;
794
+ case 7: return [2];
824
795
  }
825
796
  });
826
797
  }); };
@@ -832,28 +803,26 @@ export var deserializeAws_restJson1CreateSchedulingPolicyCommand = function (out
832
803
  if (output.statusCode !== 200 && output.statusCode >= 300) {
833
804
  return [2, deserializeAws_restJson1CreateSchedulingPolicyCommandError(output, context)];
834
805
  }
835
- contents = {
806
+ contents = map({
836
807
  $metadata: deserializeMetadata(output),
837
- arn: undefined,
838
- name: undefined,
839
- };
808
+ });
840
809
  _a = __expectNonNull;
841
810
  _b = __expectObject;
842
811
  return [4, parseBody(output.body, context)];
843
812
  case 1:
844
813
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
845
- if (data.arn !== undefined && data.arn !== null) {
814
+ if (data.arn != null) {
846
815
  contents.arn = __expectString(data.arn);
847
816
  }
848
- if (data.name !== undefined && data.name !== null) {
817
+ if (data.name != null) {
849
818
  contents.name = __expectString(data.name);
850
819
  }
851
- return [2, Promise.resolve(contents)];
820
+ return [2, contents];
852
821
  }
853
822
  });
854
823
  }); };
855
824
  var deserializeAws_restJson1CreateSchedulingPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
856
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
825
+ var parsedOutput, _a, errorCode, _b, parsedBody;
857
826
  var _c;
858
827
  return __generator(this, function (_d) {
859
828
  switch (_d.label) {
@@ -878,14 +847,14 @@ var deserializeAws_restJson1CreateSchedulingPolicyCommandError = function (outpu
878
847
  case 5: throw _d.sent();
879
848
  case 6:
880
849
  parsedBody = parsedOutput.body;
881
- $metadata = deserializeMetadata(output);
882
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
883
- response = new __BaseException({
884
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
885
- $fault: "client",
886
- $metadata: $metadata,
850
+ throwDefaultError({
851
+ output: output,
852
+ parsedBody: parsedBody,
853
+ exceptionCtor: __BaseException,
854
+ errorCode: errorCode,
887
855
  });
888
- throw __decorateServiceException(response, parsedBody);
856
+ _d.label = 7;
857
+ case 7: return [2];
889
858
  }
890
859
  });
891
860
  }); };
@@ -897,18 +866,18 @@ export var deserializeAws_restJson1DeleteComputeEnvironmentCommand = function (o
897
866
  if (output.statusCode !== 200 && output.statusCode >= 300) {
898
867
  return [2, deserializeAws_restJson1DeleteComputeEnvironmentCommandError(output, context)];
899
868
  }
900
- contents = {
869
+ contents = map({
901
870
  $metadata: deserializeMetadata(output),
902
- };
871
+ });
903
872
  return [4, collectBody(output.body, context)];
904
873
  case 1:
905
874
  _a.sent();
906
- return [2, Promise.resolve(contents)];
875
+ return [2, contents];
907
876
  }
908
877
  });
909
878
  }); };
910
879
  var deserializeAws_restJson1DeleteComputeEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
911
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
880
+ var parsedOutput, _a, errorCode, _b, parsedBody;
912
881
  var _c;
913
882
  return __generator(this, function (_d) {
914
883
  switch (_d.label) {
@@ -933,14 +902,14 @@ var deserializeAws_restJson1DeleteComputeEnvironmentCommandError = function (out
933
902
  case 5: throw _d.sent();
934
903
  case 6:
935
904
  parsedBody = parsedOutput.body;
936
- $metadata = deserializeMetadata(output);
937
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
938
- response = new __BaseException({
939
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
940
- $fault: "client",
941
- $metadata: $metadata,
905
+ throwDefaultError({
906
+ output: output,
907
+ parsedBody: parsedBody,
908
+ exceptionCtor: __BaseException,
909
+ errorCode: errorCode,
942
910
  });
943
- throw __decorateServiceException(response, parsedBody);
911
+ _d.label = 7;
912
+ case 7: return [2];
944
913
  }
945
914
  });
946
915
  }); };
@@ -952,18 +921,18 @@ export var deserializeAws_restJson1DeleteJobQueueCommand = function (output, con
952
921
  if (output.statusCode !== 200 && output.statusCode >= 300) {
953
922
  return [2, deserializeAws_restJson1DeleteJobQueueCommandError(output, context)];
954
923
  }
955
- contents = {
924
+ contents = map({
956
925
  $metadata: deserializeMetadata(output),
957
- };
926
+ });
958
927
  return [4, collectBody(output.body, context)];
959
928
  case 1:
960
929
  _a.sent();
961
- return [2, Promise.resolve(contents)];
930
+ return [2, contents];
962
931
  }
963
932
  });
964
933
  }); };
965
934
  var deserializeAws_restJson1DeleteJobQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
966
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
935
+ var parsedOutput, _a, errorCode, _b, parsedBody;
967
936
  var _c;
968
937
  return __generator(this, function (_d) {
969
938
  switch (_d.label) {
@@ -988,14 +957,14 @@ var deserializeAws_restJson1DeleteJobQueueCommandError = function (output, conte
988
957
  case 5: throw _d.sent();
989
958
  case 6:
990
959
  parsedBody = parsedOutput.body;
991
- $metadata = deserializeMetadata(output);
992
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
993
- response = new __BaseException({
994
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
995
- $fault: "client",
996
- $metadata: $metadata,
960
+ throwDefaultError({
961
+ output: output,
962
+ parsedBody: parsedBody,
963
+ exceptionCtor: __BaseException,
964
+ errorCode: errorCode,
997
965
  });
998
- throw __decorateServiceException(response, parsedBody);
966
+ _d.label = 7;
967
+ case 7: return [2];
999
968
  }
1000
969
  });
1001
970
  }); };
@@ -1007,18 +976,18 @@ export var deserializeAws_restJson1DeleteSchedulingPolicyCommand = function (out
1007
976
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1008
977
  return [2, deserializeAws_restJson1DeleteSchedulingPolicyCommandError(output, context)];
1009
978
  }
1010
- contents = {
979
+ contents = map({
1011
980
  $metadata: deserializeMetadata(output),
1012
- };
981
+ });
1013
982
  return [4, collectBody(output.body, context)];
1014
983
  case 1:
1015
984
  _a.sent();
1016
- return [2, Promise.resolve(contents)];
985
+ return [2, contents];
1017
986
  }
1018
987
  });
1019
988
  }); };
1020
989
  var deserializeAws_restJson1DeleteSchedulingPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1021
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
990
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1022
991
  var _c;
1023
992
  return __generator(this, function (_d) {
1024
993
  switch (_d.label) {
@@ -1043,14 +1012,14 @@ var deserializeAws_restJson1DeleteSchedulingPolicyCommandError = function (outpu
1043
1012
  case 5: throw _d.sent();
1044
1013
  case 6:
1045
1014
  parsedBody = parsedOutput.body;
1046
- $metadata = deserializeMetadata(output);
1047
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1048
- response = new __BaseException({
1049
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1050
- $fault: "client",
1051
- $metadata: $metadata,
1015
+ throwDefaultError({
1016
+ output: output,
1017
+ parsedBody: parsedBody,
1018
+ exceptionCtor: __BaseException,
1019
+ errorCode: errorCode,
1052
1020
  });
1053
- throw __decorateServiceException(response, parsedBody);
1021
+ _d.label = 7;
1022
+ case 7: return [2];
1054
1023
  }
1055
1024
  });
1056
1025
  }); };
@@ -1062,18 +1031,18 @@ export var deserializeAws_restJson1DeregisterJobDefinitionCommand = function (ou
1062
1031
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1063
1032
  return [2, deserializeAws_restJson1DeregisterJobDefinitionCommandError(output, context)];
1064
1033
  }
1065
- contents = {
1034
+ contents = map({
1066
1035
  $metadata: deserializeMetadata(output),
1067
- };
1036
+ });
1068
1037
  return [4, collectBody(output.body, context)];
1069
1038
  case 1:
1070
1039
  _a.sent();
1071
- return [2, Promise.resolve(contents)];
1040
+ return [2, contents];
1072
1041
  }
1073
1042
  });
1074
1043
  }); };
1075
1044
  var deserializeAws_restJson1DeregisterJobDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1076
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1045
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1077
1046
  var _c;
1078
1047
  return __generator(this, function (_d) {
1079
1048
  switch (_d.label) {
@@ -1098,14 +1067,14 @@ var deserializeAws_restJson1DeregisterJobDefinitionCommandError = function (outp
1098
1067
  case 5: throw _d.sent();
1099
1068
  case 6:
1100
1069
  parsedBody = parsedOutput.body;
1101
- $metadata = deserializeMetadata(output);
1102
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1103
- response = new __BaseException({
1104
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1105
- $fault: "client",
1106
- $metadata: $metadata,
1070
+ throwDefaultError({
1071
+ output: output,
1072
+ parsedBody: parsedBody,
1073
+ exceptionCtor: __BaseException,
1074
+ errorCode: errorCode,
1107
1075
  });
1108
- throw __decorateServiceException(response, parsedBody);
1076
+ _d.label = 7;
1077
+ case 7: return [2];
1109
1078
  }
1110
1079
  });
1111
1080
  }); };
@@ -1117,28 +1086,26 @@ export var deserializeAws_restJson1DescribeComputeEnvironmentsCommand = function
1117
1086
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1118
1087
  return [2, deserializeAws_restJson1DescribeComputeEnvironmentsCommandError(output, context)];
1119
1088
  }
1120
- contents = {
1089
+ contents = map({
1121
1090
  $metadata: deserializeMetadata(output),
1122
- computeEnvironments: undefined,
1123
- nextToken: undefined,
1124
- };
1091
+ });
1125
1092
  _a = __expectNonNull;
1126
1093
  _b = __expectObject;
1127
1094
  return [4, parseBody(output.body, context)];
1128
1095
  case 1:
1129
1096
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1130
- if (data.computeEnvironments !== undefined && data.computeEnvironments !== null) {
1097
+ if (data.computeEnvironments != null) {
1131
1098
  contents.computeEnvironments = deserializeAws_restJson1ComputeEnvironmentDetailList(data.computeEnvironments, context);
1132
1099
  }
1133
- if (data.nextToken !== undefined && data.nextToken !== null) {
1100
+ if (data.nextToken != null) {
1134
1101
  contents.nextToken = __expectString(data.nextToken);
1135
1102
  }
1136
- return [2, Promise.resolve(contents)];
1103
+ return [2, contents];
1137
1104
  }
1138
1105
  });
1139
1106
  }); };
1140
1107
  var deserializeAws_restJson1DescribeComputeEnvironmentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1141
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1108
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1142
1109
  var _c;
1143
1110
  return __generator(this, function (_d) {
1144
1111
  switch (_d.label) {
@@ -1163,14 +1130,14 @@ var deserializeAws_restJson1DescribeComputeEnvironmentsCommandError = function (
1163
1130
  case 5: throw _d.sent();
1164
1131
  case 6:
1165
1132
  parsedBody = parsedOutput.body;
1166
- $metadata = deserializeMetadata(output);
1167
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1168
- response = new __BaseException({
1169
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1170
- $fault: "client",
1171
- $metadata: $metadata,
1133
+ throwDefaultError({
1134
+ output: output,
1135
+ parsedBody: parsedBody,
1136
+ exceptionCtor: __BaseException,
1137
+ errorCode: errorCode,
1172
1138
  });
1173
- throw __decorateServiceException(response, parsedBody);
1139
+ _d.label = 7;
1140
+ case 7: return [2];
1174
1141
  }
1175
1142
  });
1176
1143
  }); };
@@ -1182,28 +1149,26 @@ export var deserializeAws_restJson1DescribeJobDefinitionsCommand = function (out
1182
1149
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1183
1150
  return [2, deserializeAws_restJson1DescribeJobDefinitionsCommandError(output, context)];
1184
1151
  }
1185
- contents = {
1152
+ contents = map({
1186
1153
  $metadata: deserializeMetadata(output),
1187
- jobDefinitions: undefined,
1188
- nextToken: undefined,
1189
- };
1154
+ });
1190
1155
  _a = __expectNonNull;
1191
1156
  _b = __expectObject;
1192
1157
  return [4, parseBody(output.body, context)];
1193
1158
  case 1:
1194
1159
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1195
- if (data.jobDefinitions !== undefined && data.jobDefinitions !== null) {
1160
+ if (data.jobDefinitions != null) {
1196
1161
  contents.jobDefinitions = deserializeAws_restJson1JobDefinitionList(data.jobDefinitions, context);
1197
1162
  }
1198
- if (data.nextToken !== undefined && data.nextToken !== null) {
1163
+ if (data.nextToken != null) {
1199
1164
  contents.nextToken = __expectString(data.nextToken);
1200
1165
  }
1201
- return [2, Promise.resolve(contents)];
1166
+ return [2, contents];
1202
1167
  }
1203
1168
  });
1204
1169
  }); };
1205
1170
  var deserializeAws_restJson1DescribeJobDefinitionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1206
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1171
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1207
1172
  var _c;
1208
1173
  return __generator(this, function (_d) {
1209
1174
  switch (_d.label) {
@@ -1228,14 +1193,14 @@ var deserializeAws_restJson1DescribeJobDefinitionsCommandError = function (outpu
1228
1193
  case 5: throw _d.sent();
1229
1194
  case 6:
1230
1195
  parsedBody = parsedOutput.body;
1231
- $metadata = deserializeMetadata(output);
1232
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1233
- response = new __BaseException({
1234
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1235
- $fault: "client",
1236
- $metadata: $metadata,
1196
+ throwDefaultError({
1197
+ output: output,
1198
+ parsedBody: parsedBody,
1199
+ exceptionCtor: __BaseException,
1200
+ errorCode: errorCode,
1237
1201
  });
1238
- throw __decorateServiceException(response, parsedBody);
1202
+ _d.label = 7;
1203
+ case 7: return [2];
1239
1204
  }
1240
1205
  });
1241
1206
  }); };
@@ -1247,28 +1212,26 @@ export var deserializeAws_restJson1DescribeJobQueuesCommand = function (output,
1247
1212
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1248
1213
  return [2, deserializeAws_restJson1DescribeJobQueuesCommandError(output, context)];
1249
1214
  }
1250
- contents = {
1215
+ contents = map({
1251
1216
  $metadata: deserializeMetadata(output),
1252
- jobQueues: undefined,
1253
- nextToken: undefined,
1254
- };
1217
+ });
1255
1218
  _a = __expectNonNull;
1256
1219
  _b = __expectObject;
1257
1220
  return [4, parseBody(output.body, context)];
1258
1221
  case 1:
1259
1222
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1260
- if (data.jobQueues !== undefined && data.jobQueues !== null) {
1223
+ if (data.jobQueues != null) {
1261
1224
  contents.jobQueues = deserializeAws_restJson1JobQueueDetailList(data.jobQueues, context);
1262
1225
  }
1263
- if (data.nextToken !== undefined && data.nextToken !== null) {
1226
+ if (data.nextToken != null) {
1264
1227
  contents.nextToken = __expectString(data.nextToken);
1265
1228
  }
1266
- return [2, Promise.resolve(contents)];
1229
+ return [2, contents];
1267
1230
  }
1268
1231
  });
1269
1232
  }); };
1270
1233
  var deserializeAws_restJson1DescribeJobQueuesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1271
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1234
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1272
1235
  var _c;
1273
1236
  return __generator(this, function (_d) {
1274
1237
  switch (_d.label) {
@@ -1293,14 +1256,14 @@ var deserializeAws_restJson1DescribeJobQueuesCommandError = function (output, co
1293
1256
  case 5: throw _d.sent();
1294
1257
  case 6:
1295
1258
  parsedBody = parsedOutput.body;
1296
- $metadata = deserializeMetadata(output);
1297
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1298
- response = new __BaseException({
1299
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1300
- $fault: "client",
1301
- $metadata: $metadata,
1259
+ throwDefaultError({
1260
+ output: output,
1261
+ parsedBody: parsedBody,
1262
+ exceptionCtor: __BaseException,
1263
+ errorCode: errorCode,
1302
1264
  });
1303
- throw __decorateServiceException(response, parsedBody);
1265
+ _d.label = 7;
1266
+ case 7: return [2];
1304
1267
  }
1305
1268
  });
1306
1269
  }); };
@@ -1312,24 +1275,23 @@ export var deserializeAws_restJson1DescribeJobsCommand = function (output, conte
1312
1275
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1313
1276
  return [2, deserializeAws_restJson1DescribeJobsCommandError(output, context)];
1314
1277
  }
1315
- contents = {
1278
+ contents = map({
1316
1279
  $metadata: deserializeMetadata(output),
1317
- jobs: undefined,
1318
- };
1280
+ });
1319
1281
  _a = __expectNonNull;
1320
1282
  _b = __expectObject;
1321
1283
  return [4, parseBody(output.body, context)];
1322
1284
  case 1:
1323
1285
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1324
- if (data.jobs !== undefined && data.jobs !== null) {
1286
+ if (data.jobs != null) {
1325
1287
  contents.jobs = deserializeAws_restJson1JobDetailList(data.jobs, context);
1326
1288
  }
1327
- return [2, Promise.resolve(contents)];
1289
+ return [2, contents];
1328
1290
  }
1329
1291
  });
1330
1292
  }); };
1331
1293
  var deserializeAws_restJson1DescribeJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1332
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1294
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1333
1295
  var _c;
1334
1296
  return __generator(this, function (_d) {
1335
1297
  switch (_d.label) {
@@ -1354,14 +1316,14 @@ var deserializeAws_restJson1DescribeJobsCommandError = function (output, context
1354
1316
  case 5: throw _d.sent();
1355
1317
  case 6:
1356
1318
  parsedBody = parsedOutput.body;
1357
- $metadata = deserializeMetadata(output);
1358
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1359
- response = new __BaseException({
1360
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1361
- $fault: "client",
1362
- $metadata: $metadata,
1319
+ throwDefaultError({
1320
+ output: output,
1321
+ parsedBody: parsedBody,
1322
+ exceptionCtor: __BaseException,
1323
+ errorCode: errorCode,
1363
1324
  });
1364
- throw __decorateServiceException(response, parsedBody);
1325
+ _d.label = 7;
1326
+ case 7: return [2];
1365
1327
  }
1366
1328
  });
1367
1329
  }); };
@@ -1373,24 +1335,23 @@ export var deserializeAws_restJson1DescribeSchedulingPoliciesCommand = function
1373
1335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1374
1336
  return [2, deserializeAws_restJson1DescribeSchedulingPoliciesCommandError(output, context)];
1375
1337
  }
1376
- contents = {
1338
+ contents = map({
1377
1339
  $metadata: deserializeMetadata(output),
1378
- schedulingPolicies: undefined,
1379
- };
1340
+ });
1380
1341
  _a = __expectNonNull;
1381
1342
  _b = __expectObject;
1382
1343
  return [4, parseBody(output.body, context)];
1383
1344
  case 1:
1384
1345
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1385
- if (data.schedulingPolicies !== undefined && data.schedulingPolicies !== null) {
1346
+ if (data.schedulingPolicies != null) {
1386
1347
  contents.schedulingPolicies = deserializeAws_restJson1SchedulingPolicyDetailList(data.schedulingPolicies, context);
1387
1348
  }
1388
- return [2, Promise.resolve(contents)];
1349
+ return [2, contents];
1389
1350
  }
1390
1351
  });
1391
1352
  }); };
1392
1353
  var deserializeAws_restJson1DescribeSchedulingPoliciesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1393
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1354
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1394
1355
  var _c;
1395
1356
  return __generator(this, function (_d) {
1396
1357
  switch (_d.label) {
@@ -1415,14 +1376,14 @@ var deserializeAws_restJson1DescribeSchedulingPoliciesCommandError = function (o
1415
1376
  case 5: throw _d.sent();
1416
1377
  case 6:
1417
1378
  parsedBody = parsedOutput.body;
1418
- $metadata = deserializeMetadata(output);
1419
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1420
- response = new __BaseException({
1421
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1422
- $fault: "client",
1423
- $metadata: $metadata,
1379
+ throwDefaultError({
1380
+ output: output,
1381
+ parsedBody: parsedBody,
1382
+ exceptionCtor: __BaseException,
1383
+ errorCode: errorCode,
1424
1384
  });
1425
- throw __decorateServiceException(response, parsedBody);
1385
+ _d.label = 7;
1386
+ case 7: return [2];
1426
1387
  }
1427
1388
  });
1428
1389
  }); };
@@ -1434,28 +1395,26 @@ export var deserializeAws_restJson1ListJobsCommand = function (output, context)
1434
1395
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1435
1396
  return [2, deserializeAws_restJson1ListJobsCommandError(output, context)];
1436
1397
  }
1437
- contents = {
1398
+ contents = map({
1438
1399
  $metadata: deserializeMetadata(output),
1439
- jobSummaryList: undefined,
1440
- nextToken: undefined,
1441
- };
1400
+ });
1442
1401
  _a = __expectNonNull;
1443
1402
  _b = __expectObject;
1444
1403
  return [4, parseBody(output.body, context)];
1445
1404
  case 1:
1446
1405
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1447
- if (data.jobSummaryList !== undefined && data.jobSummaryList !== null) {
1406
+ if (data.jobSummaryList != null) {
1448
1407
  contents.jobSummaryList = deserializeAws_restJson1JobSummaryList(data.jobSummaryList, context);
1449
1408
  }
1450
- if (data.nextToken !== undefined && data.nextToken !== null) {
1409
+ if (data.nextToken != null) {
1451
1410
  contents.nextToken = __expectString(data.nextToken);
1452
1411
  }
1453
- return [2, Promise.resolve(contents)];
1412
+ return [2, contents];
1454
1413
  }
1455
1414
  });
1456
1415
  }); };
1457
1416
  var deserializeAws_restJson1ListJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1458
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1417
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1459
1418
  var _c;
1460
1419
  return __generator(this, function (_d) {
1461
1420
  switch (_d.label) {
@@ -1480,14 +1439,14 @@ var deserializeAws_restJson1ListJobsCommandError = function (output, context) {
1480
1439
  case 5: throw _d.sent();
1481
1440
  case 6:
1482
1441
  parsedBody = parsedOutput.body;
1483
- $metadata = deserializeMetadata(output);
1484
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1485
- response = new __BaseException({
1486
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1487
- $fault: "client",
1488
- $metadata: $metadata,
1442
+ throwDefaultError({
1443
+ output: output,
1444
+ parsedBody: parsedBody,
1445
+ exceptionCtor: __BaseException,
1446
+ errorCode: errorCode,
1489
1447
  });
1490
- throw __decorateServiceException(response, parsedBody);
1448
+ _d.label = 7;
1449
+ case 7: return [2];
1491
1450
  }
1492
1451
  });
1493
1452
  }); };
@@ -1499,28 +1458,26 @@ export var deserializeAws_restJson1ListSchedulingPoliciesCommand = function (out
1499
1458
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1500
1459
  return [2, deserializeAws_restJson1ListSchedulingPoliciesCommandError(output, context)];
1501
1460
  }
1502
- contents = {
1461
+ contents = map({
1503
1462
  $metadata: deserializeMetadata(output),
1504
- nextToken: undefined,
1505
- schedulingPolicies: undefined,
1506
- };
1463
+ });
1507
1464
  _a = __expectNonNull;
1508
1465
  _b = __expectObject;
1509
1466
  return [4, parseBody(output.body, context)];
1510
1467
  case 1:
1511
1468
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1512
- if (data.nextToken !== undefined && data.nextToken !== null) {
1469
+ if (data.nextToken != null) {
1513
1470
  contents.nextToken = __expectString(data.nextToken);
1514
1471
  }
1515
- if (data.schedulingPolicies !== undefined && data.schedulingPolicies !== null) {
1472
+ if (data.schedulingPolicies != null) {
1516
1473
  contents.schedulingPolicies = deserializeAws_restJson1SchedulingPolicyListingDetailList(data.schedulingPolicies, context);
1517
1474
  }
1518
- return [2, Promise.resolve(contents)];
1475
+ return [2, contents];
1519
1476
  }
1520
1477
  });
1521
1478
  }); };
1522
1479
  var deserializeAws_restJson1ListSchedulingPoliciesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1523
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1480
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1524
1481
  var _c;
1525
1482
  return __generator(this, function (_d) {
1526
1483
  switch (_d.label) {
@@ -1545,14 +1502,14 @@ var deserializeAws_restJson1ListSchedulingPoliciesCommandError = function (outpu
1545
1502
  case 5: throw _d.sent();
1546
1503
  case 6:
1547
1504
  parsedBody = parsedOutput.body;
1548
- $metadata = deserializeMetadata(output);
1549
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1550
- response = new __BaseException({
1551
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1552
- $fault: "client",
1553
- $metadata: $metadata,
1505
+ throwDefaultError({
1506
+ output: output,
1507
+ parsedBody: parsedBody,
1508
+ exceptionCtor: __BaseException,
1509
+ errorCode: errorCode,
1554
1510
  });
1555
- throw __decorateServiceException(response, parsedBody);
1511
+ _d.label = 7;
1512
+ case 7: return [2];
1556
1513
  }
1557
1514
  });
1558
1515
  }); };
@@ -1564,24 +1521,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
1564
1521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1565
1522
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
1566
1523
  }
1567
- contents = {
1524
+ contents = map({
1568
1525
  $metadata: deserializeMetadata(output),
1569
- tags: undefined,
1570
- };
1526
+ });
1571
1527
  _a = __expectNonNull;
1572
1528
  _b = __expectObject;
1573
1529
  return [4, parseBody(output.body, context)];
1574
1530
  case 1:
1575
1531
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1576
- if (data.tags !== undefined && data.tags !== null) {
1532
+ if (data.tags != null) {
1577
1533
  contents.tags = deserializeAws_restJson1TagrisTagsMap(data.tags, context);
1578
1534
  }
1579
- return [2, Promise.resolve(contents)];
1535
+ return [2, contents];
1580
1536
  }
1581
1537
  });
1582
1538
  }); };
1583
1539
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1584
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1540
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1585
1541
  var _c;
1586
1542
  return __generator(this, function (_d) {
1587
1543
  switch (_d.label) {
@@ -1606,14 +1562,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1606
1562
  case 5: throw _d.sent();
1607
1563
  case 6:
1608
1564
  parsedBody = parsedOutput.body;
1609
- $metadata = deserializeMetadata(output);
1610
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1611
- response = new __BaseException({
1612
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1613
- $fault: "client",
1614
- $metadata: $metadata,
1565
+ throwDefaultError({
1566
+ output: output,
1567
+ parsedBody: parsedBody,
1568
+ exceptionCtor: __BaseException,
1569
+ errorCode: errorCode,
1615
1570
  });
1616
- throw __decorateServiceException(response, parsedBody);
1571
+ _d.label = 7;
1572
+ case 7: return [2];
1617
1573
  }
1618
1574
  });
1619
1575
  }); };
@@ -1625,32 +1581,29 @@ export var deserializeAws_restJson1RegisterJobDefinitionCommand = function (outp
1625
1581
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1626
1582
  return [2, deserializeAws_restJson1RegisterJobDefinitionCommandError(output, context)];
1627
1583
  }
1628
- contents = {
1584
+ contents = map({
1629
1585
  $metadata: deserializeMetadata(output),
1630
- jobDefinitionArn: undefined,
1631
- jobDefinitionName: undefined,
1632
- revision: undefined,
1633
- };
1586
+ });
1634
1587
  _a = __expectNonNull;
1635
1588
  _b = __expectObject;
1636
1589
  return [4, parseBody(output.body, context)];
1637
1590
  case 1:
1638
1591
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1639
- if (data.jobDefinitionArn !== undefined && data.jobDefinitionArn !== null) {
1592
+ if (data.jobDefinitionArn != null) {
1640
1593
  contents.jobDefinitionArn = __expectString(data.jobDefinitionArn);
1641
1594
  }
1642
- if (data.jobDefinitionName !== undefined && data.jobDefinitionName !== null) {
1595
+ if (data.jobDefinitionName != null) {
1643
1596
  contents.jobDefinitionName = __expectString(data.jobDefinitionName);
1644
1597
  }
1645
- if (data.revision !== undefined && data.revision !== null) {
1598
+ if (data.revision != null) {
1646
1599
  contents.revision = __expectInt32(data.revision);
1647
1600
  }
1648
- return [2, Promise.resolve(contents)];
1601
+ return [2, contents];
1649
1602
  }
1650
1603
  });
1651
1604
  }); };
1652
1605
  var deserializeAws_restJson1RegisterJobDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1653
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1606
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1654
1607
  var _c;
1655
1608
  return __generator(this, function (_d) {
1656
1609
  switch (_d.label) {
@@ -1675,14 +1628,14 @@ var deserializeAws_restJson1RegisterJobDefinitionCommandError = function (output
1675
1628
  case 5: throw _d.sent();
1676
1629
  case 6:
1677
1630
  parsedBody = parsedOutput.body;
1678
- $metadata = deserializeMetadata(output);
1679
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1680
- response = new __BaseException({
1681
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1682
- $fault: "client",
1683
- $metadata: $metadata,
1631
+ throwDefaultError({
1632
+ output: output,
1633
+ parsedBody: parsedBody,
1634
+ exceptionCtor: __BaseException,
1635
+ errorCode: errorCode,
1684
1636
  });
1685
- throw __decorateServiceException(response, parsedBody);
1637
+ _d.label = 7;
1638
+ case 7: return [2];
1686
1639
  }
1687
1640
  });
1688
1641
  }); };
@@ -1694,32 +1647,29 @@ export var deserializeAws_restJson1SubmitJobCommand = function (output, context)
1694
1647
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1695
1648
  return [2, deserializeAws_restJson1SubmitJobCommandError(output, context)];
1696
1649
  }
1697
- contents = {
1650
+ contents = map({
1698
1651
  $metadata: deserializeMetadata(output),
1699
- jobArn: undefined,
1700
- jobId: undefined,
1701
- jobName: undefined,
1702
- };
1652
+ });
1703
1653
  _a = __expectNonNull;
1704
1654
  _b = __expectObject;
1705
1655
  return [4, parseBody(output.body, context)];
1706
1656
  case 1:
1707
1657
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1708
- if (data.jobArn !== undefined && data.jobArn !== null) {
1658
+ if (data.jobArn != null) {
1709
1659
  contents.jobArn = __expectString(data.jobArn);
1710
1660
  }
1711
- if (data.jobId !== undefined && data.jobId !== null) {
1661
+ if (data.jobId != null) {
1712
1662
  contents.jobId = __expectString(data.jobId);
1713
1663
  }
1714
- if (data.jobName !== undefined && data.jobName !== null) {
1664
+ if (data.jobName != null) {
1715
1665
  contents.jobName = __expectString(data.jobName);
1716
1666
  }
1717
- return [2, Promise.resolve(contents)];
1667
+ return [2, contents];
1718
1668
  }
1719
1669
  });
1720
1670
  }); };
1721
1671
  var deserializeAws_restJson1SubmitJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1722
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1672
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1723
1673
  var _c;
1724
1674
  return __generator(this, function (_d) {
1725
1675
  switch (_d.label) {
@@ -1744,14 +1694,14 @@ var deserializeAws_restJson1SubmitJobCommandError = function (output, context) {
1744
1694
  case 5: throw _d.sent();
1745
1695
  case 6:
1746
1696
  parsedBody = parsedOutput.body;
1747
- $metadata = deserializeMetadata(output);
1748
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1749
- response = new __BaseException({
1750
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1751
- $fault: "client",
1752
- $metadata: $metadata,
1697
+ throwDefaultError({
1698
+ output: output,
1699
+ parsedBody: parsedBody,
1700
+ exceptionCtor: __BaseException,
1701
+ errorCode: errorCode,
1753
1702
  });
1754
- throw __decorateServiceException(response, parsedBody);
1703
+ _d.label = 7;
1704
+ case 7: return [2];
1755
1705
  }
1756
1706
  });
1757
1707
  }); };
@@ -1763,18 +1713,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
1763
1713
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1764
1714
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
1765
1715
  }
1766
- contents = {
1716
+ contents = map({
1767
1717
  $metadata: deserializeMetadata(output),
1768
- };
1718
+ });
1769
1719
  return [4, collectBody(output.body, context)];
1770
1720
  case 1:
1771
1721
  _a.sent();
1772
- return [2, Promise.resolve(contents)];
1722
+ return [2, contents];
1773
1723
  }
1774
1724
  });
1775
1725
  }); };
1776
1726
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1777
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1727
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1778
1728
  var _c;
1779
1729
  return __generator(this, function (_d) {
1780
1730
  switch (_d.label) {
@@ -1799,14 +1749,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
1799
1749
  case 5: throw _d.sent();
1800
1750
  case 6:
1801
1751
  parsedBody = parsedOutput.body;
1802
- $metadata = deserializeMetadata(output);
1803
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1804
- response = new __BaseException({
1805
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1806
- $fault: "client",
1807
- $metadata: $metadata,
1752
+ throwDefaultError({
1753
+ output: output,
1754
+ parsedBody: parsedBody,
1755
+ exceptionCtor: __BaseException,
1756
+ errorCode: errorCode,
1808
1757
  });
1809
- throw __decorateServiceException(response, parsedBody);
1758
+ _d.label = 7;
1759
+ case 7: return [2];
1810
1760
  }
1811
1761
  });
1812
1762
  }); };
@@ -1818,18 +1768,18 @@ export var deserializeAws_restJson1TerminateJobCommand = function (output, conte
1818
1768
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1819
1769
  return [2, deserializeAws_restJson1TerminateJobCommandError(output, context)];
1820
1770
  }
1821
- contents = {
1771
+ contents = map({
1822
1772
  $metadata: deserializeMetadata(output),
1823
- };
1773
+ });
1824
1774
  return [4, collectBody(output.body, context)];
1825
1775
  case 1:
1826
1776
  _a.sent();
1827
- return [2, Promise.resolve(contents)];
1777
+ return [2, contents];
1828
1778
  }
1829
1779
  });
1830
1780
  }); };
1831
1781
  var deserializeAws_restJson1TerminateJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1832
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1782
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1833
1783
  var _c;
1834
1784
  return __generator(this, function (_d) {
1835
1785
  switch (_d.label) {
@@ -1854,14 +1804,14 @@ var deserializeAws_restJson1TerminateJobCommandError = function (output, context
1854
1804
  case 5: throw _d.sent();
1855
1805
  case 6:
1856
1806
  parsedBody = parsedOutput.body;
1857
- $metadata = deserializeMetadata(output);
1858
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1859
- response = new __BaseException({
1860
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1861
- $fault: "client",
1862
- $metadata: $metadata,
1807
+ throwDefaultError({
1808
+ output: output,
1809
+ parsedBody: parsedBody,
1810
+ exceptionCtor: __BaseException,
1811
+ errorCode: errorCode,
1863
1812
  });
1864
- throw __decorateServiceException(response, parsedBody);
1813
+ _d.label = 7;
1814
+ case 7: return [2];
1865
1815
  }
1866
1816
  });
1867
1817
  }); };
@@ -1873,18 +1823,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
1873
1823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1874
1824
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
1875
1825
  }
1876
- contents = {
1826
+ contents = map({
1877
1827
  $metadata: deserializeMetadata(output),
1878
- };
1828
+ });
1879
1829
  return [4, collectBody(output.body, context)];
1880
1830
  case 1:
1881
1831
  _a.sent();
1882
- return [2, Promise.resolve(contents)];
1832
+ return [2, contents];
1883
1833
  }
1884
1834
  });
1885
1835
  }); };
1886
1836
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1887
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1837
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1888
1838
  var _c;
1889
1839
  return __generator(this, function (_d) {
1890
1840
  switch (_d.label) {
@@ -1909,14 +1859,14 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
1909
1859
  case 5: throw _d.sent();
1910
1860
  case 6:
1911
1861
  parsedBody = parsedOutput.body;
1912
- $metadata = deserializeMetadata(output);
1913
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1914
- response = new __BaseException({
1915
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1916
- $fault: "client",
1917
- $metadata: $metadata,
1862
+ throwDefaultError({
1863
+ output: output,
1864
+ parsedBody: parsedBody,
1865
+ exceptionCtor: __BaseException,
1866
+ errorCode: errorCode,
1918
1867
  });
1919
- throw __decorateServiceException(response, parsedBody);
1868
+ _d.label = 7;
1869
+ case 7: return [2];
1920
1870
  }
1921
1871
  });
1922
1872
  }); };
@@ -1928,28 +1878,26 @@ export var deserializeAws_restJson1UpdateComputeEnvironmentCommand = function (o
1928
1878
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1929
1879
  return [2, deserializeAws_restJson1UpdateComputeEnvironmentCommandError(output, context)];
1930
1880
  }
1931
- contents = {
1881
+ contents = map({
1932
1882
  $metadata: deserializeMetadata(output),
1933
- computeEnvironmentArn: undefined,
1934
- computeEnvironmentName: undefined,
1935
- };
1883
+ });
1936
1884
  _a = __expectNonNull;
1937
1885
  _b = __expectObject;
1938
1886
  return [4, parseBody(output.body, context)];
1939
1887
  case 1:
1940
1888
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1941
- if (data.computeEnvironmentArn !== undefined && data.computeEnvironmentArn !== null) {
1889
+ if (data.computeEnvironmentArn != null) {
1942
1890
  contents.computeEnvironmentArn = __expectString(data.computeEnvironmentArn);
1943
1891
  }
1944
- if (data.computeEnvironmentName !== undefined && data.computeEnvironmentName !== null) {
1892
+ if (data.computeEnvironmentName != null) {
1945
1893
  contents.computeEnvironmentName = __expectString(data.computeEnvironmentName);
1946
1894
  }
1947
- return [2, Promise.resolve(contents)];
1895
+ return [2, contents];
1948
1896
  }
1949
1897
  });
1950
1898
  }); };
1951
1899
  var deserializeAws_restJson1UpdateComputeEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1952
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1900
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1953
1901
  var _c;
1954
1902
  return __generator(this, function (_d) {
1955
1903
  switch (_d.label) {
@@ -1974,14 +1922,14 @@ var deserializeAws_restJson1UpdateComputeEnvironmentCommandError = function (out
1974
1922
  case 5: throw _d.sent();
1975
1923
  case 6:
1976
1924
  parsedBody = parsedOutput.body;
1977
- $metadata = deserializeMetadata(output);
1978
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1979
- response = new __BaseException({
1980
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1981
- $fault: "client",
1982
- $metadata: $metadata,
1925
+ throwDefaultError({
1926
+ output: output,
1927
+ parsedBody: parsedBody,
1928
+ exceptionCtor: __BaseException,
1929
+ errorCode: errorCode,
1983
1930
  });
1984
- throw __decorateServiceException(response, parsedBody);
1931
+ _d.label = 7;
1932
+ case 7: return [2];
1985
1933
  }
1986
1934
  });
1987
1935
  }); };
@@ -1993,28 +1941,26 @@ export var deserializeAws_restJson1UpdateJobQueueCommand = function (output, con
1993
1941
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1994
1942
  return [2, deserializeAws_restJson1UpdateJobQueueCommandError(output, context)];
1995
1943
  }
1996
- contents = {
1944
+ contents = map({
1997
1945
  $metadata: deserializeMetadata(output),
1998
- jobQueueArn: undefined,
1999
- jobQueueName: undefined,
2000
- };
1946
+ });
2001
1947
  _a = __expectNonNull;
2002
1948
  _b = __expectObject;
2003
1949
  return [4, parseBody(output.body, context)];
2004
1950
  case 1:
2005
1951
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2006
- if (data.jobQueueArn !== undefined && data.jobQueueArn !== null) {
1952
+ if (data.jobQueueArn != null) {
2007
1953
  contents.jobQueueArn = __expectString(data.jobQueueArn);
2008
1954
  }
2009
- if (data.jobQueueName !== undefined && data.jobQueueName !== null) {
1955
+ if (data.jobQueueName != null) {
2010
1956
  contents.jobQueueName = __expectString(data.jobQueueName);
2011
1957
  }
2012
- return [2, Promise.resolve(contents)];
1958
+ return [2, contents];
2013
1959
  }
2014
1960
  });
2015
1961
  }); };
2016
1962
  var deserializeAws_restJson1UpdateJobQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2017
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1963
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2018
1964
  var _c;
2019
1965
  return __generator(this, function (_d) {
2020
1966
  switch (_d.label) {
@@ -2039,14 +1985,14 @@ var deserializeAws_restJson1UpdateJobQueueCommandError = function (output, conte
2039
1985
  case 5: throw _d.sent();
2040
1986
  case 6:
2041
1987
  parsedBody = parsedOutput.body;
2042
- $metadata = deserializeMetadata(output);
2043
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2044
- response = new __BaseException({
2045
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2046
- $fault: "client",
2047
- $metadata: $metadata,
1988
+ throwDefaultError({
1989
+ output: output,
1990
+ parsedBody: parsedBody,
1991
+ exceptionCtor: __BaseException,
1992
+ errorCode: errorCode,
2048
1993
  });
2049
- throw __decorateServiceException(response, parsedBody);
1994
+ _d.label = 7;
1995
+ case 7: return [2];
2050
1996
  }
2051
1997
  });
2052
1998
  }); };
@@ -2058,18 +2004,18 @@ export var deserializeAws_restJson1UpdateSchedulingPolicyCommand = function (out
2058
2004
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2059
2005
  return [2, deserializeAws_restJson1UpdateSchedulingPolicyCommandError(output, context)];
2060
2006
  }
2061
- contents = {
2007
+ contents = map({
2062
2008
  $metadata: deserializeMetadata(output),
2063
- };
2009
+ });
2064
2010
  return [4, collectBody(output.body, context)];
2065
2011
  case 1:
2066
2012
  _a.sent();
2067
- return [2, Promise.resolve(contents)];
2013
+ return [2, contents];
2068
2014
  }
2069
2015
  });
2070
2016
  }); };
2071
2017
  var deserializeAws_restJson1UpdateSchedulingPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2072
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2018
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2073
2019
  var _c;
2074
2020
  return __generator(this, function (_d) {
2075
2021
  switch (_d.label) {
@@ -2094,23 +2040,24 @@ var deserializeAws_restJson1UpdateSchedulingPolicyCommandError = function (outpu
2094
2040
  case 5: throw _d.sent();
2095
2041
  case 6:
2096
2042
  parsedBody = parsedOutput.body;
2097
- $metadata = deserializeMetadata(output);
2098
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2099
- response = new __BaseException({
2100
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2101
- $fault: "client",
2102
- $metadata: $metadata,
2043
+ throwDefaultError({
2044
+ output: output,
2045
+ parsedBody: parsedBody,
2046
+ exceptionCtor: __BaseException,
2047
+ errorCode: errorCode,
2103
2048
  });
2104
- throw __decorateServiceException(response, parsedBody);
2049
+ _d.label = 7;
2050
+ case 7: return [2];
2105
2051
  }
2106
2052
  });
2107
2053
  }); };
2054
+ var map = __map;
2108
2055
  var deserializeAws_restJson1ClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2109
2056
  var contents, data, exception;
2110
2057
  return __generator(this, function (_a) {
2111
- contents = {};
2058
+ contents = map({});
2112
2059
  data = parsedOutput.body;
2113
- if (data.message !== undefined && data.message !== null) {
2060
+ if (data.message != null) {
2114
2061
  contents.message = __expectString(data.message);
2115
2062
  }
2116
2063
  exception = new ClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2120,9 +2067,9 @@ var deserializeAws_restJson1ClientExceptionResponse = function (parsedOutput, co
2120
2067
  var deserializeAws_restJson1ServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2121
2068
  var contents, data, exception;
2122
2069
  return __generator(this, function (_a) {
2123
- contents = {};
2070
+ contents = map({});
2124
2071
  data = parsedOutput.body;
2125
- if (data.message !== undefined && data.message !== null) {
2072
+ if (data.message != null) {
2126
2073
  contents.message = __expectString(data.message);
2127
2074
  }
2128
2075
  exception = new ServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2139,9 +2086,6 @@ var serializeAws_restJson1ComputeEnvironmentOrders = function (input, context) {
2139
2086
  return input
2140
2087
  .filter(function (e) { return e != null; })
2141
2088
  .map(function (entry) {
2142
- if (entry === null) {
2143
- return null;
2144
- }
2145
2089
  return serializeAws_restJson1ComputeEnvironmentOrder(entry, context);
2146
2090
  });
2147
2091
  };
@@ -2198,9 +2142,6 @@ var serializeAws_restJson1DeviceCgroupPermissions = function (input, context) {
2198
2142
  return input
2199
2143
  .filter(function (e) { return e != null; })
2200
2144
  .map(function (entry) {
2201
- if (entry === null) {
2202
- return null;
2203
- }
2204
2145
  return entry;
2205
2146
  });
2206
2147
  };
@@ -2208,9 +2149,6 @@ var serializeAws_restJson1DevicesList = function (input, context) {
2208
2149
  return input
2209
2150
  .filter(function (e) { return e != null; })
2210
2151
  .map(function (entry) {
2211
- if (entry === null) {
2212
- return null;
2213
- }
2214
2152
  return serializeAws_restJson1Device(entry, context);
2215
2153
  });
2216
2154
  };
@@ -2221,9 +2159,6 @@ var serializeAws_restJson1Ec2ConfigurationList = function (input, context) {
2221
2159
  return input
2222
2160
  .filter(function (e) { return e != null; })
2223
2161
  .map(function (entry) {
2224
- if (entry === null) {
2225
- return null;
2226
- }
2227
2162
  return serializeAws_restJson1Ec2Configuration(entry, context);
2228
2163
  });
2229
2164
  };
@@ -2239,9 +2174,6 @@ var serializeAws_restJson1EnvironmentVariables = function (input, context) {
2239
2174
  return input
2240
2175
  .filter(function (e) { return e != null; })
2241
2176
  .map(function (entry) {
2242
- if (entry === null) {
2243
- return null;
2244
- }
2245
2177
  return serializeAws_restJson1KeyValuePair(entry, context);
2246
2178
  });
2247
2179
  };
@@ -2252,9 +2184,6 @@ var serializeAws_restJson1EvaluateOnExitList = function (input, context) {
2252
2184
  return input
2253
2185
  .filter(function (e) { return e != null; })
2254
2186
  .map(function (entry) {
2255
- if (entry === null) {
2256
- return null;
2257
- }
2258
2187
  return serializeAws_restJson1EvaluateOnExit(entry, context);
2259
2188
  });
2260
2189
  };
@@ -2276,9 +2205,6 @@ var serializeAws_restJson1JobDependencyList = function (input, context) {
2276
2205
  return input
2277
2206
  .filter(function (e) { return e != null; })
2278
2207
  .map(function (entry) {
2279
- if (entry === null) {
2280
- return null;
2281
- }
2282
2208
  return serializeAws_restJson1JobDependency(entry, context);
2283
2209
  });
2284
2210
  };
@@ -2301,9 +2227,6 @@ var serializeAws_restJson1ListJobsFilterList = function (input, context) {
2301
2227
  return input
2302
2228
  .filter(function (e) { return e != null; })
2303
2229
  .map(function (entry) {
2304
- if (entry === null) {
2305
- return null;
2306
- }
2307
2230
  return serializeAws_restJson1KeyValuesPair(entry, context);
2308
2231
  });
2309
2232
  };
@@ -2329,9 +2252,6 @@ var serializeAws_restJson1MountPoints = function (input, context) {
2329
2252
  return input
2330
2253
  .filter(function (e) { return e != null; })
2331
2254
  .map(function (entry) {
2332
- if (entry === null) {
2333
- return null;
2334
- }
2335
2255
  return serializeAws_restJson1MountPoint(entry, context);
2336
2256
  });
2337
2257
  };
@@ -2357,9 +2277,6 @@ var serializeAws_restJson1NodePropertyOverrides = function (input, context) {
2357
2277
  return input
2358
2278
  .filter(function (e) { return e != null; })
2359
2279
  .map(function (entry) {
2360
- if (entry === null) {
2361
- return null;
2362
- }
2363
2280
  return serializeAws_restJson1NodePropertyOverride(entry, context);
2364
2281
  });
2365
2282
  };
@@ -2367,9 +2284,6 @@ var serializeAws_restJson1NodeRangeProperties = function (input, context) {
2367
2284
  return input
2368
2285
  .filter(function (e) { return e != null; })
2369
2286
  .map(function (entry) {
2370
- if (entry === null) {
2371
- return null;
2372
- }
2373
2287
  return serializeAws_restJson1NodeRangeProperty(entry, context);
2374
2288
  });
2375
2289
  };
@@ -2390,9 +2304,6 @@ var serializeAws_restJson1PlatformCapabilityList = function (input, context) {
2390
2304
  return input
2391
2305
  .filter(function (e) { return e != null; })
2392
2306
  .map(function (entry) {
2393
- if (entry === null) {
2394
- return null;
2395
- }
2396
2307
  return entry;
2397
2308
  });
2398
2309
  };
@@ -2403,9 +2314,6 @@ var serializeAws_restJson1ResourceRequirements = function (input, context) {
2403
2314
  return input
2404
2315
  .filter(function (e) { return e != null; })
2405
2316
  .map(function (entry) {
2406
- if (entry === null) {
2407
- return null;
2408
- }
2409
2317
  return serializeAws_restJson1ResourceRequirement(entry, context);
2410
2318
  });
2411
2319
  };
@@ -2421,9 +2329,6 @@ var serializeAws_restJson1SecretList = function (input, context) {
2421
2329
  return input
2422
2330
  .filter(function (e) { return e != null; })
2423
2331
  .map(function (entry) {
2424
- if (entry === null) {
2425
- return null;
2426
- }
2427
2332
  return serializeAws_restJson1Secret(entry, context);
2428
2333
  });
2429
2334
  };
@@ -2434,9 +2339,6 @@ var serializeAws_restJson1ShareAttributesList = function (input, context) {
2434
2339
  return input
2435
2340
  .filter(function (e) { return e != null; })
2436
2341
  .map(function (entry) {
2437
- if (entry === null) {
2438
- return null;
2439
- }
2440
2342
  return serializeAws_restJson1ShareAttributes(entry, context);
2441
2343
  });
2442
2344
  };
@@ -2444,9 +2346,6 @@ var serializeAws_restJson1StringList = function (input, context) {
2444
2346
  return input
2445
2347
  .filter(function (e) { return e != null; })
2446
2348
  .map(function (entry) {
2447
- if (entry === null) {
2448
- return null;
2449
- }
2450
2349
  return entry;
2451
2350
  });
2452
2351
  };
@@ -2477,9 +2376,6 @@ var serializeAws_restJson1TmpfsList = function (input, context) {
2477
2376
  return input
2478
2377
  .filter(function (e) { return e != null; })
2479
2378
  .map(function (entry) {
2480
- if (entry === null) {
2481
- return null;
2482
- }
2483
2379
  return serializeAws_restJson1Tmpfs(entry, context);
2484
2380
  });
2485
2381
  };
@@ -2490,9 +2386,6 @@ var serializeAws_restJson1Ulimits = function (input, context) {
2490
2386
  return input
2491
2387
  .filter(function (e) { return e != null; })
2492
2388
  .map(function (entry) {
2493
- if (entry === null) {
2494
- return null;
2495
- }
2496
2389
  return serializeAws_restJson1Ulimit(entry, context);
2497
2390
  });
2498
2391
  };
@@ -2508,9 +2401,6 @@ var serializeAws_restJson1Volumes = function (input, context) {
2508
2401
  return input
2509
2402
  .filter(function (e) { return e != null; })
2510
2403
  .map(function (entry) {
2511
- if (entry === null) {
2512
- return null;
2513
- }
2514
2404
  return serializeAws_restJson1Volume(entry, context);
2515
2405
  });
2516
2406
  };