@aws-sdk/client-kafka 3.50.0 → 3.53.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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/KafkaServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +123 -2
- package/dist-cjs/protocols/Aws_restJson1.js +406 -1567
- package/dist-es/index.js +1 -0
- package/dist-es/models/KafkaServiceException.js +12 -0
- package/dist-es/models/models_0.js +114 -1
- package/dist-es/protocols/Aws_restJson1.js +861 -1716
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/KafkaServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +58 -25
- package/dist-types/ts3.4/Kafka.d.ts +180 -0
- package/dist-types/ts3.4/KafkaClient.d.ts +108 -0
- package/dist-types/ts3.4/commands/BatchAssociateScramSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/BatchDisassociateScramSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateClusterCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateClusterV2Command.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteClusterCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeClusterCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeClusterOperationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeClusterV2Command.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeConfigurationRevisionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetBootstrapBrokersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetCompatibleKafkaVersionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListClusterOperationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListClustersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListClustersV2Command.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListConfigurationRevisionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListConfigurationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListKafkaVersionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListNodesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListScramSecretsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RebootBrokerCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateBrokerCountCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateBrokerStorageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateBrokerTypeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateClusterConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateClusterKafkaVersionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateConnectivityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateMonitoringCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSecurityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +35 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/KafkaServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1606 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListClusterOperationsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListClustersPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListClustersV2Paginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListConfigurationRevisionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListConfigurationsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListKafkaVersionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListNodesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListScramSecretsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +9 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +107 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
|
@@ -4,6 +4,8 @@ exports.deserializeAws_restJson1ListClusterOperationsCommand = exports.deseriali
|
|
|
4
4
|
exports.deserializeAws_restJson1UpdateSecurityCommand = exports.deserializeAws_restJson1UpdateMonitoringCommand = exports.deserializeAws_restJson1UpdateConnectivityCommand = exports.deserializeAws_restJson1UpdateConfigurationCommand = exports.deserializeAws_restJson1UpdateClusterKafkaVersionCommand = exports.deserializeAws_restJson1UpdateClusterConfigurationCommand = exports.deserializeAws_restJson1UpdateBrokerTypeCommand = exports.deserializeAws_restJson1UpdateBrokerStorageCommand = exports.deserializeAws_restJson1UpdateBrokerCountCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RebootBrokerCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListScramSecretsCommand = exports.deserializeAws_restJson1ListNodesCommand = exports.deserializeAws_restJson1ListKafkaVersionsCommand = exports.deserializeAws_restJson1ListConfigurationsCommand = exports.deserializeAws_restJson1ListConfigurationRevisionsCommand = exports.deserializeAws_restJson1ListClustersV2Command = exports.deserializeAws_restJson1ListClustersCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const KafkaServiceException_1 = require("../models/KafkaServiceException");
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
7
9
|
const serializeAws_restJson1BatchAssociateScramSecretCommand = async (input, context) => {
|
|
8
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
9
11
|
const headers = {
|
|
@@ -1111,75 +1113,34 @@ const deserializeAws_restJson1BatchAssociateScramSecretCommandError = async (out
|
|
|
1111
1113
|
switch (errorCode) {
|
|
1112
1114
|
case "BadRequestException":
|
|
1113
1115
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1114
|
-
|
|
1115
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1116
|
-
name: errorCode,
|
|
1117
|
-
$metadata: deserializeMetadata(output),
|
|
1118
|
-
};
|
|
1119
|
-
break;
|
|
1116
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1120
1117
|
case "ForbiddenException":
|
|
1121
1118
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1122
|
-
|
|
1123
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1124
|
-
name: errorCode,
|
|
1125
|
-
$metadata: deserializeMetadata(output),
|
|
1126
|
-
};
|
|
1127
|
-
break;
|
|
1119
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1128
1120
|
case "InternalServerErrorException":
|
|
1129
1121
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1130
|
-
|
|
1131
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1132
|
-
name: errorCode,
|
|
1133
|
-
$metadata: deserializeMetadata(output),
|
|
1134
|
-
};
|
|
1135
|
-
break;
|
|
1122
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1136
1123
|
case "NotFoundException":
|
|
1137
1124
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1138
|
-
|
|
1139
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1140
|
-
name: errorCode,
|
|
1141
|
-
$metadata: deserializeMetadata(output),
|
|
1142
|
-
};
|
|
1143
|
-
break;
|
|
1125
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1144
1126
|
case "ServiceUnavailableException":
|
|
1145
1127
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
1146
|
-
|
|
1147
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1148
|
-
name: errorCode,
|
|
1149
|
-
$metadata: deserializeMetadata(output),
|
|
1150
|
-
};
|
|
1151
|
-
break;
|
|
1128
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1152
1129
|
case "TooManyRequestsException":
|
|
1153
1130
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
1154
|
-
|
|
1155
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1156
|
-
name: errorCode,
|
|
1157
|
-
$metadata: deserializeMetadata(output),
|
|
1158
|
-
};
|
|
1159
|
-
break;
|
|
1131
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1160
1132
|
case "UnauthorizedException":
|
|
1161
1133
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1162
|
-
|
|
1163
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1164
|
-
name: errorCode,
|
|
1165
|
-
$metadata: deserializeMetadata(output),
|
|
1166
|
-
};
|
|
1167
|
-
break;
|
|
1134
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1168
1135
|
default:
|
|
1169
1136
|
const parsedBody = parsedOutput.body;
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
...parsedBody,
|
|
1173
|
-
name: `${errorCode}`,
|
|
1174
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1137
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1138
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1175
1139
|
$fault: "client",
|
|
1176
1140
|
$metadata: deserializeMetadata(output),
|
|
1177
|
-
};
|
|
1141
|
+
});
|
|
1142
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1178
1143
|
}
|
|
1179
|
-
const message = response.message || response.Message || errorCode;
|
|
1180
|
-
response.message = message;
|
|
1181
|
-
delete response.Message;
|
|
1182
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1183
1144
|
};
|
|
1184
1145
|
const deserializeAws_restJson1BatchDisassociateScramSecretCommand = async (output, context) => {
|
|
1185
1146
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1211,75 +1172,34 @@ const deserializeAws_restJson1BatchDisassociateScramSecretCommandError = async (
|
|
|
1211
1172
|
switch (errorCode) {
|
|
1212
1173
|
case "BadRequestException":
|
|
1213
1174
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1214
|
-
|
|
1215
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1216
|
-
name: errorCode,
|
|
1217
|
-
$metadata: deserializeMetadata(output),
|
|
1218
|
-
};
|
|
1219
|
-
break;
|
|
1175
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1220
1176
|
case "ForbiddenException":
|
|
1221
1177
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1222
|
-
|
|
1223
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1224
|
-
name: errorCode,
|
|
1225
|
-
$metadata: deserializeMetadata(output),
|
|
1226
|
-
};
|
|
1227
|
-
break;
|
|
1178
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1228
1179
|
case "InternalServerErrorException":
|
|
1229
1180
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1230
|
-
|
|
1231
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1232
|
-
name: errorCode,
|
|
1233
|
-
$metadata: deserializeMetadata(output),
|
|
1234
|
-
};
|
|
1235
|
-
break;
|
|
1181
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1236
1182
|
case "NotFoundException":
|
|
1237
1183
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1238
|
-
|
|
1239
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1240
|
-
name: errorCode,
|
|
1241
|
-
$metadata: deserializeMetadata(output),
|
|
1242
|
-
};
|
|
1243
|
-
break;
|
|
1184
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1244
1185
|
case "ServiceUnavailableException":
|
|
1245
1186
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
1246
|
-
|
|
1247
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1248
|
-
name: errorCode,
|
|
1249
|
-
$metadata: deserializeMetadata(output),
|
|
1250
|
-
};
|
|
1251
|
-
break;
|
|
1187
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1252
1188
|
case "TooManyRequestsException":
|
|
1253
1189
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
1254
|
-
|
|
1255
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1256
|
-
name: errorCode,
|
|
1257
|
-
$metadata: deserializeMetadata(output),
|
|
1258
|
-
};
|
|
1259
|
-
break;
|
|
1190
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1260
1191
|
case "UnauthorizedException":
|
|
1261
1192
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1262
|
-
|
|
1263
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1264
|
-
name: errorCode,
|
|
1265
|
-
$metadata: deserializeMetadata(output),
|
|
1266
|
-
};
|
|
1267
|
-
break;
|
|
1193
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1268
1194
|
default:
|
|
1269
1195
|
const parsedBody = parsedOutput.body;
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
...parsedBody,
|
|
1273
|
-
name: `${errorCode}`,
|
|
1274
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1196
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1197
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1275
1198
|
$fault: "client",
|
|
1276
1199
|
$metadata: deserializeMetadata(output),
|
|
1277
|
-
};
|
|
1200
|
+
});
|
|
1201
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1278
1202
|
}
|
|
1279
|
-
const message = response.message || response.Message || errorCode;
|
|
1280
|
-
response.message = message;
|
|
1281
|
-
delete response.Message;
|
|
1282
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1283
1203
|
};
|
|
1284
1204
|
const deserializeAws_restJson1CreateClusterCommand = async (output, context) => {
|
|
1285
1205
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1315,75 +1235,34 @@ const deserializeAws_restJson1CreateClusterCommandError = async (output, context
|
|
|
1315
1235
|
switch (errorCode) {
|
|
1316
1236
|
case "BadRequestException":
|
|
1317
1237
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1318
|
-
|
|
1319
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1320
|
-
name: errorCode,
|
|
1321
|
-
$metadata: deserializeMetadata(output),
|
|
1322
|
-
};
|
|
1323
|
-
break;
|
|
1238
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1324
1239
|
case "ConflictException":
|
|
1325
1240
|
case "com.amazonaws.kafka#ConflictException":
|
|
1326
|
-
|
|
1327
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1328
|
-
name: errorCode,
|
|
1329
|
-
$metadata: deserializeMetadata(output),
|
|
1330
|
-
};
|
|
1331
|
-
break;
|
|
1241
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1332
1242
|
case "ForbiddenException":
|
|
1333
1243
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1334
|
-
|
|
1335
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1336
|
-
name: errorCode,
|
|
1337
|
-
$metadata: deserializeMetadata(output),
|
|
1338
|
-
};
|
|
1339
|
-
break;
|
|
1244
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1340
1245
|
case "InternalServerErrorException":
|
|
1341
1246
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1342
|
-
|
|
1343
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1344
|
-
name: errorCode,
|
|
1345
|
-
$metadata: deserializeMetadata(output),
|
|
1346
|
-
};
|
|
1347
|
-
break;
|
|
1247
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1348
1248
|
case "ServiceUnavailableException":
|
|
1349
1249
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
1350
|
-
|
|
1351
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1352
|
-
name: errorCode,
|
|
1353
|
-
$metadata: deserializeMetadata(output),
|
|
1354
|
-
};
|
|
1355
|
-
break;
|
|
1250
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1356
1251
|
case "TooManyRequestsException":
|
|
1357
1252
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
1358
|
-
|
|
1359
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1360
|
-
name: errorCode,
|
|
1361
|
-
$metadata: deserializeMetadata(output),
|
|
1362
|
-
};
|
|
1363
|
-
break;
|
|
1253
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1364
1254
|
case "UnauthorizedException":
|
|
1365
1255
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1366
|
-
|
|
1367
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1368
|
-
name: errorCode,
|
|
1369
|
-
$metadata: deserializeMetadata(output),
|
|
1370
|
-
};
|
|
1371
|
-
break;
|
|
1256
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1372
1257
|
default:
|
|
1373
1258
|
const parsedBody = parsedOutput.body;
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
...parsedBody,
|
|
1377
|
-
name: `${errorCode}`,
|
|
1378
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1259
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1260
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1379
1261
|
$fault: "client",
|
|
1380
1262
|
$metadata: deserializeMetadata(output),
|
|
1381
|
-
};
|
|
1263
|
+
});
|
|
1264
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1382
1265
|
}
|
|
1383
|
-
const message = response.message || response.Message || errorCode;
|
|
1384
|
-
response.message = message;
|
|
1385
|
-
delete response.Message;
|
|
1386
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1387
1266
|
};
|
|
1388
1267
|
const deserializeAws_restJson1CreateClusterV2Command = async (output, context) => {
|
|
1389
1268
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1423,75 +1302,34 @@ const deserializeAws_restJson1CreateClusterV2CommandError = async (output, conte
|
|
|
1423
1302
|
switch (errorCode) {
|
|
1424
1303
|
case "BadRequestException":
|
|
1425
1304
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1426
|
-
|
|
1427
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1428
|
-
name: errorCode,
|
|
1429
|
-
$metadata: deserializeMetadata(output),
|
|
1430
|
-
};
|
|
1431
|
-
break;
|
|
1305
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1432
1306
|
case "ConflictException":
|
|
1433
1307
|
case "com.amazonaws.kafka#ConflictException":
|
|
1434
|
-
|
|
1435
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1436
|
-
name: errorCode,
|
|
1437
|
-
$metadata: deserializeMetadata(output),
|
|
1438
|
-
};
|
|
1439
|
-
break;
|
|
1308
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1440
1309
|
case "ForbiddenException":
|
|
1441
1310
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1442
|
-
|
|
1443
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1444
|
-
name: errorCode,
|
|
1445
|
-
$metadata: deserializeMetadata(output),
|
|
1446
|
-
};
|
|
1447
|
-
break;
|
|
1311
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1448
1312
|
case "InternalServerErrorException":
|
|
1449
1313
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1450
|
-
|
|
1451
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1452
|
-
name: errorCode,
|
|
1453
|
-
$metadata: deserializeMetadata(output),
|
|
1454
|
-
};
|
|
1455
|
-
break;
|
|
1314
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1456
1315
|
case "ServiceUnavailableException":
|
|
1457
1316
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
1458
|
-
|
|
1459
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1460
|
-
name: errorCode,
|
|
1461
|
-
$metadata: deserializeMetadata(output),
|
|
1462
|
-
};
|
|
1463
|
-
break;
|
|
1317
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1464
1318
|
case "TooManyRequestsException":
|
|
1465
1319
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
1466
|
-
|
|
1467
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1468
|
-
name: errorCode,
|
|
1469
|
-
$metadata: deserializeMetadata(output),
|
|
1470
|
-
};
|
|
1471
|
-
break;
|
|
1320
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1472
1321
|
case "UnauthorizedException":
|
|
1473
1322
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1474
|
-
|
|
1475
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1476
|
-
name: errorCode,
|
|
1477
|
-
$metadata: deserializeMetadata(output),
|
|
1478
|
-
};
|
|
1479
|
-
break;
|
|
1323
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1480
1324
|
default:
|
|
1481
1325
|
const parsedBody = parsedOutput.body;
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
...parsedBody,
|
|
1485
|
-
name: `${errorCode}`,
|
|
1486
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1326
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1327
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1487
1328
|
$fault: "client",
|
|
1488
1329
|
$metadata: deserializeMetadata(output),
|
|
1489
|
-
};
|
|
1330
|
+
});
|
|
1331
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1490
1332
|
}
|
|
1491
|
-
const message = response.message || response.Message || errorCode;
|
|
1492
|
-
response.message = message;
|
|
1493
|
-
delete response.Message;
|
|
1494
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1495
1333
|
};
|
|
1496
1334
|
const deserializeAws_restJson1CreateConfigurationCommand = async (output, context) => {
|
|
1497
1335
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1535,75 +1373,34 @@ const deserializeAws_restJson1CreateConfigurationCommandError = async (output, c
|
|
|
1535
1373
|
switch (errorCode) {
|
|
1536
1374
|
case "BadRequestException":
|
|
1537
1375
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1538
|
-
|
|
1539
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1540
|
-
name: errorCode,
|
|
1541
|
-
$metadata: deserializeMetadata(output),
|
|
1542
|
-
};
|
|
1543
|
-
break;
|
|
1376
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1544
1377
|
case "ConflictException":
|
|
1545
1378
|
case "com.amazonaws.kafka#ConflictException":
|
|
1546
|
-
|
|
1547
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1548
|
-
name: errorCode,
|
|
1549
|
-
$metadata: deserializeMetadata(output),
|
|
1550
|
-
};
|
|
1551
|
-
break;
|
|
1379
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1552
1380
|
case "ForbiddenException":
|
|
1553
1381
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1554
|
-
|
|
1555
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1556
|
-
name: errorCode,
|
|
1557
|
-
$metadata: deserializeMetadata(output),
|
|
1558
|
-
};
|
|
1559
|
-
break;
|
|
1382
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1560
1383
|
case "InternalServerErrorException":
|
|
1561
1384
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1562
|
-
|
|
1563
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1564
|
-
name: errorCode,
|
|
1565
|
-
$metadata: deserializeMetadata(output),
|
|
1566
|
-
};
|
|
1567
|
-
break;
|
|
1385
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1568
1386
|
case "ServiceUnavailableException":
|
|
1569
1387
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
1570
|
-
|
|
1571
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1572
|
-
name: errorCode,
|
|
1573
|
-
$metadata: deserializeMetadata(output),
|
|
1574
|
-
};
|
|
1575
|
-
break;
|
|
1388
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1576
1389
|
case "TooManyRequestsException":
|
|
1577
1390
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
1578
|
-
|
|
1579
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1580
|
-
name: errorCode,
|
|
1581
|
-
$metadata: deserializeMetadata(output),
|
|
1582
|
-
};
|
|
1583
|
-
break;
|
|
1391
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1584
1392
|
case "UnauthorizedException":
|
|
1585
1393
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1586
|
-
|
|
1587
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1588
|
-
name: errorCode,
|
|
1589
|
-
$metadata: deserializeMetadata(output),
|
|
1590
|
-
};
|
|
1591
|
-
break;
|
|
1394
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1592
1395
|
default:
|
|
1593
1396
|
const parsedBody = parsedOutput.body;
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
...parsedBody,
|
|
1597
|
-
name: `${errorCode}`,
|
|
1598
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1397
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1398
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1599
1399
|
$fault: "client",
|
|
1600
1400
|
$metadata: deserializeMetadata(output),
|
|
1601
|
-
};
|
|
1401
|
+
});
|
|
1402
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1602
1403
|
}
|
|
1603
|
-
const message = response.message || response.Message || errorCode;
|
|
1604
|
-
response.message = message;
|
|
1605
|
-
delete response.Message;
|
|
1606
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1607
1404
|
};
|
|
1608
1405
|
const deserializeAws_restJson1DeleteClusterCommand = async (output, context) => {
|
|
1609
1406
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1635,51 +1432,25 @@ const deserializeAws_restJson1DeleteClusterCommandError = async (output, context
|
|
|
1635
1432
|
switch (errorCode) {
|
|
1636
1433
|
case "BadRequestException":
|
|
1637
1434
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1638
|
-
|
|
1639
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1640
|
-
name: errorCode,
|
|
1641
|
-
$metadata: deserializeMetadata(output),
|
|
1642
|
-
};
|
|
1643
|
-
break;
|
|
1435
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1644
1436
|
case "ForbiddenException":
|
|
1645
1437
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1646
|
-
|
|
1647
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1648
|
-
name: errorCode,
|
|
1649
|
-
$metadata: deserializeMetadata(output),
|
|
1650
|
-
};
|
|
1651
|
-
break;
|
|
1438
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1652
1439
|
case "InternalServerErrorException":
|
|
1653
1440
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1654
|
-
|
|
1655
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1656
|
-
name: errorCode,
|
|
1657
|
-
$metadata: deserializeMetadata(output),
|
|
1658
|
-
};
|
|
1659
|
-
break;
|
|
1441
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1660
1442
|
case "NotFoundException":
|
|
1661
1443
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1662
|
-
|
|
1663
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1664
|
-
name: errorCode,
|
|
1665
|
-
$metadata: deserializeMetadata(output),
|
|
1666
|
-
};
|
|
1667
|
-
break;
|
|
1444
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1668
1445
|
default:
|
|
1669
1446
|
const parsedBody = parsedOutput.body;
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
...parsedBody,
|
|
1673
|
-
name: `${errorCode}`,
|
|
1674
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1447
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1448
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1675
1449
|
$fault: "client",
|
|
1676
1450
|
$metadata: deserializeMetadata(output),
|
|
1677
|
-
};
|
|
1451
|
+
});
|
|
1452
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1678
1453
|
}
|
|
1679
|
-
const message = response.message || response.Message || errorCode;
|
|
1680
|
-
response.message = message;
|
|
1681
|
-
delete response.Message;
|
|
1682
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1683
1454
|
};
|
|
1684
1455
|
const deserializeAws_restJson1DeleteConfigurationCommand = async (output, context) => {
|
|
1685
1456
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1711,51 +1482,25 @@ const deserializeAws_restJson1DeleteConfigurationCommandError = async (output, c
|
|
|
1711
1482
|
switch (errorCode) {
|
|
1712
1483
|
case "BadRequestException":
|
|
1713
1484
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1714
|
-
|
|
1715
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1716
|
-
name: errorCode,
|
|
1717
|
-
$metadata: deserializeMetadata(output),
|
|
1718
|
-
};
|
|
1719
|
-
break;
|
|
1485
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1720
1486
|
case "ForbiddenException":
|
|
1721
1487
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1722
|
-
|
|
1723
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1724
|
-
name: errorCode,
|
|
1725
|
-
$metadata: deserializeMetadata(output),
|
|
1726
|
-
};
|
|
1727
|
-
break;
|
|
1488
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1728
1489
|
case "InternalServerErrorException":
|
|
1729
1490
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1730
|
-
|
|
1731
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1732
|
-
name: errorCode,
|
|
1733
|
-
$metadata: deserializeMetadata(output),
|
|
1734
|
-
};
|
|
1735
|
-
break;
|
|
1491
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1736
1492
|
case "NotFoundException":
|
|
1737
1493
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1738
|
-
|
|
1739
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1740
|
-
name: errorCode,
|
|
1741
|
-
$metadata: deserializeMetadata(output),
|
|
1742
|
-
};
|
|
1743
|
-
break;
|
|
1494
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1744
1495
|
default:
|
|
1745
1496
|
const parsedBody = parsedOutput.body;
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
...parsedBody,
|
|
1749
|
-
name: `${errorCode}`,
|
|
1750
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1497
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1498
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1751
1499
|
$fault: "client",
|
|
1752
1500
|
$metadata: deserializeMetadata(output),
|
|
1753
|
-
};
|
|
1501
|
+
});
|
|
1502
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1754
1503
|
}
|
|
1755
|
-
const message = response.message || response.Message || errorCode;
|
|
1756
|
-
response.message = message;
|
|
1757
|
-
delete response.Message;
|
|
1758
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1759
1504
|
};
|
|
1760
1505
|
const deserializeAws_restJson1DescribeClusterCommand = async (output, context) => {
|
|
1761
1506
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1783,59 +1528,28 @@ const deserializeAws_restJson1DescribeClusterCommandError = async (output, conte
|
|
|
1783
1528
|
switch (errorCode) {
|
|
1784
1529
|
case "BadRequestException":
|
|
1785
1530
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1786
|
-
|
|
1787
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1788
|
-
name: errorCode,
|
|
1789
|
-
$metadata: deserializeMetadata(output),
|
|
1790
|
-
};
|
|
1791
|
-
break;
|
|
1531
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1792
1532
|
case "ForbiddenException":
|
|
1793
1533
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1794
|
-
|
|
1795
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1796
|
-
name: errorCode,
|
|
1797
|
-
$metadata: deserializeMetadata(output),
|
|
1798
|
-
};
|
|
1799
|
-
break;
|
|
1534
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1800
1535
|
case "InternalServerErrorException":
|
|
1801
1536
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1802
|
-
|
|
1803
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1804
|
-
name: errorCode,
|
|
1805
|
-
$metadata: deserializeMetadata(output),
|
|
1806
|
-
};
|
|
1807
|
-
break;
|
|
1537
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1808
1538
|
case "NotFoundException":
|
|
1809
1539
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1810
|
-
|
|
1811
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1812
|
-
name: errorCode,
|
|
1813
|
-
$metadata: deserializeMetadata(output),
|
|
1814
|
-
};
|
|
1815
|
-
break;
|
|
1540
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1816
1541
|
case "UnauthorizedException":
|
|
1817
1542
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1818
|
-
|
|
1819
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1820
|
-
name: errorCode,
|
|
1821
|
-
$metadata: deserializeMetadata(output),
|
|
1822
|
-
};
|
|
1823
|
-
break;
|
|
1543
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1824
1544
|
default:
|
|
1825
1545
|
const parsedBody = parsedOutput.body;
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
...parsedBody,
|
|
1829
|
-
name: `${errorCode}`,
|
|
1830
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1546
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1547
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1831
1548
|
$fault: "client",
|
|
1832
1549
|
$metadata: deserializeMetadata(output),
|
|
1833
|
-
};
|
|
1550
|
+
});
|
|
1551
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1834
1552
|
}
|
|
1835
|
-
const message = response.message || response.Message || errorCode;
|
|
1836
|
-
response.message = message;
|
|
1837
|
-
delete response.Message;
|
|
1838
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1839
1553
|
};
|
|
1840
1554
|
const deserializeAws_restJson1DescribeClusterOperationCommand = async (output, context) => {
|
|
1841
1555
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1863,59 +1577,28 @@ const deserializeAws_restJson1DescribeClusterOperationCommandError = async (outp
|
|
|
1863
1577
|
switch (errorCode) {
|
|
1864
1578
|
case "BadRequestException":
|
|
1865
1579
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1866
|
-
|
|
1867
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1868
|
-
name: errorCode,
|
|
1869
|
-
$metadata: deserializeMetadata(output),
|
|
1870
|
-
};
|
|
1871
|
-
break;
|
|
1580
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1872
1581
|
case "ForbiddenException":
|
|
1873
1582
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1874
|
-
|
|
1875
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1876
|
-
name: errorCode,
|
|
1877
|
-
$metadata: deserializeMetadata(output),
|
|
1878
|
-
};
|
|
1879
|
-
break;
|
|
1583
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1880
1584
|
case "InternalServerErrorException":
|
|
1881
1585
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1882
|
-
|
|
1883
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1884
|
-
name: errorCode,
|
|
1885
|
-
$metadata: deserializeMetadata(output),
|
|
1886
|
-
};
|
|
1887
|
-
break;
|
|
1586
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1888
1587
|
case "NotFoundException":
|
|
1889
1588
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1890
|
-
|
|
1891
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1892
|
-
name: errorCode,
|
|
1893
|
-
$metadata: deserializeMetadata(output),
|
|
1894
|
-
};
|
|
1895
|
-
break;
|
|
1589
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1896
1590
|
case "UnauthorizedException":
|
|
1897
1591
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1898
|
-
|
|
1899
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1900
|
-
name: errorCode,
|
|
1901
|
-
$metadata: deserializeMetadata(output),
|
|
1902
|
-
};
|
|
1903
|
-
break;
|
|
1592
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1904
1593
|
default:
|
|
1905
1594
|
const parsedBody = parsedOutput.body;
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
...parsedBody,
|
|
1909
|
-
name: `${errorCode}`,
|
|
1910
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1595
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1596
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1911
1597
|
$fault: "client",
|
|
1912
1598
|
$metadata: deserializeMetadata(output),
|
|
1913
|
-
};
|
|
1599
|
+
});
|
|
1600
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1914
1601
|
}
|
|
1915
|
-
const message = response.message || response.Message || errorCode;
|
|
1916
|
-
response.message = message;
|
|
1917
|
-
delete response.Message;
|
|
1918
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1919
1602
|
};
|
|
1920
1603
|
const deserializeAws_restJson1DescribeClusterV2Command = async (output, context) => {
|
|
1921
1604
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1943,59 +1626,28 @@ const deserializeAws_restJson1DescribeClusterV2CommandError = async (output, con
|
|
|
1943
1626
|
switch (errorCode) {
|
|
1944
1627
|
case "BadRequestException":
|
|
1945
1628
|
case "com.amazonaws.kafka#BadRequestException":
|
|
1946
|
-
|
|
1947
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1948
|
-
name: errorCode,
|
|
1949
|
-
$metadata: deserializeMetadata(output),
|
|
1950
|
-
};
|
|
1951
|
-
break;
|
|
1629
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1952
1630
|
case "ForbiddenException":
|
|
1953
1631
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
1954
|
-
|
|
1955
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1956
|
-
name: errorCode,
|
|
1957
|
-
$metadata: deserializeMetadata(output),
|
|
1958
|
-
};
|
|
1959
|
-
break;
|
|
1632
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1960
1633
|
case "InternalServerErrorException":
|
|
1961
1634
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
1962
|
-
|
|
1963
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1964
|
-
name: errorCode,
|
|
1965
|
-
$metadata: deserializeMetadata(output),
|
|
1966
|
-
};
|
|
1967
|
-
break;
|
|
1635
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1968
1636
|
case "NotFoundException":
|
|
1969
1637
|
case "com.amazonaws.kafka#NotFoundException":
|
|
1970
|
-
|
|
1971
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1972
|
-
name: errorCode,
|
|
1973
|
-
$metadata: deserializeMetadata(output),
|
|
1974
|
-
};
|
|
1975
|
-
break;
|
|
1638
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1976
1639
|
case "UnauthorizedException":
|
|
1977
1640
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
1978
|
-
|
|
1979
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1980
|
-
name: errorCode,
|
|
1981
|
-
$metadata: deserializeMetadata(output),
|
|
1982
|
-
};
|
|
1983
|
-
break;
|
|
1641
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1984
1642
|
default:
|
|
1985
1643
|
const parsedBody = parsedOutput.body;
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
...parsedBody,
|
|
1989
|
-
name: `${errorCode}`,
|
|
1990
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1644
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1645
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1991
1646
|
$fault: "client",
|
|
1992
1647
|
$metadata: deserializeMetadata(output),
|
|
1993
|
-
};
|
|
1648
|
+
});
|
|
1649
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1994
1650
|
}
|
|
1995
|
-
const message = response.message || response.Message || errorCode;
|
|
1996
|
-
response.message = message;
|
|
1997
|
-
delete response.Message;
|
|
1998
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1999
1651
|
};
|
|
2000
1652
|
const deserializeAws_restJson1DescribeConfigurationCommand = async (output, context) => {
|
|
2001
1653
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2047,67 +1699,31 @@ const deserializeAws_restJson1DescribeConfigurationCommandError = async (output,
|
|
|
2047
1699
|
switch (errorCode) {
|
|
2048
1700
|
case "BadRequestException":
|
|
2049
1701
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2050
|
-
|
|
2051
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2052
|
-
name: errorCode,
|
|
2053
|
-
$metadata: deserializeMetadata(output),
|
|
2054
|
-
};
|
|
2055
|
-
break;
|
|
1702
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2056
1703
|
case "ForbiddenException":
|
|
2057
1704
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2058
|
-
|
|
2059
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2060
|
-
name: errorCode,
|
|
2061
|
-
$metadata: deserializeMetadata(output),
|
|
2062
|
-
};
|
|
2063
|
-
break;
|
|
1705
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2064
1706
|
case "InternalServerErrorException":
|
|
2065
1707
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2066
|
-
|
|
2067
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2068
|
-
name: errorCode,
|
|
2069
|
-
$metadata: deserializeMetadata(output),
|
|
2070
|
-
};
|
|
2071
|
-
break;
|
|
1708
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2072
1709
|
case "NotFoundException":
|
|
2073
1710
|
case "com.amazonaws.kafka#NotFoundException":
|
|
2074
|
-
|
|
2075
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2076
|
-
name: errorCode,
|
|
2077
|
-
$metadata: deserializeMetadata(output),
|
|
2078
|
-
};
|
|
2079
|
-
break;
|
|
1711
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2080
1712
|
case "ServiceUnavailableException":
|
|
2081
1713
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
2082
|
-
|
|
2083
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2084
|
-
name: errorCode,
|
|
2085
|
-
$metadata: deserializeMetadata(output),
|
|
2086
|
-
};
|
|
2087
|
-
break;
|
|
1714
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2088
1715
|
case "UnauthorizedException":
|
|
2089
1716
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2090
|
-
|
|
2091
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2092
|
-
name: errorCode,
|
|
2093
|
-
$metadata: deserializeMetadata(output),
|
|
2094
|
-
};
|
|
2095
|
-
break;
|
|
1717
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2096
1718
|
default:
|
|
2097
1719
|
const parsedBody = parsedOutput.body;
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
...parsedBody,
|
|
2101
|
-
name: `${errorCode}`,
|
|
2102
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1720
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1721
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2103
1722
|
$fault: "client",
|
|
2104
1723
|
$metadata: deserializeMetadata(output),
|
|
2105
|
-
};
|
|
1724
|
+
});
|
|
1725
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2106
1726
|
}
|
|
2107
|
-
const message = response.message || response.Message || errorCode;
|
|
2108
|
-
response.message = message;
|
|
2109
|
-
delete response.Message;
|
|
2110
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2111
1727
|
};
|
|
2112
1728
|
const deserializeAws_restJson1DescribeConfigurationRevisionCommand = async (output, context) => {
|
|
2113
1729
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2151,67 +1767,31 @@ const deserializeAws_restJson1DescribeConfigurationRevisionCommandError = async
|
|
|
2151
1767
|
switch (errorCode) {
|
|
2152
1768
|
case "BadRequestException":
|
|
2153
1769
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2154
|
-
|
|
2155
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2156
|
-
name: errorCode,
|
|
2157
|
-
$metadata: deserializeMetadata(output),
|
|
2158
|
-
};
|
|
2159
|
-
break;
|
|
1770
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2160
1771
|
case "ForbiddenException":
|
|
2161
1772
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2162
|
-
|
|
2163
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2164
|
-
name: errorCode,
|
|
2165
|
-
$metadata: deserializeMetadata(output),
|
|
2166
|
-
};
|
|
2167
|
-
break;
|
|
1773
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2168
1774
|
case "InternalServerErrorException":
|
|
2169
1775
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2170
|
-
|
|
2171
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2172
|
-
name: errorCode,
|
|
2173
|
-
$metadata: deserializeMetadata(output),
|
|
2174
|
-
};
|
|
2175
|
-
break;
|
|
1776
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2176
1777
|
case "NotFoundException":
|
|
2177
1778
|
case "com.amazonaws.kafka#NotFoundException":
|
|
2178
|
-
|
|
2179
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2180
|
-
name: errorCode,
|
|
2181
|
-
$metadata: deserializeMetadata(output),
|
|
2182
|
-
};
|
|
2183
|
-
break;
|
|
1779
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2184
1780
|
case "ServiceUnavailableException":
|
|
2185
1781
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
2186
|
-
|
|
2187
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2188
|
-
name: errorCode,
|
|
2189
|
-
$metadata: deserializeMetadata(output),
|
|
2190
|
-
};
|
|
2191
|
-
break;
|
|
1782
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2192
1783
|
case "UnauthorizedException":
|
|
2193
1784
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2194
|
-
|
|
2195
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2196
|
-
name: errorCode,
|
|
2197
|
-
$metadata: deserializeMetadata(output),
|
|
2198
|
-
};
|
|
2199
|
-
break;
|
|
1785
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2200
1786
|
default:
|
|
2201
1787
|
const parsedBody = parsedOutput.body;
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
...parsedBody,
|
|
2205
|
-
name: `${errorCode}`,
|
|
2206
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1788
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1789
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2207
1790
|
$fault: "client",
|
|
2208
1791
|
$metadata: deserializeMetadata(output),
|
|
2209
|
-
};
|
|
1792
|
+
});
|
|
1793
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2210
1794
|
}
|
|
2211
|
-
const message = response.message || response.Message || errorCode;
|
|
2212
|
-
response.message = message;
|
|
2213
|
-
delete response.Message;
|
|
2214
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2215
1795
|
};
|
|
2216
1796
|
const deserializeAws_restJson1GetBootstrapBrokersCommand = async (output, context) => {
|
|
2217
1797
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2263,59 +1843,28 @@ const deserializeAws_restJson1GetBootstrapBrokersCommandError = async (output, c
|
|
|
2263
1843
|
switch (errorCode) {
|
|
2264
1844
|
case "BadRequestException":
|
|
2265
1845
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2266
|
-
|
|
2267
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2268
|
-
name: errorCode,
|
|
2269
|
-
$metadata: deserializeMetadata(output),
|
|
2270
|
-
};
|
|
2271
|
-
break;
|
|
1846
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2272
1847
|
case "ConflictException":
|
|
2273
1848
|
case "com.amazonaws.kafka#ConflictException":
|
|
2274
|
-
|
|
2275
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2276
|
-
name: errorCode,
|
|
2277
|
-
$metadata: deserializeMetadata(output),
|
|
2278
|
-
};
|
|
2279
|
-
break;
|
|
1849
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
2280
1850
|
case "ForbiddenException":
|
|
2281
1851
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2282
|
-
|
|
2283
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2284
|
-
name: errorCode,
|
|
2285
|
-
$metadata: deserializeMetadata(output),
|
|
2286
|
-
};
|
|
2287
|
-
break;
|
|
1852
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2288
1853
|
case "InternalServerErrorException":
|
|
2289
1854
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2290
|
-
|
|
2291
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2292
|
-
name: errorCode,
|
|
2293
|
-
$metadata: deserializeMetadata(output),
|
|
2294
|
-
};
|
|
2295
|
-
break;
|
|
1855
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2296
1856
|
case "UnauthorizedException":
|
|
2297
1857
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2298
|
-
|
|
2299
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2300
|
-
name: errorCode,
|
|
2301
|
-
$metadata: deserializeMetadata(output),
|
|
2302
|
-
};
|
|
2303
|
-
break;
|
|
1858
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2304
1859
|
default:
|
|
2305
1860
|
const parsedBody = parsedOutput.body;
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
...parsedBody,
|
|
2309
|
-
name: `${errorCode}`,
|
|
2310
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1861
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1862
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2311
1863
|
$fault: "client",
|
|
2312
1864
|
$metadata: deserializeMetadata(output),
|
|
2313
|
-
};
|
|
1865
|
+
});
|
|
1866
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2314
1867
|
}
|
|
2315
|
-
const message = response.message || response.Message || errorCode;
|
|
2316
|
-
response.message = message;
|
|
2317
|
-
delete response.Message;
|
|
2318
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2319
1868
|
};
|
|
2320
1869
|
const deserializeAws_restJson1GetCompatibleKafkaVersionsCommand = async (output, context) => {
|
|
2321
1870
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2343,75 +1892,34 @@ const deserializeAws_restJson1GetCompatibleKafkaVersionsCommandError = async (ou
|
|
|
2343
1892
|
switch (errorCode) {
|
|
2344
1893
|
case "BadRequestException":
|
|
2345
1894
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2346
|
-
|
|
2347
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2348
|
-
name: errorCode,
|
|
2349
|
-
$metadata: deserializeMetadata(output),
|
|
2350
|
-
};
|
|
2351
|
-
break;
|
|
1895
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2352
1896
|
case "ForbiddenException":
|
|
2353
1897
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2354
|
-
|
|
2355
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2356
|
-
name: errorCode,
|
|
2357
|
-
$metadata: deserializeMetadata(output),
|
|
2358
|
-
};
|
|
2359
|
-
break;
|
|
1898
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2360
1899
|
case "InternalServerErrorException":
|
|
2361
1900
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2362
|
-
|
|
2363
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2364
|
-
name: errorCode,
|
|
2365
|
-
$metadata: deserializeMetadata(output),
|
|
2366
|
-
};
|
|
2367
|
-
break;
|
|
1901
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2368
1902
|
case "NotFoundException":
|
|
2369
1903
|
case "com.amazonaws.kafka#NotFoundException":
|
|
2370
|
-
|
|
2371
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2372
|
-
name: errorCode,
|
|
2373
|
-
$metadata: deserializeMetadata(output),
|
|
2374
|
-
};
|
|
2375
|
-
break;
|
|
1904
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2376
1905
|
case "ServiceUnavailableException":
|
|
2377
1906
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
2378
|
-
|
|
2379
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2380
|
-
name: errorCode,
|
|
2381
|
-
$metadata: deserializeMetadata(output),
|
|
2382
|
-
};
|
|
2383
|
-
break;
|
|
1907
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2384
1908
|
case "TooManyRequestsException":
|
|
2385
1909
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
2386
|
-
|
|
2387
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2388
|
-
name: errorCode,
|
|
2389
|
-
$metadata: deserializeMetadata(output),
|
|
2390
|
-
};
|
|
2391
|
-
break;
|
|
1910
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2392
1911
|
case "UnauthorizedException":
|
|
2393
1912
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2394
|
-
|
|
2395
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2396
|
-
name: errorCode,
|
|
2397
|
-
$metadata: deserializeMetadata(output),
|
|
2398
|
-
};
|
|
2399
|
-
break;
|
|
1913
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2400
1914
|
default:
|
|
2401
1915
|
const parsedBody = parsedOutput.body;
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
...parsedBody,
|
|
2405
|
-
name: `${errorCode}`,
|
|
2406
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1916
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1917
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2407
1918
|
$fault: "client",
|
|
2408
1919
|
$metadata: deserializeMetadata(output),
|
|
2409
|
-
};
|
|
1920
|
+
});
|
|
1921
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2410
1922
|
}
|
|
2411
|
-
const message = response.message || response.Message || errorCode;
|
|
2412
|
-
response.message = message;
|
|
2413
|
-
delete response.Message;
|
|
2414
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2415
1923
|
};
|
|
2416
1924
|
const deserializeAws_restJson1ListClusterOperationsCommand = async (output, context) => {
|
|
2417
1925
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2443,51 +1951,25 @@ const deserializeAws_restJson1ListClusterOperationsCommandError = async (output,
|
|
|
2443
1951
|
switch (errorCode) {
|
|
2444
1952
|
case "BadRequestException":
|
|
2445
1953
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2446
|
-
|
|
2447
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2448
|
-
name: errorCode,
|
|
2449
|
-
$metadata: deserializeMetadata(output),
|
|
2450
|
-
};
|
|
2451
|
-
break;
|
|
1954
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2452
1955
|
case "ForbiddenException":
|
|
2453
1956
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2454
|
-
|
|
2455
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2456
|
-
name: errorCode,
|
|
2457
|
-
$metadata: deserializeMetadata(output),
|
|
2458
|
-
};
|
|
2459
|
-
break;
|
|
1957
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2460
1958
|
case "InternalServerErrorException":
|
|
2461
1959
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2462
|
-
|
|
2463
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2464
|
-
name: errorCode,
|
|
2465
|
-
$metadata: deserializeMetadata(output),
|
|
2466
|
-
};
|
|
2467
|
-
break;
|
|
1960
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2468
1961
|
case "UnauthorizedException":
|
|
2469
1962
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2470
|
-
|
|
2471
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2472
|
-
name: errorCode,
|
|
2473
|
-
$metadata: deserializeMetadata(output),
|
|
2474
|
-
};
|
|
2475
|
-
break;
|
|
1963
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2476
1964
|
default:
|
|
2477
1965
|
const parsedBody = parsedOutput.body;
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
...parsedBody,
|
|
2481
|
-
name: `${errorCode}`,
|
|
2482
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1966
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
1967
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2483
1968
|
$fault: "client",
|
|
2484
1969
|
$metadata: deserializeMetadata(output),
|
|
2485
|
-
};
|
|
1970
|
+
});
|
|
1971
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2486
1972
|
}
|
|
2487
|
-
const message = response.message || response.Message || errorCode;
|
|
2488
|
-
response.message = message;
|
|
2489
|
-
delete response.Message;
|
|
2490
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2491
1973
|
};
|
|
2492
1974
|
const deserializeAws_restJson1ListClustersCommand = async (output, context) => {
|
|
2493
1975
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2519,51 +2001,25 @@ const deserializeAws_restJson1ListClustersCommandError = async (output, context)
|
|
|
2519
2001
|
switch (errorCode) {
|
|
2520
2002
|
case "BadRequestException":
|
|
2521
2003
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2522
|
-
|
|
2523
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2524
|
-
name: errorCode,
|
|
2525
|
-
$metadata: deserializeMetadata(output),
|
|
2526
|
-
};
|
|
2527
|
-
break;
|
|
2004
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2528
2005
|
case "ForbiddenException":
|
|
2529
2006
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2530
|
-
|
|
2531
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2532
|
-
name: errorCode,
|
|
2533
|
-
$metadata: deserializeMetadata(output),
|
|
2534
|
-
};
|
|
2535
|
-
break;
|
|
2007
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2536
2008
|
case "InternalServerErrorException":
|
|
2537
2009
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2538
|
-
|
|
2539
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2540
|
-
name: errorCode,
|
|
2541
|
-
$metadata: deserializeMetadata(output),
|
|
2542
|
-
};
|
|
2543
|
-
break;
|
|
2010
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2544
2011
|
case "UnauthorizedException":
|
|
2545
2012
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2546
|
-
|
|
2547
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2548
|
-
name: errorCode,
|
|
2549
|
-
$metadata: deserializeMetadata(output),
|
|
2550
|
-
};
|
|
2551
|
-
break;
|
|
2013
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2552
2014
|
default:
|
|
2553
2015
|
const parsedBody = parsedOutput.body;
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
...parsedBody,
|
|
2557
|
-
name: `${errorCode}`,
|
|
2558
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2016
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2017
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2559
2018
|
$fault: "client",
|
|
2560
2019
|
$metadata: deserializeMetadata(output),
|
|
2561
|
-
};
|
|
2020
|
+
});
|
|
2021
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2562
2022
|
}
|
|
2563
|
-
const message = response.message || response.Message || errorCode;
|
|
2564
|
-
response.message = message;
|
|
2565
|
-
delete response.Message;
|
|
2566
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2567
2023
|
};
|
|
2568
2024
|
const deserializeAws_restJson1ListClustersV2Command = async (output, context) => {
|
|
2569
2025
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2595,51 +2051,25 @@ const deserializeAws_restJson1ListClustersV2CommandError = async (output, contex
|
|
|
2595
2051
|
switch (errorCode) {
|
|
2596
2052
|
case "BadRequestException":
|
|
2597
2053
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2598
|
-
|
|
2599
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2600
|
-
name: errorCode,
|
|
2601
|
-
$metadata: deserializeMetadata(output),
|
|
2602
|
-
};
|
|
2603
|
-
break;
|
|
2054
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2604
2055
|
case "ForbiddenException":
|
|
2605
2056
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2606
|
-
|
|
2607
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2608
|
-
name: errorCode,
|
|
2609
|
-
$metadata: deserializeMetadata(output),
|
|
2610
|
-
};
|
|
2611
|
-
break;
|
|
2057
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2612
2058
|
case "InternalServerErrorException":
|
|
2613
2059
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2614
|
-
|
|
2615
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2616
|
-
name: errorCode,
|
|
2617
|
-
$metadata: deserializeMetadata(output),
|
|
2618
|
-
};
|
|
2619
|
-
break;
|
|
2060
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2620
2061
|
case "UnauthorizedException":
|
|
2621
2062
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2622
|
-
|
|
2623
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2624
|
-
name: errorCode,
|
|
2625
|
-
$metadata: deserializeMetadata(output),
|
|
2626
|
-
};
|
|
2627
|
-
break;
|
|
2063
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2628
2064
|
default:
|
|
2629
2065
|
const parsedBody = parsedOutput.body;
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
...parsedBody,
|
|
2633
|
-
name: `${errorCode}`,
|
|
2634
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2066
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2067
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2635
2068
|
$fault: "client",
|
|
2636
2069
|
$metadata: deserializeMetadata(output),
|
|
2637
|
-
};
|
|
2070
|
+
});
|
|
2071
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2638
2072
|
}
|
|
2639
|
-
const message = response.message || response.Message || errorCode;
|
|
2640
|
-
response.message = message;
|
|
2641
|
-
delete response.Message;
|
|
2642
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2643
2073
|
};
|
|
2644
2074
|
const deserializeAws_restJson1ListConfigurationRevisionsCommand = async (output, context) => {
|
|
2645
2075
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2671,67 +2101,31 @@ const deserializeAws_restJson1ListConfigurationRevisionsCommandError = async (ou
|
|
|
2671
2101
|
switch (errorCode) {
|
|
2672
2102
|
case "BadRequestException":
|
|
2673
2103
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2674
|
-
|
|
2675
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2676
|
-
name: errorCode,
|
|
2677
|
-
$metadata: deserializeMetadata(output),
|
|
2678
|
-
};
|
|
2679
|
-
break;
|
|
2104
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2680
2105
|
case "ForbiddenException":
|
|
2681
2106
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2682
|
-
|
|
2683
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2684
|
-
name: errorCode,
|
|
2685
|
-
$metadata: deserializeMetadata(output),
|
|
2686
|
-
};
|
|
2687
|
-
break;
|
|
2107
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2688
2108
|
case "InternalServerErrorException":
|
|
2689
2109
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2690
|
-
|
|
2691
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2692
|
-
name: errorCode,
|
|
2693
|
-
$metadata: deserializeMetadata(output),
|
|
2694
|
-
};
|
|
2695
|
-
break;
|
|
2110
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2696
2111
|
case "NotFoundException":
|
|
2697
2112
|
case "com.amazonaws.kafka#NotFoundException":
|
|
2698
|
-
|
|
2699
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2700
|
-
name: errorCode,
|
|
2701
|
-
$metadata: deserializeMetadata(output),
|
|
2702
|
-
};
|
|
2703
|
-
break;
|
|
2113
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2704
2114
|
case "ServiceUnavailableException":
|
|
2705
2115
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
2706
|
-
|
|
2707
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2708
|
-
name: errorCode,
|
|
2709
|
-
$metadata: deserializeMetadata(output),
|
|
2710
|
-
};
|
|
2711
|
-
break;
|
|
2116
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2712
2117
|
case "UnauthorizedException":
|
|
2713
2118
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2714
|
-
|
|
2715
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2716
|
-
name: errorCode,
|
|
2717
|
-
$metadata: deserializeMetadata(output),
|
|
2718
|
-
};
|
|
2719
|
-
break;
|
|
2119
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2720
2120
|
default:
|
|
2721
2121
|
const parsedBody = parsedOutput.body;
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
...parsedBody,
|
|
2725
|
-
name: `${errorCode}`,
|
|
2726
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2122
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2123
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2727
2124
|
$fault: "client",
|
|
2728
2125
|
$metadata: deserializeMetadata(output),
|
|
2729
|
-
};
|
|
2126
|
+
});
|
|
2127
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2730
2128
|
}
|
|
2731
|
-
const message = response.message || response.Message || errorCode;
|
|
2732
|
-
response.message = message;
|
|
2733
|
-
delete response.Message;
|
|
2734
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2735
2129
|
};
|
|
2736
2130
|
const deserializeAws_restJson1ListConfigurationsCommand = async (output, context) => {
|
|
2737
2131
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2763,59 +2157,28 @@ const deserializeAws_restJson1ListConfigurationsCommandError = async (output, co
|
|
|
2763
2157
|
switch (errorCode) {
|
|
2764
2158
|
case "BadRequestException":
|
|
2765
2159
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2766
|
-
|
|
2767
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2768
|
-
name: errorCode,
|
|
2769
|
-
$metadata: deserializeMetadata(output),
|
|
2770
|
-
};
|
|
2771
|
-
break;
|
|
2160
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2772
2161
|
case "ForbiddenException":
|
|
2773
2162
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2774
|
-
|
|
2775
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2776
|
-
name: errorCode,
|
|
2777
|
-
$metadata: deserializeMetadata(output),
|
|
2778
|
-
};
|
|
2779
|
-
break;
|
|
2163
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2780
2164
|
case "InternalServerErrorException":
|
|
2781
2165
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2782
|
-
|
|
2783
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2784
|
-
name: errorCode,
|
|
2785
|
-
$metadata: deserializeMetadata(output),
|
|
2786
|
-
};
|
|
2787
|
-
break;
|
|
2166
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2788
2167
|
case "ServiceUnavailableException":
|
|
2789
2168
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
2790
|
-
|
|
2791
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2792
|
-
name: errorCode,
|
|
2793
|
-
$metadata: deserializeMetadata(output),
|
|
2794
|
-
};
|
|
2795
|
-
break;
|
|
2169
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2796
2170
|
case "UnauthorizedException":
|
|
2797
2171
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2798
|
-
|
|
2799
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2800
|
-
name: errorCode,
|
|
2801
|
-
$metadata: deserializeMetadata(output),
|
|
2802
|
-
};
|
|
2803
|
-
break;
|
|
2172
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2804
2173
|
default:
|
|
2805
2174
|
const parsedBody = parsedOutput.body;
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
...parsedBody,
|
|
2809
|
-
name: `${errorCode}`,
|
|
2810
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2175
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2176
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2811
2177
|
$fault: "client",
|
|
2812
2178
|
$metadata: deserializeMetadata(output),
|
|
2813
|
-
};
|
|
2179
|
+
});
|
|
2180
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2814
2181
|
}
|
|
2815
|
-
const message = response.message || response.Message || errorCode;
|
|
2816
|
-
response.message = message;
|
|
2817
|
-
delete response.Message;
|
|
2818
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2819
2182
|
};
|
|
2820
2183
|
const deserializeAws_restJson1ListKafkaVersionsCommand = async (output, context) => {
|
|
2821
2184
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2847,51 +2210,25 @@ const deserializeAws_restJson1ListKafkaVersionsCommandError = async (output, con
|
|
|
2847
2210
|
switch (errorCode) {
|
|
2848
2211
|
case "BadRequestException":
|
|
2849
2212
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2850
|
-
|
|
2851
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2852
|
-
name: errorCode,
|
|
2853
|
-
$metadata: deserializeMetadata(output),
|
|
2854
|
-
};
|
|
2855
|
-
break;
|
|
2213
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2856
2214
|
case "ForbiddenException":
|
|
2857
2215
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2858
|
-
|
|
2859
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2860
|
-
name: errorCode,
|
|
2861
|
-
$metadata: deserializeMetadata(output),
|
|
2862
|
-
};
|
|
2863
|
-
break;
|
|
2216
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2864
2217
|
case "InternalServerErrorException":
|
|
2865
2218
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2866
|
-
|
|
2867
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2868
|
-
name: errorCode,
|
|
2869
|
-
$metadata: deserializeMetadata(output),
|
|
2870
|
-
};
|
|
2871
|
-
break;
|
|
2219
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2872
2220
|
case "UnauthorizedException":
|
|
2873
2221
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
2874
|
-
|
|
2875
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2876
|
-
name: errorCode,
|
|
2877
|
-
$metadata: deserializeMetadata(output),
|
|
2878
|
-
};
|
|
2879
|
-
break;
|
|
2222
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2880
2223
|
default:
|
|
2881
2224
|
const parsedBody = parsedOutput.body;
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
...parsedBody,
|
|
2885
|
-
name: `${errorCode}`,
|
|
2886
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2225
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2226
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2887
2227
|
$fault: "client",
|
|
2888
2228
|
$metadata: deserializeMetadata(output),
|
|
2889
|
-
};
|
|
2229
|
+
});
|
|
2230
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2890
2231
|
}
|
|
2891
|
-
const message = response.message || response.Message || errorCode;
|
|
2892
|
-
response.message = message;
|
|
2893
|
-
delete response.Message;
|
|
2894
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2895
2232
|
};
|
|
2896
2233
|
const deserializeAws_restJson1ListNodesCommand = async (output, context) => {
|
|
2897
2234
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2923,51 +2260,25 @@ const deserializeAws_restJson1ListNodesCommandError = async (output, context) =>
|
|
|
2923
2260
|
switch (errorCode) {
|
|
2924
2261
|
case "BadRequestException":
|
|
2925
2262
|
case "com.amazonaws.kafka#BadRequestException":
|
|
2926
|
-
|
|
2927
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2928
|
-
name: errorCode,
|
|
2929
|
-
$metadata: deserializeMetadata(output),
|
|
2930
|
-
};
|
|
2931
|
-
break;
|
|
2263
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2932
2264
|
case "ForbiddenException":
|
|
2933
2265
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
2934
|
-
|
|
2935
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2936
|
-
name: errorCode,
|
|
2937
|
-
$metadata: deserializeMetadata(output),
|
|
2938
|
-
};
|
|
2939
|
-
break;
|
|
2266
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
2940
2267
|
case "InternalServerErrorException":
|
|
2941
2268
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
2942
|
-
|
|
2943
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2944
|
-
name: errorCode,
|
|
2945
|
-
$metadata: deserializeMetadata(output),
|
|
2946
|
-
};
|
|
2947
|
-
break;
|
|
2269
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2948
2270
|
case "NotFoundException":
|
|
2949
2271
|
case "com.amazonaws.kafka#NotFoundException":
|
|
2950
|
-
|
|
2951
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2952
|
-
name: errorCode,
|
|
2953
|
-
$metadata: deserializeMetadata(output),
|
|
2954
|
-
};
|
|
2955
|
-
break;
|
|
2272
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2956
2273
|
default:
|
|
2957
2274
|
const parsedBody = parsedOutput.body;
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
...parsedBody,
|
|
2961
|
-
name: `${errorCode}`,
|
|
2962
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2275
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2276
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2963
2277
|
$fault: "client",
|
|
2964
2278
|
$metadata: deserializeMetadata(output),
|
|
2965
|
-
};
|
|
2279
|
+
});
|
|
2280
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2966
2281
|
}
|
|
2967
|
-
const message = response.message || response.Message || errorCode;
|
|
2968
|
-
response.message = message;
|
|
2969
|
-
delete response.Message;
|
|
2970
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2971
2282
|
};
|
|
2972
2283
|
const deserializeAws_restJson1ListScramSecretsCommand = async (output, context) => {
|
|
2973
2284
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2999,75 +2310,34 @@ const deserializeAws_restJson1ListScramSecretsCommandError = async (output, cont
|
|
|
2999
2310
|
switch (errorCode) {
|
|
3000
2311
|
case "BadRequestException":
|
|
3001
2312
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3002
|
-
|
|
3003
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3004
|
-
name: errorCode,
|
|
3005
|
-
$metadata: deserializeMetadata(output),
|
|
3006
|
-
};
|
|
3007
|
-
break;
|
|
2313
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3008
2314
|
case "ForbiddenException":
|
|
3009
2315
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3010
|
-
|
|
3011
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3012
|
-
name: errorCode,
|
|
3013
|
-
$metadata: deserializeMetadata(output),
|
|
3014
|
-
};
|
|
3015
|
-
break;
|
|
2316
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3016
2317
|
case "InternalServerErrorException":
|
|
3017
2318
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3018
|
-
|
|
3019
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3020
|
-
name: errorCode,
|
|
3021
|
-
$metadata: deserializeMetadata(output),
|
|
3022
|
-
};
|
|
3023
|
-
break;
|
|
2319
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3024
2320
|
case "NotFoundException":
|
|
3025
2321
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3026
|
-
|
|
3027
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3028
|
-
name: errorCode,
|
|
3029
|
-
$metadata: deserializeMetadata(output),
|
|
3030
|
-
};
|
|
3031
|
-
break;
|
|
2322
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3032
2323
|
case "ServiceUnavailableException":
|
|
3033
2324
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3034
|
-
|
|
3035
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3036
|
-
name: errorCode,
|
|
3037
|
-
$metadata: deserializeMetadata(output),
|
|
3038
|
-
};
|
|
3039
|
-
break;
|
|
2325
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3040
2326
|
case "TooManyRequestsException":
|
|
3041
2327
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
3042
|
-
|
|
3043
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
3044
|
-
name: errorCode,
|
|
3045
|
-
$metadata: deserializeMetadata(output),
|
|
3046
|
-
};
|
|
3047
|
-
break;
|
|
2328
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3048
2329
|
case "UnauthorizedException":
|
|
3049
2330
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3050
|
-
|
|
3051
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3052
|
-
name: errorCode,
|
|
3053
|
-
$metadata: deserializeMetadata(output),
|
|
3054
|
-
};
|
|
3055
|
-
break;
|
|
2331
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3056
2332
|
default:
|
|
3057
2333
|
const parsedBody = parsedOutput.body;
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
...parsedBody,
|
|
3061
|
-
name: `${errorCode}`,
|
|
3062
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2334
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2335
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3063
2336
|
$fault: "client",
|
|
3064
2337
|
$metadata: deserializeMetadata(output),
|
|
3065
|
-
};
|
|
2338
|
+
});
|
|
2339
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3066
2340
|
}
|
|
3067
|
-
const message = response.message || response.Message || errorCode;
|
|
3068
|
-
response.message = message;
|
|
3069
|
-
delete response.Message;
|
|
3070
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3071
2341
|
};
|
|
3072
2342
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
3073
2343
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3095,43 +2365,22 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3095
2365
|
switch (errorCode) {
|
|
3096
2366
|
case "BadRequestException":
|
|
3097
2367
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3098
|
-
|
|
3099
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3100
|
-
name: errorCode,
|
|
3101
|
-
$metadata: deserializeMetadata(output),
|
|
3102
|
-
};
|
|
3103
|
-
break;
|
|
2368
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3104
2369
|
case "InternalServerErrorException":
|
|
3105
2370
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3106
|
-
|
|
3107
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3108
|
-
name: errorCode,
|
|
3109
|
-
$metadata: deserializeMetadata(output),
|
|
3110
|
-
};
|
|
3111
|
-
break;
|
|
2371
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3112
2372
|
case "NotFoundException":
|
|
3113
2373
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3114
|
-
|
|
3115
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3116
|
-
name: errorCode,
|
|
3117
|
-
$metadata: deserializeMetadata(output),
|
|
3118
|
-
};
|
|
3119
|
-
break;
|
|
2374
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3120
2375
|
default:
|
|
3121
2376
|
const parsedBody = parsedOutput.body;
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
...parsedBody,
|
|
3125
|
-
name: `${errorCode}`,
|
|
3126
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2377
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2378
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3127
2379
|
$fault: "client",
|
|
3128
2380
|
$metadata: deserializeMetadata(output),
|
|
3129
|
-
};
|
|
2381
|
+
});
|
|
2382
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3130
2383
|
}
|
|
3131
|
-
const message = response.message || response.Message || errorCode;
|
|
3132
|
-
response.message = message;
|
|
3133
|
-
delete response.Message;
|
|
3134
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3135
2384
|
};
|
|
3136
2385
|
const deserializeAws_restJson1RebootBrokerCommand = async (output, context) => {
|
|
3137
2386
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3163,75 +2412,34 @@ const deserializeAws_restJson1RebootBrokerCommandError = async (output, context)
|
|
|
3163
2412
|
switch (errorCode) {
|
|
3164
2413
|
case "BadRequestException":
|
|
3165
2414
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3166
|
-
|
|
3167
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3168
|
-
name: errorCode,
|
|
3169
|
-
$metadata: deserializeMetadata(output),
|
|
3170
|
-
};
|
|
3171
|
-
break;
|
|
2415
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3172
2416
|
case "ForbiddenException":
|
|
3173
2417
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3174
|
-
|
|
3175
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3176
|
-
name: errorCode,
|
|
3177
|
-
$metadata: deserializeMetadata(output),
|
|
3178
|
-
};
|
|
3179
|
-
break;
|
|
2418
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3180
2419
|
case "InternalServerErrorException":
|
|
3181
2420
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3182
|
-
|
|
3183
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3184
|
-
name: errorCode,
|
|
3185
|
-
$metadata: deserializeMetadata(output),
|
|
3186
|
-
};
|
|
3187
|
-
break;
|
|
2421
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3188
2422
|
case "NotFoundException":
|
|
3189
2423
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3190
|
-
|
|
3191
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3192
|
-
name: errorCode,
|
|
3193
|
-
$metadata: deserializeMetadata(output),
|
|
3194
|
-
};
|
|
3195
|
-
break;
|
|
2424
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3196
2425
|
case "ServiceUnavailableException":
|
|
3197
2426
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3198
|
-
|
|
3199
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3200
|
-
name: errorCode,
|
|
3201
|
-
$metadata: deserializeMetadata(output),
|
|
3202
|
-
};
|
|
3203
|
-
break;
|
|
2427
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3204
2428
|
case "TooManyRequestsException":
|
|
3205
2429
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
3206
|
-
|
|
3207
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
3208
|
-
name: errorCode,
|
|
3209
|
-
$metadata: deserializeMetadata(output),
|
|
3210
|
-
};
|
|
3211
|
-
break;
|
|
2430
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3212
2431
|
case "UnauthorizedException":
|
|
3213
2432
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3214
|
-
|
|
3215
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3216
|
-
name: errorCode,
|
|
3217
|
-
$metadata: deserializeMetadata(output),
|
|
3218
|
-
};
|
|
3219
|
-
break;
|
|
2433
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3220
2434
|
default:
|
|
3221
2435
|
const parsedBody = parsedOutput.body;
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
...parsedBody,
|
|
3225
|
-
name: `${errorCode}`,
|
|
3226
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2436
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2437
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3227
2438
|
$fault: "client",
|
|
3228
2439
|
$metadata: deserializeMetadata(output),
|
|
3229
|
-
};
|
|
2440
|
+
});
|
|
2441
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3230
2442
|
}
|
|
3231
|
-
const message = response.message || response.Message || errorCode;
|
|
3232
|
-
response.message = message;
|
|
3233
|
-
delete response.Message;
|
|
3234
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3235
2443
|
};
|
|
3236
2444
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
3237
2445
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -3255,43 +2463,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3255
2463
|
switch (errorCode) {
|
|
3256
2464
|
case "BadRequestException":
|
|
3257
2465
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3258
|
-
|
|
3259
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3260
|
-
name: errorCode,
|
|
3261
|
-
$metadata: deserializeMetadata(output),
|
|
3262
|
-
};
|
|
3263
|
-
break;
|
|
2466
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3264
2467
|
case "InternalServerErrorException":
|
|
3265
2468
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3266
|
-
|
|
3267
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3268
|
-
name: errorCode,
|
|
3269
|
-
$metadata: deserializeMetadata(output),
|
|
3270
|
-
};
|
|
3271
|
-
break;
|
|
2469
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3272
2470
|
case "NotFoundException":
|
|
3273
2471
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3274
|
-
|
|
3275
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3276
|
-
name: errorCode,
|
|
3277
|
-
$metadata: deserializeMetadata(output),
|
|
3278
|
-
};
|
|
3279
|
-
break;
|
|
2472
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3280
2473
|
default:
|
|
3281
2474
|
const parsedBody = parsedOutput.body;
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
...parsedBody,
|
|
3285
|
-
name: `${errorCode}`,
|
|
3286
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2475
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2476
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3287
2477
|
$fault: "client",
|
|
3288
2478
|
$metadata: deserializeMetadata(output),
|
|
3289
|
-
};
|
|
2479
|
+
});
|
|
2480
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3290
2481
|
}
|
|
3291
|
-
const message = response.message || response.Message || errorCode;
|
|
3292
|
-
response.message = message;
|
|
3293
|
-
delete response.Message;
|
|
3294
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3295
2482
|
};
|
|
3296
2483
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
3297
2484
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -3315,43 +2502,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3315
2502
|
switch (errorCode) {
|
|
3316
2503
|
case "BadRequestException":
|
|
3317
2504
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3318
|
-
|
|
3319
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3320
|
-
name: errorCode,
|
|
3321
|
-
$metadata: deserializeMetadata(output),
|
|
3322
|
-
};
|
|
3323
|
-
break;
|
|
2505
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3324
2506
|
case "InternalServerErrorException":
|
|
3325
2507
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3326
|
-
|
|
3327
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3328
|
-
name: errorCode,
|
|
3329
|
-
$metadata: deserializeMetadata(output),
|
|
3330
|
-
};
|
|
3331
|
-
break;
|
|
2508
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3332
2509
|
case "NotFoundException":
|
|
3333
2510
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3334
|
-
|
|
3335
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3336
|
-
name: errorCode,
|
|
3337
|
-
$metadata: deserializeMetadata(output),
|
|
3338
|
-
};
|
|
3339
|
-
break;
|
|
2511
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3340
2512
|
default:
|
|
3341
2513
|
const parsedBody = parsedOutput.body;
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
...parsedBody,
|
|
3345
|
-
name: `${errorCode}`,
|
|
3346
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2514
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2515
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3347
2516
|
$fault: "client",
|
|
3348
2517
|
$metadata: deserializeMetadata(output),
|
|
3349
|
-
};
|
|
2518
|
+
});
|
|
2519
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3350
2520
|
}
|
|
3351
|
-
const message = response.message || response.Message || errorCode;
|
|
3352
|
-
response.message = message;
|
|
3353
|
-
delete response.Message;
|
|
3354
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3355
2521
|
};
|
|
3356
2522
|
const deserializeAws_restJson1UpdateBrokerCountCommand = async (output, context) => {
|
|
3357
2523
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3383,59 +2549,28 @@ const deserializeAws_restJson1UpdateBrokerCountCommandError = async (output, con
|
|
|
3383
2549
|
switch (errorCode) {
|
|
3384
2550
|
case "BadRequestException":
|
|
3385
2551
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3386
|
-
|
|
3387
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3388
|
-
name: errorCode,
|
|
3389
|
-
$metadata: deserializeMetadata(output),
|
|
3390
|
-
};
|
|
3391
|
-
break;
|
|
2552
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3392
2553
|
case "ForbiddenException":
|
|
3393
2554
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3394
|
-
|
|
3395
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3396
|
-
name: errorCode,
|
|
3397
|
-
$metadata: deserializeMetadata(output),
|
|
3398
|
-
};
|
|
3399
|
-
break;
|
|
2555
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3400
2556
|
case "InternalServerErrorException":
|
|
3401
2557
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3402
|
-
|
|
3403
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3404
|
-
name: errorCode,
|
|
3405
|
-
$metadata: deserializeMetadata(output),
|
|
3406
|
-
};
|
|
3407
|
-
break;
|
|
2558
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3408
2559
|
case "ServiceUnavailableException":
|
|
3409
2560
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3410
|
-
|
|
3411
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3412
|
-
name: errorCode,
|
|
3413
|
-
$metadata: deserializeMetadata(output),
|
|
3414
|
-
};
|
|
3415
|
-
break;
|
|
2561
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3416
2562
|
case "UnauthorizedException":
|
|
3417
2563
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3418
|
-
|
|
3419
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3420
|
-
name: errorCode,
|
|
3421
|
-
$metadata: deserializeMetadata(output),
|
|
3422
|
-
};
|
|
3423
|
-
break;
|
|
2564
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3424
2565
|
default:
|
|
3425
2566
|
const parsedBody = parsedOutput.body;
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
...parsedBody,
|
|
3429
|
-
name: `${errorCode}`,
|
|
3430
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2567
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2568
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3431
2569
|
$fault: "client",
|
|
3432
2570
|
$metadata: deserializeMetadata(output),
|
|
3433
|
-
};
|
|
2571
|
+
});
|
|
2572
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3434
2573
|
}
|
|
3435
|
-
const message = response.message || response.Message || errorCode;
|
|
3436
|
-
response.message = message;
|
|
3437
|
-
delete response.Message;
|
|
3438
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3439
2574
|
};
|
|
3440
2575
|
const deserializeAws_restJson1UpdateBrokerStorageCommand = async (output, context) => {
|
|
3441
2576
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3467,59 +2602,28 @@ const deserializeAws_restJson1UpdateBrokerStorageCommandError = async (output, c
|
|
|
3467
2602
|
switch (errorCode) {
|
|
3468
2603
|
case "BadRequestException":
|
|
3469
2604
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3470
|
-
|
|
3471
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3472
|
-
name: errorCode,
|
|
3473
|
-
$metadata: deserializeMetadata(output),
|
|
3474
|
-
};
|
|
3475
|
-
break;
|
|
2605
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3476
2606
|
case "ForbiddenException":
|
|
3477
2607
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3478
|
-
|
|
3479
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3480
|
-
name: errorCode,
|
|
3481
|
-
$metadata: deserializeMetadata(output),
|
|
3482
|
-
};
|
|
3483
|
-
break;
|
|
2608
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3484
2609
|
case "InternalServerErrorException":
|
|
3485
2610
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3486
|
-
|
|
3487
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3488
|
-
name: errorCode,
|
|
3489
|
-
$metadata: deserializeMetadata(output),
|
|
3490
|
-
};
|
|
3491
|
-
break;
|
|
2611
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3492
2612
|
case "ServiceUnavailableException":
|
|
3493
2613
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3494
|
-
|
|
3495
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3496
|
-
name: errorCode,
|
|
3497
|
-
$metadata: deserializeMetadata(output),
|
|
3498
|
-
};
|
|
3499
|
-
break;
|
|
2614
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3500
2615
|
case "UnauthorizedException":
|
|
3501
2616
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3502
|
-
|
|
3503
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3504
|
-
name: errorCode,
|
|
3505
|
-
$metadata: deserializeMetadata(output),
|
|
3506
|
-
};
|
|
3507
|
-
break;
|
|
2617
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3508
2618
|
default:
|
|
3509
2619
|
const parsedBody = parsedOutput.body;
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
...parsedBody,
|
|
3513
|
-
name: `${errorCode}`,
|
|
3514
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2620
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2621
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3515
2622
|
$fault: "client",
|
|
3516
2623
|
$metadata: deserializeMetadata(output),
|
|
3517
|
-
};
|
|
2624
|
+
});
|
|
2625
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3518
2626
|
}
|
|
3519
|
-
const message = response.message || response.Message || errorCode;
|
|
3520
|
-
response.message = message;
|
|
3521
|
-
delete response.Message;
|
|
3522
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3523
2627
|
};
|
|
3524
2628
|
const deserializeAws_restJson1UpdateBrokerTypeCommand = async (output, context) => {
|
|
3525
2629
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3551,75 +2655,34 @@ const deserializeAws_restJson1UpdateBrokerTypeCommandError = async (output, cont
|
|
|
3551
2655
|
switch (errorCode) {
|
|
3552
2656
|
case "BadRequestException":
|
|
3553
2657
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3554
|
-
|
|
3555
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3556
|
-
name: errorCode,
|
|
3557
|
-
$metadata: deserializeMetadata(output),
|
|
3558
|
-
};
|
|
3559
|
-
break;
|
|
2658
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3560
2659
|
case "ForbiddenException":
|
|
3561
2660
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3562
|
-
|
|
3563
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3564
|
-
name: errorCode,
|
|
3565
|
-
$metadata: deserializeMetadata(output),
|
|
3566
|
-
};
|
|
3567
|
-
break;
|
|
2661
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3568
2662
|
case "InternalServerErrorException":
|
|
3569
2663
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3570
|
-
|
|
3571
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3572
|
-
name: errorCode,
|
|
3573
|
-
$metadata: deserializeMetadata(output),
|
|
3574
|
-
};
|
|
3575
|
-
break;
|
|
2664
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3576
2665
|
case "NotFoundException":
|
|
3577
2666
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3578
|
-
|
|
3579
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3580
|
-
name: errorCode,
|
|
3581
|
-
$metadata: deserializeMetadata(output),
|
|
3582
|
-
};
|
|
3583
|
-
break;
|
|
2667
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3584
2668
|
case "ServiceUnavailableException":
|
|
3585
2669
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3586
|
-
|
|
3587
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3588
|
-
name: errorCode,
|
|
3589
|
-
$metadata: deserializeMetadata(output),
|
|
3590
|
-
};
|
|
3591
|
-
break;
|
|
2670
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3592
2671
|
case "TooManyRequestsException":
|
|
3593
2672
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
3594
|
-
|
|
3595
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
3596
|
-
name: errorCode,
|
|
3597
|
-
$metadata: deserializeMetadata(output),
|
|
3598
|
-
};
|
|
3599
|
-
break;
|
|
2673
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3600
2674
|
case "UnauthorizedException":
|
|
3601
2675
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3602
|
-
|
|
3603
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3604
|
-
name: errorCode,
|
|
3605
|
-
$metadata: deserializeMetadata(output),
|
|
3606
|
-
};
|
|
3607
|
-
break;
|
|
2676
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3608
2677
|
default:
|
|
3609
2678
|
const parsedBody = parsedOutput.body;
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
...parsedBody,
|
|
3613
|
-
name: `${errorCode}`,
|
|
3614
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2679
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2680
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3615
2681
|
$fault: "client",
|
|
3616
2682
|
$metadata: deserializeMetadata(output),
|
|
3617
|
-
};
|
|
2683
|
+
});
|
|
2684
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3618
2685
|
}
|
|
3619
|
-
const message = response.message || response.Message || errorCode;
|
|
3620
|
-
response.message = message;
|
|
3621
|
-
delete response.Message;
|
|
3622
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3623
2686
|
};
|
|
3624
2687
|
const deserializeAws_restJson1UpdateClusterConfigurationCommand = async (output, context) => {
|
|
3625
2688
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3651,67 +2714,31 @@ const deserializeAws_restJson1UpdateClusterConfigurationCommandError = async (ou
|
|
|
3651
2714
|
switch (errorCode) {
|
|
3652
2715
|
case "BadRequestException":
|
|
3653
2716
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3654
|
-
|
|
3655
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3656
|
-
name: errorCode,
|
|
3657
|
-
$metadata: deserializeMetadata(output),
|
|
3658
|
-
};
|
|
3659
|
-
break;
|
|
2717
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3660
2718
|
case "ForbiddenException":
|
|
3661
2719
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3662
|
-
|
|
3663
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3664
|
-
name: errorCode,
|
|
3665
|
-
$metadata: deserializeMetadata(output),
|
|
3666
|
-
};
|
|
3667
|
-
break;
|
|
2720
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3668
2721
|
case "InternalServerErrorException":
|
|
3669
2722
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3670
|
-
|
|
3671
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3672
|
-
name: errorCode,
|
|
3673
|
-
$metadata: deserializeMetadata(output),
|
|
3674
|
-
};
|
|
3675
|
-
break;
|
|
2723
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3676
2724
|
case "NotFoundException":
|
|
3677
2725
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3678
|
-
|
|
3679
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3680
|
-
name: errorCode,
|
|
3681
|
-
$metadata: deserializeMetadata(output),
|
|
3682
|
-
};
|
|
3683
|
-
break;
|
|
2726
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3684
2727
|
case "ServiceUnavailableException":
|
|
3685
2728
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3686
|
-
|
|
3687
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3688
|
-
name: errorCode,
|
|
3689
|
-
$metadata: deserializeMetadata(output),
|
|
3690
|
-
};
|
|
3691
|
-
break;
|
|
2729
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3692
2730
|
case "UnauthorizedException":
|
|
3693
2731
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3694
|
-
|
|
3695
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3696
|
-
name: errorCode,
|
|
3697
|
-
$metadata: deserializeMetadata(output),
|
|
3698
|
-
};
|
|
3699
|
-
break;
|
|
2732
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3700
2733
|
default:
|
|
3701
2734
|
const parsedBody = parsedOutput.body;
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
...parsedBody,
|
|
3705
|
-
name: `${errorCode}`,
|
|
3706
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2735
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2736
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3707
2737
|
$fault: "client",
|
|
3708
2738
|
$metadata: deserializeMetadata(output),
|
|
3709
|
-
};
|
|
2739
|
+
});
|
|
2740
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3710
2741
|
}
|
|
3711
|
-
const message = response.message || response.Message || errorCode;
|
|
3712
|
-
response.message = message;
|
|
3713
|
-
delete response.Message;
|
|
3714
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3715
2742
|
};
|
|
3716
2743
|
const deserializeAws_restJson1UpdateClusterKafkaVersionCommand = async (output, context) => {
|
|
3717
2744
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3743,75 +2770,34 @@ const deserializeAws_restJson1UpdateClusterKafkaVersionCommandError = async (out
|
|
|
3743
2770
|
switch (errorCode) {
|
|
3744
2771
|
case "BadRequestException":
|
|
3745
2772
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3746
|
-
|
|
3747
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3748
|
-
name: errorCode,
|
|
3749
|
-
$metadata: deserializeMetadata(output),
|
|
3750
|
-
};
|
|
3751
|
-
break;
|
|
2773
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3752
2774
|
case "ForbiddenException":
|
|
3753
2775
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3754
|
-
|
|
3755
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3756
|
-
name: errorCode,
|
|
3757
|
-
$metadata: deserializeMetadata(output),
|
|
3758
|
-
};
|
|
3759
|
-
break;
|
|
2776
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3760
2777
|
case "InternalServerErrorException":
|
|
3761
2778
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3762
|
-
|
|
3763
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3764
|
-
name: errorCode,
|
|
3765
|
-
$metadata: deserializeMetadata(output),
|
|
3766
|
-
};
|
|
3767
|
-
break;
|
|
2779
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3768
2780
|
case "NotFoundException":
|
|
3769
2781
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3770
|
-
|
|
3771
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3772
|
-
name: errorCode,
|
|
3773
|
-
$metadata: deserializeMetadata(output),
|
|
3774
|
-
};
|
|
3775
|
-
break;
|
|
2782
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3776
2783
|
case "ServiceUnavailableException":
|
|
3777
2784
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3778
|
-
|
|
3779
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3780
|
-
name: errorCode,
|
|
3781
|
-
$metadata: deserializeMetadata(output),
|
|
3782
|
-
};
|
|
3783
|
-
break;
|
|
2785
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3784
2786
|
case "TooManyRequestsException":
|
|
3785
2787
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
3786
|
-
|
|
3787
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
3788
|
-
name: errorCode,
|
|
3789
|
-
$metadata: deserializeMetadata(output),
|
|
3790
|
-
};
|
|
3791
|
-
break;
|
|
2788
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3792
2789
|
case "UnauthorizedException":
|
|
3793
2790
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3794
|
-
|
|
3795
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3796
|
-
name: errorCode,
|
|
3797
|
-
$metadata: deserializeMetadata(output),
|
|
3798
|
-
};
|
|
3799
|
-
break;
|
|
2791
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3800
2792
|
default:
|
|
3801
2793
|
const parsedBody = parsedOutput.body;
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
...parsedBody,
|
|
3805
|
-
name: `${errorCode}`,
|
|
3806
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2794
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2795
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3807
2796
|
$fault: "client",
|
|
3808
2797
|
$metadata: deserializeMetadata(output),
|
|
3809
|
-
};
|
|
2798
|
+
});
|
|
2799
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3810
2800
|
}
|
|
3811
|
-
const message = response.message || response.Message || errorCode;
|
|
3812
|
-
response.message = message;
|
|
3813
|
-
delete response.Message;
|
|
3814
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3815
2801
|
};
|
|
3816
2802
|
const deserializeAws_restJson1UpdateConfigurationCommand = async (output, context) => {
|
|
3817
2803
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3843,67 +2829,31 @@ const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, c
|
|
|
3843
2829
|
switch (errorCode) {
|
|
3844
2830
|
case "BadRequestException":
|
|
3845
2831
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3846
|
-
|
|
3847
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3848
|
-
name: errorCode,
|
|
3849
|
-
$metadata: deserializeMetadata(output),
|
|
3850
|
-
};
|
|
3851
|
-
break;
|
|
2832
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3852
2833
|
case "ForbiddenException":
|
|
3853
2834
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3854
|
-
|
|
3855
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3856
|
-
name: errorCode,
|
|
3857
|
-
$metadata: deserializeMetadata(output),
|
|
3858
|
-
};
|
|
3859
|
-
break;
|
|
2835
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3860
2836
|
case "InternalServerErrorException":
|
|
3861
2837
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3862
|
-
|
|
3863
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3864
|
-
name: errorCode,
|
|
3865
|
-
$metadata: deserializeMetadata(output),
|
|
3866
|
-
};
|
|
3867
|
-
break;
|
|
2838
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3868
2839
|
case "NotFoundException":
|
|
3869
2840
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3870
|
-
|
|
3871
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3872
|
-
name: errorCode,
|
|
3873
|
-
$metadata: deserializeMetadata(output),
|
|
3874
|
-
};
|
|
3875
|
-
break;
|
|
2841
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3876
2842
|
case "ServiceUnavailableException":
|
|
3877
2843
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3878
|
-
|
|
3879
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3880
|
-
name: errorCode,
|
|
3881
|
-
$metadata: deserializeMetadata(output),
|
|
3882
|
-
};
|
|
3883
|
-
break;
|
|
2844
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3884
2845
|
case "UnauthorizedException":
|
|
3885
2846
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3886
|
-
|
|
3887
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3888
|
-
name: errorCode,
|
|
3889
|
-
$metadata: deserializeMetadata(output),
|
|
3890
|
-
};
|
|
3891
|
-
break;
|
|
2847
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3892
2848
|
default:
|
|
3893
2849
|
const parsedBody = parsedOutput.body;
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
...parsedBody,
|
|
3897
|
-
name: `${errorCode}`,
|
|
3898
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2850
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2851
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3899
2852
|
$fault: "client",
|
|
3900
2853
|
$metadata: deserializeMetadata(output),
|
|
3901
|
-
};
|
|
2854
|
+
});
|
|
2855
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3902
2856
|
}
|
|
3903
|
-
const message = response.message || response.Message || errorCode;
|
|
3904
|
-
response.message = message;
|
|
3905
|
-
delete response.Message;
|
|
3906
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3907
2857
|
};
|
|
3908
2858
|
const deserializeAws_restJson1UpdateConnectivityCommand = async (output, context) => {
|
|
3909
2859
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3935,67 +2885,31 @@ const deserializeAws_restJson1UpdateConnectivityCommandError = async (output, co
|
|
|
3935
2885
|
switch (errorCode) {
|
|
3936
2886
|
case "BadRequestException":
|
|
3937
2887
|
case "com.amazonaws.kafka#BadRequestException":
|
|
3938
|
-
|
|
3939
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3940
|
-
name: errorCode,
|
|
3941
|
-
$metadata: deserializeMetadata(output),
|
|
3942
|
-
};
|
|
3943
|
-
break;
|
|
2888
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3944
2889
|
case "ForbiddenException":
|
|
3945
2890
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
3946
|
-
|
|
3947
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3948
|
-
name: errorCode,
|
|
3949
|
-
$metadata: deserializeMetadata(output),
|
|
3950
|
-
};
|
|
3951
|
-
break;
|
|
2891
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3952
2892
|
case "InternalServerErrorException":
|
|
3953
2893
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
3954
|
-
|
|
3955
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3956
|
-
name: errorCode,
|
|
3957
|
-
$metadata: deserializeMetadata(output),
|
|
3958
|
-
};
|
|
3959
|
-
break;
|
|
2894
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3960
2895
|
case "NotFoundException":
|
|
3961
2896
|
case "com.amazonaws.kafka#NotFoundException":
|
|
3962
|
-
|
|
3963
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3964
|
-
name: errorCode,
|
|
3965
|
-
$metadata: deserializeMetadata(output),
|
|
3966
|
-
};
|
|
3967
|
-
break;
|
|
2897
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3968
2898
|
case "ServiceUnavailableException":
|
|
3969
2899
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
3970
|
-
|
|
3971
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3972
|
-
name: errorCode,
|
|
3973
|
-
$metadata: deserializeMetadata(output),
|
|
3974
|
-
};
|
|
3975
|
-
break;
|
|
2900
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3976
2901
|
case "UnauthorizedException":
|
|
3977
2902
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
3978
|
-
|
|
3979
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3980
|
-
name: errorCode,
|
|
3981
|
-
$metadata: deserializeMetadata(output),
|
|
3982
|
-
};
|
|
3983
|
-
break;
|
|
2903
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3984
2904
|
default:
|
|
3985
2905
|
const parsedBody = parsedOutput.body;
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
...parsedBody,
|
|
3989
|
-
name: `${errorCode}`,
|
|
3990
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2906
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2907
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3991
2908
|
$fault: "client",
|
|
3992
2909
|
$metadata: deserializeMetadata(output),
|
|
3993
|
-
};
|
|
2910
|
+
});
|
|
2911
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3994
2912
|
}
|
|
3995
|
-
const message = response.message || response.Message || errorCode;
|
|
3996
|
-
response.message = message;
|
|
3997
|
-
delete response.Message;
|
|
3998
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3999
2913
|
};
|
|
4000
2914
|
const deserializeAws_restJson1UpdateMonitoringCommand = async (output, context) => {
|
|
4001
2915
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4027,59 +2941,28 @@ const deserializeAws_restJson1UpdateMonitoringCommandError = async (output, cont
|
|
|
4027
2941
|
switch (errorCode) {
|
|
4028
2942
|
case "BadRequestException":
|
|
4029
2943
|
case "com.amazonaws.kafka#BadRequestException":
|
|
4030
|
-
|
|
4031
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4032
|
-
name: errorCode,
|
|
4033
|
-
$metadata: deserializeMetadata(output),
|
|
4034
|
-
};
|
|
4035
|
-
break;
|
|
2944
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
4036
2945
|
case "ForbiddenException":
|
|
4037
2946
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
4038
|
-
|
|
4039
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
4040
|
-
name: errorCode,
|
|
4041
|
-
$metadata: deserializeMetadata(output),
|
|
4042
|
-
};
|
|
4043
|
-
break;
|
|
2947
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
4044
2948
|
case "InternalServerErrorException":
|
|
4045
2949
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
4046
|
-
|
|
4047
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
4048
|
-
name: errorCode,
|
|
4049
|
-
$metadata: deserializeMetadata(output),
|
|
4050
|
-
};
|
|
4051
|
-
break;
|
|
2950
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
4052
2951
|
case "ServiceUnavailableException":
|
|
4053
2952
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
4054
|
-
|
|
4055
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4056
|
-
name: errorCode,
|
|
4057
|
-
$metadata: deserializeMetadata(output),
|
|
4058
|
-
};
|
|
4059
|
-
break;
|
|
2953
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4060
2954
|
case "UnauthorizedException":
|
|
4061
2955
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
4062
|
-
|
|
4063
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
4064
|
-
name: errorCode,
|
|
4065
|
-
$metadata: deserializeMetadata(output),
|
|
4066
|
-
};
|
|
4067
|
-
break;
|
|
2956
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
4068
2957
|
default:
|
|
4069
2958
|
const parsedBody = parsedOutput.body;
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
...parsedBody,
|
|
4073
|
-
name: `${errorCode}`,
|
|
4074
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2959
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
2960
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4075
2961
|
$fault: "client",
|
|
4076
2962
|
$metadata: deserializeMetadata(output),
|
|
4077
|
-
};
|
|
2963
|
+
});
|
|
2964
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4078
2965
|
}
|
|
4079
|
-
const message = response.message || response.Message || errorCode;
|
|
4080
|
-
response.message = message;
|
|
4081
|
-
delete response.Message;
|
|
4082
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4083
2966
|
};
|
|
4084
2967
|
const deserializeAws_restJson1UpdateSecurityCommand = async (output, context) => {
|
|
4085
2968
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4111,84 +2994,37 @@ const deserializeAws_restJson1UpdateSecurityCommandError = async (output, contex
|
|
|
4111
2994
|
switch (errorCode) {
|
|
4112
2995
|
case "BadRequestException":
|
|
4113
2996
|
case "com.amazonaws.kafka#BadRequestException":
|
|
4114
|
-
|
|
4115
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4116
|
-
name: errorCode,
|
|
4117
|
-
$metadata: deserializeMetadata(output),
|
|
4118
|
-
};
|
|
4119
|
-
break;
|
|
2997
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
4120
2998
|
case "ForbiddenException":
|
|
4121
2999
|
case "com.amazonaws.kafka#ForbiddenException":
|
|
4122
|
-
|
|
4123
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
4124
|
-
name: errorCode,
|
|
4125
|
-
$metadata: deserializeMetadata(output),
|
|
4126
|
-
};
|
|
4127
|
-
break;
|
|
3000
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
4128
3001
|
case "InternalServerErrorException":
|
|
4129
3002
|
case "com.amazonaws.kafka#InternalServerErrorException":
|
|
4130
|
-
|
|
4131
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
4132
|
-
name: errorCode,
|
|
4133
|
-
$metadata: deserializeMetadata(output),
|
|
4134
|
-
};
|
|
4135
|
-
break;
|
|
3003
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
4136
3004
|
case "NotFoundException":
|
|
4137
3005
|
case "com.amazonaws.kafka#NotFoundException":
|
|
4138
|
-
|
|
4139
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
4140
|
-
name: errorCode,
|
|
4141
|
-
$metadata: deserializeMetadata(output),
|
|
4142
|
-
};
|
|
4143
|
-
break;
|
|
3006
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
4144
3007
|
case "ServiceUnavailableException":
|
|
4145
3008
|
case "com.amazonaws.kafka#ServiceUnavailableException":
|
|
4146
|
-
|
|
4147
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4148
|
-
name: errorCode,
|
|
4149
|
-
$metadata: deserializeMetadata(output),
|
|
4150
|
-
};
|
|
4151
|
-
break;
|
|
3009
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4152
3010
|
case "TooManyRequestsException":
|
|
4153
3011
|
case "com.amazonaws.kafka#TooManyRequestsException":
|
|
4154
|
-
|
|
4155
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
4156
|
-
name: errorCode,
|
|
4157
|
-
$metadata: deserializeMetadata(output),
|
|
4158
|
-
};
|
|
4159
|
-
break;
|
|
3012
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
4160
3013
|
case "UnauthorizedException":
|
|
4161
3014
|
case "com.amazonaws.kafka#UnauthorizedException":
|
|
4162
|
-
|
|
4163
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
4164
|
-
name: errorCode,
|
|
4165
|
-
$metadata: deserializeMetadata(output),
|
|
4166
|
-
};
|
|
4167
|
-
break;
|
|
3015
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
4168
3016
|
default:
|
|
4169
3017
|
const parsedBody = parsedOutput.body;
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
...parsedBody,
|
|
4173
|
-
name: `${errorCode}`,
|
|
4174
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3018
|
+
response = new KafkaServiceException_1.KafkaServiceException({
|
|
3019
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4175
3020
|
$fault: "client",
|
|
4176
3021
|
$metadata: deserializeMetadata(output),
|
|
4177
|
-
};
|
|
3022
|
+
});
|
|
3023
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4178
3024
|
}
|
|
4179
|
-
const message = response.message || response.Message || errorCode;
|
|
4180
|
-
response.message = message;
|
|
4181
|
-
delete response.Message;
|
|
4182
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4183
3025
|
};
|
|
4184
3026
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
4185
|
-
const contents = {
|
|
4186
|
-
name: "BadRequestException",
|
|
4187
|
-
$fault: "client",
|
|
4188
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4189
|
-
InvalidParameter: undefined,
|
|
4190
|
-
Message: undefined,
|
|
4191
|
-
};
|
|
3027
|
+
const contents = {};
|
|
4192
3028
|
const data = parsedOutput.body;
|
|
4193
3029
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4194
3030
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4196,16 +3032,14 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
4196
3032
|
if (data.message !== undefined && data.message !== null) {
|
|
4197
3033
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4198
3034
|
}
|
|
4199
|
-
|
|
3035
|
+
const exception = new models_0_1.BadRequestException({
|
|
3036
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3037
|
+
...contents,
|
|
3038
|
+
});
|
|
3039
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4200
3040
|
};
|
|
4201
3041
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
4202
|
-
const contents = {
|
|
4203
|
-
name: "ConflictException",
|
|
4204
|
-
$fault: "client",
|
|
4205
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4206
|
-
InvalidParameter: undefined,
|
|
4207
|
-
Message: undefined,
|
|
4208
|
-
};
|
|
3042
|
+
const contents = {};
|
|
4209
3043
|
const data = parsedOutput.body;
|
|
4210
3044
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4211
3045
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4213,16 +3047,14 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
4213
3047
|
if (data.message !== undefined && data.message !== null) {
|
|
4214
3048
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4215
3049
|
}
|
|
4216
|
-
|
|
3050
|
+
const exception = new models_0_1.ConflictException({
|
|
3051
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3052
|
+
...contents,
|
|
3053
|
+
});
|
|
3054
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4217
3055
|
};
|
|
4218
3056
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
4219
|
-
const contents = {
|
|
4220
|
-
name: "ForbiddenException",
|
|
4221
|
-
$fault: "client",
|
|
4222
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4223
|
-
InvalidParameter: undefined,
|
|
4224
|
-
Message: undefined,
|
|
4225
|
-
};
|
|
3057
|
+
const contents = {};
|
|
4226
3058
|
const data = parsedOutput.body;
|
|
4227
3059
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4228
3060
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4230,16 +3062,14 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
|
|
|
4230
3062
|
if (data.message !== undefined && data.message !== null) {
|
|
4231
3063
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4232
3064
|
}
|
|
4233
|
-
|
|
3065
|
+
const exception = new models_0_1.ForbiddenException({
|
|
3066
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3067
|
+
...contents,
|
|
3068
|
+
});
|
|
3069
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4234
3070
|
};
|
|
4235
3071
|
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
4236
|
-
const contents = {
|
|
4237
|
-
name: "InternalServerErrorException",
|
|
4238
|
-
$fault: "server",
|
|
4239
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4240
|
-
InvalidParameter: undefined,
|
|
4241
|
-
Message: undefined,
|
|
4242
|
-
};
|
|
3072
|
+
const contents = {};
|
|
4243
3073
|
const data = parsedOutput.body;
|
|
4244
3074
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4245
3075
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4247,16 +3077,14 @@ const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (pars
|
|
|
4247
3077
|
if (data.message !== undefined && data.message !== null) {
|
|
4248
3078
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4249
3079
|
}
|
|
4250
|
-
|
|
3080
|
+
const exception = new models_0_1.InternalServerErrorException({
|
|
3081
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3082
|
+
...contents,
|
|
3083
|
+
});
|
|
3084
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4251
3085
|
};
|
|
4252
3086
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
4253
|
-
const contents = {
|
|
4254
|
-
name: "NotFoundException",
|
|
4255
|
-
$fault: "client",
|
|
4256
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4257
|
-
InvalidParameter: undefined,
|
|
4258
|
-
Message: undefined,
|
|
4259
|
-
};
|
|
3087
|
+
const contents = {};
|
|
4260
3088
|
const data = parsedOutput.body;
|
|
4261
3089
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4262
3090
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4264,16 +3092,14 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
4264
3092
|
if (data.message !== undefined && data.message !== null) {
|
|
4265
3093
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4266
3094
|
}
|
|
4267
|
-
|
|
3095
|
+
const exception = new models_0_1.NotFoundException({
|
|
3096
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3097
|
+
...contents,
|
|
3098
|
+
});
|
|
3099
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4268
3100
|
};
|
|
4269
3101
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
4270
|
-
const contents = {
|
|
4271
|
-
name: "ServiceUnavailableException",
|
|
4272
|
-
$fault: "server",
|
|
4273
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4274
|
-
InvalidParameter: undefined,
|
|
4275
|
-
Message: undefined,
|
|
4276
|
-
};
|
|
3102
|
+
const contents = {};
|
|
4277
3103
|
const data = parsedOutput.body;
|
|
4278
3104
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4279
3105
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4281,16 +3107,14 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
|
|
|
4281
3107
|
if (data.message !== undefined && data.message !== null) {
|
|
4282
3108
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4283
3109
|
}
|
|
4284
|
-
|
|
3110
|
+
const exception = new models_0_1.ServiceUnavailableException({
|
|
3111
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3112
|
+
...contents,
|
|
3113
|
+
});
|
|
3114
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4285
3115
|
};
|
|
4286
3116
|
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
4287
|
-
const contents = {
|
|
4288
|
-
name: "TooManyRequestsException",
|
|
4289
|
-
$fault: "client",
|
|
4290
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4291
|
-
InvalidParameter: undefined,
|
|
4292
|
-
Message: undefined,
|
|
4293
|
-
};
|
|
3117
|
+
const contents = {};
|
|
4294
3118
|
const data = parsedOutput.body;
|
|
4295
3119
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4296
3120
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4298,16 +3122,14 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
|
|
|
4298
3122
|
if (data.message !== undefined && data.message !== null) {
|
|
4299
3123
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4300
3124
|
}
|
|
4301
|
-
|
|
3125
|
+
const exception = new models_0_1.TooManyRequestsException({
|
|
3126
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3127
|
+
...contents,
|
|
3128
|
+
});
|
|
3129
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4302
3130
|
};
|
|
4303
3131
|
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
4304
|
-
const contents = {
|
|
4305
|
-
name: "UnauthorizedException",
|
|
4306
|
-
$fault: "client",
|
|
4307
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4308
|
-
InvalidParameter: undefined,
|
|
4309
|
-
Message: undefined,
|
|
4310
|
-
};
|
|
3132
|
+
const contents = {};
|
|
4311
3133
|
const data = parsedOutput.body;
|
|
4312
3134
|
if (data.invalidParameter !== undefined && data.invalidParameter !== null) {
|
|
4313
3135
|
contents.InvalidParameter = smithy_client_1.expectString(data.invalidParameter);
|
|
@@ -4315,7 +3137,11 @@ const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutpu
|
|
|
4315
3137
|
if (data.message !== undefined && data.message !== null) {
|
|
4316
3138
|
contents.Message = smithy_client_1.expectString(data.message);
|
|
4317
3139
|
}
|
|
4318
|
-
|
|
3140
|
+
const exception = new models_0_1.UnauthorizedException({
|
|
3141
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3142
|
+
...contents,
|
|
3143
|
+
});
|
|
3144
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
4319
3145
|
};
|
|
4320
3146
|
const serializeAws_restJson1__listOf__string = (input, context) => {
|
|
4321
3147
|
return input
|
|
@@ -4624,7 +3450,7 @@ const serializeAws_restJson1VpcConfig = (input, context) => {
|
|
|
4624
3450
|
};
|
|
4625
3451
|
};
|
|
4626
3452
|
const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
4627
|
-
|
|
3453
|
+
const retVal = (output || [])
|
|
4628
3454
|
.filter((e) => e != null)
|
|
4629
3455
|
.map((entry) => {
|
|
4630
3456
|
if (entry === null) {
|
|
@@ -4632,9 +3458,10 @@ const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
|
4632
3458
|
}
|
|
4633
3459
|
return smithy_client_1.expectString(entry);
|
|
4634
3460
|
});
|
|
3461
|
+
return retVal;
|
|
4635
3462
|
};
|
|
4636
3463
|
const deserializeAws_restJson1__listOfBrokerEBSVolumeInfo = (output, context) => {
|
|
4637
|
-
|
|
3464
|
+
const retVal = (output || [])
|
|
4638
3465
|
.filter((e) => e != null)
|
|
4639
3466
|
.map((entry) => {
|
|
4640
3467
|
if (entry === null) {
|
|
@@ -4642,9 +3469,10 @@ const deserializeAws_restJson1__listOfBrokerEBSVolumeInfo = (output, context) =>
|
|
|
4642
3469
|
}
|
|
4643
3470
|
return deserializeAws_restJson1BrokerEBSVolumeInfo(entry, context);
|
|
4644
3471
|
});
|
|
3472
|
+
return retVal;
|
|
4645
3473
|
};
|
|
4646
3474
|
const deserializeAws_restJson1__listOfCluster = (output, context) => {
|
|
4647
|
-
|
|
3475
|
+
const retVal = (output || [])
|
|
4648
3476
|
.filter((e) => e != null)
|
|
4649
3477
|
.map((entry) => {
|
|
4650
3478
|
if (entry === null) {
|
|
@@ -4652,9 +3480,10 @@ const deserializeAws_restJson1__listOfCluster = (output, context) => {
|
|
|
4652
3480
|
}
|
|
4653
3481
|
return deserializeAws_restJson1Cluster(entry, context);
|
|
4654
3482
|
});
|
|
3483
|
+
return retVal;
|
|
4655
3484
|
};
|
|
4656
3485
|
const deserializeAws_restJson1__listOfClusterInfo = (output, context) => {
|
|
4657
|
-
|
|
3486
|
+
const retVal = (output || [])
|
|
4658
3487
|
.filter((e) => e != null)
|
|
4659
3488
|
.map((entry) => {
|
|
4660
3489
|
if (entry === null) {
|
|
@@ -4662,9 +3491,10 @@ const deserializeAws_restJson1__listOfClusterInfo = (output, context) => {
|
|
|
4662
3491
|
}
|
|
4663
3492
|
return deserializeAws_restJson1ClusterInfo(entry, context);
|
|
4664
3493
|
});
|
|
3494
|
+
return retVal;
|
|
4665
3495
|
};
|
|
4666
3496
|
const deserializeAws_restJson1__listOfClusterOperationInfo = (output, context) => {
|
|
4667
|
-
|
|
3497
|
+
const retVal = (output || [])
|
|
4668
3498
|
.filter((e) => e != null)
|
|
4669
3499
|
.map((entry) => {
|
|
4670
3500
|
if (entry === null) {
|
|
@@ -4672,9 +3502,10 @@ const deserializeAws_restJson1__listOfClusterOperationInfo = (output, context) =
|
|
|
4672
3502
|
}
|
|
4673
3503
|
return deserializeAws_restJson1ClusterOperationInfo(entry, context);
|
|
4674
3504
|
});
|
|
3505
|
+
return retVal;
|
|
4675
3506
|
};
|
|
4676
3507
|
const deserializeAws_restJson1__listOfClusterOperationStep = (output, context) => {
|
|
4677
|
-
|
|
3508
|
+
const retVal = (output || [])
|
|
4678
3509
|
.filter((e) => e != null)
|
|
4679
3510
|
.map((entry) => {
|
|
4680
3511
|
if (entry === null) {
|
|
@@ -4682,9 +3513,10 @@ const deserializeAws_restJson1__listOfClusterOperationStep = (output, context) =
|
|
|
4682
3513
|
}
|
|
4683
3514
|
return deserializeAws_restJson1ClusterOperationStep(entry, context);
|
|
4684
3515
|
});
|
|
3516
|
+
return retVal;
|
|
4685
3517
|
};
|
|
4686
3518
|
const deserializeAws_restJson1__listOfCompatibleKafkaVersion = (output, context) => {
|
|
4687
|
-
|
|
3519
|
+
const retVal = (output || [])
|
|
4688
3520
|
.filter((e) => e != null)
|
|
4689
3521
|
.map((entry) => {
|
|
4690
3522
|
if (entry === null) {
|
|
@@ -4692,9 +3524,10 @@ const deserializeAws_restJson1__listOfCompatibleKafkaVersion = (output, context)
|
|
|
4692
3524
|
}
|
|
4693
3525
|
return deserializeAws_restJson1CompatibleKafkaVersion(entry, context);
|
|
4694
3526
|
});
|
|
3527
|
+
return retVal;
|
|
4695
3528
|
};
|
|
4696
3529
|
const deserializeAws_restJson1__listOfConfiguration = (output, context) => {
|
|
4697
|
-
|
|
3530
|
+
const retVal = (output || [])
|
|
4698
3531
|
.filter((e) => e != null)
|
|
4699
3532
|
.map((entry) => {
|
|
4700
3533
|
if (entry === null) {
|
|
@@ -4702,9 +3535,10 @@ const deserializeAws_restJson1__listOfConfiguration = (output, context) => {
|
|
|
4702
3535
|
}
|
|
4703
3536
|
return deserializeAws_restJson1Configuration(entry, context);
|
|
4704
3537
|
});
|
|
3538
|
+
return retVal;
|
|
4705
3539
|
};
|
|
4706
3540
|
const deserializeAws_restJson1__listOfConfigurationRevision = (output, context) => {
|
|
4707
|
-
|
|
3541
|
+
const retVal = (output || [])
|
|
4708
3542
|
.filter((e) => e != null)
|
|
4709
3543
|
.map((entry) => {
|
|
4710
3544
|
if (entry === null) {
|
|
@@ -4712,9 +3546,10 @@ const deserializeAws_restJson1__listOfConfigurationRevision = (output, context)
|
|
|
4712
3546
|
}
|
|
4713
3547
|
return deserializeAws_restJson1ConfigurationRevision(entry, context);
|
|
4714
3548
|
});
|
|
3549
|
+
return retVal;
|
|
4715
3550
|
};
|
|
4716
3551
|
const deserializeAws_restJson1__listOfKafkaVersion = (output, context) => {
|
|
4717
|
-
|
|
3552
|
+
const retVal = (output || [])
|
|
4718
3553
|
.filter((e) => e != null)
|
|
4719
3554
|
.map((entry) => {
|
|
4720
3555
|
if (entry === null) {
|
|
@@ -4722,9 +3557,10 @@ const deserializeAws_restJson1__listOfKafkaVersion = (output, context) => {
|
|
|
4722
3557
|
}
|
|
4723
3558
|
return deserializeAws_restJson1KafkaVersion(entry, context);
|
|
4724
3559
|
});
|
|
3560
|
+
return retVal;
|
|
4725
3561
|
};
|
|
4726
3562
|
const deserializeAws_restJson1__listOfNodeInfo = (output, context) => {
|
|
4727
|
-
|
|
3563
|
+
const retVal = (output || [])
|
|
4728
3564
|
.filter((e) => e != null)
|
|
4729
3565
|
.map((entry) => {
|
|
4730
3566
|
if (entry === null) {
|
|
@@ -4732,9 +3568,10 @@ const deserializeAws_restJson1__listOfNodeInfo = (output, context) => {
|
|
|
4732
3568
|
}
|
|
4733
3569
|
return deserializeAws_restJson1NodeInfo(entry, context);
|
|
4734
3570
|
});
|
|
3571
|
+
return retVal;
|
|
4735
3572
|
};
|
|
4736
3573
|
const deserializeAws_restJson1__listOfUnprocessedScramSecret = (output, context) => {
|
|
4737
|
-
|
|
3574
|
+
const retVal = (output || [])
|
|
4738
3575
|
.filter((e) => e != null)
|
|
4739
3576
|
.map((entry) => {
|
|
4740
3577
|
if (entry === null) {
|
|
@@ -4742,9 +3579,10 @@ const deserializeAws_restJson1__listOfUnprocessedScramSecret = (output, context)
|
|
|
4742
3579
|
}
|
|
4743
3580
|
return deserializeAws_restJson1UnprocessedScramSecret(entry, context);
|
|
4744
3581
|
});
|
|
3582
|
+
return retVal;
|
|
4745
3583
|
};
|
|
4746
3584
|
const deserializeAws_restJson1__listOfVpcConfig = (output, context) => {
|
|
4747
|
-
|
|
3585
|
+
const retVal = (output || [])
|
|
4748
3586
|
.filter((e) => e != null)
|
|
4749
3587
|
.map((entry) => {
|
|
4750
3588
|
if (entry === null) {
|
|
@@ -4752,6 +3590,7 @@ const deserializeAws_restJson1__listOfVpcConfig = (output, context) => {
|
|
|
4752
3590
|
}
|
|
4753
3591
|
return deserializeAws_restJson1VpcConfig(entry, context);
|
|
4754
3592
|
});
|
|
3593
|
+
return retVal;
|
|
4755
3594
|
};
|
|
4756
3595
|
const deserializeAws_restJson1__mapOf__string = (output, context) => {
|
|
4757
3596
|
return Object.entries(output).reduce((acc, [key, value]) => {
|