@aws-sdk/client-mq 3.503.1 → 3.507.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.
package/dist-cjs/index.js CHANGED
@@ -689,7 +689,7 @@ var se_UpdateUserCommand = /* @__PURE__ */ __name(async (input, context) => {
689
689
  }, "se_UpdateUserCommand");
690
690
  var de_CreateBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
691
691
  if (output.statusCode !== 200 && output.statusCode >= 300) {
692
- return de_CreateBrokerCommandError(output, context);
692
+ return de_CommandError(output, context);
693
693
  }
694
694
  const contents = (0, import_smithy_client.map)({
695
695
  $metadata: deserializeMetadata(output)
@@ -702,40 +702,9 @@ var de_CreateBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
702
702
  Object.assign(contents, doc);
703
703
  return contents;
704
704
  }, "de_CreateBrokerCommand");
705
- var de_CreateBrokerCommandError = /* @__PURE__ */ __name(async (output, context) => {
706
- const parsedOutput = {
707
- ...output,
708
- body: await parseErrorBody(output.body, context)
709
- };
710
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
711
- switch (errorCode) {
712
- case "BadRequestException":
713
- case "com.amazonaws.mq#BadRequestException":
714
- throw await de_BadRequestExceptionRes(parsedOutput, context);
715
- case "ConflictException":
716
- case "com.amazonaws.mq#ConflictException":
717
- throw await de_ConflictExceptionRes(parsedOutput, context);
718
- case "ForbiddenException":
719
- case "com.amazonaws.mq#ForbiddenException":
720
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
721
- case "InternalServerErrorException":
722
- case "com.amazonaws.mq#InternalServerErrorException":
723
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
724
- case "UnauthorizedException":
725
- case "com.amazonaws.mq#UnauthorizedException":
726
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
727
- default:
728
- const parsedBody = parsedOutput.body;
729
- return throwDefaultError({
730
- output,
731
- parsedBody,
732
- errorCode
733
- });
734
- }
735
- }, "de_CreateBrokerCommandError");
736
705
  var de_CreateConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
737
706
  if (output.statusCode !== 200 && output.statusCode >= 300) {
738
- return de_CreateConfigurationCommandError(output, context);
707
+ return de_CommandError(output, context);
739
708
  }
740
709
  const contents = (0, import_smithy_client.map)({
741
710
  $metadata: deserializeMetadata(output)
@@ -752,37 +721,9 @@ var de_CreateConfigurationCommand = /* @__PURE__ */ __name(async (output, contex
752
721
  Object.assign(contents, doc);
753
722
  return contents;
754
723
  }, "de_CreateConfigurationCommand");
755
- var de_CreateConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
756
- const parsedOutput = {
757
- ...output,
758
- body: await parseErrorBody(output.body, context)
759
- };
760
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
- switch (errorCode) {
762
- case "BadRequestException":
763
- case "com.amazonaws.mq#BadRequestException":
764
- throw await de_BadRequestExceptionRes(parsedOutput, context);
765
- case "ConflictException":
766
- case "com.amazonaws.mq#ConflictException":
767
- throw await de_ConflictExceptionRes(parsedOutput, context);
768
- case "ForbiddenException":
769
- case "com.amazonaws.mq#ForbiddenException":
770
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
771
- case "InternalServerErrorException":
772
- case "com.amazonaws.mq#InternalServerErrorException":
773
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
774
- default:
775
- const parsedBody = parsedOutput.body;
776
- return throwDefaultError({
777
- output,
778
- parsedBody,
779
- errorCode
780
- });
781
- }
782
- }, "de_CreateConfigurationCommandError");
783
724
  var de_CreateTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
784
725
  if (output.statusCode !== 204 && output.statusCode >= 300) {
785
- return de_CreateTagsCommandError(output, context);
726
+ return de_CommandError(output, context);
786
727
  }
787
728
  const contents = (0, import_smithy_client.map)({
788
729
  $metadata: deserializeMetadata(output)
@@ -790,37 +731,9 @@ var de_CreateTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
790
731
  await (0, import_smithy_client.collectBody)(output.body, context);
791
732
  return contents;
792
733
  }, "de_CreateTagsCommand");
793
- var de_CreateTagsCommandError = /* @__PURE__ */ __name(async (output, context) => {
794
- const parsedOutput = {
795
- ...output,
796
- body: await parseErrorBody(output.body, context)
797
- };
798
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
799
- switch (errorCode) {
800
- case "BadRequestException":
801
- case "com.amazonaws.mq#BadRequestException":
802
- throw await de_BadRequestExceptionRes(parsedOutput, context);
803
- case "ForbiddenException":
804
- case "com.amazonaws.mq#ForbiddenException":
805
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
806
- case "InternalServerErrorException":
807
- case "com.amazonaws.mq#InternalServerErrorException":
808
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
809
- case "NotFoundException":
810
- case "com.amazonaws.mq#NotFoundException":
811
- throw await de_NotFoundExceptionRes(parsedOutput, context);
812
- default:
813
- const parsedBody = parsedOutput.body;
814
- return throwDefaultError({
815
- output,
816
- parsedBody,
817
- errorCode
818
- });
819
- }
820
- }, "de_CreateTagsCommandError");
821
734
  var de_CreateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
