@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.
@@ -363,16 +363,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
363
363
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
364
364
  const headers = {};
365
365
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
366
- if (input.resourceArn !== undefined) {
367
- const labelValue = input.resourceArn;
368
- if (labelValue.length <= 0) {
369
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
370
- }
371
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
372
- }
373
- else {
374
- throw new Error("No value provided for input HTTP label: resourceArn.");
375
- }
366
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
376
367
  let body;
377
368
  return new protocol_http_1.HttpRequest({
378
369
  protocol,
@@ -472,16 +463,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
472
463
  "content-type": "application/json",
473
464
  };
474
465
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
475
- if (input.resourceArn !== undefined) {
476
- const labelValue = input.resourceArn;
477
- if (labelValue.length <= 0) {
478
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
479
- }
480
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
481
- }
482
- else {
483
- throw new Error("No value provided for input HTTP label: resourceArn.");
484
- }
466
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
485
467
  let body;
486
468
  body = JSON.stringify({
487
469
  ...(input.tags != null && { tags: serializeAws_restJson1TagrisTagsMap(input.tags, context) }),
@@ -523,19 +505,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
523
505
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
524
506
  const headers = {};
525
507
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
526
- if (input.resourceArn !== undefined) {
527
- const labelValue = input.resourceArn;
528
- if (labelValue.length <= 0) {
529
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
530
- }
531
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
532
- }
533
- else {
534
- throw new Error("No value provided for input HTTP label: resourceArn.");
535
- }
536
- const query = {
537
- ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
538
- };
508
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
509
+ const query = map({
510
+ tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
511
+ });
539
512
  let body;
540
513
  return new protocol_http_1.HttpRequest({
541
514
  protocol,
@@ -634,11 +607,11 @@ const deserializeAws_restJson1CancelJobCommand = async (output, context) => {
634
607
  if (output.statusCode !== 200 && output.statusCode >= 300) {
635
608
  return deserializeAws_restJson1CancelJobCommandError(output, context);
636
609
  }
637
- const contents = {
610
+ const contents = map({
638
611
  $metadata: deserializeMetadata(output),
639
- };
612
+ });
640
613
  await collectBody(output.body, context);
641
- return Promise.resolve(contents);
614
+ return contents;
642
615
  };
643
616
  exports.deserializeAws_restJson1CancelJobCommand = deserializeAws_restJson1CancelJobCommand;
644
617
  const deserializeAws_restJson1CancelJobCommandError = async (output, context) => {
@@ -646,7 +619,6 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
646
619
  ...output,
647
620
  body: await parseBody(output.body, context),
648
621
  };
649
- let response;
650
622
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
651
623
  switch (errorCode) {
652
624
  case "ClientException":
@@ -657,33 +629,29 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
657
629
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
658
630
  default:
659
631
  const parsedBody = parsedOutput.body;
660
- const $metadata = deserializeMetadata(output);
661
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
662
- response = new BatchServiceException_1.BatchServiceException({
663
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
664
- $fault: "client",
665
- $metadata,
632
+ (0, smithy_client_1.throwDefaultError)({
633
+ output,
634
+ parsedBody,
635
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
636
+ errorCode,
666
637
  });
667
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
668
638
  }
669
639
  };
670
640
  const deserializeAws_restJson1CreateComputeEnvironmentCommand = async (output, context) => {
671
641
  if (output.statusCode !== 200 && output.statusCode >= 300) {
672
642
  return deserializeAws_restJson1CreateComputeEnvironmentCommandError(output, context);
673
643
  }
674
- const contents = {
644
+ const contents = map({
675
645
  $metadata: deserializeMetadata(output),
676
- computeEnvironmentArn: undefined,
677
- computeEnvironmentName: undefined,
678
- };
646
+ });
679
647
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
680
- if (data.computeEnvironmentArn !== undefined && data.computeEnvironmentArn !== null) {
648
+ if (data.computeEnvironmentArn != null) {
681
649
  contents.computeEnvironmentArn = (0, smithy_client_1.expectString)(data.computeEnvironmentArn);
682
650
  }
683
- if (data.computeEnvironmentName !== undefined && data.computeEnvironmentName !== null) {
651
+ if (data.computeEnvironmentName != null) {
684
652
  contents.computeEnvironmentName = (0, smithy_client_1.expectString)(data.computeEnvironmentName);
685
653
  }
686
- return Promise.resolve(contents);
654
+ return contents;
687
655
  };
688
656
  exports.deserializeAws_restJson1CreateComputeEnvironmentCommand = deserializeAws_restJson1CreateComputeEnvironmentCommand;
689
657
  const deserializeAws_restJson1CreateComputeEnvironmentCommandError = async (output, context) => {
@@ -691,7 +659,6 @@ const deserializeAws_restJson1CreateComputeEnvironmentCommandError = async (outp
691
659
  ...output,
692
660
  body: await parseBody(output.body, context),
693
661
  };
694
- let response;
695
662
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
696
663
  switch (errorCode) {
697
664
  case "ClientException":
@@ -702,33 +669,29 @@ const deserializeAws_restJson1CreateComputeEnvironmentCommandError = async (outp
702
669
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
703
670
  default:
704
671
  const parsedBody = parsedOutput.body;
705
- const $metadata = deserializeMetadata(output);
706
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
707
- response = new BatchServiceException_1.BatchServiceException({
708
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
709
- $fault: "client",
710
- $metadata,
672
+ (0, smithy_client_1.throwDefaultError)({
673
+ output,
674
+ parsedBody,
675
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
676
+ errorCode,
711
677
  });
712
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
713
678
  }
714
679
  };
715
680
  const deserializeAws_restJson1CreateJobQueueCommand = async (output, context) => {
716
681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
717
682
  return deserializeAws_restJson1CreateJobQueueCommandError(output, context);
718
683
  }
719
- const contents = {
684
+ const contents = map({
720
685
  $metadata: deserializeMetadata(output),
721
- jobQueueArn: undefined,
722
- jobQueueName: undefined,
723
- };
686
+ });
724
687
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
725
- if (data.jobQueueArn !== undefined && data.jobQueueArn !== null) {
688
+ if (data.jobQueueArn != null) {
726
689
  contents.jobQueueArn = (0, smithy_client_1.expectString)(data.jobQueueArn);
727
690
  }
728
- if (data.jobQueueName !== undefined && data.jobQueueName !== null) {
691
+ if (data.jobQueueName != null) {
729
692
  contents.jobQueueName = (0, smithy_client_1.expectString)(data.jobQueueName);
730
693
  }
731
- return Promise.resolve(contents);
694
+ return contents;
732
695
  };
733
696
  exports.deserializeAws_restJson1CreateJobQueueCommand = deserializeAws_restJson1CreateJobQueueCommand;
734
697
  const deserializeAws_restJson1CreateJobQueueCommandError = async (output, context) => {
@@ -736,7 +699,6 @@ const deserializeAws_restJson1CreateJobQueueCommandError = async (output, contex
736
699
  ...output,
737
700
  body: await parseBody(output.body, context),
738
701
  };
739
- let response;
740
702
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
741
703
  switch (errorCode) {
742
704
  case "ClientException":
@@ -747,33 +709,29 @@ const deserializeAws_restJson1CreateJobQueueCommandError = async (output, contex
747
709
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
748
710
  default:
749
711
  const parsedBody = parsedOutput.body;
750
- const $metadata = deserializeMetadata(output);
751
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
752
- response = new BatchServiceException_1.BatchServiceException({
753
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
754
- $fault: "client",
755
- $metadata,
712
+ (0, smithy_client_1.throwDefaultError)({
713
+ output,
714
+ parsedBody,
715
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
716
+ errorCode,
756
717
  });
757
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
758
718
  }
759
719
  };
760
720
  const deserializeAws_restJson1CreateSchedulingPolicyCommand = async (output, context) => {
761
721
  if (output.statusCode !== 200 && output.statusCode >= 300) {
762
722
  return deserializeAws_restJson1CreateSchedulingPolicyCommandError(output, context);
763
723
  }
764
- const contents = {
724
+ const contents = map({
765
725
  $metadata: deserializeMetadata(output),
766
- arn: undefined,
767
- name: undefined,
768
- };
726
+ });
769
727
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
770
- if (data.arn !== undefined && data.arn !== null) {
728
+ if (data.arn != null) {
771
729
  contents.arn = (0, smithy_client_1.expectString)(data.arn);
772
730
  }
773
- if (data.name !== undefined && data.name !== null) {
731
+ if (data.name != null) {
774
732
  contents.name = (0, smithy_client_1.expectString)(data.name);
775
733
  }
776
- return Promise.resolve(contents);
734
+ return contents;
777
735
  };
778
736
  exports.deserializeAws_restJson1CreateSchedulingPolicyCommand = deserializeAws_restJson1CreateSchedulingPolicyCommand;
779
737
  const deserializeAws_restJson1CreateSchedulingPolicyCommandError = async (output, context) => {
@@ -781,7 +739,6 @@ const deserializeAws_restJson1CreateSchedulingPolicyCommandError = async (output
781
739
  ...output,
782
740
  body: await parseBody(output.body, context),
783
741
  };
784
- let response;
785
742
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
786
743
  switch (errorCode) {
787
744
  case "ClientException":
@@ -792,25 +749,23 @@ const deserializeAws_restJson1CreateSchedulingPolicyCommandError = async (output
792
749
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
793
750
  default:
794
751
  const parsedBody = parsedOutput.body;
795
- const $metadata = deserializeMetadata(output);
796
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
797
- response = new BatchServiceException_1.BatchServiceException({
798
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
799
- $fault: "client",
800
- $metadata,
752
+ (0, smithy_client_1.throwDefaultError)({
753
+ output,
754
+ parsedBody,
755
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
756
+ errorCode,
801
757
  });
802
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
803
758
  }
804
759
  };
805
760
  const deserializeAws_restJson1DeleteComputeEnvironmentCommand = async (output, context) => {
806
761
  if (output.statusCode !== 200 && output.statusCode >= 300) {
807
762
  return deserializeAws_restJson1DeleteComputeEnvironmentCommandError(output, context);
808
763
  }
809
- const contents = {
764
+ const contents = map({
810
765
  $metadata: deserializeMetadata(output),
811
- };
766
+ });
812
767
  await collectBody(output.body, context);
813
- return Promise.resolve(contents);
768
+ return contents;
814
769
  };
815
770
  exports.deserializeAws_restJson1DeleteComputeEnvironmentCommand = deserializeAws_restJson1DeleteComputeEnvironmentCommand;
816
771
  const deserializeAws_restJson1DeleteComputeEnvironmentCommandError = async (output, context) => {
@@ -818,7 +773,6 @@ const deserializeAws_restJson1DeleteComputeEnvironmentCommandError = async (outp
818
773
  ...output,
819
774
  body: await parseBody(output.body, context),
820
775
  };
821
- let response;
822
776
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
823
777
  switch (errorCode) {
824
778
  case "ClientException":
@@ -829,25 +783,23 @@ const deserializeAws_restJson1DeleteComputeEnvironmentCommandError = async (outp
829
783
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
830
784
  default:
831
785
  const parsedBody = parsedOutput.body;
832
- const $metadata = deserializeMetadata(output);
833
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
834
- response = new BatchServiceException_1.BatchServiceException({
835
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
836
- $fault: "client",
837
- $metadata,
786
+ (0, smithy_client_1.throwDefaultError)({
787
+ output,
788
+ parsedBody,
789
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
790
+ errorCode,
838
791
  });
839
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
840
792
  }
841
793
  };
842
794
  const deserializeAws_restJson1DeleteJobQueueCommand = async (output, context) => {
843
795
  if (output.statusCode !== 200 && output.statusCode >= 300) {
844
796
  return deserializeAws_restJson1DeleteJobQueueCommandError(output, context);
845
797
  }
846
- const contents = {
798
+ const contents = map({
847
799
  $metadata: deserializeMetadata(output),
848
- };
800
+ });
849
801
  await collectBody(output.body, context);
850
- return Promise.resolve(contents);
802
+ return contents;
851
803
  };
852
804
  exports.deserializeAws_restJson1DeleteJobQueueCommand = deserializeAws_restJson1DeleteJobQueueCommand;
853
805
  const deserializeAws_restJson1DeleteJobQueueCommandError = async (output, context) => {
@@ -855,7 +807,6 @@ const deserializeAws_restJson1DeleteJobQueueCommandError = async (output, contex
855
807
  ...output,
856
808
  body: await parseBody(output.body, context),
857
809
  };
858
- let response;
859
810
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
860
811
  switch (errorCode) {
861
812
  case "ClientException":
@@ -866,25 +817,23 @@ const deserializeAws_restJson1DeleteJobQueueCommandError = async (output, contex
866
817
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
867
818
  default:
868
819
  const parsedBody = parsedOutput.body;
869
- const $metadata = deserializeMetadata(output);
870
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
871
- response = new BatchServiceException_1.BatchServiceException({
872
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
873
- $fault: "client",
874
- $metadata,
820
+ (0, smithy_client_1.throwDefaultError)({
821
+ output,
822
+ parsedBody,
823
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
824
+ errorCode,
875
825
  });
876
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
877
826
  }
878
827
  };
879
828
  const deserializeAws_restJson1DeleteSchedulingPolicyCommand = async (output, context) => {
880
829
  if (output.statusCode !== 200 && output.statusCode >= 300) {
881
830
  return deserializeAws_restJson1DeleteSchedulingPolicyCommandError(output, context);
882
831
  }
883
- const contents = {
832
+ const contents = map({
884
833
  $metadata: deserializeMetadata(output),
885
- };
834
+ });
886
835
  await collectBody(output.body, context);
887
- return Promise.resolve(contents);
836
+ return contents;
888
837
  };
889
838
  exports.deserializeAws_restJson1DeleteSchedulingPolicyCommand = deserializeAws_restJson1DeleteSchedulingPolicyCommand;
890
839
  const deserializeAws_restJson1DeleteSchedulingPolicyCommandError = async (output, context) => {
@@ -892,7 +841,6 @@ const deserializeAws_restJson1DeleteSchedulingPolicyCommandError = async (output
892
841
  ...output,
893
842
  body: await parseBody(output.body, context),
894
843
  };
895
- let response;
896
844
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
845
  switch (errorCode) {
898
846
  case "ClientException":
@@ -903,25 +851,23 @@ const deserializeAws_restJson1DeleteSchedulingPolicyCommandError = async (output
903
851
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
904
852
  default:
905
853
  const parsedBody = parsedOutput.body;
906
- const $metadata = deserializeMetadata(output);
907
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
908
- response = new BatchServiceException_1.BatchServiceException({
909
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
910
- $fault: "client",
911
- $metadata,
854
+ (0, smithy_client_1.throwDefaultError)({
855
+ output,
856
+ parsedBody,
857
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
858
+ errorCode,
912
859
  });
913
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
914
860
  }
915
861
  };
916
862
  const deserializeAws_restJson1DeregisterJobDefinitionCommand = async (output, context) => {
917
863
  if (output.statusCode !== 200 && output.statusCode >= 300) {
918
864
  return deserializeAws_restJson1DeregisterJobDefinitionCommandError(output, context);
919
865
  }
920
- const contents = {
866
+ const contents = map({
921
867
  $metadata: deserializeMetadata(output),
922
- };
868
+ });
923
869
  await collectBody(output.body, context);
924
- return Promise.resolve(contents);
870
+ return contents;
925
871
  };
926
872
  exports.deserializeAws_restJson1DeregisterJobDefinitionCommand = deserializeAws_restJson1DeregisterJobDefinitionCommand;
927
873
  const deserializeAws_restJson1DeregisterJobDefinitionCommandError = async (output, context) => {
@@ -929,7 +875,6 @@ const deserializeAws_restJson1DeregisterJobDefinitionCommandError = async (outpu
929
875
  ...output,
930
876
  body: await parseBody(output.body, context),
931
877
  };
932
- let response;
933
878
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
934
879
  switch (errorCode) {
935
880
  case "ClientException":
@@ -940,33 +885,29 @@ const deserializeAws_restJson1DeregisterJobDefinitionCommandError = async (outpu
940
885
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
941
886
  default:
942
887
  const parsedBody = parsedOutput.body;
943
- const $metadata = deserializeMetadata(output);
944
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
945
- response = new BatchServiceException_1.BatchServiceException({
946
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
947
- $fault: "client",
948
- $metadata,
888
+ (0, smithy_client_1.throwDefaultError)({
889
+ output,
890
+ parsedBody,
891
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
892
+ errorCode,
949
893
  });
950
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
951
894
  }
952
895
  };
953
896
  const deserializeAws_restJson1DescribeComputeEnvironmentsCommand = async (output, context) => {
954
897
  if (output.statusCode !== 200 && output.statusCode >= 300) {
955
898
  return deserializeAws_restJson1DescribeComputeEnvironmentsCommandError(output, context);
956
899
  }
957
- const contents = {
900
+ const contents = map({
958
901
  $metadata: deserializeMetadata(output),
959
- computeEnvironments: undefined,
960
- nextToken: undefined,
961
- };
902
+ });
962
903
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
963
- if (data.computeEnvironments !== undefined && data.computeEnvironments !== null) {
904
+ if (data.computeEnvironments != null) {
964
905
  contents.computeEnvironments = deserializeAws_restJson1ComputeEnvironmentDetailList(data.computeEnvironments, context);
965
906
  }
966
- if (data.nextToken !== undefined && data.nextToken !== null) {
907
+ if (data.nextToken != null) {
967
908
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
968
909
  }
969
- return Promise.resolve(contents);
910
+ return contents;
970
911
  };
971
912
  exports.deserializeAws_restJson1DescribeComputeEnvironmentsCommand = deserializeAws_restJson1DescribeComputeEnvironmentsCommand;
972
913
  const deserializeAws_restJson1DescribeComputeEnvironmentsCommandError = async (output, context) => {
@@ -974,7 +915,6 @@ const deserializeAws_restJson1DescribeComputeEnvironmentsCommandError = async (o
974
915
  ...output,
975
916
  body: await parseBody(output.body, context),
976
917
  };
977
- let response;
978
918
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
979
919
  switch (errorCode) {
980
920
  case "ClientException":
@@ -985,33 +925,29 @@ const deserializeAws_restJson1DescribeComputeEnvironmentsCommandError = async (o
985
925
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
986
926
  default:
987
927
  const parsedBody = parsedOutput.body;
988
- const $metadata = deserializeMetadata(output);
989
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
990
- response = new BatchServiceException_1.BatchServiceException({
991
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
992
- $fault: "client",
993
- $metadata,
928
+ (0, smithy_client_1.throwDefaultError)({
929
+ output,
930
+ parsedBody,
931
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
932
+ errorCode,
994
933
  });
995
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
996
934
  }
997
935
  };
998
936
  const deserializeAws_restJson1DescribeJobDefinitionsCommand = async (output, context) => {
999
937
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1000
938
  return deserializeAws_restJson1DescribeJobDefinitionsCommandError(output, context);
1001
939
  }
1002
- const contents = {
940
+ const contents = map({
1003
941
  $metadata: deserializeMetadata(output),
1004
- jobDefinitions: undefined,
1005
- nextToken: undefined,
1006
- };
942
+ });
1007
943
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1008
- if (data.jobDefinitions !== undefined && data.jobDefinitions !== null) {
944
+ if (data.jobDefinitions != null) {
1009
945
  contents.jobDefinitions = deserializeAws_restJson1JobDefinitionList(data.jobDefinitions, context);
1010
946
  }
1011
- if (data.nextToken !== undefined && data.nextToken !== null) {
947
+ if (data.nextToken != null) {
1012
948
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1013
949
  }
1014
- return Promise.resolve(contents);
950
+ return contents;
1015
951
  };
1016
952
  exports.deserializeAws_restJson1DescribeJobDefinitionsCommand = deserializeAws_restJson1DescribeJobDefinitionsCommand;
1017
953
  const deserializeAws_restJson1DescribeJobDefinitionsCommandError = async (output, context) => {
@@ -1019,7 +955,6 @@ const deserializeAws_restJson1DescribeJobDefinitionsCommandError = async (output
1019
955
  ...output,
1020
956
  body: await parseBody(output.body, context),
1021
957
  };
1022
- let response;
1023
958
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1024
959
  switch (errorCode) {
1025
960
  case "ClientException":
@@ -1030,33 +965,29 @@ const deserializeAws_restJson1DescribeJobDefinitionsCommandError = async (output
1030
965
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1031
966
  default:
1032
967
  const parsedBody = parsedOutput.body;
1033
- const $metadata = deserializeMetadata(output);
1034
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1035
- response = new BatchServiceException_1.BatchServiceException({
1036
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1037
- $fault: "client",
1038
- $metadata,
968
+ (0, smithy_client_1.throwDefaultError)({
969
+ output,
970
+ parsedBody,
971
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
972
+ errorCode,
1039
973
  });
1040
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1041
974
  }
1042
975
  };
1043
976
  const deserializeAws_restJson1DescribeJobQueuesCommand = async (output, context) => {
1044
977
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1045
978
  return deserializeAws_restJson1DescribeJobQueuesCommandError(output, context);
1046
979
  }
1047
- const contents = {
980
+ const contents = map({
1048
981
  $metadata: deserializeMetadata(output),
1049
- jobQueues: undefined,
1050
- nextToken: undefined,
1051
- };
982
+ });
1052
983
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1053
- if (data.jobQueues !== undefined && data.jobQueues !== null) {
984
+ if (data.jobQueues != null) {
1054
985
  contents.jobQueues = deserializeAws_restJson1JobQueueDetailList(data.jobQueues, context);
1055
986
  }
1056
- if (data.nextToken !== undefined && data.nextToken !== null) {
987
+ if (data.nextToken != null) {
1057
988
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1058
989
  }
1059
- return Promise.resolve(contents);
990
+ return contents;
1060
991
  };
1061
992
  exports.deserializeAws_restJson1DescribeJobQueuesCommand = deserializeAws_restJson1DescribeJobQueuesCommand;
1062
993
  const deserializeAws_restJson1DescribeJobQueuesCommandError = async (output, context) => {
@@ -1064,7 +995,6 @@ const deserializeAws_restJson1DescribeJobQueuesCommandError = async (output, con
1064
995
  ...output,
1065
996
  body: await parseBody(output.body, context),
1066
997
  };
1067
- let response;
1068
998
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1069
999
  switch (errorCode) {
1070
1000
  case "ClientException":
@@ -1075,29 +1005,26 @@ const deserializeAws_restJson1DescribeJobQueuesCommandError = async (output, con
1075
1005
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1076
1006
  default:
1077
1007
  const parsedBody = parsedOutput.body;
1078
- const $metadata = deserializeMetadata(output);
1079
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1080
- response = new BatchServiceException_1.BatchServiceException({
1081
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1082
- $fault: "client",
1083
- $metadata,
1008
+ (0, smithy_client_1.throwDefaultError)({
1009
+ output,
1010
+ parsedBody,
1011
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1012
+ errorCode,
1084
1013
  });
1085
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1086
1014
  }
1087
1015
  };
1088
1016
  const deserializeAws_restJson1DescribeJobsCommand = async (output, context) => {
1089
1017
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1090
1018
  return deserializeAws_restJson1DescribeJobsCommandError(output, context);
1091
1019
  }
1092
- const contents = {
1020
+ const contents = map({
1093
1021
  $metadata: deserializeMetadata(output),
1094
- jobs: undefined,
1095
- };
1022
+ });
1096
1023
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1097
- if (data.jobs !== undefined && data.jobs !== null) {
1024
+ if (data.jobs != null) {
1098
1025
  contents.jobs = deserializeAws_restJson1JobDetailList(data.jobs, context);
1099
1026
  }
1100
- return Promise.resolve(contents);
1027
+ return contents;
1101
1028
  };
1102
1029
  exports.deserializeAws_restJson1DescribeJobsCommand = deserializeAws_restJson1DescribeJobsCommand;
1103
1030
  const deserializeAws_restJson1DescribeJobsCommandError = async (output, context) => {
@@ -1105,7 +1032,6 @@ const deserializeAws_restJson1DescribeJobsCommandError = async (output, context)
1105
1032
  ...output,
1106
1033
  body: await parseBody(output.body, context),
1107
1034
  };
1108
- let response;
1109
1035
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1110
1036
  switch (errorCode) {
1111
1037
  case "ClientException":
@@ -1116,29 +1042,26 @@ const deserializeAws_restJson1DescribeJobsCommandError = async (output, context)
1116
1042
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1117
1043
  default:
1118
1044
  const parsedBody = parsedOutput.body;
1119
- const $metadata = deserializeMetadata(output);
1120
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1121
- response = new BatchServiceException_1.BatchServiceException({
1122
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1123
- $fault: "client",
1124
- $metadata,
1045
+ (0, smithy_client_1.throwDefaultError)({
1046
+ output,
1047
+ parsedBody,
1048
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1049
+ errorCode,
1125
1050
  });
1126
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1127
1051
  }
1128
1052
  };
1129
1053
  const deserializeAws_restJson1DescribeSchedulingPoliciesCommand = async (output, context) => {
1130
1054
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1131
1055
  return deserializeAws_restJson1DescribeSchedulingPoliciesCommandError(output, context);
1132
1056
  }
1133
- const contents = {
1057
+ const contents = map({
1134
1058
  $metadata: deserializeMetadata(output),
1135
- schedulingPolicies: undefined,
1136
- };
1059
+ });
1137
1060
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1138
- if (data.schedulingPolicies !== undefined && data.schedulingPolicies !== null) {
1061
+ if (data.schedulingPolicies != null) {
1139
1062
  contents.schedulingPolicies = deserializeAws_restJson1SchedulingPolicyDetailList(data.schedulingPolicies, context);
1140
1063
  }
1141
- return Promise.resolve(contents);
1064
+ return contents;
1142
1065
  };
1143
1066
  exports.deserializeAws_restJson1DescribeSchedulingPoliciesCommand = deserializeAws_restJson1DescribeSchedulingPoliciesCommand;
1144
1067
  const deserializeAws_restJson1DescribeSchedulingPoliciesCommandError = async (output, context) => {
@@ -1146,7 +1069,6 @@ const deserializeAws_restJson1DescribeSchedulingPoliciesCommandError = async (ou
1146
1069
  ...output,
1147
1070
  body: await parseBody(output.body, context),
1148
1071
  };
1149
- let response;
1150
1072
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1151
1073
  switch (errorCode) {
1152
1074
  case "ClientException":
@@ -1157,33 +1079,29 @@ const deserializeAws_restJson1DescribeSchedulingPoliciesCommandError = async (ou
1157
1079
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1158
1080
  default:
1159
1081
  const parsedBody = parsedOutput.body;
1160
- const $metadata = deserializeMetadata(output);
1161
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1162
- response = new BatchServiceException_1.BatchServiceException({
1163
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1164
- $fault: "client",
1165
- $metadata,
1082
+ (0, smithy_client_1.throwDefaultError)({
1083
+ output,
1084
+ parsedBody,
1085
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1086
+ errorCode,
1166
1087
  });
1167
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1168
1088
  }
1169
1089
  };
1170
1090
  const deserializeAws_restJson1ListJobsCommand = async (output, context) => {
1171
1091
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1172
1092
  return deserializeAws_restJson1ListJobsCommandError(output, context);
1173
1093
  }
1174
- const contents = {
1094
+ const contents = map({
1175
1095
  $metadata: deserializeMetadata(output),
1176
- jobSummaryList: undefined,
1177
- nextToken: undefined,
1178
- };
1096
+ });
1179
1097
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1180
- if (data.jobSummaryList !== undefined && data.jobSummaryList !== null) {
1098
+ if (data.jobSummaryList != null) {
1181
1099
  contents.jobSummaryList = deserializeAws_restJson1JobSummaryList(data.jobSummaryList, context);
1182
1100
  }
1183
- if (data.nextToken !== undefined && data.nextToken !== null) {
1101
+ if (data.nextToken != null) {
1184
1102
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1185
1103
  }
1186
- return Promise.resolve(contents);
1104
+ return contents;
1187
1105
  };
1188
1106
  exports.deserializeAws_restJson1ListJobsCommand = deserializeAws_restJson1ListJobsCommand;
1189
1107
  const deserializeAws_restJson1ListJobsCommandError = async (output, context) => {
@@ -1191,7 +1109,6 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
1191
1109
  ...output,
1192
1110
  body: await parseBody(output.body, context),
1193
1111
  };
1194
- let response;
1195
1112
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1196
1113
  switch (errorCode) {
1197
1114
  case "ClientException":
@@ -1202,33 +1119,29 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
1202
1119
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1203
1120
  default:
1204
1121
  const parsedBody = parsedOutput.body;
1205
- const $metadata = deserializeMetadata(output);
1206
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1207
- response = new BatchServiceException_1.BatchServiceException({
1208
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1209
- $fault: "client",
1210
- $metadata,
1122
+ (0, smithy_client_1.throwDefaultError)({
1123
+ output,
1124
+ parsedBody,
1125
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1126
+ errorCode,
1211
1127
  });
1212
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1213
1128
  }
1214
1129
  };
1215
1130
  const deserializeAws_restJson1ListSchedulingPoliciesCommand = async (output, context) => {
1216
1131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1217
1132
  return deserializeAws_restJson1ListSchedulingPoliciesCommandError(output, context);
1218
1133
  }
1219
- const contents = {
1134
+ const contents = map({
1220
1135
  $metadata: deserializeMetadata(output),
1221
- nextToken: undefined,
1222
- schedulingPolicies: undefined,
1223
- };
1136
+ });
1224
1137
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1225
- if (data.nextToken !== undefined && data.nextToken !== null) {
1138
+ if (data.nextToken != null) {
1226
1139
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1227
1140
  }
1228
- if (data.schedulingPolicies !== undefined && data.schedulingPolicies !== null) {
1141
+ if (data.schedulingPolicies != null) {
1229
1142
  contents.schedulingPolicies = deserializeAws_restJson1SchedulingPolicyListingDetailList(data.schedulingPolicies, context);
1230
1143
  }
1231
- return Promise.resolve(contents);
1144
+ return contents;
1232
1145
  };
1233
1146
  exports.deserializeAws_restJson1ListSchedulingPoliciesCommand = deserializeAws_restJson1ListSchedulingPoliciesCommand;
1234
1147
  const deserializeAws_restJson1ListSchedulingPoliciesCommandError = async (output, context) => {
@@ -1236,7 +1149,6 @@ const deserializeAws_restJson1ListSchedulingPoliciesCommandError = async (output
1236
1149
  ...output,
1237
1150
  body: await parseBody(output.body, context),
1238
1151
  };
1239
- let response;
1240
1152
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1241
1153
  switch (errorCode) {
1242
1154
  case "ClientException":
@@ -1247,29 +1159,26 @@ const deserializeAws_restJson1ListSchedulingPoliciesCommandError = async (output
1247
1159
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1248
1160
  default:
1249
1161
  const parsedBody = parsedOutput.body;
1250
- const $metadata = deserializeMetadata(output);
1251
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1252
- response = new BatchServiceException_1.BatchServiceException({
1253
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1254
- $fault: "client",
1255
- $metadata,
1162
+ (0, smithy_client_1.throwDefaultError)({
1163
+ output,
1164
+ parsedBody,
1165
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1166
+ errorCode,
1256
1167
  });
1257
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1258
1168
  }
1259
1169
  };
1260
1170
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1261
1171
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1262
1172
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
1263
1173
  }
1264
- const contents = {
1174
+ const contents = map({
1265
1175
  $metadata: deserializeMetadata(output),
1266
- tags: undefined,
1267
- };
1176
+ });
1268
1177
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1269
- if (data.tags !== undefined && data.tags !== null) {
1178
+ if (data.tags != null) {
1270
1179
  contents.tags = deserializeAws_restJson1TagrisTagsMap(data.tags, context);
1271
1180
  }
1272
- return Promise.resolve(contents);
1181
+ return contents;
1273
1182
  };
1274
1183
  exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
1275
1184
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
@@ -1277,7 +1186,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1277
1186
  ...output,
1278
1187
  body: await parseBody(output.body, context),
1279
1188
  };
1280
- let response;
1281
1189
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1282
1190
  switch (errorCode) {
1283
1191
  case "ClientException":
@@ -1288,37 +1196,32 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1288
1196
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1289
1197
  default:
1290
1198
  const parsedBody = parsedOutput.body;
1291
- const $metadata = deserializeMetadata(output);
1292
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1293
- response = new BatchServiceException_1.BatchServiceException({
1294
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1295
- $fault: "client",
1296
- $metadata,
1199
+ (0, smithy_client_1.throwDefaultError)({
1200
+ output,
1201
+ parsedBody,
1202
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1203
+ errorCode,
1297
1204
  });
1298
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1299
1205
  }
1300
1206
  };
1301
1207
  const deserializeAws_restJson1RegisterJobDefinitionCommand = async (output, context) => {
1302
1208
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1303
1209
  return deserializeAws_restJson1RegisterJobDefinitionCommandError(output, context);
1304
1210
  }
1305
- const contents = {
1211
+ const contents = map({
1306
1212
  $metadata: deserializeMetadata(output),
1307
- jobDefinitionArn: undefined,
1308
- jobDefinitionName: undefined,
1309
- revision: undefined,
1310
- };
1213
+ });
1311
1214
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1312
- if (data.jobDefinitionArn !== undefined && data.jobDefinitionArn !== null) {
1215
+ if (data.jobDefinitionArn != null) {
1313
1216
  contents.jobDefinitionArn = (0, smithy_client_1.expectString)(data.jobDefinitionArn);
1314
1217
  }
1315
- if (data.jobDefinitionName !== undefined && data.jobDefinitionName !== null) {
1218
+ if (data.jobDefinitionName != null) {
1316
1219
  contents.jobDefinitionName = (0, smithy_client_1.expectString)(data.jobDefinitionName);
1317
1220
  }
1318
- if (data.revision !== undefined && data.revision !== null) {
1221
+ if (data.revision != null) {
1319
1222
  contents.revision = (0, smithy_client_1.expectInt32)(data.revision);
1320
1223
  }
1321
- return Promise.resolve(contents);
1224
+ return contents;
1322
1225
  };
1323
1226
  exports.deserializeAws_restJson1RegisterJobDefinitionCommand = deserializeAws_restJson1RegisterJobDefinitionCommand;
1324
1227
  const deserializeAws_restJson1RegisterJobDefinitionCommandError = async (output, context) => {
@@ -1326,7 +1229,6 @@ const deserializeAws_restJson1RegisterJobDefinitionCommandError = async (output,
1326
1229
  ...output,
1327
1230
  body: await parseBody(output.body, context),
1328
1231
  };
1329
- let response;
1330
1232
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1331
1233
  switch (errorCode) {
1332
1234
  case "ClientException":
@@ -1337,37 +1239,32 @@ const deserializeAws_restJson1RegisterJobDefinitionCommandError = async (output,
1337
1239
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1338
1240
  default:
1339
1241
  const parsedBody = parsedOutput.body;
1340
- const $metadata = deserializeMetadata(output);
1341
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1342
- response = new BatchServiceException_1.BatchServiceException({
1343
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1344
- $fault: "client",
1345
- $metadata,
1242
+ (0, smithy_client_1.throwDefaultError)({
1243
+ output,
1244
+ parsedBody,
1245
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1246
+ errorCode,
1346
1247
  });
1347
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1348
1248
  }
1349
1249
  };
1350
1250
  const deserializeAws_restJson1SubmitJobCommand = async (output, context) => {
1351
1251
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
1252
  return deserializeAws_restJson1SubmitJobCommandError(output, context);
1353
1253
  }
1354
- const contents = {
1254
+ const contents = map({
1355
1255
  $metadata: deserializeMetadata(output),
1356
- jobArn: undefined,
1357
- jobId: undefined,
1358
- jobName: undefined,
1359
- };
1256
+ });
1360
1257
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1361
- if (data.jobArn !== undefined && data.jobArn !== null) {
1258
+ if (data.jobArn != null) {
1362
1259
  contents.jobArn = (0, smithy_client_1.expectString)(data.jobArn);
1363
1260
  }
1364
- if (data.jobId !== undefined && data.jobId !== null) {
1261
+ if (data.jobId != null) {
1365
1262
  contents.jobId = (0, smithy_client_1.expectString)(data.jobId);
1366
1263
  }
1367
- if (data.jobName !== undefined && data.jobName !== null) {
1264
+ if (data.jobName != null) {
1368
1265
  contents.jobName = (0, smithy_client_1.expectString)(data.jobName);
1369
1266
  }
1370
- return Promise.resolve(contents);
1267
+ return contents;
1371
1268
  };
1372
1269
  exports.deserializeAws_restJson1SubmitJobCommand = deserializeAws_restJson1SubmitJobCommand;
1373
1270
  const deserializeAws_restJson1SubmitJobCommandError = async (output, context) => {
@@ -1375,7 +1272,6 @@ const deserializeAws_restJson1SubmitJobCommandError = async (output, context) =>
1375
1272
  ...output,
1376
1273
  body: await parseBody(output.body, context),
1377
1274
  };
1378
- let response;
1379
1275
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1380
1276
  switch (errorCode) {
1381
1277
  case "ClientException":
@@ -1386,25 +1282,23 @@ const deserializeAws_restJson1SubmitJobCommandError = async (output, context) =>
1386
1282
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1387
1283
  default:
1388
1284
  const parsedBody = parsedOutput.body;
1389
- const $metadata = deserializeMetadata(output);
1390
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1391
- response = new BatchServiceException_1.BatchServiceException({
1392
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1393
- $fault: "client",
1394
- $metadata,
1285
+ (0, smithy_client_1.throwDefaultError)({
1286
+ output,
1287
+ parsedBody,
1288
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1289
+ errorCode,
1395
1290
  });
1396
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1397
1291
  }
1398
1292
  };
1399
1293
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1400
1294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1401
1295
  return deserializeAws_restJson1TagResourceCommandError(output, context);
1402
1296
  }
1403
- const contents = {
1297
+ const contents = map({
1404
1298
  $metadata: deserializeMetadata(output),
1405
- };
1299
+ });
1406
1300
  await collectBody(output.body, context);
1407
- return Promise.resolve(contents);
1301
+ return contents;
1408
1302
  };
1409
1303
  exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
1410
1304
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
@@ -1412,7 +1306,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1412
1306
  ...output,
1413
1307
  body: await parseBody(output.body, context),
1414
1308
  };
1415
- let response;
1416
1309
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1417
1310
  switch (errorCode) {
1418
1311
  case "ClientException":
@@ -1423,25 +1316,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1423
1316
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1424
1317
  default:
1425
1318
  const parsedBody = parsedOutput.body;
1426
- const $metadata = deserializeMetadata(output);
1427
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1428
- response = new BatchServiceException_1.BatchServiceException({
1429
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1430
- $fault: "client",
1431
- $metadata,
1319
+ (0, smithy_client_1.throwDefaultError)({
1320
+ output,
1321
+ parsedBody,
1322
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1323
+ errorCode,
1432
1324
  });
1433
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1434
1325
  }
1435
1326
  };
1436
1327
  const deserializeAws_restJson1TerminateJobCommand = async (output, context) => {
1437
1328
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1438
1329
  return deserializeAws_restJson1TerminateJobCommandError(output, context);
1439
1330
  }
1440
- const contents = {
1331
+ const contents = map({
1441
1332
  $metadata: deserializeMetadata(output),
1442
- };
1333
+ });
1443
1334
  await collectBody(output.body, context);
1444
- return Promise.resolve(contents);
1335
+ return contents;
1445
1336
  };
1446
1337
  exports.deserializeAws_restJson1TerminateJobCommand = deserializeAws_restJson1TerminateJobCommand;
1447
1338
  const deserializeAws_restJson1TerminateJobCommandError = async (output, context) => {
@@ -1449,7 +1340,6 @@ const deserializeAws_restJson1TerminateJobCommandError = async (output, context)
1449
1340
  ...output,
1450
1341
  body: await parseBody(output.body, context),
1451
1342
  };
1452
- let response;
1453
1343
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1454
1344
  switch (errorCode) {
1455
1345
  case "ClientException":
@@ -1460,25 +1350,23 @@ const deserializeAws_restJson1TerminateJobCommandError = async (output, context)
1460
1350
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1461
1351
  default:
1462
1352
  const parsedBody = parsedOutput.body;
1463
- const $metadata = deserializeMetadata(output);
1464
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1465
- response = new BatchServiceException_1.BatchServiceException({
1466
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1467
- $fault: "client",
1468
- $metadata,
1353
+ (0, smithy_client_1.throwDefaultError)({
1354
+ output,
1355
+ parsedBody,
1356
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1357
+ errorCode,
1469
1358
  });
1470
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1471
1359
  }
1472
1360
  };
1473
1361
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
1474
1362
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1475
1363
  return deserializeAws_restJson1UntagResourceCommandError(output, context);
1476
1364
  }
1477
- const contents = {
1365
+ const contents = map({
1478
1366
  $metadata: deserializeMetadata(output),
1479
- };
1367
+ });
1480
1368
  await collectBody(output.body, context);
1481
- return Promise.resolve(contents);
1369
+ return contents;
1482
1370
  };
1483
1371
  exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
1484
1372
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
@@ -1486,7 +1374,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1486
1374
  ...output,
1487
1375
  body: await parseBody(output.body, context),
1488
1376
  };
1489
- let response;
1490
1377
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1491
1378
  switch (errorCode) {
1492
1379
  case "ClientException":
@@ -1497,33 +1384,29 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1497
1384
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1498
1385
  default:
1499
1386
  const parsedBody = parsedOutput.body;
1500
- const $metadata = deserializeMetadata(output);
1501
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1502
- response = new BatchServiceException_1.BatchServiceException({
1503
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1504
- $fault: "client",
1505
- $metadata,
1387
+ (0, smithy_client_1.throwDefaultError)({
1388
+ output,
1389
+ parsedBody,
1390
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1391
+ errorCode,
1506
1392
  });
1507
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1508
1393
  }
1509
1394
  };
1510
1395
  const deserializeAws_restJson1UpdateComputeEnvironmentCommand = async (output, context) => {
1511
1396
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1512
1397
  return deserializeAws_restJson1UpdateComputeEnvironmentCommandError(output, context);
1513
1398
  }
1514
- const contents = {
1399
+ const contents = map({
1515
1400
  $metadata: deserializeMetadata(output),
1516
- computeEnvironmentArn: undefined,
1517
- computeEnvironmentName: undefined,
1518
- };
1401
+ });
1519
1402
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1520
- if (data.computeEnvironmentArn !== undefined && data.computeEnvironmentArn !== null) {
1403
+ if (data.computeEnvironmentArn != null) {
1521
1404
  contents.computeEnvironmentArn = (0, smithy_client_1.expectString)(data.computeEnvironmentArn);
1522
1405
  }
1523
- if (data.computeEnvironmentName !== undefined && data.computeEnvironmentName !== null) {
1406
+ if (data.computeEnvironmentName != null) {
1524
1407
  contents.computeEnvironmentName = (0, smithy_client_1.expectString)(data.computeEnvironmentName);
1525
1408
  }
1526
- return Promise.resolve(contents);
1409
+ return contents;
1527
1410
  };
1528
1411
  exports.deserializeAws_restJson1UpdateComputeEnvironmentCommand = deserializeAws_restJson1UpdateComputeEnvironmentCommand;
1529
1412
  const deserializeAws_restJson1UpdateComputeEnvironmentCommandError = async (output, context) => {
@@ -1531,7 +1414,6 @@ const deserializeAws_restJson1UpdateComputeEnvironmentCommandError = async (outp
1531
1414
  ...output,
1532
1415
  body: await parseBody(output.body, context),
1533
1416
  };
1534
- let response;
1535
1417
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1536
1418
  switch (errorCode) {
1537
1419
  case "ClientException":
@@ -1542,33 +1424,29 @@ const deserializeAws_restJson1UpdateComputeEnvironmentCommandError = async (outp
1542
1424
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1543
1425
  default:
1544
1426
  const parsedBody = parsedOutput.body;
1545
- const $metadata = deserializeMetadata(output);
1546
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1547
- response = new BatchServiceException_1.BatchServiceException({
1548
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1549
- $fault: "client",
1550
- $metadata,
1427
+ (0, smithy_client_1.throwDefaultError)({
1428
+ output,
1429
+ parsedBody,
1430
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1431
+ errorCode,
1551
1432
  });
1552
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1553
1433
  }
1554
1434
  };
1555
1435
  const deserializeAws_restJson1UpdateJobQueueCommand = async (output, context) => {
1556
1436
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1557
1437
  return deserializeAws_restJson1UpdateJobQueueCommandError(output, context);
1558
1438
  }
1559
- const contents = {
1439
+ const contents = map({
1560
1440
  $metadata: deserializeMetadata(output),
1561
- jobQueueArn: undefined,
1562
- jobQueueName: undefined,
1563
- };
1441
+ });
1564
1442
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1565
- if (data.jobQueueArn !== undefined && data.jobQueueArn !== null) {
1443
+ if (data.jobQueueArn != null) {
1566
1444
  contents.jobQueueArn = (0, smithy_client_1.expectString)(data.jobQueueArn);
1567
1445
  }
1568
- if (data.jobQueueName !== undefined && data.jobQueueName !== null) {
1446
+ if (data.jobQueueName != null) {
1569
1447
  contents.jobQueueName = (0, smithy_client_1.expectString)(data.jobQueueName);
1570
1448
  }
1571
- return Promise.resolve(contents);
1449
+ return contents;
1572
1450
  };
1573
1451
  exports.deserializeAws_restJson1UpdateJobQueueCommand = deserializeAws_restJson1UpdateJobQueueCommand;
1574
1452
  const deserializeAws_restJson1UpdateJobQueueCommandError = async (output, context) => {
@@ -1576,7 +1454,6 @@ const deserializeAws_restJson1UpdateJobQueueCommandError = async (output, contex
1576
1454
  ...output,
1577
1455
  body: await parseBody(output.body, context),
1578
1456
  };
1579
- let response;
1580
1457
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1581
1458
  switch (errorCode) {
1582
1459
  case "ClientException":
@@ -1587,25 +1464,23 @@ const deserializeAws_restJson1UpdateJobQueueCommandError = async (output, contex
1587
1464
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1588
1465
  default:
1589
1466
  const parsedBody = parsedOutput.body;
1590
- const $metadata = deserializeMetadata(output);
1591
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1592
- response = new BatchServiceException_1.BatchServiceException({
1593
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1594
- $fault: "client",
1595
- $metadata,
1467
+ (0, smithy_client_1.throwDefaultError)({
1468
+ output,
1469
+ parsedBody,
1470
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1471
+ errorCode,
1596
1472
  });
1597
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1598
1473
  }
1599
1474
  };
1600
1475
  const deserializeAws_restJson1UpdateSchedulingPolicyCommand = async (output, context) => {
1601
1476
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1602
1477
  return deserializeAws_restJson1UpdateSchedulingPolicyCommandError(output, context);
1603
1478
  }
1604
- const contents = {
1479
+ const contents = map({
1605
1480
  $metadata: deserializeMetadata(output),
1606
- };
1481
+ });
1607
1482
  await collectBody(output.body, context);
1608
- return Promise.resolve(contents);
1483
+ return contents;
1609
1484
  };
1610
1485
  exports.deserializeAws_restJson1UpdateSchedulingPolicyCommand = deserializeAws_restJson1UpdateSchedulingPolicyCommand;
1611
1486
  const deserializeAws_restJson1UpdateSchedulingPolicyCommandError = async (output, context) => {
@@ -1613,7 +1488,6 @@ const deserializeAws_restJson1UpdateSchedulingPolicyCommandError = async (output
1613
1488
  ...output,
1614
1489
  body: await parseBody(output.body, context),
1615
1490
  };
1616
- let response;
1617
1491
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1618
1492
  switch (errorCode) {
1619
1493
  case "ClientException":
@@ -1624,20 +1498,19 @@ const deserializeAws_restJson1UpdateSchedulingPolicyCommandError = async (output
1624
1498
  throw await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context);
1625
1499
  default:
1626
1500
  const parsedBody = parsedOutput.body;
1627
- const $metadata = deserializeMetadata(output);
1628
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1629
- response = new BatchServiceException_1.BatchServiceException({
1630
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1631
- $fault: "client",
1632
- $metadata,
1501
+ (0, smithy_client_1.throwDefaultError)({
1502
+ output,
1503
+ parsedBody,
1504
+ exceptionCtor: BatchServiceException_1.BatchServiceException,
1505
+ errorCode,
1633
1506
  });
1634
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1635
1507
  }
1636
1508
  };
1509
+ const map = smithy_client_1.map;
1637
1510
  const deserializeAws_restJson1ClientExceptionResponse = async (parsedOutput, context) => {
1638
- const contents = {};
1511
+ const contents = map({});
1639
1512
  const data = parsedOutput.body;
1640
- if (data.message !== undefined && data.message !== null) {
1513
+ if (data.message != null) {
1641
1514
  contents.message = (0, smithy_client_1.expectString)(data.message);
1642
1515
  }
1643
1516
  const exception = new models_0_1.ClientException({
@@ -1647,9 +1520,9 @@ const deserializeAws_restJson1ClientExceptionResponse = async (parsedOutput, con
1647
1520
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1648
1521
  };
1649
1522
  const deserializeAws_restJson1ServerExceptionResponse = async (parsedOutput, context) => {
1650
- const contents = {};
1523
+ const contents = map({});
1651
1524
  const data = parsedOutput.body;
1652
- if (data.message !== undefined && data.message !== null) {
1525
+ if (data.message != null) {
1653
1526
  contents.message = (0, smithy_client_1.expectString)(data.message);
1654
1527
  }
1655
1528
  const exception = new models_0_1.ServerException({
@@ -1673,9 +1546,6 @@ const serializeAws_restJson1ComputeEnvironmentOrders = (input, context) => {
1673
1546
  return input
1674
1547
  .filter((e) => e != null)
1675
1548
  .map((entry) => {
1676
- if (entry === null) {
1677
- return null;
1678
- }
1679
1549
  return serializeAws_restJson1ComputeEnvironmentOrder(entry, context);
1680
1550
  });
1681
1551
  };
@@ -1800,9 +1670,6 @@ const serializeAws_restJson1DeviceCgroupPermissions = (input, context) => {
1800
1670
  return input
1801
1671
  .filter((e) => e != null)
1802
1672
  .map((entry) => {
1803
- if (entry === null) {
1804
- return null;
1805
- }
1806
1673
  return entry;
1807
1674
  });
1808
1675
  };
@@ -1810,9 +1677,6 @@ const serializeAws_restJson1DevicesList = (input, context) => {
1810
1677
  return input
1811
1678
  .filter((e) => e != null)
1812
1679
  .map((entry) => {
1813
- if (entry === null) {
1814
- return null;
1815
- }
1816
1680
  return serializeAws_restJson1Device(entry, context);
1817
1681
  });
1818
1682
  };
@@ -1826,9 +1690,6 @@ const serializeAws_restJson1Ec2ConfigurationList = (input, context) => {
1826
1690
  return input
1827
1691
  .filter((e) => e != null)
1828
1692
  .map((entry) => {
1829
- if (entry === null) {
1830
- return null;
1831
- }
1832
1693
  return serializeAws_restJson1Ec2Configuration(entry, context);
1833
1694
  });
1834
1695
  };
@@ -1853,9 +1714,6 @@ const serializeAws_restJson1EnvironmentVariables = (input, context) => {
1853
1714
  return input
1854
1715
  .filter((e) => e != null)
1855
1716
  .map((entry) => {
1856
- if (entry === null) {
1857
- return null;
1858
- }
1859
1717
  return serializeAws_restJson1KeyValuePair(entry, context);
1860
1718
  });
1861
1719
  };
@@ -1871,9 +1729,6 @@ const serializeAws_restJson1EvaluateOnExitList = (input, context) => {
1871
1729
  return input
1872
1730
  .filter((e) => e != null)
1873
1731
  .map((entry) => {
1874
- if (entry === null) {
1875
- return null;
1876
- }
1877
1732
  return serializeAws_restJson1EvaluateOnExit(entry, context);
1878
1733
  });
1879
1734
  };
@@ -1906,9 +1761,6 @@ const serializeAws_restJson1JobDependencyList = (input, context) => {
1906
1761
  return input
1907
1762
  .filter((e) => e != null)
1908
1763
  .map((entry) => {
1909
- if (entry === null) {
1910
- return null;
1911
- }
1912
1764
  return serializeAws_restJson1JobDependency(entry, context);
1913
1765
  });
1914
1766
  };
@@ -1950,9 +1802,6 @@ const serializeAws_restJson1ListJobsFilterList = (input, context) => {
1950
1802
  return input
1951
1803
  .filter((e) => e != null)
1952
1804
  .map((entry) => {
1953
- if (entry === null) {
1954
- return null;
1955
- }
1956
1805
  return serializeAws_restJson1KeyValuesPair(entry, context);
1957
1806
  });
1958
1807
  };
@@ -1987,9 +1836,6 @@ const serializeAws_restJson1MountPoints = (input, context) => {
1987
1836
  return input
1988
1837
  .filter((e) => e != null)
1989
1838
  .map((entry) => {
1990
- if (entry === null) {
1991
- return null;
1992
- }
1993
1839
  return serializeAws_restJson1MountPoint(entry, context);
1994
1840
  });
1995
1841
  };
@@ -2027,9 +1873,6 @@ const serializeAws_restJson1NodePropertyOverrides = (input, context) => {
2027
1873
  return input
2028
1874
  .filter((e) => e != null)
2029
1875
  .map((entry) => {
2030
- if (entry === null) {
2031
- return null;
2032
- }
2033
1876
  return serializeAws_restJson1NodePropertyOverride(entry, context);
2034
1877
  });
2035
1878
  };
@@ -2037,9 +1880,6 @@ const serializeAws_restJson1NodeRangeProperties = (input, context) => {
2037
1880
  return input
2038
1881
  .filter((e) => e != null)
2039
1882
  .map((entry) => {
2040
- if (entry === null) {
2041
- return null;
2042
- }
2043
1883
  return serializeAws_restJson1NodeRangeProperty(entry, context);
2044
1884
  });
2045
1885
  };
@@ -2064,9 +1904,6 @@ const serializeAws_restJson1PlatformCapabilityList = (input, context) => {
2064
1904
  return input
2065
1905
  .filter((e) => e != null)
2066
1906
  .map((entry) => {
2067
- if (entry === null) {
2068
- return null;
2069
- }
2070
1907
  return entry;
2071
1908
  });
2072
1909
  };
@@ -2080,9 +1917,6 @@ const serializeAws_restJson1ResourceRequirements = (input, context) => {
2080
1917
  return input
2081
1918
  .filter((e) => e != null)
2082
1919
  .map((entry) => {
2083
- if (entry === null) {
2084
- return null;
2085
- }
2086
1920
  return serializeAws_restJson1ResourceRequirement(entry, context);
2087
1921
  });
2088
1922
  };
@@ -2104,9 +1938,6 @@ const serializeAws_restJson1SecretList = (input, context) => {
2104
1938
  return input
2105
1939
  .filter((e) => e != null)
2106
1940
  .map((entry) => {
2107
- if (entry === null) {
2108
- return null;
2109
- }
2110
1941
  return serializeAws_restJson1Secret(entry, context);
2111
1942
  });
2112
1943
  };
@@ -2120,9 +1951,6 @@ const serializeAws_restJson1ShareAttributesList = (input, context) => {
2120
1951
  return input
2121
1952
  .filter((e) => e != null)
2122
1953
  .map((entry) => {
2123
- if (entry === null) {
2124
- return null;
2125
- }
2126
1954
  return serializeAws_restJson1ShareAttributes(entry, context);
2127
1955
  });
2128
1956
  };
@@ -2130,9 +1958,6 @@ const serializeAws_restJson1StringList = (input, context) => {
2130
1958
  return input
2131
1959
  .filter((e) => e != null)
2132
1960
  .map((entry) => {
2133
- if (entry === null) {
2134
- return null;
2135
- }
2136
1961
  return entry;
2137
1962
  });
2138
1963
  };
@@ -2169,9 +1994,6 @@ const serializeAws_restJson1TmpfsList = (input, context) => {
2169
1994
  return input
2170
1995
  .filter((e) => e != null)
2171
1996
  .map((entry) => {
2172
- if (entry === null) {
2173
- return null;
2174
- }
2175
1997
  return serializeAws_restJson1Tmpfs(entry, context);
2176
1998
  });
2177
1999
  };
@@ -2186,9 +2008,6 @@ const serializeAws_restJson1Ulimits = (input, context) => {
2186
2008
  return input
2187
2009
  .filter((e) => e != null)
2188
2010
  .map((entry) => {
2189
- if (entry === null) {
2190
- return null;
2191
- }
2192
2011
  return serializeAws_restJson1Ulimit(entry, context);
2193
2012
  });
2194
2013
  };
@@ -2211,9 +2030,6 @@ const serializeAws_restJson1Volumes = (input, context) => {
2211
2030
  return input
2212
2031
  .filter((e) => e != null)
2213
2032
  .map((entry) => {
2214
- if (entry === null) {
2215
- return null;
2216
- }
2217
2033
  return serializeAws_restJson1Volume(entry, context);
2218
2034
  });
2219
2035
  };