@aws-sdk/client-mediapackage-vod 3.118.1 → 3.128.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.
@@ -23,8 +23,7 @@ const serializeAws_restJson1ConfigureLogsCommand = async (input, context) => {
23
23
  }
24
24
  let body;
25
25
  body = JSON.stringify({
26
- ...(input.EgressAccessLogs !== undefined &&
27
- input.EgressAccessLogs !== null && {
26
+ ...(input.EgressAccessLogs != null && {
28
27
  egressAccessLogs: serializeAws_restJson1EgressAccessLogs(input.EgressAccessLogs, context),
29
28
  }),
30
29
  });
@@ -47,13 +46,12 @@ const serializeAws_restJson1CreateAssetCommand = async (input, context) => {
47
46
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assets";
48
47
  let body;
49
48
  body = JSON.stringify({
50
- ...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
51
- ...(input.PackagingGroupId !== undefined &&
52
- input.PackagingGroupId !== null && { packagingGroupId: input.PackagingGroupId }),
53
- ...(input.ResourceId !== undefined && input.ResourceId !== null && { resourceId: input.ResourceId }),
54
- ...(input.SourceArn !== undefined && input.SourceArn !== null && { sourceArn: input.SourceArn }),
55
- ...(input.SourceRoleArn !== undefined && input.SourceRoleArn !== null && { sourceRoleArn: input.SourceRoleArn }),
56
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
49
+ ...(input.Id != null && { id: input.Id }),
50
+ ...(input.PackagingGroupId != null && { packagingGroupId: input.PackagingGroupId }),
51
+ ...(input.ResourceId != null && { resourceId: input.ResourceId }),
52
+ ...(input.SourceArn != null && { sourceArn: input.SourceArn }),
53
+ ...(input.SourceRoleArn != null && { sourceRoleArn: input.SourceRoleArn }),
54
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
57
55
  });
58
56
  return new protocol_http_1.HttpRequest({
59
57
  protocol,
@@ -74,18 +72,13 @@ const serializeAws_restJson1CreatePackagingConfigurationCommand = async (input,
74
72
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations";
75
73
  let body;
76
74
  body = JSON.stringify({
77
- ...(input.CmafPackage !== undefined &&
78
- input.CmafPackage !== null && { cmafPackage: serializeAws_restJson1CmafPackage(input.CmafPackage, context) }),
79
- ...(input.DashPackage !== undefined &&
80
- input.DashPackage !== null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) }),
81
- ...(input.HlsPackage !== undefined &&
82
- input.HlsPackage !== null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) }),
83
- ...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
84
- ...(input.MssPackage !== undefined &&
85
- input.MssPackage !== null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) }),
86
- ...(input.PackagingGroupId !== undefined &&
87
- input.PackagingGroupId !== null && { packagingGroupId: input.PackagingGroupId }),
88
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
75
+ ...(input.CmafPackage != null && { cmafPackage: serializeAws_restJson1CmafPackage(input.CmafPackage, context) }),
76
+ ...(input.DashPackage != null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) }),
77
+ ...(input.HlsPackage != null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) }),
78
+ ...(input.Id != null && { id: input.Id }),
79
+ ...(input.MssPackage != null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) }),
80
+ ...(input.PackagingGroupId != null && { packagingGroupId: input.PackagingGroupId }),
81
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
89
82
  });
