@aws-sdk/client-emr-containers 3.118.1 → 3.127.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.
@@ -63,19 +63,16 @@ const serializeAws_restJson1CreateManagedEndpointCommand = async (input, context
63
63
  }
64
64
  let body;
65
65
  body = JSON.stringify({
66
- ...(input.certificateArn !== undefined &&
67
- input.certificateArn !== null && { certificateArn: input.certificateArn }),
66
+ ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
68
67
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
69
- ...(input.configurationOverrides !== undefined &&
70
- input.configurationOverrides !== null && {
68
+ ...(input.configurationOverrides != null && {
71
69
  configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
72
70
  }),
73
- ...(input.executionRoleArn !== undefined &&
74
- input.executionRoleArn !== null && { executionRoleArn: input.executionRoleArn }),
75
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
76
- ...(input.releaseLabel !== undefined && input.releaseLabel !== null && { releaseLabel: input.releaseLabel }),
77
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
78
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
71
+ ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
72
+ ...(input.name != null && { name: input.name }),
73
+ ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
74
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
75
+ ...(input.type != null && { type: input.type }),
79
76
  });
80
77
  return new protocol_http_1.HttpRequest({
81
78
  protocol,
@@ -98,12 +95,11 @@ const serializeAws_restJson1CreateVirtualClusterCommand = async (input, context)
98
95
  let body;
99
96
  body = JSON.stringify({
100
97
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
101
- ...(input.containerProvider !== undefined &&
102
- input.containerProvider !== null && {
98
+ ...(input.containerProvider != null && {
103
99
  containerProvider: serializeAws_restJson1ContainerProvider(input.containerProvider, context),
104
100
  }),
105
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
106
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
101
+ ...(input.name != null && { name: input.name }),
102
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
107
103
  });
108
104
  return new protocol_http_1.HttpRequest({
109
105
  protocol,
@@ -436,17 +432,14 @@ const serializeAws_restJson1StartJobRunCommand = async (input, context) => {
436
432
  let body;
437
433
  body = JSON.stringify({
438
434
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
439
- ...(input.configurationOverrides !== undefined &&
440
- input.configurationOverrides !== null && {
435
+ ...(input.configurationOverrides != null && {
441
436
  configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
442
437
  }),
443
- ...(input.executionRoleArn !== undefined &&
444
- input.executionRoleArn !== null && { executionRoleArn: input.executionRoleArn }),
445
- ...(input.jobDriver !== undefined &&
446
- input.jobDriver !== null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) }),
447
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
448
- ...(input.releaseLabel !== undefined && input.releaseLabel !== null && { releaseLabel: input.releaseLabel }),
449
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
438
+ ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
439
+ ...(input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) }),
440
+ ...(input.name != null && { name: input.name }),
441
+ ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
442
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
450
443
  });
451
444
  return new protocol_http_1.HttpRequest({
452
445
  protocol,
@@ -477,7 +470,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
477
470
  }
478
471
  let body;
479
472
  body = JSON.stringify({
480
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
473
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
481
474
  });
482
475
  return new protocol_http_1.HttpRequest({
483
476
  protocol,
@@ -545,8 +538,7 @@ const deserializeAws_restJson1CancelJobRunCommandError = async (output, context)
545
538
  body: await parseBody(output.body, context),
546
539
  };
547
540
  let response;
548
- let errorCode = "UnknownError";
549
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
541
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
550
542
  switch (errorCode) {
551
543
  case "InternalServerException":
552
544
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -556,10 +548,12 @@ const deserializeAws_restJson1CancelJobRunCommandError = async (output, context)
556
548
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
557
549
  default:
558
550
  const parsedBody = parsedOutput.body;
551
+ const $metadata = deserializeMetadata(output);
552
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
559
553
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
560
- name: parsedBody.code || parsedBody.Code || errorCode,
554
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
561
555
  $fault: "client",
562
- $metadata: deserializeMetadata(output),
556
+ $metadata,
563
557
  });
564
558
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
565
559
  }
@@ -597,8 +591,7 @@ const deserializeAws_restJson1CreateManagedEndpointCommandError = async (output,
597
591
  body: await parseBody(output.body, context),
598
592
  };
599
593
  let response;
600
- let errorCode = "UnknownError";
601
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
594
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
602
595
  switch (errorCode) {
603
596
  case "InternalServerException":
604
597
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -611,10 +604,12 @@ const deserializeAws_restJson1CreateManagedEndpointCommandError = async (output,
611
604
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
612
605
  default:
613
606
  const parsedBody = parsedOutput.body;
607
+ const $metadata = deserializeMetadata(output);
608
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
614
609
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
615
- name: parsedBody.code || parsedBody.Code || errorCode,
610
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
616
611
  $fault: "client",
617
- $metadata: deserializeMetadata(output),
612
+ $metadata,
618
613
  });
619
614
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
620
615
  }
@@ -648,8 +643,7 @@ const deserializeAws_restJson1CreateVirtualClusterCommandError = async (output,
648
643
  body: await parseBody(output.body, context),
649
644
  };
650
645
  let response;
651
- let errorCode = "UnknownError";
652
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
646
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
653
647
  switch (errorCode) {
654
648
  case "InternalServerException":
655
649
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -662,10 +656,12 @@ const deserializeAws_restJson1CreateVirtualClusterCommandError = async (output,
662
656
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
663
657
  default:
664
658
  const parsedBody = parsedOutput.body;
659
+ const $metadata = deserializeMetadata(output);
660
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
665
661
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
666
- name: parsedBody.code || parsedBody.Code || errorCode,
662
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
667
663
  $fault: "client",
668
- $metadata: deserializeMetadata(output),
664
+ $metadata,
669
665
  });
670
666
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
671
667
  }
@@ -695,8 +691,7 @@ const deserializeAws_restJson1DeleteManagedEndpointCommandError = async (output,
695
691
  body: await parseBody(output.body, context),
696
692
  };
697
693
  let response;
698
- let errorCode = "UnknownError";
699
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
694
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
700
695
  switch (errorCode) {
701
696
  case "InternalServerException":
702
697
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -706,10 +701,12 @@ const deserializeAws_restJson1DeleteManagedEndpointCommandError = async (output,
706
701
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
707
702
  default:
708
703
  const parsedBody = parsedOutput.body;
704
+ const $metadata = deserializeMetadata(output);
705
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
709
706
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
710
- name: parsedBody.code || parsedBody.Code || errorCode,
707
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
711
708
  $fault: "client",
712
- $metadata: deserializeMetadata(output),
709
+ $metadata,
713
710
  });
714
711
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
715
712
  }
@@ -735,8 +732,7 @@ const deserializeAws_restJson1DeleteVirtualClusterCommandError = async (output,
735
732
  body: await parseBody(output.body, context),
736
733
  };
737
734
  let response;
738
- let errorCode = "UnknownError";
739
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
735
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
736
  switch (errorCode) {
741
737
  case "InternalServerException":
742
738
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -746,10 +742,12 @@ const deserializeAws_restJson1DeleteVirtualClusterCommandError = async (output,
746
742
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
747
743
  default:
748
744
  const parsedBody = parsedOutput.body;
745
+ const $metadata = deserializeMetadata(output);
746
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
749
747
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
750
- name: parsedBody.code || parsedBody.Code || errorCode,
748
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
751
749
  $fault: "client",
752
- $metadata: deserializeMetadata(output),
750
+ $metadata,
753
751
  });
754
752
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
755
753
  }
@@ -775,8 +773,7 @@ const deserializeAws_restJson1DescribeJobRunCommandError = async (output, contex
775
773
  body: await parseBody(output.body, context),
776
774
  };
777
775
  let response;
778
- let errorCode = "UnknownError";
779
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
776
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
777
  switch (errorCode) {
781
778
  case "InternalServerException":
782
779
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -789,10 +786,12 @@ const deserializeAws_restJson1DescribeJobRunCommandError = async (output, contex
789
786
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
790
787
  default:
791
788
  const parsedBody = parsedOutput.body;
789
+ const $metadata = deserializeMetadata(output);
790
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
792
791
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
793
- name: parsedBody.code || parsedBody.Code || errorCode,
792
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
794
793
  $fault: "client",
795
- $metadata: deserializeMetadata(output),
794
+ $metadata,
796
795
  });
797
796
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
798
797
  }
@@ -818,8 +817,7 @@ const deserializeAws_restJson1DescribeManagedEndpointCommandError = async (outpu
818
817
  body: await parseBody(output.body, context),
819
818
  };
820
819
  let response;
821
- let errorCode = "UnknownError";
822
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
820
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
823
821
  switch (errorCode) {
824
822
  case "InternalServerException":
825
823
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -832,10 +830,12 @@ const deserializeAws_restJson1DescribeManagedEndpointCommandError = async (outpu
832
830
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
833
831
  default:
834
832
  const parsedBody = parsedOutput.body;
833
+ const $metadata = deserializeMetadata(output);
834
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
835
835
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
836
- name: parsedBody.code || parsedBody.Code || errorCode,
836
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
837
837
  $fault: "client",
838
- $metadata: deserializeMetadata(output),
838
+ $metadata,
839
839
  });
840
840
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
841
841
  }
@@ -861,8 +861,7 @@ const deserializeAws_restJson1DescribeVirtualClusterCommandError = async (output
861
861
  body: await parseBody(output.body, context),
862
862
  };
863
863
  let response;
864
- let errorCode = "UnknownError";
865
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
865
  switch (errorCode) {
867
866
  case "InternalServerException":
868
867
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -875,10 +874,12 @@ const deserializeAws_restJson1DescribeVirtualClusterCommandError = async (output
875
874
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
876
875
  default:
877
876
  const parsedBody = parsedOutput.body;
877
+ const $metadata = deserializeMetadata(output);
878
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
878
879
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
879
- name: parsedBody.code || parsedBody.Code || errorCode,
880
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
880
881
  $fault: "client",
881
- $metadata: deserializeMetadata(output),
882
+ $metadata,
882
883
  });
883
884
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
884
885
  }