822
735
  if (output.statusCode !== 200 && output.statusCode >= 300) {
823
- return de_CreateUserCommandError(output, context);
736
+ return de_CommandError(output, context);
824
737
  }
825
738
  const contents = (0, import_smithy_client.map)({
826
739
  $metadata: deserializeMetadata(output)
@@ -828,40 +741,9 @@ var de_CreateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
828
741
  await (0, import_smithy_client.collectBody)(output.body, context);
829
742
  return contents;
830
743
  }, "de_CreateUserCommand");
831
- var de_CreateUserCommandError = /* @__PURE__ */ __name(async (output, context) => {
832
- const parsedOutput = {
833
- ...output,
834
- body: await parseErrorBody(output.body, context)
835
- };
836
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
837
- switch (errorCode) {
838
- case "BadRequestException":
839
- case "com.amazonaws.mq#BadRequestException":
840
- throw await de_BadRequestExceptionRes(parsedOutput, context);
841
- case "ConflictException":
842
- case "com.amazonaws.mq#ConflictException":
843
- throw await de_ConflictExceptionRes(parsedOutput, context);
844
- case "ForbiddenException":
845
- case "com.amazonaws.mq#ForbiddenException":
846
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
847
- case "InternalServerErrorException":
848
- case "com.amazonaws.mq#InternalServerErrorException":
849
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
850
- case "NotFoundException":
851
- case "com.amazonaws.mq#NotFoundException":
852
- throw await de_NotFoundExceptionRes(parsedOutput, context);
853
- default:
854
- const parsedBody = parsedOutput.body;
855
- return throwDefaultError({
856
- output,
857
- parsedBody,
858
- errorCode
859
- });
860
- }
861
- }, "de_CreateUserCommandError");
862
744
  var de_DeleteBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
863
745
  if (output.statusCode !== 200 && output.statusCode >= 300) {
864
- return de_DeleteBrokerCommandError(output, context);
746
+ return de_CommandError(output, context);
865
747
  }
866
748
  const contents = (0, import_smithy_client.map)({
867
749
  $metadata: deserializeMetadata(output)
@@ -873,37 +755,9 @@ var de_DeleteBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
873
755
  Object.assign(contents, doc);
874
756
  return contents;
875
757
  }, "de_DeleteBrokerCommand");
876
- var de_DeleteBrokerCommandError = /* @__PURE__ */ __name(async (output, context) => {
877
- const parsedOutput = {
878
- ...output,
879
- body: await parseErrorBody(output.body, context)
880
- };
881
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
882
- switch (errorCode) {
883
- case "BadRequestException":
884
- case "com.amazonaws.mq#BadRequestException":
885
- throw await de_BadRequestExceptionRes(parsedOutput, context);
886
- case "ForbiddenException":
887
- case "com.amazonaws.mq#ForbiddenException":
888
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
889
- case "InternalServerErrorException":
890
- case "com.amazonaws.mq#InternalServerErrorException":
891
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
892
- case "NotFoundException":
893
- case "com.amazonaws.mq#NotFoundException":
894
- throw await de_NotFoundExceptionRes(parsedOutput, context);
895
- default:
896
- const parsedBody = parsedOutput.body;
897
- return throwDefaultError({
898
- output,
899
- parsedBody,
900
- errorCode
901
- });
902
- }
903
- }, "de_DeleteBrokerCommandError");
904
758
  var de_DeleteTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
905
759
  if (output.statusCode !== 204 && output.statusCode >= 300) {
906
- return de_DeleteTagsCommandError(output, context);
760
+ return de_CommandError(output, context);
907
761
  }
908
762
  const contents = (0, import_smithy_client.map)({
909
763
  $metadata: deserializeMetadata(output)
@@ -911,37 +765,9 @@ var de_DeleteTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
911
765
  await (0, import_smithy_client.collectBody)(output.body, context);
912
766
  return contents;
913
767
  }, "de_DeleteTagsCommand");