90
83
  return new protocol_http_1.HttpRequest({
91
84
  protocol,
@@ -106,16 +99,14 @@ const serializeAws_restJson1CreatePackagingGroupCommand = async (input, context)
106
99
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups";
107
100
  let body;
108
101
  body = JSON.stringify({
109
- ...(input.Authorization !== undefined &&
110
- input.Authorization !== null && {
102
+ ...(input.Authorization != null && {
111
103
  authorization: serializeAws_restJson1Authorization(input.Authorization, context),
112
104
  }),
113
- ...(input.EgressAccessLogs !== undefined &&
114
- input.EgressAccessLogs !== null && {
105
+ ...(input.EgressAccessLogs != null && {
115
106
  egressAccessLogs: serializeAws_restJson1EgressAccessLogs(input.EgressAccessLogs, context),
116
107
  }),
117
- ...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
118
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
108
+ ...(input.Id != null && { id: input.Id }),
109
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
119
110
  });
120
111
  return new protocol_http_1.HttpRequest({
121
112
  protocol,
@@ -393,8 +384,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
393
384
  }
394
385
  let body;
395
386
  body = JSON.stringify({
396
- ...(input.Tags !== undefined &&
397
- input.Tags !== null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
387
+ ...(input.Tags != null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
398
388
  });
399
389
  return new protocol_http_1.HttpRequest({
400
390
  protocol,
@@ -455,8 +445,7 @@ const serializeAws_restJson1UpdatePackagingGroupCommand = async (input, context)
455
445
  }
456
446
  let body;
457
447
  body = JSON.stringify({
458
- ...(input.Authorization !== undefined &&
459
- input.Authorization !== null && {
448
+ ...(input.Authorization != null && {
460
449
  authorization: serializeAws_restJson1Authorization(input.Authorization, context),
461
450
  }),
462
451
  });
@@ -512,8 +501,7 @@ const deserializeAws_restJson1ConfigureLogsCommandError = async (output, context
512
501
  body: await parseBody(output.body, context),
513
502
  };
514
503
  let response;
515
- let errorCode = "UnknownError";
516
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
517
505
  switch (errorCode) {
518
506
  case "ForbiddenException":
519
507
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -535,10 +523,12 @@ const deserializeAws_restJson1ConfigureLogsCommandError = async (output, context
535
523
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
536
524
  default:
537
525
  const parsedBody = parsedOutput.body;
526
+ const $metadata = deserializeMetadata(output);
527
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
538
528
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
539
- name: parsedBody.code || parsedBody.Code || errorCode,
529
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
540
530
  $fault: "client",
541
- $metadata: deserializeMetadata(output),
531
+ $metadata,
542
532
  });
543
533
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
544
534
  }
@@ -596,8 +586,7 @@ const deserializeAws_restJson1CreateAssetCommandError = async (output, context)
596
586
  body: await parseBody(output.body, context),
597
587
  };
598
588
  let response;
599
- let errorCode = "UnknownError";
600
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
589
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
601
590
  switch (errorCode) {
602
591
  case "ForbiddenException":
603
592
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -619,10 +608,12 @@ const deserializeAws_restJson1CreateAssetCommandError = async (output, context)
619
608
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
620
609
  default:
621
610
  const parsedBody = parsedOutput.body;
611
+ const $metadata = deserializeMetadata(output);
612
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
622
613
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
623
- name: parsedBody.code || parsedBody.Code || errorCode,
614
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
624
615
  $fault: "client",
625
- $metadata: deserializeMetadata(output),
616
+ $metadata,
626
617
  });
627
618
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
628
619
  }
@@ -676,8 +667,7 @@ const deserializeAws_restJson1CreatePackagingConfigurationCommandError = async (
676
667
  body: await parseBody(output.body, context),
677
668
  };
678
669
  let response;
679
- let errorCode = "UnknownError";
680
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
670
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
681
671
  switch (errorCode) {
682
672
  case "ForbiddenException":
683
673
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -699,10 +689,12 @@ const deserializeAws_restJson1CreatePackagingConfigurationCommandError = async (
699
689
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
700
690
  default:
701
691
  const parsedBody = parsedOutput.body;
692
+ const $metadata = deserializeMetadata(output);
693
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
702
694
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
703
- name: parsedBody.code || parsedBody.Code || errorCode,
695
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
704
696
  $fault: "client",
705
- $metadata: deserializeMetadata(output),
697
+ $metadata,
706
698
  });
707
699
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
708
700
  }
@@ -748,8 +740,7 @@ const deserializeAws_restJson1CreatePackagingGroupCommandError = async (output,
748
740
  body: await parseBody(output.body, context),
749
741
  };
750
742
  let response;
751
- let errorCode = "UnknownError";
752
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
743
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
753
744
  switch (errorCode) {
754
745
  case "ForbiddenException":
755
746
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -771,10 +762,12 @@ const deserializeAws_restJson1CreatePackagingGroupCommandError = async (output,
771
762
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
772
763
  default:
773
764
  const parsedBody = parsedOutput.body;
765
+ const $metadata = deserializeMetadata(output);
766
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
774
767
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
775
- name: parsedBody.code || parsedBody.Code || errorCode,
768
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
776
769
  $fault: "client",
777
- $metadata: deserializeMetadata(output),
770
+ $metadata,
778
771
  });
779
772
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
780
773
  }
@@ -796,8 +789,7 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
796
789
  body: await parseBody(output.body, context),
797
790
  };
798
791
  let response;
799
- let errorCode = "UnknownError";
800
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
793
  switch (errorCode) {
802
794
  case "ForbiddenException":
803
795
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -819,10 +811,12 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
819
811
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
820
812
  default:
821
813
  const parsedBody = parsedOutput.body;
814
+ const $metadata = deserializeMetadata(output);
815
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
822
816
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
823
- name: parsedBody.code || parsedBody.Code || errorCode,
817
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
824
818
  $fault: "client",
825
- $metadata: deserializeMetadata(output),
819
+ $metadata,
826
820
  });
827
821
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
828
822
  }
@@ -844,8 +838,7 @@ const deserializeAws_restJson1DeletePackagingConfigurationCommandError = async (
844
838
  body: await parseBody(output.body, context),
845
839
  };
846
840
  let response;
847
- let errorCode = "UnknownError";
848
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
841
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
849
842
  switch (errorCode) {
850
843
  case "ForbiddenException":
851
844
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -867,10 +860,12 @@ const deserializeAws_restJson1DeletePackagingConfigurationCommandError = async (
867
860
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
868
861
  default:
869
862
  const parsedBody = parsedOutput.body;
863
+ const $metadata = deserializeMetadata(output);
864
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
870
865
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
871
- name: parsedBody.code || parsedBody.Code || errorCode,
866
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
872
867
  $fault: "client",
873
- $metadata: deserializeMetadata(output),
868
+ $metadata,
874
869
  });
875
870
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
876
871
  }
@@ -892,8 +887,7 @@ const deserializeAws_restJson1DeletePackagingGroupCommandError = async (output,
892
887
  body: await parseBody(output.body, context),
893
888
  };
894
889
  let response;
895
- let errorCode = "UnknownError";
896
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
890
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
891
  switch (errorCode) {
898
892
  case "ForbiddenException":
899
893
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -915,10 +909,12 @@ const deserializeAws_restJson1DeletePackagingGroupCommandError = async (output,
915
909
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
916
910
  default:
917
911
  const parsedBody = parsedOutput.body;
912
+ const $metadata = deserializeMetadata(output);
913
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
918
914
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
919
- name: parsedBody.code || parsedBody.Code || errorCode,
915
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
920
916
  $fault: "client",
921
- $metadata: deserializeMetadata(output),
917
+ $metadata,
922
918
  });
923
919
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
924
920
  }
@@ -976,8 +972,7 @@ const deserializeAws_restJson1DescribeAssetCommandError = async (output, context
976
972
  body: await parseBody(output.body, context),
977
973
  };
978
974
  let response;
979
- let errorCode = "UnknownError";
980
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
975
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
981
976
  switch (errorCode) {
982
977
  case "ForbiddenException":
983
978
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -999,10 +994,12 @@ const deserializeAws_restJson1DescribeAssetCommandError = async (output, context
999
994
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1000
995
  default:
1001
996
  const parsedBody = parsedOutput.body;
997
+ const $metadata = deserializeMetadata(output);
998
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1002
999
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1003
- name: parsedBody.code || parsedBody.Code || errorCode,
1000
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1004
1001
  $fault: "client",
1005
- $metadata: deserializeMetadata(output),
1002
+ $metadata,
1006
1003
  });
1007
1004
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1008
1005
  }