@@ -908,8 +909,7 @@ const deserializeAws_restJson1ListJobRunsCommandError = async (output, context)
908
909
  body: await parseBody(output.body, context),
909
910
  };
910
911
  let response;
911
- let errorCode = "UnknownError";
912
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
912
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
913
913
  switch (errorCode) {
914
914
  case "InternalServerException":
915
915
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -919,10 +919,12 @@ const deserializeAws_restJson1ListJobRunsCommandError = async (output, context)
919
919
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
920
920
  default:
921
921
  const parsedBody = parsedOutput.body;
922
+ const $metadata = deserializeMetadata(output);
923
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
922
924
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
923
- name: parsedBody.code || parsedBody.Code || errorCode,
925
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
924
926
  $fault: "client",
925
- $metadata: deserializeMetadata(output),
927
+ $metadata,
926
928
  });
927
929
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
928
930
  }
@@ -952,8 +954,7 @@ const deserializeAws_restJson1ListManagedEndpointsCommandError = async (output,
952
954
  body: await parseBody(output.body, context),
953
955
  };
954
956
  let response;
955
- let errorCode = "UnknownError";
956
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
957
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
957
958
  switch (errorCode) {
958
959
  case "InternalServerException":
959
960
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -963,10 +964,12 @@ const deserializeAws_restJson1ListManagedEndpointsCommandError = async (output,
963
964
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
964
965
  default:
965
966
  const parsedBody = parsedOutput.body;
967
+ const $metadata = deserializeMetadata(output);
968
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
966
969
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
967
- name: parsedBody.code || parsedBody.Code || errorCode,
970
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
968
971
  $fault: "client",
969
- $metadata: deserializeMetadata(output),
972
+ $metadata,
970
973
  });