914
- var de_DeleteTagsCommandError = /* @__PURE__ */ __name(async (output, context) => {
915
- const parsedOutput = {
916
- ...output,
917
- body: await parseErrorBody(output.body, context)
918
- };
919
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
920
- switch (errorCode) {
921
- case "BadRequestException":
922
- case "com.amazonaws.mq#BadRequestException":
923
- throw await de_BadRequestExceptionRes(parsedOutput, context);
924
- case "ForbiddenException":
925
- case "com.amazonaws.mq#ForbiddenException":
926
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
927
- case "InternalServerErrorException":
928
- case "com.amazonaws.mq#InternalServerErrorException":
929
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
930
- case "NotFoundException":
931
- case "com.amazonaws.mq#NotFoundException":
932
- throw await de_NotFoundExceptionRes(parsedOutput, context);
933
- default:
934
- const parsedBody = parsedOutput.body;
935
- return throwDefaultError({
936
- output,
937
- parsedBody,
938
- errorCode
939
- });
940
- }
941
- }, "de_DeleteTagsCommandError");
942
768
  var de_DeleteUserCommand = /* @__PURE__ */ __name(async (output, context) => {
943
769
  if (output.statusCode !== 200 && output.statusCode >= 300) {
944
- return de_DeleteUserCommandError(output, context);
770
+ return de_CommandError(output, context);
945
771
  }
946
772
  const contents = (0, import_smithy_client.map)({
947
773
  $metadata: deserializeMetadata(output)
@@ -949,37 +775,9 @@ var de_DeleteUserCommand = /* @__PURE__ */ __name(async (output, context) => {
949
775
  await (0, import_smithy_client.collectBody)(output.body, context);
950
776
  return contents;
951
777
  }, "de_DeleteUserCommand");
952
- var de_DeleteUserCommandError = /* @__PURE__ */ __name(async (output, context) => {
953
- const parsedOutput = {
954
- ...output,
955
- body: await parseErrorBody(output.body, context)
956
- };
957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
958
- switch (errorCode) {
959
- case "BadRequestException":
960
- case "com.amazonaws.mq#BadRequestException":
961
- throw await de_BadRequestExceptionRes(parsedOutput, context);
962
- case "ForbiddenException":
963
- case "com.amazonaws.mq#ForbiddenException":
964
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
965
- case "InternalServerErrorException":
966
- case "com.amazonaws.mq#InternalServerErrorException":
967
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
968
- case "NotFoundException":
969
- case "com.amazonaws.mq#NotFoundException":
970
- throw await de_NotFoundExceptionRes(parsedOutput, context);
971
- default:
972
- const parsedBody = parsedOutput.body;
973
- return throwDefaultError({
974
- output,
975
- parsedBody,
976
- errorCode
977
- });
978
- }
979
- }, "de_DeleteUserCommandError");
980
778
  var de_DescribeBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
981
779
  if (output.statusCode !== 200 && output.statusCode >= 300) {
982
- return de_DescribeBrokerCommandError(output, context);
780
+ return de_CommandError(output, context);
983
781
  }
984
782
  const contents = (0, import_smithy_client.map)({
985
783
  $metadata: deserializeMetadata(output)
@@ -1027,37 +825,9 @@ var de_DescribeBrokerCommand = /* @__PURE__ */ __name(async (output, context) =>
1027
825
  Object.assign(contents, doc);
1028
826
  return contents;
1029
827
  }, "de_DescribeBrokerCommand");
1030
- var de_DescribeBrokerCommandError = /* @__PURE__ */ __name(async (output, context) => {
1031
- const parsedOutput = {
1032
- ...output,
1033
- body: await parseErrorBody(output.body, context)
1034
- };
1035
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1036
- switch (errorCode) {
1037
- case "BadRequestException":
1038
- case "com.amazonaws.mq#BadRequestException":
1039
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1040
- case "ForbiddenException":
1041
- case "com.amazonaws.mq#ForbiddenException":
1042
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1043
- case "InternalServerErrorException":
1044
- case "com.amazonaws.mq#InternalServerErrorException":
1045
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1046
- case "NotFoundException":
1047
- case "com.amazonaws.mq#NotFoundException":
1048
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1049
- default:
1050
- const parsedBody = parsedOutput.body;
1051
- return throwDefaultError({
1052
- output,
1053
- parsedBody,
1054
- errorCode
1055
- });
1056
- }
1057
- }, "de_DescribeBrokerCommandError");
1058
828
  var de_DescribeBrokerEngineTypesCommand = /* @__PURE__ */ __name(async (output, context) => {
1059
829
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1060
- return de_DescribeBrokerEngineTypesCommandError(output, context);
830
+ return de_CommandError(output, context);
1061
831
  }
1062
832
  const contents = (0, import_smithy_client.map)({
1063
833
  $metadata: deserializeMetadata(output)
@@ -1071,34 +841,9 @@ var de_DescribeBrokerEngineTypesCommand = /* @__PURE__ */ __name(async (output,
1071
841
  Object.assign(contents, doc);
1072
842
  return contents;
1073
843
  }, "de_DescribeBrokerEngineTypesCommand");
1074
- var de_DescribeBrokerEngineTypesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1075
- const parsedOutput = {
1076
- ...output,
1077
- body: await parseErrorBody(output.body, context)
1078
- };
1079
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
- switch (errorCode) {
1081
- case "BadRequestException":
1082
- case "com.amazonaws.mq#BadRequestException":
1083
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1084
- case "ForbiddenException":
1085
- case "com.amazonaws.mq#ForbiddenException":
1086
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1087
- case "InternalServerErrorException":
1088
- case "com.amazonaws.mq#InternalServerErrorException":
1089
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1090
- default:
1091
- const parsedBody = parsedOutput.body;
1092
- return throwDefaultError({
1093
- output,
1094
- parsedBody,
1095
- errorCode
1096
- });
1097
- }
1098
- }, "de_DescribeBrokerEngineTypesCommandError");
1099
844
  var de_DescribeBrokerInstanceOptionsCommand = /* @__PURE__ */ __name(async (output, context) => {
1100
845
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1101
- return de_DescribeBrokerInstanceOptionsCommandError(output, context);
846
+ return de_CommandError(output, context);
1102
847
  }
1103
848
  const contents = (0, import_smithy_client.map)({
1104
849
  $metadata: deserializeMetadata(output)
@@ -1112,34 +857,9 @@ var de_DescribeBrokerInstanceOptionsCommand = /* @__PURE__ */ __name(async (outp
1112
857
  Object.assign(contents, doc);
1113
858
  return contents;
1114
859
  }, "de_DescribeBrokerInstanceOptionsCommand");
1115
- var de_DescribeBrokerInstanceOptionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1116
- const parsedOutput = {
1117
- ...output,
1118
- body: await parseErrorBody(output.body, context)
1119
- };
1120
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1121
- switch (errorCode) {
1122
- case "BadRequestException":
1123
- case "com.amazonaws.mq#BadRequestException":
1124
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1125
- case "ForbiddenException":
1126
- case "com.amazonaws.mq#ForbiddenException":
1127
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1128
- case "InternalServerErrorException":
1129
- case "com.amazonaws.mq#InternalServerErrorException":
1130
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1131
- default:
1132
- const parsedBody = parsedOutput.body;
1133
- return throwDefaultError({
1134
- output,
1135
- parsedBody,
1136
- errorCode
1137
- });
1138
- }
1139
- }, "de_DescribeBrokerInstanceOptionsCommandError");
1140
860
  var de_DescribeConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1141
861
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1142
- return de_DescribeConfigurationCommandError(output, context);
862
+ return de_CommandError(output, context);
1143
863
  }
1144
864
  const contents = (0, import_smithy_client.map)({
1145
865
  $metadata: deserializeMetadata(output)
@@ -1160,37 +880,9 @@ var de_DescribeConfigurationCommand = /* @__PURE__ */ __name(async (output, cont
1160
880
  Object.assign(contents, doc);
1161
881
  return contents;
1162
882
  }, "de_DescribeConfigurationCommand");
1163
- var de_DescribeConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1164
- const parsedOutput = {
1165
- ...output,
1166
- body: await parseErrorBody(output.body, context)
1167
- };
1168
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1169
- switch (errorCode) {
1170
- case "BadRequestException":
1171
- case "com.amazonaws.mq#BadRequestException":
1172
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1173
- case "ForbiddenException":
1174
- case "com.amazonaws.mq#ForbiddenException":
1175
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1176
- case "InternalServerErrorException":
1177
- case "com.amazonaws.mq#InternalServerErrorException":
1178
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1179
- case "NotFoundException":
1180
- case "com.amazonaws.mq#NotFoundException":
1181
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1182
- default:
1183
- const parsedBody = parsedOutput.body;
1184
- return throwDefaultError({
1185
- output,
1186
- parsedBody,
1187
- errorCode
1188
- });
1189
- }
1190
- }, "de_DescribeConfigurationCommandError");
1191
883
  var de_DescribeConfigurationRevisionCommand = /* @__PURE__ */ __name(async (output, context) => {
1192
884
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1193
- return de_DescribeConfigurationRevisionCommandError(output, context);
885
+ return de_CommandError(output, context);
1194
886
  }
1195
887
  const contents = (0, import_smithy_client.map)({
1196
888
  $metadata: deserializeMetadata(output)
@@ -1203,86 +895,30 @@ var de_DescribeConfigurationRevisionCommand = /* @__PURE__ */ __name(async (outp
1203
895
  Description: [, import_smithy_client.expectString, `description`]
1204
896
  });
1205
897
  Object.assign(contents, doc);
1206
- return contents;
1207
- }, "de_DescribeConfigurationRevisionCommand");
1208
- var de_DescribeConfigurationRevisionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1209
- const parsedOutput = {
1210
- ...output,
1211
- body: await parseErrorBody(output.body, context)
1212
- };
1213
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1214
- switch (errorCode) {
1215
- case "BadRequestException":
1216
- case "com.amazonaws.mq#BadRequestException":
1217
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1218
- case "ForbiddenException":
1219
- case "com.amazonaws.mq#ForbiddenException":
1220
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1221
- case "InternalServerErrorException":
1222
- case "com.amazonaws.mq#InternalServerErrorException":
1223
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1224
- case "NotFoundException":
1225
- case "com.amazonaws.mq#NotFoundException":
1226
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1227
- default:
1228
- const parsedBody = parsedOutput.body;
1229
- return throwDefaultError({
1230
- output,
1231
- parsedBody,
1232
- errorCode
1233
- });
1234
- }
1235
- }, "de_DescribeConfigurationRevisionCommandError");
1236
- var de_DescribeUserCommand = /* @__PURE__ */ __name(async (output, context) => {
1237
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1238
- return de_DescribeUserCommandError(output, context);
1239
- }
1240
- const contents = (0, import_smithy_client.map)({
1241
- $metadata: deserializeMetadata(output)
1242
- });
1243
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1244
- const doc = (0, import_smithy_client.take)(data, {
1245
- BrokerId: [, import_smithy_client.expectString, `brokerId`],
1246
- ConsoleAccess: [, import_smithy_client.expectBoolean, `consoleAccess`],
1247
- Groups: [, import_smithy_client._json, `groups`],
1248
- Pending: [, (_) => de_UserPendingChanges(_, context), `pending`],
1249
- ReplicationUser: [, import_smithy_client.expectBoolean, `replicationUser`],
1250
- Username: [, import_smithy_client.expectString, `username`]
1251
- });
1252
- Object.assign(contents, doc);
1253
- return contents;
1254
- }, "de_DescribeUserCommand");
1255
- var de_DescribeUserCommandError = /* @__PURE__ */ __name(async (output, context) => {
1256
- const parsedOutput = {
1257
- ...output,
1258
- body: await parseErrorBody(output.body, context)
1259
- };
1260
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1261
- switch (errorCode) {
1262
- case "BadRequestException":
1263
- case "com.amazonaws.mq#BadRequestException":
1264
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1265
- case "ForbiddenException":
1266
- case "com.amazonaws.mq#ForbiddenException":
1267
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1268
- case "InternalServerErrorException":
1269
- case "com.amazonaws.mq#InternalServerErrorException":
1270
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1271
- case "NotFoundException":
1272
- case "com.amazonaws.mq#NotFoundException":
1273
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1274
- default:
1275
- const parsedBody = parsedOutput.body;
1276
- return throwDefaultError({
1277
- output,
1278
- parsedBody,
1279
- errorCode
1280
- });
898
+ return contents;
899
+ }, "de_DescribeConfigurationRevisionCommand");
900
+ var de_DescribeUserCommand = /* @__PURE__ */ __name(async (output, context) => {
901
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
902
+ return de_CommandError(output, context);
1281
903
  }
1282
- }, "de_DescribeUserCommandError");
904
+ const contents = (0, import_smithy_client.map)({
905
+ $metadata: deserializeMetadata(output)
906
+ });
907
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
908
+ const doc = (0, import_smithy_client.take)(data, {
909
+ BrokerId: [, import_smithy_client.expectString, `brokerId`],
910
+ ConsoleAccess: [, import_smithy_client.expectBoolean, `consoleAccess`],
911
+ Groups: [, import_smithy_client._json, `groups`],
912
+ Pending: [, (_) => de_UserPendingChanges(_, context), `pending`],
913
+ ReplicationUser: [, import_smithy_client.expectBoolean, `replicationUser`],
914
+ Username: [, import_smithy_client.expectString, `username`]
915
+ });
916
+ Object.assign(contents, doc);
917
+ return contents;
918
+ }, "de_DescribeUserCommand");
1283
919
  var de_ListBrokersCommand = /* @__PURE__ */ __name(async (output, context) => {
1284
920
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1285
- return de_ListBrokersCommandError(output, context);
921
+ return de_CommandError(output, context);
1286
922
  }
1287
923
  const contents = (0, import_smithy_client.map)({
1288
924
  $metadata: deserializeMetadata(output)
@@ -1295,34 +931,9 @@ var de_ListBrokersCommand = /* @__PURE__ */ __name(async (output, context) => {
1295
931
  Object.assign(contents, doc);
1296
932
  return contents;
1297
933
  }, "de_ListBrokersCommand");
1298
- var de_ListBrokersCommandError = /* @__PURE__ */ __name(async (output, context) => {
1299
- const parsedOutput = {
1300
- ...output,
1301
- body: await parseErrorBody(output.body, context)
1302
- };
1303
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1304
- switch (errorCode) {
1305
- case "BadRequestException":
1306
- case "com.amazonaws.mq#BadRequestException":
1307
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1308
- case "ForbiddenException":
1309
- case "com.amazonaws.mq#ForbiddenException":
1310
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1311
- case "InternalServerErrorException":
1312
- case "com.amazonaws.mq#InternalServerErrorException":
1313
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1314
- default:
1315
- const parsedBody = parsedOutput.body;
1316
- return throwDefaultError({
1317
- output,
1318
- parsedBody,
1319
- errorCode
1320
- });
1321
- }
1322
- }, "de_ListBrokersCommandError");
1323
934
  var de_ListConfigurationRevisionsCommand = /* @__PURE__ */ __name(async (output, context) => {
1324
935
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1325
- return de_ListConfigurationRevisionsCommandError(output, context);
936
+ return de_CommandError(output, context);
1326
937
  }
1327
938
  const contents = (0, import_smithy_client.map)({
1328
939
  $metadata: deserializeMetadata(output)
@@ -1337,37 +948,9 @@ var de_ListConfigurationRevisionsCommand = /* @__PURE__ */ __name(async (output,
1337
948
  Object.assign(contents, doc);
1338
949
  return contents;
1339
950
  }, "de_ListConfigurationRevisionsCommand");
1340
- var de_ListConfigurationRevisionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1341
- const parsedOutput = {
1342
- ...output,
1343
- body: await parseErrorBody(output.body, context)
1344
- };
1345
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1346
- switch (errorCode) {
1347
- case "BadRequestException":
1348
- case "com.amazonaws.mq#BadRequestException":
1349
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1350
- case "ForbiddenException":
1351
- case "com.amazonaws.mq#ForbiddenException":
1352
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1353
- case "InternalServerErrorException":
1354
- case "com.amazonaws.mq#InternalServerErrorException":
1355
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1356
- case "NotFoundException":
1357
- case "com.amazonaws.mq#NotFoundException":
1358
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1359
- default:
1360
- const parsedBody = parsedOutput.body;
1361
- return throwDefaultError({
1362
- output,
1363
- parsedBody,
1364
- errorCode
1365
- });
1366
- }
1367
- }, "de_ListConfigurationRevisionsCommandError");
1368
951
  var de_ListConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {
1369
952
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1370
- return de_ListConfigurationsCommandError(output, context);
953
+ return de_CommandError(output, context);
1371
954
  }
1372
955
  const contents = (0, import_smithy_client.map)({
1373
956
  $metadata: deserializeMetadata(output)
@@ -1381,34 +964,9 @@ var de_ListConfigurationsCommand = /* @__PURE__ */ __name(async (output, context
1381
964
  Object.assign(contents, doc);
1382
965
  return contents;
1383
966
  }, "de_ListConfigurationsCommand");
1384
- var de_ListConfigurationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1385
- const parsedOutput = {
1386
- ...output,
1387
- body: await parseErrorBody(output.body, context)
1388
- };
1389
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1390
- switch (errorCode) {
1391
- case "BadRequestException":
1392
- case "com.amazonaws.mq#BadRequestException":
1393
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1394
- case "ForbiddenException":
1395
- case "com.amazonaws.mq#ForbiddenException":
1396
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1397
- case "InternalServerErrorException":
1398
- case "com.amazonaws.mq#InternalServerErrorException":
1399
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1400
- default:
1401
- const parsedBody = parsedOutput.body;
1402
- return throwDefaultError({
1403
- output,
1404
- parsedBody,
1405
- errorCode
1406
- });
1407
- }
1408
- }, "de_ListConfigurationsCommandError");
1409
967
  var de_ListTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
1410
968
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1411
- return de_ListTagsCommandError(output, context);
969
+ return de_CommandError(output, context);
1412
970
  }
1413
971
  const contents = (0, import_smithy_client.map)({
1414
972
  $metadata: deserializeMetadata(output)
@@ -1420,37 +978,9 @@ var de_ListTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
1420
978
  Object.assign(contents, doc);
1421
979
  return contents;
1422
980
  }, "de_ListTagsCommand");
1423
- var de_ListTagsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1424
- const parsedOutput = {
1425
- ...output,
1426
- body: await parseErrorBody(output.body, context)
1427
- };
1428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1429
- switch (errorCode) {
1430
- case "BadRequestException":
1431
- case "com.amazonaws.mq#BadRequestException":
1432
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1433
- case "ForbiddenException":
1434
- case "com.amazonaws.mq#ForbiddenException":
1435
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1436
- case "InternalServerErrorException":
1437
- case "com.amazonaws.mq#InternalServerErrorException":
1438
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1439
- case "NotFoundException":
1440
- case "com.amazonaws.mq#NotFoundException":
1441
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1442
- default:
1443
- const parsedBody = parsedOutput.body;
1444
- return throwDefaultError({
1445
- output,
1446
- parsedBody,
1447
- errorCode
1448
- });
1449
- }
1450
- }, "de_ListTagsCommandError");
1451
981
  var de_ListUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
1452
982
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1453
- return de_ListUsersCommandError(output, context);
983
+ return de_CommandError(output, context);
1454
984
  }
1455
985
  const contents = (0, import_smithy_client.map)({
1456
986
  $metadata: deserializeMetadata(output)
@@ -1465,37 +995,9 @@ var de_ListUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
1465
995
  Object.assign(contents, doc);
1466
996
  return contents;
1467
997
  }, "de_ListUsersCommand");
1468
- var de_ListUsersCommandError = /* @__PURE__ */ __name(async (output, context) => {
1469
- const parsedOutput = {
1470
- ...output,
1471
- body: await parseErrorBody(output.body, context)
1472
- };
1473
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1474
- switch (errorCode) {
1475
- case "BadRequestException":
1476
- case "com.amazonaws.mq#BadRequestException":
1477
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1478
- case "ForbiddenException":
1479
- case "com.amazonaws.mq#ForbiddenException":
1480
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1481
- case "InternalServerErrorException":
1482
- case "com.amazonaws.mq#InternalServerErrorException":
1483
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1484
- case "NotFoundException":
1485
- case "com.amazonaws.mq#NotFoundException":
1486
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1487
- default:
1488
- const parsedBody = parsedOutput.body;
1489
- return throwDefaultError({
1490
- output,
1491
- parsedBody,
1492
- errorCode
1493
- });
1494
- }
1495
- }, "de_ListUsersCommandError");
1496
998
  var de_PromoteCommand = /* @__PURE__ */ __name(async (output, context) => {
1497
999
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1498
- return de_PromoteCommandError(output, context);
1000
+ return de_CommandError(output, context);
1499
1001
  }
1500
1002
  const contents = (0, import_smithy_client.map)({
1501
1003
  $metadata: deserializeMetadata(output)
@@ -1507,37 +1009,9 @@ var de_PromoteCommand = /* @__PURE__ */ __name(async (output, context) => {
1507
1009
  Object.assign(contents, doc);
1508
1010
  return contents;
1509
1011
  }, "de_PromoteCommand");
1510
- var de_PromoteCommandError = /* @__PURE__ */ __name(async (output, context) => {
1511
- const parsedOutput = {
1512
- ...output,
1513
- body: await parseErrorBody(output.body, context)
1514
- };
1515
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1516
- switch (errorCode) {
1517
- case "BadRequestException":
1518
- case "com.amazonaws.mq#BadRequestException":
1519
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1520
- case "ForbiddenException":
1521
- case "com.amazonaws.mq#ForbiddenException":
1522
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1523
- case "InternalServerErrorException":
1524
- case "com.amazonaws.mq#InternalServerErrorException":
1525
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1526
- case "NotFoundException":
1527
- case "com.amazonaws.mq#NotFoundException":
1528
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1529
- default:
1530
- const parsedBody = parsedOutput.body;
1531
- return throwDefaultError({
1532
- output,
1533
- parsedBody,
1534
- errorCode
1535
- });
1536
- }
1537
- }, "de_PromoteCommandError");
1538
1012
  var de_RebootBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
1539
1013
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1540
- return de_RebootBrokerCommandError(output, context);
1014
+ return de_CommandError(output, context);
1541
1015
  }
1542
1016
  const contents = (0, import_smithy_client.map)({
1543
1017
  $metadata: deserializeMetadata(output)
@@ -1545,37 +1019,9 @@ var de_RebootBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
1545
1019
  await (0, import_smithy_client.collectBody)(output.body, context);
1546
1020
  return contents;
1547
1021
  }, "de_RebootBrokerCommand");
1548
- var de_RebootBrokerCommandError = /* @__PURE__ */ __name(async (output, context) => {
1549
- const parsedOutput = {
1550
- ...output,
1551
- body: await parseErrorBody(output.body, context)
1552
- };
1553
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1554
- switch (errorCode) {
1555
- case "BadRequestException":
1556
- case "com.amazonaws.mq#BadRequestException":
1557
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1558
- case "ForbiddenException":
1559
- case "com.amazonaws.mq#ForbiddenException":
1560
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1561
- case "InternalServerErrorException":
1562
- case "com.amazonaws.mq#InternalServerErrorException":
1563
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1564
- case "NotFoundException":
1565
- case "com.amazonaws.mq#NotFoundException":
1566
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1567
- default:
1568
- const parsedBody = parsedOutput.body;
1569
- return throwDefaultError({
1570
- output,
1571
- parsedBody,
1572
- errorCode
1573
- });
1574
- }
1575
- }, "de_RebootBrokerCommandError");
1576
1022
  var de_UpdateBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
1577
1023
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1578
- return de_UpdateBrokerCommandError(output, context);
1024
+ return de_CommandError(output, context);
1579
1025
  }
1580
1026
  const contents = (0, import_smithy_client.map)({
1581
1027
  $metadata: deserializeMetadata(output)
@@ -1604,40 +1050,9 @@ var de_UpdateBrokerCommand = /* @__PURE__ */ __name(async (output, context) => {
1604
1050
  Object.assign(contents, doc);
1605
1051
  return contents;
1606
1052
  }, "de_UpdateBrokerCommand");
1607
- var de_UpdateBrokerCommandError = /* @__PURE__ */ __name(async (output, context) => {
1608
- const parsedOutput = {
1609
- ...output,
1610
- body: await parseErrorBody(output.body, context)
1611
- };
1612
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1613
- switch (errorCode) {
1614
- case "BadRequestException":
1615
- case "com.amazonaws.mq#BadRequestException":
1616
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1617
- case "ConflictException":
1618
- case "com.amazonaws.mq#ConflictException":
1619
- throw await de_ConflictExceptionRes(parsedOutput, context);
1620
- case "ForbiddenException":
1621
- case "com.amazonaws.mq#ForbiddenException":
1622
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1623
- case "InternalServerErrorException":
1624
- case "com.amazonaws.mq#InternalServerErrorException":
1625
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1626
- case "NotFoundException":
1627
- case "com.amazonaws.mq#NotFoundException":
1628
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1629
- default:
1630
- const parsedBody = parsedOutput.body;
1631
- return throwDefaultError({
1632
- output,
1633
- parsedBody,
1634
- errorCode
1635
- });
1636
- }
1637
- }, "de_UpdateBrokerCommandError");
1638
1053
  var de_UpdateConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
1639
1054
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1640
- return de_UpdateConfigurationCommandError(output, context);
1055
+ return de_CommandError(output, context);
1641
1056
  }
1642
1057
  const contents = (0, import_smithy_client.map)({
1643
1058
  $metadata: deserializeMetadata(output)
@@ -1654,40 +1069,9 @@ var de_UpdateConfigurationCommand = /* @__PURE__ */ __name(async (output, contex
1654
1069
  Object.assign(contents, doc);
1655
1070
  return contents;
1656
1071
  }, "de_UpdateConfigurationCommand");
1657
- var de_UpdateConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1658
- const parsedOutput = {
1659
- ...output,
1660
- body: await parseErrorBody(output.body, context)
1661
- };
1662
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1663
- switch (errorCode) {
1664
- case "BadRequestException":
1665
- case "com.amazonaws.mq#BadRequestException":
1666
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1667
- case "ConflictException":
1668
- case "com.amazonaws.mq#ConflictException":
1669
- throw await de_ConflictExceptionRes(parsedOutput, context);
1670
- case "ForbiddenException":
1671
- case "com.amazonaws.mq#ForbiddenException":
1672
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1673
- case "InternalServerErrorException":
1674
- case "com.amazonaws.mq#InternalServerErrorException":
1675
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1676
- case "NotFoundException":
1677
- case "com.amazonaws.mq#NotFoundException":
1678
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1679
- default:
1680
- const parsedBody = parsedOutput.body;
1681
- return throwDefaultError({
1682
- output,
1683
- parsedBody,
1684
- errorCode
1685
- });
1686
- }
1687
- }, "de_UpdateConfigurationCommandError");
1688
1072
  var de_UpdateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
1689
1073
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1690
- return de_UpdateUserCommandError(output, context);
1074
+ return de_CommandError(output, context);
1691
1075
  }
1692
1076
  const contents = (0, import_smithy_client.map)({
1693
1077
  $metadata: deserializeMetadata(output)
@@ -1695,7 +1079,7 @@ var de_UpdateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
1695
1079
  await (0, import_smithy_client.collectBody)(output.body, context);
1696
1080
  return contents;
1697
1081
  }, "de_UpdateUserCommand");
1698
- var de_UpdateUserCommandError = /* @__PURE__ */ __name(async (output, context) => {
1082
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1699
1083
  const parsedOutput = {
1700
1084
  ...output,
1701
1085
  body: await parseErrorBody(output.body, context)
@@ -1714,6 +1098,9 @@ var de_UpdateUserCommandError = /* @__PURE__ */ __name(async (output, context) =
1714
1098
  case "InternalServerErrorException":
1715
1099
  case "com.amazonaws.mq#InternalServerErrorException":
1716
1100
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1101
+ case "UnauthorizedException":
1102
+ case "com.amazonaws.mq#UnauthorizedException":
1103
+ throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1717
1104
  case "NotFoundException":
1718
1105
  case "com.amazonaws.mq#NotFoundException":
1719
1106
  throw await de_NotFoundExceptionRes(parsedOutput, context);
@@ -1725,7 +1112,7 @@ var de_UpdateUserCommandError = /* @__PURE__ */ __name(async (output, context) =
1725
1112
  errorCode
1726
1113
  });
1727
1114
  }
1728
- }, "de_UpdateUserCommandError");
1115
+ }, "de_CommandError");
1729
1116
  var throwDefaultError = (0, import_smithy_client.withBaseException)(MqServiceException);
1730
1117
  var de_BadRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1731
1118
  const contents = (0, import_smithy_client.map)({});