@@ -1056,8 +1053,7 @@ const deserializeAws_restJson1DescribePackagingConfigurationCommandError = async
1056
1053
  body: await parseBody(output.body, context),
1057
1054
  };
1058
1055
  let response;
1059
- let errorCode = "UnknownError";
1060
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1056
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
1057
  switch (errorCode) {
1062
1058
  case "ForbiddenException":
1063
1059
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -1079,10 +1075,12 @@ const deserializeAws_restJson1DescribePackagingConfigurationCommandError = async
1079
1075
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1080
1076
  default:
1081
1077
  const parsedBody = parsedOutput.body;
1078
+ const $metadata = deserializeMetadata(output);
1079
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1082
1080
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1083
- name: parsedBody.code || parsedBody.Code || errorCode,
1081
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1084
1082
  $fault: "client",
1085
- $metadata: deserializeMetadata(output),
1083
+ $metadata,
1086
1084
  });
1087
1085
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1088
1086
  }
@@ -1128,8 +1126,7 @@ const deserializeAws_restJson1DescribePackagingGroupCommandError = async (output
1128
1126
  body: await parseBody(output.body, context),
1129
1127
  };
1130
1128
  let response;
1131
- let errorCode = "UnknownError";
1132
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1129
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1133
1130
  switch (errorCode) {
1134
1131
  case "ForbiddenException":
1135
1132
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -1151,10 +1148,12 @@ const deserializeAws_restJson1DescribePackagingGroupCommandError = async (output
1151
1148
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1152
1149
  default:
1153
1150
  const parsedBody = parsedOutput.body;
1151
+ const $metadata = deserializeMetadata(output);
1152
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1154
1153
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1155
- name: parsedBody.code || parsedBody.Code || errorCode,
1154
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1156
1155
  $fault: "client",
1157
- $metadata: deserializeMetadata(output),
1156
+ $metadata,
1158
1157
  });
1159
1158
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1160
1159
  }
@@ -1184,8 +1183,7 @@ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) =
1184
1183
  body: await parseBody(output.body, context),
1185
1184
  };
1186
1185
  let response;
1187
- let errorCode = "UnknownError";
1188
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1186
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
1187
  switch (errorCode) {
1190
1188
  case "ForbiddenException":
1191
1189
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -1207,10 +1205,12 @@ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) =
1207
1205
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1208
1206
  default:
1209
1207
  const parsedBody = parsedOutput.body;
1208
+ const $metadata = deserializeMetadata(output);
1209
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1210
1210
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1211
- name: parsedBody.code || parsedBody.Code || errorCode,
1211
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1212
1212
  $fault: "client",
1213
- $metadata: deserializeMetadata(output),
1213
+ $metadata,
1214
1214
  });
1215
1215
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1216
1216
  }
@@ -1240,8 +1240,7 @@ const deserializeAws_restJson1ListPackagingConfigurationsCommandError = async (o
1240
1240
  body: await parseBody(output.body, context),
1241
1241
  };
1242
1242
  let response;
1243
- let errorCode = "UnknownError";
1244
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1243
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1245
1244
  switch (errorCode) {
1246
1245
  case "ForbiddenException":
1247
1246
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -1263,10 +1262,12 @@ const deserializeAws_restJson1ListPackagingConfigurationsCommandError = async (o
1263
1262
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1264
1263
  default:
1265
1264
  const parsedBody = parsedOutput.body;
1265
+ const $metadata = deserializeMetadata(output);
1266
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1266
1267
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1267
- name: parsedBody.code || parsedBody.Code || errorCode,
1268
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1268
1269
  $fault: "client",
1269
- $metadata: deserializeMetadata(output),
1270
+ $metadata,
1270
1271
  });
1271
1272
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1272
1273
  }
@@ -1296,8 +1297,7 @@ const deserializeAws_restJson1ListPackagingGroupsCommandError = async (output, c
1296
1297
  body: await parseBody(output.body, context),
1297
1298
  };
1298
1299
  let response;
1299
- let errorCode = "UnknownError";
1300
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1300
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1301
1301
  switch (errorCode) {
1302
1302
  case "ForbiddenException":
1303
1303
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -1319,10 +1319,12 @@ const deserializeAws_restJson1ListPackagingGroupsCommandError = async (output, c
1319
1319
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1320
1320
  default:
1321
1321
  const parsedBody = parsedOutput.body;
1322
+ const $metadata = deserializeMetadata(output);
1323
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1322
1324
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1323
- name: parsedBody.code || parsedBody.Code || errorCode,
1325
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1324
1326
  $fault: "client",
1325
- $metadata: deserializeMetadata(output),
1327
+ $metadata,
1326
1328
  });
1327
1329
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1328
1330
  }
@@ -1348,15 +1350,16 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1348
1350
  body: await parseBody(output.body, context),
1349
1351
  };
1350
1352
  let response;
1351
- let errorCode = "UnknownError";
1352
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
1354
  switch (errorCode) {
1354
1355
  default:
1355
1356
  const parsedBody = parsedOutput.body;
1357
+ const $metadata = deserializeMetadata(output);
1358
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1356
1359
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1357
- name: parsedBody.code || parsedBody.Code || errorCode,
1360
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1358
1361
  $fault: "client",
1359
- $metadata: deserializeMetadata(output),
1362
+ $metadata,
1360
1363
  });
1361
1364
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1362
1365
  }
@@ -1378,15 +1381,16 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1378
1381
  body: await parseBody(output.body, context),
1379
1382
  };