971
974
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
972
975
  }
@@ -992,8 +995,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
992
995
  body: await parseBody(output.body, context),
993
996
  };
994
997
  let response;
995
- let errorCode = "UnknownError";
996
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
998
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
997
999
  switch (errorCode) {
998
1000
  case "InternalServerException":
999
1001
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -1006,10 +1008,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1006
1008
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1007
1009
  default:
1008
1010
  const parsedBody = parsedOutput.body;
1011
+ const $metadata = deserializeMetadata(output);
1012
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1009
1013
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
1010
- name: parsedBody.code || parsedBody.Code || errorCode,
1014
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1011
1015
  $fault: "client",
1012
- $metadata: deserializeMetadata(output),
1016
+ $metadata,
1013
1017
  });
1014
1018
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1015
1019
  }
@@ -1039,8 +1043,7 @@ const deserializeAws_restJson1ListVirtualClustersCommandError = async (output, c
1039
1043
  body: await parseBody(output.body, context),
1040
1044
  };
1041
1045
  let response;
1042
- let errorCode = "UnknownError";
1043
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1046
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
1047
  switch (errorCode) {
1045
1048
  case "InternalServerException":
1046
1049
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -1050,10 +1053,12 @@ const deserializeAws_restJson1ListVirtualClustersCommandError = async (output, c
1050
1053
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1051
1054
  default:
1052
1055
  const parsedBody = parsedOutput.body;
1056
+ const $metadata = deserializeMetadata(output);
1057
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1053
1058
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
1054
- name: parsedBody.code || parsedBody.Code || errorCode,
1059
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1055
1060
  $fault: "client",
1056
- $metadata: deserializeMetadata(output),
1061
+ $metadata,
1057
1062
  });