1380
1383
  let response;
1381
- let errorCode = "UnknownError";
1382
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1384
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1383
1385
  switch (errorCode) {
1384
1386
  default:
1385
1387
  const parsedBody = parsedOutput.body;
1388
+ const $metadata = deserializeMetadata(output);
1389
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1386
1390
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1387
- name: parsedBody.code || parsedBody.Code || errorCode,
1391
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1388
1392
  $fault: "client",
1389
- $metadata: deserializeMetadata(output),
1393
+ $metadata,
1390
1394
  });
1391
1395
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1392
1396
  }
@@ -1408,15 +1412,16 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1408
1412
  body: await parseBody(output.body, context),
1409
1413
  };
1410
1414
  let response;
1411
- let errorCode = "UnknownError";
1412
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1415
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1413
1416
  switch (errorCode) {
1414
1417
  default:
1415
1418
  const parsedBody = parsedOutput.body;
1419
+ const $metadata = deserializeMetadata(output);
1420
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1416
1421
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1417
- name: parsedBody.code || parsedBody.Code || errorCode,
1422
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1418
1423
  $fault: "client",
1419
- $metadata: deserializeMetadata(output),
1424
+ $metadata,
1420
1425
  });
1421
1426
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1422
1427
  }
@@ -1462,8 +1467,7 @@ const deserializeAws_restJson1UpdatePackagingGroupCommandError = async (output,
1462
1467
  body: await parseBody(output.body, context),
1463
1468
  };
1464
1469
  let response;