1058
1063
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1059
1064
  }
@@ -1091,8 +1096,7 @@ const deserializeAws_restJson1StartJobRunCommandError = async (output, context)
1091
1096
  body: await parseBody(output.body, context),
1092
1097
  };
1093
1098
  let response;
1094
- let errorCode = "UnknownError";
1095
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1099
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1096
1100
  switch (errorCode) {
1097
1101
  case "InternalServerException":
1098
1102
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -1105,10 +1109,12 @@ const deserializeAws_restJson1StartJobRunCommandError = async (output, context)
1105
1109
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1106
1110
  default:
1107
1111
  const parsedBody = parsedOutput.body;
1112
+ const $metadata = deserializeMetadata(output);
1113
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1108
1114
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
1109
- name: parsedBody.code || parsedBody.Code || errorCode,
1115
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1110
1116
  $fault: "client",
1111
- $metadata: deserializeMetadata(output),
1117
+ $metadata,
1112
1118
  });
1113
1119
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1114
1120
  }
@@ -1130,8 +1136,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1130
1136
  body: await parseBody(output.body, context),
1131
1137
  };
1132
1138
  let response;
1133
- let errorCode = "UnknownError";
1134
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1139
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1135
1140
  switch (errorCode) {
1136
1141
  case "InternalServerException":
1137
1142
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -1144,10 +1149,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1144
1149
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1145
1150
  default:
1146
1151
  const parsedBody = parsedOutput.body;
1152
+ const $metadata = deserializeMetadata(output);
1153
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1147
1154
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
1148
- name: parsedBody.code || parsedBody.Code || errorCode,
1155
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1149
1156
  $fault: "client",
1150
- $metadata: deserializeMetadata(output),
1157
+ $metadata,
1151
1158
  });
1152
1159
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1153
1160
  }
@@ -1169,8 +1176,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1169
1176
  body: await parseBody(output.body, context),
1170
1177
  };
1171
1178
  let response;
1172
- let errorCode = "UnknownError";
1173
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1179
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1174
1180
  switch (errorCode) {
1175
1181
  case "InternalServerException":
1176
1182
  case "com.amazonaws.emrcontainers#InternalServerException":
@@ -1183,10 +1189,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1183
1189
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1184
1190
  default:
1185
1191
  const parsedBody = parsedOutput.body;
1192
+ const $metadata = deserializeMetadata(output);
1193
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1186
1194
  response = new EMRContainersServiceException_1.EMRContainersServiceException({
1187
- name: parsedBody.code || parsedBody.Code || errorCode,
1195
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1188
1196
  $fault: "client",
1189
- $metadata: deserializeMetadata(output),
1197
+ $metadata,
1190
1198
  });
1191
1199
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1192
1200
  }
@@ -1229,21 +1237,17 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
1229
1237
  };
1230
1238
  const serializeAws_restJson1CloudWatchMonitoringConfiguration = (input, context) => {
1231
1239
  return {
1232
- ...(input.logGroupName !== undefined && input.logGroupName !== null && { logGroupName: input.logGroupName }),
1233
- ...(input.logStreamNamePrefix !== undefined &&
1234
- input.logStreamNamePrefix !== null && { logStreamNamePrefix: input.logStreamNamePrefix }),
1240
+ ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
1241
+ ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
1235
1242
  };
1236
1243
  };
1237
1244
  const serializeAws_restJson1Configuration = (input, context) => {
1238
1245
  return {
1239
- ...(input.classification !== undefined &&
1240
- input.classification !== null && { classification: input.classification }),
1241
- ...(input.configurations !== undefined &&
1242
- input.configurations !== null && {
1246
+ ...(input.classification != null && { classification: input.classification }),
1247
+ ...(input.configurations != null && {
1243
1248
  configurations: serializeAws_restJson1ConfigurationList(input.configurations, context),
1244
1249
  }),
1245
- ...(input.properties !== undefined &&
1246
- input.properties !== null && {
1250
+ ...(input.properties != null && {
1247
1251
  properties: serializeAws_restJson1SensitivePropertiesMap(input.properties, context),
1248
1252
  }),
1249
1253
  };
@@ -1260,12 +1264,10 @@ const serializeAws_restJson1ConfigurationList = (input, context) => {
1260
1264
  };
1261
1265
  const serializeAws_restJson1ConfigurationOverrides = (input, context) => {
1262
1266
  return {
1263
- ...(input.applicationConfiguration !== undefined &&
1264
- input.applicationConfiguration !== null && {
1267
+ ...(input.applicationConfiguration != null && {
1265
1268
  applicationConfiguration: serializeAws_restJson1ConfigurationList(input.applicationConfiguration, context),
1266
1269
  }),
1267
- ...(input.monitoringConfiguration !== undefined &&
1268
- input.monitoringConfiguration !== null && {
1270
+ ...(input.monitoringConfiguration != null && {
1269
1271
  monitoringConfiguration: serializeAws_restJson1MonitoringConfiguration(input.monitoringConfiguration, context),
1270
1272
  }),
1271
1273
  };
@@ -1278,15 +1280,14 @@ const serializeAws_restJson1ContainerInfo = (input, context) => {
1278
1280
  };
1279
1281
  const serializeAws_restJson1ContainerProvider = (input, context) => {
1280
1282
  return {
1281
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
1282
- ...(input.info !== undefined &&
1283
- input.info !== null && { info: serializeAws_restJson1ContainerInfo(input.info, context) }),
1284
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
1283
+ ...(input.id != null && { id: input.id }),
1284
+ ...(input.info != null && { info: serializeAws_restJson1ContainerInfo(input.info, context) }),
1285
+ ...(input.type != null && { type: input.type }),
1285
1286
  };
1286
1287
  };
1287
1288
  const serializeAws_restJson1EksInfo = (input, context) => {
1288
1289
  return {
1289
- ...(input.namespace !== undefined && input.namespace !== null && { namespace: input.namespace }),
1290
+ ...(input.namespace != null && { namespace: input.namespace }),
1290
1291
  };
1291
1292
  };
1292
1293
  const serializeAws_restJson1EntryPointArguments = (input, context) => {
@@ -1301,29 +1302,25 @@ const serializeAws_restJson1EntryPointArguments = (input, context) => {
1301
1302
  };
1302
1303
  const serializeAws_restJson1JobDriver = (input, context) => {
1303
1304
  return {
1304
- ...(input.sparkSubmitJobDriver !== undefined &&
1305
- input.sparkSubmitJobDriver !== null && {
1305
+ ...(input.sparkSubmitJobDriver != null && {
1306
1306
  sparkSubmitJobDriver: serializeAws_restJson1SparkSubmitJobDriver(input.sparkSubmitJobDriver, context),
1307
1307
  }),
1308
1308
  };
1309
1309
  };
1310
1310
  const serializeAws_restJson1MonitoringConfiguration = (input, context) => {
1311
1311
  return {
1312
- ...(input.cloudWatchMonitoringConfiguration !== undefined &&
1313
- input.cloudWatchMonitoringConfiguration !== null && {
1312
+ ...(input.cloudWatchMonitoringConfiguration != null && {
1314
1313
  cloudWatchMonitoringConfiguration: serializeAws_restJson1CloudWatchMonitoringConfiguration(input.cloudWatchMonitoringConfiguration, context),
1315
1314
  }),
1316
- ...(input.persistentAppUI !== undefined &&
1317
- input.persistentAppUI !== null && { persistentAppUI: input.persistentAppUI }),
1318
- ...(input.s3MonitoringConfiguration !== undefined &&
1319
- input.s3MonitoringConfiguration !== null && {
1315
+ ...(input.persistentAppUI != null && { persistentAppUI: input.persistentAppUI }),
1316
+ ...(input.s3MonitoringConfiguration != null && {
1320
1317
  s3MonitoringConfiguration: serializeAws_restJson1S3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
1321
1318
  }),
1322
1319
  };
1323
1320
  };
1324
1321
  const serializeAws_restJson1S3MonitoringConfiguration = (input, context) => {
1325
1322
  return {
1326
- ...(input.logUri !== undefined && input.logUri !== null && { logUri: input.logUri }),
1323
+ ...(input.logUri != null && { logUri: input.logUri }),
1327
1324
  };
1328
1325
  };
1329
1326
  const serializeAws_restJson1SensitivePropertiesMap = (input, context) => {
@@ -1339,13 +1336,11 @@ const serializeAws_restJson1SensitivePropertiesMap = (input, context) => {
1339
1336
  };
1340
1337
  const serializeAws_restJson1SparkSubmitJobDriver = (input, context) => {
1341
1338
  return {
1342
- ...(input.entryPoint !== undefined && input.entryPoint !== null && { entryPoint: input.entryPoint }),
1343
- ...(input.entryPointArguments !== undefined &&
1344
- input.entryPointArguments !== null && {
1339
+ ...(input.entryPoint != null && { entryPoint: input.entryPoint }),
1340
+ ...(input.entryPointArguments != null && {
1345
1341
  entryPointArguments: serializeAws_restJson1EntryPointArguments(input.entryPointArguments, context),
1346
1342
  }),
1347
- ...(input.sparkSubmitParameters !== undefined &&
1348
- input.sparkSubmitParameters !== null && { sparkSubmitParameters: input.sparkSubmitParameters }),
1343
+ ...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }),
1349
1344
  };
1350
1345
  };
1351
1346
  const serializeAws_restJson1TagMap = (input, context) => {
@@ -1374,10 +1369,10 @@ const deserializeAws_restJson1CloudWatchMonitoringConfiguration = (output, conte
1374
1369
  const deserializeAws_restJson1Configuration = (output, context) => {
1375
1370
  return {
1376
1371
  classification: (0, smithy_client_1.expectString)(output.classification),
1377
- configurations: output.configurations !== undefined && output.configurations !== null
1372
+ configurations: output.configurations != null
1378
1373
  ? deserializeAws_restJson1ConfigurationList(output.configurations, context)
1379
1374
  : undefined,
1380
- properties: output.properties !== undefined && output.properties !== null
1375
+ properties: output.properties != null
1381
1376
  ? deserializeAws_restJson1SensitivePropertiesMap(output.properties, context)
1382
1377
  : undefined,
1383
1378
  };
@@ -1395,10 +1390,10 @@ const deserializeAws_restJson1ConfigurationList = (output, context) => {
1395
1390
  };
1396
1391
  const deserializeAws_restJson1ConfigurationOverrides = (output, context) => {
1397
1392
  return {
1398
- applicationConfiguration: output.applicationConfiguration !== undefined && output.applicationConfiguration !== null
1393
+ applicationConfiguration: output.applicationConfiguration != null
1399
1394
  ? deserializeAws_restJson1ConfigurationList(output.applicationConfiguration, context)
1400
1395
  : undefined,
1401
- monitoringConfiguration: output.monitoringConfiguration !== undefined && output.monitoringConfiguration !== null
1396
+ monitoringConfiguration: output.monitoringConfiguration != null
1402
1397
  ? deserializeAws_restJson1MonitoringConfiguration(output.monitoringConfiguration, context)
1403
1398
  : undefined,
1404
1399
  };
@@ -1414,9 +1409,7 @@ const deserializeAws_restJson1ContainerInfo = (output, context) => {
1414
1409
  const deserializeAws_restJson1ContainerProvider = (output, context) => {
1415
1410
  return {
1416
1411
  id: (0, smithy_client_1.expectString)(output.id),
1417
- info: output.info !== undefined && output.info !== null
1418
- ? deserializeAws_restJson1ContainerInfo((0, smithy_client_1.expectUnion)(output.info), context)
1419
- : undefined,
1412
+ info: output.info != null ? deserializeAws_restJson1ContainerInfo((0, smithy_client_1.expectUnion)(output.info), context) : undefined,
1420
1413
  type: (0, smithy_client_1.expectString)(output.type),
1421
1414
  };
1422
1415
  };
@@ -1429,15 +1422,13 @@ const deserializeAws_restJson1Endpoint = (output, context) => {
1429
1422
  return {
1430
1423
  arn: (0, smithy_client_1.expectString)(output.arn),
1431
1424
  certificateArn: (0, smithy_client_1.expectString)(output.certificateArn),
1432
- certificateAuthority: output.certificateAuthority !== undefined && output.certificateAuthority !== null
1425
+ certificateAuthority: output.certificateAuthority != null
1433
1426
  ? deserializeAws_restJson1Certificate(output.certificateAuthority, context)
1434
1427
  : undefined,
1435
- configurationOverrides: output.configurationOverrides !== undefined && output.configurationOverrides !== null
1428
+ configurationOverrides: output.configurationOverrides != null
1436
1429
  ? deserializeAws_restJson1ConfigurationOverrides(output.configurationOverrides, context)
1437
1430
  : undefined,
1438
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1439
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1440
- : undefined,
1431
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
1441
1432
  executionRoleArn: (0, smithy_client_1.expectString)(output.executionRoleArn),
1442
1433
  failureReason: (0, smithy_client_1.expectString)(output.failureReason),
1443
1434
  id: (0, smithy_client_1.expectString)(output.id),
@@ -1447,12 +1438,8 @@ const deserializeAws_restJson1Endpoint = (output, context) => {
1447
1438
  serverUrl: (0, smithy_client_1.expectString)(output.serverUrl),
1448
1439
  state: (0, smithy_client_1.expectString)(output.state),
1449
1440
  stateDetails: (0, smithy_client_1.expectString)(output.stateDetails),
1450
- subnetIds: output.subnetIds !== undefined && output.subnetIds !== null
1451
- ? deserializeAws_restJson1SubnetIds(output.subnetIds, context)
1452
- : undefined,
1453
- tags: output.tags !== undefined && output.tags !== null
1454
- ? deserializeAws_restJson1TagMap(output.tags, context)
1455
- : undefined,
1441
+ subnetIds: output.subnetIds != null ? deserializeAws_restJson1SubnetIds(output.subnetIds, context) : undefined,
1442
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1456
1443
  type: (0, smithy_client_1.expectString)(output.type),
1457
1444
  virtualClusterId: (0, smithy_client_1.expectString)(output.virtualClusterId),
1458
1445
  };
@@ -1481,7 +1468,7 @@ const deserializeAws_restJson1EntryPointArguments = (output, context) => {
1481
1468
  };
1482
1469
  const deserializeAws_restJson1JobDriver = (output, context) => {
1483
1470
  return {
1484
- sparkSubmitJobDriver: output.sparkSubmitJobDriver !== undefined && output.sparkSubmitJobDriver !== null
1471
+ sparkSubmitJobDriver: output.sparkSubmitJobDriver != null
1485
1472
  ? deserializeAws_restJson1SparkSubmitJobDriver(output.sparkSubmitJobDriver, context)
1486
1473
  : undefined,
1487
1474
  };
@@ -1490,29 +1477,21 @@ const deserializeAws_restJson1JobRun = (output, context) => {
1490
1477
  return {
1491
1478
  arn: (0, smithy_client_1.expectString)(output.arn),
1492
1479
  clientToken: (0, smithy_client_1.expectString)(output.clientToken),
1493
- configurationOverrides: output.configurationOverrides !== undefined && output.configurationOverrides !== null
1480
+ configurationOverrides: output.configurationOverrides != null
1494
1481
  ? deserializeAws_restJson1ConfigurationOverrides(output.configurationOverrides, context)
1495
1482
  : undefined,
1496
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1497
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1498
- : undefined,
1483
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
1499
1484
  createdBy: (0, smithy_client_1.expectString)(output.createdBy),
1500
1485
  executionRoleArn: (0, smithy_client_1.expectString)(output.executionRoleArn),
1501
1486
  failureReason: (0, smithy_client_1.expectString)(output.failureReason),
1502
- finishedAt: output.finishedAt !== undefined && output.finishedAt !== null
1503
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.finishedAt)))
1504
- : undefined,
1487
+ finishedAt: output.finishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.finishedAt)) : undefined,
1505
1488
  id: (0, smithy_client_1.expectString)(output.id),
1506
- jobDriver: output.jobDriver !== undefined && output.jobDriver !== null
1507
- ? deserializeAws_restJson1JobDriver(output.jobDriver, context)
1508
- : undefined,
1489
+ jobDriver: output.jobDriver != null ? deserializeAws_restJson1JobDriver(output.jobDriver, context) : undefined,
1509
1490
  name: (0, smithy_client_1.expectString)(output.name),
1510
1491
  releaseLabel: (0, smithy_client_1.expectString)(output.releaseLabel),
1511
1492
  state: (0, smithy_client_1.expectString)(output.state),
1512
1493
  stateDetails: (0, smithy_client_1.expectString)(output.stateDetails),
1513
- tags: output.tags !== undefined && output.tags !== null
1514
- ? deserializeAws_restJson1TagMap(output.tags, context)
1515
- : undefined,
1494
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1516
1495
  virtualClusterId: (0, smithy_client_1.expectString)(output.virtualClusterId),
1517
1496
  };
1518
1497
  };
@@ -1529,11 +1508,11 @@ const deserializeAws_restJson1JobRuns = (output, context) => {
1529
1508
  };
1530
1509
  const deserializeAws_restJson1MonitoringConfiguration = (output, context) => {
1531
1510
  return {
1532
- cloudWatchMonitoringConfiguration: output.cloudWatchMonitoringConfiguration !== undefined && output.cloudWatchMonitoringConfiguration !== null
1511
+ cloudWatchMonitoringConfiguration: output.cloudWatchMonitoringConfiguration != null
1533
1512
  ? deserializeAws_restJson1CloudWatchMonitoringConfiguration(output.cloudWatchMonitoringConfiguration, context)
1534
1513
  : undefined,
1535
1514
  persistentAppUI: (0, smithy_client_1.expectString)(output.persistentAppUI),
1536
- s3MonitoringConfiguration: output.s3MonitoringConfiguration !== undefined && output.s3MonitoringConfiguration !== null
1515
+ s3MonitoringConfiguration: output.s3MonitoringConfiguration != null
1537
1516
  ? deserializeAws_restJson1S3MonitoringConfiguration(output.s3MonitoringConfiguration, context)
1538
1517
  : undefined,
1539
1518
  };
@@ -1557,7 +1536,7 @@ const deserializeAws_restJson1SensitivePropertiesMap = (output, context) => {
1557
1536
  const deserializeAws_restJson1SparkSubmitJobDriver = (output, context) => {
1558
1537
  return {
1559
1538
  entryPoint: (0, smithy_client_1.expectString)(output.entryPoint),
1560
- entryPointArguments: output.entryPointArguments !== undefined && output.entryPointArguments !== null
1539
+ entryPointArguments: output.entryPointArguments != null
1561
1540
  ? deserializeAws_restJson1EntryPointArguments(output.entryPointArguments, context)
1562
1541
  : undefined,
1563
1542
  sparkSubmitParameters: (0, smithy_client_1.expectString)(output.sparkSubmitParameters),
@@ -1588,18 +1567,14 @@ const deserializeAws_restJson1TagMap = (output, context) => {
1588
1567
  const deserializeAws_restJson1VirtualCluster = (output, context) => {
1589
1568
  return {
1590
1569
  arn: (0, smithy_client_1.expectString)(output.arn),
1591
- containerProvider: output.containerProvider !== undefined && output.containerProvider !== null
1570
+ containerProvider: output.containerProvider != null
1592
1571
  ? deserializeAws_restJson1ContainerProvider(output.containerProvider, context)
1593
1572
  : undefined,
1594
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1595
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1596
- : undefined,
1573
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
1597
1574
  id: (0, smithy_client_1.expectString)(output.id),
1598
1575
  name: (0, smithy_client_1.expectString)(output.name),
1599
1576
  state: (0, smithy_client_1.expectString)(output.state),
1600
- tags: output.tags !== undefined && output.tags !== null
1601
- ? deserializeAws_restJson1TagMap(output.tags, context)
1602
- : undefined,
1577
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1603
1578
  };
1604
1579
  };
1605
1580
  const deserializeAws_restJson1VirtualClusters = (output, context) => {
@@ -1662,5 +1637,4 @@ const loadRestJsonErrorCode = (output, data) => {
1662
1637
  if (data["__type"] !== undefined) {
1663
1638
  return sanitizeErrorCode(data["__type"]);
1664
1639
  }
1665
- return "";
1666
1640
  };