1465
- let errorCode = "UnknownError";
1466
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1470
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1467
1471
  switch (errorCode) {
1468
1472
  case "ForbiddenException":
1469
1473
  case "com.amazonaws.mediapackagevod#ForbiddenException":
@@ -1485,10 +1489,12 @@ const deserializeAws_restJson1UpdatePackagingGroupCommandError = async (output,
1485
1489
  throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1486
1490
  default:
1487
1491
  const parsedBody = parsedOutput.body;
1492
+ const $metadata = deserializeMetadata(output);
1493
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1488
1494
  response = new MediaPackageVodServiceException_1.MediaPackageVodServiceException({
1489
- name: parsedBody.code || parsedBody.Code || errorCode,
1495
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1490
1496
  $fault: "client",
1491
- $metadata: deserializeMetadata(output),
1497
+ $metadata,
1492
1498
  });
1493
1499
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1494
1500
  }
@@ -1628,182 +1634,144 @@ const serializeAws_restJson1__mapOf__string = (input, context) => {
1628
1634
  };
1629
1635
  const serializeAws_restJson1Authorization = (input, context) => {
1630
1636
  return {
1631
- ...(input.CdnIdentifierSecret !== undefined &&
1632
- input.CdnIdentifierSecret !== null && { cdnIdentifierSecret: input.CdnIdentifierSecret }),
1633
- ...(input.SecretsRoleArn !== undefined &&
1634
- input.SecretsRoleArn !== null && { secretsRoleArn: input.SecretsRoleArn }),
1637
+ ...(input.CdnIdentifierSecret != null && { cdnIdentifierSecret: input.CdnIdentifierSecret }),
1638
+ ...(input.SecretsRoleArn != null && { secretsRoleArn: input.SecretsRoleArn }),
1635
1639
  };
1636
1640
  };
1637
1641
  const serializeAws_restJson1CmafEncryption = (input, context) => {
1638
1642
  return {
1639
- ...(input.ConstantInitializationVector !== undefined &&
1640
- input.ConstantInitializationVector !== null && {
1643
+ ...(input.ConstantInitializationVector != null && {
1641
1644
  constantInitializationVector: input.ConstantInitializationVector,
1642
1645
  }),
1643
- ...(input.SpekeKeyProvider !== undefined &&
1644
- input.SpekeKeyProvider !== null && {
1646
+ ...(input.SpekeKeyProvider != null && {
1645
1647
  spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1646
1648
  }),
1647
1649
  };
1648
1650
  };
1649
1651
  const serializeAws_restJson1CmafPackage = (input, context) => {
1650
1652
  return {
1651
- ...(input.Encryption !== undefined &&
1652
- input.Encryption !== null && { encryption: serializeAws_restJson1CmafEncryption(input.Encryption, context) }),
1653
- ...(input.HlsManifests !== undefined &&
1654
- input.HlsManifests !== null && {
1653
+ ...(input.Encryption != null && { encryption: serializeAws_restJson1CmafEncryption(input.Encryption, context) }),
1654
+ ...(input.HlsManifests != null && {
1655
1655
  hlsManifests: serializeAws_restJson1__listOfHlsManifest(input.HlsManifests, context),
1656
1656
  }),
1657
- ...(input.IncludeEncoderConfigurationInSegments !== undefined &&
1658
- input.IncludeEncoderConfigurationInSegments !== null && {
1657
+ ...(input.IncludeEncoderConfigurationInSegments != null && {
1659
1658
  includeEncoderConfigurationInSegments: input.IncludeEncoderConfigurationInSegments,
1660
1659
  }),
1661
- ...(input.SegmentDurationSeconds !== undefined &&
1662
- input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1660
+ ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1663
1661
  };
1664
1662
  };
1665
1663
  const serializeAws_restJson1DashEncryption = (input, context) => {
1666
1664
  return {
1667
- ...(input.SpekeKeyProvider !== undefined &&
1668
- input.SpekeKeyProvider !== null && {
1665
+ ...(input.SpekeKeyProvider != null && {
1669
1666
  spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1670
1667
  }),
1671
1668
  };
1672
1669
  };
1673
1670
  const serializeAws_restJson1DashManifest = (input, context) => {
1674
1671
  return {
1675
- ...(input.ManifestLayout !== undefined &&
1676
- input.ManifestLayout !== null && { manifestLayout: input.ManifestLayout }),
1677
- ...(input.ManifestName !== undefined && input.ManifestName !== null && { manifestName: input.ManifestName }),
1678
- ...(input.MinBufferTimeSeconds !== undefined &&
1679
- input.MinBufferTimeSeconds !== null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }),
1680
- ...(input.Profile !== undefined && input.Profile !== null && { profile: input.Profile }),
1681
- ...(input.ScteMarkersSource !== undefined &&
1682
- input.ScteMarkersSource !== null && { scteMarkersSource: input.ScteMarkersSource }),
1683
- ...(input.StreamSelection !== undefined &&
1684
- input.StreamSelection !== null && {
1672
+ ...(input.ManifestLayout != null && { manifestLayout: input.ManifestLayout }),
1673
+ ...(input.ManifestName != null && { manifestName: input.ManifestName }),
1674
+ ...(input.MinBufferTimeSeconds != null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }),
1675
+ ...(input.Profile != null && { profile: input.Profile }),
1676
+ ...(input.ScteMarkersSource != null && { scteMarkersSource: input.ScteMarkersSource }),
1677
+ ...(input.StreamSelection != null && {
1685
1678
  streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1686
1679
  }),
1687
1680
  };
1688
1681
  };
1689
1682
  const serializeAws_restJson1DashPackage = (input, context) => {
1690
1683
  return {
1691
- ...(input.DashManifests !== undefined &&
1692
- input.DashManifests !== null && {
1684
+ ...(input.DashManifests != null && {
1693
1685
  dashManifests: serializeAws_restJson1__listOfDashManifest(input.DashManifests, context),
1694
1686
  }),
1695
- ...(input.Encryption !== undefined &&
1696
- input.Encryption !== null && { encryption: serializeAws_restJson1DashEncryption(input.Encryption, context) }),
1697
- ...(input.IncludeEncoderConfigurationInSegments !== undefined &&
1698
- input.IncludeEncoderConfigurationInSegments !== null && {
1687
+ ...(input.Encryption != null && { encryption: serializeAws_restJson1DashEncryption(input.Encryption, context) }),
1688
+ ...(input.IncludeEncoderConfigurationInSegments != null && {
1699
1689
  includeEncoderConfigurationInSegments: input.IncludeEncoderConfigurationInSegments,
1700
1690
  }),
1701
- ...(input.PeriodTriggers !== undefined &&
1702
- input.PeriodTriggers !== null && {
1691
+ ...(input.PeriodTriggers != null && {
1703
1692
  periodTriggers: serializeAws_restJson1__listOf__PeriodTriggersElement(input.PeriodTriggers, context),
1704
1693
  }),
1705
- ...(input.SegmentDurationSeconds !== undefined &&
1706
- input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1707
- ...(input.SegmentTemplateFormat !== undefined &&
1708
- input.SegmentTemplateFormat !== null && { segmentTemplateFormat: input.SegmentTemplateFormat }),
1694
+ ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1695
+ ...(input.SegmentTemplateFormat != null && { segmentTemplateFormat: input.SegmentTemplateFormat }),
1709
1696
  };
1710
1697
  };
1711
1698
  const serializeAws_restJson1EgressAccessLogs = (input, context) => {
1712
1699
  return {
1713
- ...(input.LogGroupName !== undefined && input.LogGroupName !== null && { logGroupName: input.LogGroupName }),
1700
+ ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }),
1714
1701
  };
1715
1702
  };
1716
1703
  const serializeAws_restJson1HlsEncryption = (input, context) => {
1717
1704
  return {
1718
- ...(input.ConstantInitializationVector !== undefined &&
1719
- input.ConstantInitializationVector !== null && {
1705
+ ...(input.ConstantInitializationVector != null && {
1720
1706
  constantInitializationVector: input.ConstantInitializationVector,
1721
1707
  }),
1722
- ...(input.EncryptionMethod !== undefined &&
1723
- input.EncryptionMethod !== null && { encryptionMethod: input.EncryptionMethod }),
1724
- ...(input.SpekeKeyProvider !== undefined &&
1725
- input.SpekeKeyProvider !== null && {
1708
+ ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }),
1709
+ ...(input.SpekeKeyProvider != null && {
1726
1710
  spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1727
1711
  }),
1728
1712
  };
1729
1713
  };
1730
1714
  const serializeAws_restJson1HlsManifest = (input, context) => {
1731
1715
  return {
1732
- ...(input.AdMarkers !== undefined && input.AdMarkers !== null && { adMarkers: input.AdMarkers }),
1733
- ...(input.IncludeIframeOnlyStream !== undefined &&
1734
- input.IncludeIframeOnlyStream !== null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1735
- ...(input.ManifestName !== undefined && input.ManifestName !== null && { manifestName: input.ManifestName }),
1736
- ...(input.ProgramDateTimeIntervalSeconds !== undefined &&
1737
- input.ProgramDateTimeIntervalSeconds !== null && {
1716
+ ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }),
1717
+ ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1718
+ ...(input.ManifestName != null && { manifestName: input.ManifestName }),
1719
+ ...(input.ProgramDateTimeIntervalSeconds != null && {
1738
1720
  programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
1739
1721
  }),
1740
- ...(input.RepeatExtXKey !== undefined && input.RepeatExtXKey !== null && { repeatExtXKey: input.RepeatExtXKey }),
1741
- ...(input.StreamSelection !== undefined &&
1742
- input.StreamSelection !== null && {
1722
+ ...(input.RepeatExtXKey != null && { repeatExtXKey: input.RepeatExtXKey }),
1723
+ ...(input.StreamSelection != null && {
1743
1724
  streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1744
1725
  }),
1745
1726
  };
1746
1727
  };
1747
1728
  const serializeAws_restJson1HlsPackage = (input, context) => {
1748
1729
  return {
1749
- ...(input.Encryption !== undefined &&
1750
- input.Encryption !== null && { encryption: serializeAws_restJson1HlsEncryption(input.Encryption, context) }),
1751
- ...(input.HlsManifests !== undefined &&
1752
- input.HlsManifests !== null && {
1730
+ ...(input.Encryption != null && { encryption: serializeAws_restJson1HlsEncryption(input.Encryption, context) }),
1731
+ ...(input.HlsManifests != null && {
1753
1732
  hlsManifests: serializeAws_restJson1__listOfHlsManifest(input.HlsManifests, context),
1754
1733
  }),
1755
- ...(input.IncludeDvbSubtitles !== undefined &&
1756
- input.IncludeDvbSubtitles !== null && { includeDvbSubtitles: input.IncludeDvbSubtitles }),
1757
- ...(input.SegmentDurationSeconds !== undefined &&
1758
- input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1759
- ...(input.UseAudioRenditionGroup !== undefined &&
1760
- input.UseAudioRenditionGroup !== null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }),
1734
+ ...(input.IncludeDvbSubtitles != null && { includeDvbSubtitles: input.IncludeDvbSubtitles }),
1735
+ ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1736
+ ...(input.UseAudioRenditionGroup != null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }),
1761
1737
  };
1762
1738
  };
1763
1739
  const serializeAws_restJson1MssEncryption = (input, context) => {
1764
1740
  return {
1765
- ...(input.SpekeKeyProvider !== undefined &&
1766
- input.SpekeKeyProvider !== null && {
1741
+ ...(input.SpekeKeyProvider != null && {
1767
1742
  spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1768
1743
  }),
1769
1744
  };
1770
1745
  };
1771
1746
  const serializeAws_restJson1MssManifest = (input, context) => {
1772
1747
  return {
1773
- ...(input.ManifestName !== undefined && input.ManifestName !== null && { manifestName: input.ManifestName }),
1774
- ...(input.StreamSelection !== undefined &&
1775
- input.StreamSelection !== null && {
1748
+ ...(input.ManifestName != null && { manifestName: input.ManifestName }),
1749
+ ...(input.StreamSelection != null && {
1776
1750
  streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1777
1751
  }),
1778
1752
  };
1779
1753
  };
1780
1754
  const serializeAws_restJson1MssPackage = (input, context) => {
1781
1755
  return {
1782
- ...(input.Encryption !== undefined &&
1783
- input.Encryption !== null && { encryption: serializeAws_restJson1MssEncryption(input.Encryption, context) }),
1784
- ...(input.MssManifests !== undefined &&
1785
- input.MssManifests !== null && {
1756
+ ...(input.Encryption != null && { encryption: serializeAws_restJson1MssEncryption(input.Encryption, context) }),
1757
+ ...(input.MssManifests != null && {
1786
1758
  mssManifests: serializeAws_restJson1__listOfMssManifest(input.MssManifests, context),
1787
1759
  }),
1788
- ...(input.SegmentDurationSeconds !== undefined &&
1789
- input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1760
+ ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1790
1761
  };
1791
1762
  };
1792
1763
  const serializeAws_restJson1SpekeKeyProvider = (input, context) => {
1793
1764
  return {
1794
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { roleArn: input.RoleArn }),
1795
- ...(input.SystemIds !== undefined &&
1796
- input.SystemIds !== null && { systemIds: serializeAws_restJson1__listOf__string(input.SystemIds, context) }),
1797
- ...(input.Url !== undefined && input.Url !== null && { url: input.Url }),
1765
+ ...(input.RoleArn != null && { roleArn: input.RoleArn }),
1766
+ ...(input.SystemIds != null && { systemIds: serializeAws_restJson1__listOf__string(input.SystemIds, context) }),
1767
+ ...(input.Url != null && { url: input.Url }),
1798
1768
  };
1799
1769
  };
1800
1770
  const serializeAws_restJson1StreamSelection = (input, context) => {
1801
1771
  return {
1802
- ...(input.MaxVideoBitsPerSecond !== undefined &&
1803
- input.MaxVideoBitsPerSecond !== null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }),
1804
- ...(input.MinVideoBitsPerSecond !== undefined &&
1805
- input.MinVideoBitsPerSecond !== null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }),
1806
- ...(input.StreamOrder !== undefined && input.StreamOrder !== null && { streamOrder: input.StreamOrder }),
1772
+ ...(input.MaxVideoBitsPerSecond != null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }),
1773
+ ...(input.MinVideoBitsPerSecond != null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }),
1774
+ ...(input.StreamOrder != null && { streamOrder: input.StreamOrder }),
1807
1775
  };
1808
1776
  };
1809
1777
  const serializeAws_restJson1Tags = (input, context) => {
@@ -1936,9 +1904,7 @@ const deserializeAws_restJson1AssetShallow = (output, context) => {
1936
1904
  ResourceId: (0, smithy_client_1.expectString)(output.resourceId),
1937
1905
  SourceArn: (0, smithy_client_1.expectString)(output.sourceArn),
1938
1906
  SourceRoleArn: (0, smithy_client_1.expectString)(output.sourceRoleArn),
1939
- Tags: output.tags !== undefined && output.tags !== null
1940
- ? deserializeAws_restJson1Tags(output.tags, context)
1941
- : undefined,
1907
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
1942
1908
  };
1943
1909
  };
1944
1910
  const deserializeAws_restJson1Authorization = (output, context) => {
@@ -1950,17 +1916,15 @@ const deserializeAws_restJson1Authorization = (output, context) => {
1950
1916
  const deserializeAws_restJson1CmafEncryption = (output, context) => {
1951
1917
  return {
1952
1918
  ConstantInitializationVector: (0, smithy_client_1.expectString)(output.constantInitializationVector),
1953
- SpekeKeyProvider: output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
1919
+ SpekeKeyProvider: output.spekeKeyProvider != null
1954
1920
  ? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
1955
1921
  : undefined,
1956
1922
  };
1957
1923
  };
1958
1924
  const deserializeAws_restJson1CmafPackage = (output, context) => {
1959
1925
  return {
1960
- Encryption: output.encryption !== undefined && output.encryption !== null
1961
- ? deserializeAws_restJson1CmafEncryption(output.encryption, context)
1962
- : undefined,
1963
- HlsManifests: output.hlsManifests !== undefined && output.hlsManifests !== null
1926
+ Encryption: output.encryption != null ? deserializeAws_restJson1CmafEncryption(output.encryption, context) : undefined,
1927
+ HlsManifests: output.hlsManifests != null
1964
1928
  ? deserializeAws_restJson1__listOfHlsManifest(output.hlsManifests, context)
1965
1929
  : undefined,
1966
1930
  IncludeEncoderConfigurationInSegments: (0, smithy_client_1.expectBoolean)(output.includeEncoderConfigurationInSegments),
@@ -1969,7 +1933,7 @@ const deserializeAws_restJson1CmafPackage = (output, context) => {
1969
1933
  };
1970
1934
  const deserializeAws_restJson1DashEncryption = (output, context) => {
1971
1935
  return {
1972
- SpekeKeyProvider: output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
1936
+ SpekeKeyProvider: output.spekeKeyProvider != null
1973
1937
  ? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
1974
1938
  : undefined,
1975
1939
  };
@@ -1981,21 +1945,19 @@ const deserializeAws_restJson1DashManifest = (output, context) => {
1981
1945
  MinBufferTimeSeconds: (0, smithy_client_1.expectInt32)(output.minBufferTimeSeconds),
1982
1946
  Profile: (0, smithy_client_1.expectString)(output.profile),
1983
1947
  ScteMarkersSource: (0, smithy_client_1.expectString)(output.scteMarkersSource),
1984
- StreamSelection: output.streamSelection !== undefined && output.streamSelection !== null
1948
+ StreamSelection: output.streamSelection != null
1985
1949
  ? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
1986
1950
  : undefined,
1987
1951
  };
1988
1952
  };
1989
1953
  const deserializeAws_restJson1DashPackage = (output, context) => {
1990
1954
  return {
1991
- DashManifests: output.dashManifests !== undefined && output.dashManifests !== null
1955
+ DashManifests: output.dashManifests != null
1992
1956
  ? deserializeAws_restJson1__listOfDashManifest(output.dashManifests, context)
1993
1957
  : undefined,
1994
- Encryption: output.encryption !== undefined && output.encryption !== null
1995
- ? deserializeAws_restJson1DashEncryption(output.encryption, context)
1996
- : undefined,
1958
+ Encryption: output.encryption != null ? deserializeAws_restJson1DashEncryption(output.encryption, context) : undefined,
1997
1959
  IncludeEncoderConfigurationInSegments: (0, smithy_client_1.expectBoolean)(output.includeEncoderConfigurationInSegments),
1998
- PeriodTriggers: output.periodTriggers !== undefined && output.periodTriggers !== null
1960
+ PeriodTriggers: output.periodTriggers != null
1999
1961
  ? deserializeAws_restJson1__listOf__PeriodTriggersElement(output.periodTriggers, context)
2000
1962
  : undefined,
2001
1963
  SegmentDurationSeconds: (0, smithy_client_1.expectInt32)(output.segmentDurationSeconds),
@@ -2018,7 +1980,7 @@ const deserializeAws_restJson1HlsEncryption = (output, context) => {
2018
1980
  return {
2019
1981
  ConstantInitializationVector: (0, smithy_client_1.expectString)(output.constantInitializationVector),
2020
1982
  EncryptionMethod: (0, smithy_client_1.expectString)(output.encryptionMethod),
2021
- SpekeKeyProvider: output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
1983
+ SpekeKeyProvider: output.spekeKeyProvider != null
2022
1984
  ? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
2023
1985
  : undefined,
2024
1986
  };
@@ -2030,17 +1992,15 @@ const deserializeAws_restJson1HlsManifest = (output, context) => {
2030
1992
  ManifestName: (0, smithy_client_1.expectString)(output.manifestName),
2031
1993
  ProgramDateTimeIntervalSeconds: (0, smithy_client_1.expectInt32)(output.programDateTimeIntervalSeconds),
2032
1994
  RepeatExtXKey: (0, smithy_client_1.expectBoolean)(output.repeatExtXKey),
2033
- StreamSelection: output.streamSelection !== undefined && output.streamSelection !== null
1995
+ StreamSelection: output.streamSelection != null
2034
1996
  ? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
2035
1997
  : undefined,
2036
1998
  };
2037
1999
  };
2038
2000
  const deserializeAws_restJson1HlsPackage = (output, context) => {
2039
2001
  return {
2040
- Encryption: output.encryption !== undefined && output.encryption !== null
2041
- ? deserializeAws_restJson1HlsEncryption(output.encryption, context)
2042
- : undefined,
2043
- HlsManifests: output.hlsManifests !== undefined && output.hlsManifests !== null
2002
+ Encryption: output.encryption != null ? deserializeAws_restJson1HlsEncryption(output.encryption, context) : undefined,
2003
+ HlsManifests: output.hlsManifests != null
2044
2004
  ? deserializeAws_restJson1__listOfHlsManifest(output.hlsManifests, context)
2045
2005
  : undefined,
2046
2006
  IncludeDvbSubtitles: (0, smithy_client_1.expectBoolean)(output.includeDvbSubtitles),
@@ -2050,7 +2010,7 @@ const deserializeAws_restJson1HlsPackage = (output, context) => {
2050
2010
  };
2051
2011
  const deserializeAws_restJson1MssEncryption = (output, context) => {
2052
2012
  return {
2053
- SpekeKeyProvider: output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
2013
+ SpekeKeyProvider: output.spekeKeyProvider != null
2054
2014
  ? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
2055
2015
  : undefined,
2056
2016
  };
@@ -2058,17 +2018,15 @@ const deserializeAws_restJson1MssEncryption = (output, context) => {
2058
2018
  const deserializeAws_restJson1MssManifest = (output, context) => {
2059
2019
  return {
2060
2020
  ManifestName: (0, smithy_client_1.expectString)(output.manifestName),
2061
- StreamSelection: output.streamSelection !== undefined && output.streamSelection !== null
2021
+ StreamSelection: output.streamSelection != null
2062
2022
  ? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
2063
2023
  : undefined,
2064
2024
  };
2065
2025
  };
2066
2026
  const deserializeAws_restJson1MssPackage = (output, context) => {
2067
2027
  return {
2068
- Encryption: output.encryption !== undefined && output.encryption !== null
2069
- ? deserializeAws_restJson1MssEncryption(output.encryption, context)
2070
- : undefined,
2071
- MssManifests: output.mssManifests !== undefined && output.mssManifests !== null
2028
+ Encryption: output.encryption != null ? deserializeAws_restJson1MssEncryption(output.encryption, context) : undefined,
2029
+ MssManifests: output.mssManifests != null
2072
2030
  ? deserializeAws_restJson1__listOfMssManifest(output.mssManifests, context)
2073
2031
  : undefined,
2074
2032
  SegmentDurationSeconds: (0, smithy_client_1.expectInt32)(output.segmentDurationSeconds),
@@ -2077,47 +2035,31 @@ const deserializeAws_restJson1MssPackage = (output, context) => {
2077
2035
  const deserializeAws_restJson1PackagingConfiguration = (output, context) => {
2078
2036
  return {
2079
2037
  Arn: (0, smithy_client_1.expectString)(output.arn),
2080
- CmafPackage: output.cmafPackage !== undefined && output.cmafPackage !== null
2081
- ? deserializeAws_restJson1CmafPackage(output.cmafPackage, context)
2082
- : undefined,
2083
- DashPackage: output.dashPackage !== undefined && output.dashPackage !== null
2084
- ? deserializeAws_restJson1DashPackage(output.dashPackage, context)
2085
- : undefined,
2086
- HlsPackage: output.hlsPackage !== undefined && output.hlsPackage !== null
2087
- ? deserializeAws_restJson1HlsPackage(output.hlsPackage, context)
2088
- : undefined,
2038
+ CmafPackage: output.cmafPackage != null ? deserializeAws_restJson1CmafPackage(output.cmafPackage, context) : undefined,
2039
+ DashPackage: output.dashPackage != null ? deserializeAws_restJson1DashPackage(output.dashPackage, context) : undefined,
2040
+ HlsPackage: output.hlsPackage != null ? deserializeAws_restJson1HlsPackage(output.hlsPackage, context) : undefined,
2089
2041
  Id: (0, smithy_client_1.expectString)(output.id),
2090
- MssPackage: output.mssPackage !== undefined && output.mssPackage !== null
2091
- ? deserializeAws_restJson1MssPackage(output.mssPackage, context)
2092
- : undefined,
2042
+ MssPackage: output.mssPackage != null ? deserializeAws_restJson1MssPackage(output.mssPackage, context) : undefined,
2093
2043
  PackagingGroupId: (0, smithy_client_1.expectString)(output.packagingGroupId),
2094
- Tags: output.tags !== undefined && output.tags !== null
2095
- ? deserializeAws_restJson1Tags(output.tags, context)
2096
- : undefined,
2044
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
2097
2045
  };
2098
2046
  };
2099
2047
  const deserializeAws_restJson1PackagingGroup = (output, context) => {
2100
2048
  return {
2101
2049
  Arn: (0, smithy_client_1.expectString)(output.arn),
2102
- Authorization: output.authorization !== undefined && output.authorization !== null
2103
- ? deserializeAws_restJson1Authorization(output.authorization, context)
2104
- : undefined,
2050
+ Authorization: output.authorization != null ? deserializeAws_restJson1Authorization(output.authorization, context) : undefined,
2105
2051
  DomainName: (0, smithy_client_1.expectString)(output.domainName),
2106
- EgressAccessLogs: output.egressAccessLogs !== undefined && output.egressAccessLogs !== null
2052
+ EgressAccessLogs: output.egressAccessLogs != null
2107
2053
  ? deserializeAws_restJson1EgressAccessLogs(output.egressAccessLogs, context)
2108
2054
  : undefined,
2109
2055
  Id: (0, smithy_client_1.expectString)(output.id),
2110
- Tags: output.tags !== undefined && output.tags !== null
2111
- ? deserializeAws_restJson1Tags(output.tags, context)
2112
- : undefined,
2056
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
2113
2057
  };
2114
2058
  };
2115
2059
  const deserializeAws_restJson1SpekeKeyProvider = (output, context) => {
2116
2060
  return {
2117
2061
  RoleArn: (0, smithy_client_1.expectString)(output.roleArn),
2118
- SystemIds: output.systemIds !== undefined && output.systemIds !== null
2119
- ? deserializeAws_restJson1__listOf__string(output.systemIds, context)
2120
- : undefined,
2062
+ SystemIds: output.systemIds != null ? deserializeAws_restJson1__listOf__string(output.systemIds, context) : undefined,
2121
2063
  Url: (0, smithy_client_1.expectString)(output.url),
2122
2064
  };
2123
2065
  };
@@ -2188,5 +2130,4 @@ const loadRestJsonErrorCode = (output, data) => {
2188
2130
  if (data["__type"] !== undefined) {
2189
2131
  return sanitizeErrorCode(data["__type"]);
2190
2132
  }
2191
- return "";
2192
2133
  };