@aws-sdk/client-lex-models-v2 3.41.0 → 3.45.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 +41 -0
- package/dist-cjs/LexModelsV2.js +90 -0
- package/dist-cjs/commands/DescribeBotRecommendationCommand.js +36 -0
- package/dist-cjs/commands/ListBotRecommendationsCommand.js +36 -0
- package/dist-cjs/commands/ListRecommendedIntentsCommand.js +36 -0
- package/dist-cjs/commands/SearchAssociatedTranscriptsCommand.js +36 -0
- package/dist-cjs/commands/StartBotRecommendationCommand.js +36 -0
- package/dist-cjs/commands/UpdateBotRecommendationCommand.js +36 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +231 -5
- package/dist-cjs/pagination/ListBotRecommendationsPaginator.js +35 -0
- package/dist-cjs/pagination/ListRecommendedIntentsPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1531 -186
- package/dist-es/LexModelsV2.js +90 -0
- package/dist-es/commands/DescribeBotRecommendationCommand.js +39 -0
- package/dist-es/commands/ListBotRecommendationsCommand.js +39 -0
- package/dist-es/commands/ListRecommendedIntentsCommand.js +39 -0
- package/dist-es/commands/SearchAssociatedTranscriptsCommand.js +39 -0
- package/dist-es/commands/StartBotRecommendationCommand.js +39 -0
- package/dist-es/commands/UpdateBotRecommendationCommand.js +39 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +158 -0
- package/dist-es/pagination/ListBotRecommendationsPaginator.js +74 -0
- package/dist-es/pagination/ListRecommendedIntentsPaginator.js +74 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +1543 -135
- package/dist-types/LexModelsV2.d.ts +56 -6
- package/dist-types/LexModelsV2Client.d.ts +8 -2
- package/dist-types/commands/DeleteBotVersionCommand.d.ts +1 -1
- package/dist-types/commands/DeleteUtterancesCommand.d.ts +3 -3
- package/dist-types/commands/DescribeBotRecommendationCommand.d.ts +39 -0
- package/dist-types/commands/ListBotRecommendationsCommand.d.ts +36 -0
- package/dist-types/commands/ListBuiltInIntentsCommand.d.ts +1 -1
- package/dist-types/commands/ListRecommendedIntentsCommand.d.ts +36 -0
- package/dist-types/commands/SearchAssociatedTranscriptsCommand.d.ts +36 -0
- package/dist-types/commands/StartBotRecommendationCommand.d.ts +36 -0
- package/dist-types/commands/UpdateBotRecommendationCommand.d.ts +35 -0
- package/dist-types/commands/UpdateExportCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +1117 -91
- package/dist-types/pagination/ListBotRecommendationsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListRecommendedIntentsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/LexModelsV2.d.ts +30 -0
- package/dist-types/ts3.4/LexModelsV2Client.d.ts +8 -2
- package/dist-types/ts3.4/commands/DescribeBotRecommendationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListBotRecommendationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListRecommendedIntentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/SearchAssociatedTranscriptsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartBotRecommendationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateBotRecommendationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +480 -2
- package/dist-types/ts3.4/pagination/ListBotRecommendationsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListRecommendedIntentsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +5 -5
|
@@ -510,7 +510,10 @@ export var serializeAws_restJson1CreateSlotTypeCommand = function (input, contex
|
|
|
510
510
|
else {
|
|
511
511
|
throw new Error("No value provided for input HTTP label: localeId.");
|
|
512
512
|
}
|
|
513
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.
|
|
513
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.externalSourceSetting !== undefined &&
|
|
514
|
+
input.externalSourceSetting !== null && {
|
|
515
|
+
externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
|
|
516
|
+
})), (input.parentSlotTypeSignature !== undefined &&
|
|
514
517
|
input.parentSlotTypeSignature !== null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName !== undefined && input.slotTypeName !== null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues !== undefined &&
|
|
515
518
|
input.slotTypeValues !== null && {
|
|
516
519
|
slotTypeValues: serializeAws_restJson1SlotTypeValues(input.slotTypeValues, context),
|
|
@@ -1227,6 +1230,68 @@ export var serializeAws_restJson1DescribeBotLocaleCommand = function (input, con
|
|
|
1227
1230
|
}
|
|
1228
1231
|
});
|
|
1229
1232
|
}); };
|
|
1233
|
+
export var serializeAws_restJson1DescribeBotRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1234
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
|
|
1235
|
+
return __generator(this, function (_c) {
|
|
1236
|
+
switch (_c.label) {
|
|
1237
|
+
case 0: return [4, context.endpoint()];
|
|
1238
|
+
case 1:
|
|
1239
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1240
|
+
headers = {};
|
|
1241
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1242
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}";
|
|
1243
|
+
if (input.botId !== undefined) {
|
|
1244
|
+
labelValue = input.botId;
|
|
1245
|
+
if (labelValue.length <= 0) {
|
|
1246
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
1247
|
+
}
|
|
1248
|
+
resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
|
|
1249
|
+
}
|
|
1250
|
+
else {
|
|
1251
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
1252
|
+
}
|
|
1253
|
+
if (input.botVersion !== undefined) {
|
|
1254
|
+
labelValue = input.botVersion;
|
|
1255
|
+
if (labelValue.length <= 0) {
|
|
1256
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
1257
|
+
}
|
|
1258
|
+
resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
|
|
1259
|
+
}
|
|
1260
|
+
else {
|
|
1261
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
1262
|
+
}
|
|
1263
|
+
if (input.localeId !== undefined) {
|
|
1264
|
+
labelValue = input.localeId;
|
|
1265
|
+
if (labelValue.length <= 0) {
|
|
1266
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
1267
|
+
}
|
|
1268
|
+
resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
|
|
1269
|
+
}
|
|
1270
|
+
else {
|
|
1271
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
1272
|
+
}
|
|
1273
|
+
if (input.botRecommendationId !== undefined) {
|
|
1274
|
+
labelValue = input.botRecommendationId;
|
|
1275
|
+
if (labelValue.length <= 0) {
|
|
1276
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
1277
|
+
}
|
|
1278
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
|
|
1279
|
+
}
|
|
1280
|
+
else {
|
|
1281
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
1282
|
+
}
|
|
1283
|
+
return [2, new __HttpRequest({
|
|
1284
|
+
protocol: protocol,
|
|
1285
|
+
hostname: hostname,
|
|
1286
|
+
port: port,
|
|
1287
|
+
method: "GET",
|
|
1288
|
+
headers: headers,
|
|
1289
|
+
path: resolvedPath,
|
|
1290
|
+
body: body,
|
|
1291
|
+
})];
|
|
1292
|
+
}
|
|
1293
|
+
});
|
|
1294
|
+
}); };
|
|
1230
1295
|
export var serializeAws_restJson1DescribeBotVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1231
1296
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1232
1297
|
return __generator(this, function (_c) {
|
|
@@ -1677,6 +1742,61 @@ export var serializeAws_restJson1ListBotLocalesCommand = function (input, contex
|
|
|
1677
1742
|
}
|
|
1678
1743
|
});
|
|
1679
1744
|
}); };
|
|
1745
|
+
export var serializeAws_restJson1ListBotRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1746
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
1747
|
+
return __generator(this, function (_c) {
|
|
1748
|
+
switch (_c.label) {
|
|
1749
|
+
case 0: return [4, context.endpoint()];
|
|
1750
|
+
case 1:
|
|
1751
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1752
|
+
headers = {
|
|
1753
|
+
"content-type": "application/json",
|
|
1754
|
+
};
|
|
1755
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1756
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations";
|
|
1757
|
+
if (input.botId !== undefined) {
|
|
1758
|
+
labelValue = input.botId;
|
|
1759
|
+
if (labelValue.length <= 0) {
|
|
1760
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
1761
|
+
}
|
|
1762
|
+
resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
|
|
1763
|
+
}
|
|
1764
|
+
else {
|
|
1765
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
1766
|
+
}
|
|
1767
|
+
if (input.botVersion !== undefined) {
|
|
1768
|
+
labelValue = input.botVersion;
|
|
1769
|
+
if (labelValue.length <= 0) {
|
|
1770
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
1771
|
+
}
|
|
1772
|
+
resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
|
|
1773
|
+
}
|
|
1774
|
+
else {
|
|
1775
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
1776
|
+
}
|
|
1777
|
+
if (input.localeId !== undefined) {
|
|
1778
|
+
labelValue = input.localeId;
|
|
1779
|
+
if (labelValue.length <= 0) {
|
|
1780
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
1781
|
+
}
|
|
1782
|
+
resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
|
|
1783
|
+
}
|
|
1784
|
+
else {
|
|
1785
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
1786
|
+
}
|
|
1787
|
+
body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
|
|
1788
|
+
return [2, new __HttpRequest({
|
|
1789
|
+
protocol: protocol,
|
|
1790
|
+
hostname: hostname,
|
|
1791
|
+
port: port,
|
|
1792
|
+
method: "POST",
|
|
1793
|
+
headers: headers,
|
|
1794
|
+
path: resolvedPath,
|
|
1795
|
+
body: body,
|
|
1796
|
+
})];
|
|
1797
|
+
}
|
|
1798
|
+
});
|
|
1799
|
+
}); };
|
|
1680
1800
|
export var serializeAws_restJson1ListBotsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1681
1801
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
1682
1802
|
return __generator(this, function (_c) {
|
|
@@ -1917,6 +2037,71 @@ export var serializeAws_restJson1ListIntentsCommand = function (input, context)
|
|
|
1917
2037
|
}
|
|
1918
2038
|
});
|
|
1919
2039
|
}); };
|
|
2040
|
+
export var serializeAws_restJson1ListRecommendedIntentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2041
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
|
|
2042
|
+
return __generator(this, function (_c) {
|
|
2043
|
+
switch (_c.label) {
|
|
2044
|
+
case 0: return [4, context.endpoint()];
|
|
2045
|
+
case 1:
|
|
2046
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2047
|
+
headers = {
|
|
2048
|
+
"content-type": "application/json",
|
|
2049
|
+
};
|
|
2050
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2051
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}/intents";
|
|
2052
|
+
if (input.botId !== undefined) {
|
|
2053
|
+
labelValue = input.botId;
|
|
2054
|
+
if (labelValue.length <= 0) {
|
|
2055
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2056
|
+
}
|
|
2057
|
+
resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
|
|
2058
|
+
}
|
|
2059
|
+
else {
|
|
2060
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2061
|
+
}
|
|
2062
|
+
if (input.botVersion !== undefined) {
|
|
2063
|
+
labelValue = input.botVersion;
|
|
2064
|
+
if (labelValue.length <= 0) {
|
|
2065
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2066
|
+
}
|
|
2067
|
+
resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
|
|
2068
|
+
}
|
|
2069
|
+
else {
|
|
2070
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2071
|
+
}
|
|
2072
|
+
if (input.localeId !== undefined) {
|
|
2073
|
+
labelValue = input.localeId;
|
|
2074
|
+
if (labelValue.length <= 0) {
|
|
2075
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2076
|
+
}
|
|
2077
|
+
resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
|
|
2078
|
+
}
|
|
2079
|
+
else {
|
|
2080
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2081
|
+
}
|
|
2082
|
+
if (input.botRecommendationId !== undefined) {
|
|
2083
|
+
labelValue = input.botRecommendationId;
|
|
2084
|
+
if (labelValue.length <= 0) {
|
|
2085
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
2086
|
+
}
|
|
2087
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
|
|
2088
|
+
}
|
|
2089
|
+
else {
|
|
2090
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
2091
|
+
}
|
|
2092
|
+
body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
|
|
2093
|
+
return [2, new __HttpRequest({
|
|
2094
|
+
protocol: protocol,
|
|
2095
|
+
hostname: hostname,
|
|
2096
|
+
port: port,
|
|
2097
|
+
method: "POST",
|
|
2098
|
+
headers: headers,
|
|
2099
|
+
path: resolvedPath,
|
|
2100
|
+
body: body,
|
|
2101
|
+
})];
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
}); };
|
|
1920
2105
|
export var serializeAws_restJson1ListSlotsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1921
2106
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
|
|
1922
2107
|
return __generator(this, function (_c) {
|
|
@@ -2072,8 +2257,8 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
2072
2257
|
}
|
|
2073
2258
|
});
|
|
2074
2259
|
}); };
|
|
2075
|
-
export var
|
|
2076
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
2260
|
+
export var serializeAws_restJson1SearchAssociatedTranscriptsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2261
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
|
|
2077
2262
|
return __generator(this, function (_c) {
|
|
2078
2263
|
switch (_c.label) {
|
|
2079
2264
|
case 0: return [4, context.endpoint()];
|
|
@@ -2082,16 +2267,55 @@ export var serializeAws_restJson1StartImportCommand = function (input, context)
|
|
|
2082
2267
|
headers = {
|
|
2083
2268
|
"content-type": "application/json",
|
|
2084
2269
|
};
|
|
2085
|
-
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2270
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2271
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}/associatedtranscripts";
|
|
2272
|
+
if (input.botId !== undefined) {
|
|
2273
|
+
labelValue = input.botId;
|
|
2274
|
+
if (labelValue.length <= 0) {
|
|
2275
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2276
|
+
}
|
|
2277
|
+
resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
|
|
2278
|
+
}
|
|
2279
|
+
else {
|
|
2280
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2281
|
+
}
|
|
2282
|
+
if (input.botVersion !== undefined) {
|
|
2283
|
+
labelValue = input.botVersion;
|
|
2284
|
+
if (labelValue.length <= 0) {
|
|
2285
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2286
|
+
}
|
|
2287
|
+
resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
|
|
2288
|
+
}
|
|
2289
|
+
else {
|
|
2290
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2291
|
+
}
|
|
2292
|
+
if (input.localeId !== undefined) {
|
|
2293
|
+
labelValue = input.localeId;
|
|
2294
|
+
if (labelValue.length <= 0) {
|
|
2295
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2296
|
+
}
|
|
2297
|
+
resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
|
|
2298
|
+
}
|
|
2299
|
+
else {
|
|
2300
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2301
|
+
}
|
|
2302
|
+
if (input.botRecommendationId !== undefined) {
|
|
2303
|
+
labelValue = input.botRecommendationId;
|
|
2304
|
+
if (labelValue.length <= 0) {
|
|
2305
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
2306
|
+
}
|
|
2307
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
|
|
2308
|
+
}
|
|
2309
|
+
else {
|
|
2310
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
2311
|
+
}
|
|
2312
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
|
|
2313
|
+
input.filters !== null && { filters: serializeAws_restJson1AssociatedTranscriptFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextIndex !== undefined && input.nextIndex !== null && { nextIndex: input.nextIndex })), (input.searchOrder !== undefined && input.searchOrder !== null && { searchOrder: input.searchOrder })));
|
|
2090
2314
|
return [2, new __HttpRequest({
|
|
2091
2315
|
protocol: protocol,
|
|
2092
2316
|
hostname: hostname,
|
|
2093
2317
|
port: port,
|
|
2094
|
-
method: "
|
|
2318
|
+
method: "POST",
|
|
2095
2319
|
headers: headers,
|
|
2096
2320
|
path: resolvedPath,
|
|
2097
2321
|
body: body,
|
|
@@ -2099,8 +2323,8 @@ export var serializeAws_restJson1StartImportCommand = function (input, context)
|
|
|
2099
2323
|
}
|
|
2100
2324
|
});
|
|
2101
2325
|
}); };
|
|
2102
|
-
export var
|
|
2103
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
2326
|
+
export var serializeAws_restJson1StartBotRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2327
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
2104
2328
|
return __generator(this, function (_c) {
|
|
2105
2329
|
switch (_c.label) {
|
|
2106
2330
|
case 0: return [4, context.endpoint()];
|
|
@@ -2109,23 +2333,50 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
2109
2333
|
headers = {
|
|
2110
2334
|
"content-type": "application/json",
|
|
2111
2335
|
};
|
|
2112
|
-
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2113
|
-
|
|
2114
|
-
|
|
2336
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2337
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations";
|
|
2338
|
+
if (input.botId !== undefined) {
|
|
2339
|
+
labelValue = input.botId;
|
|
2115
2340
|
if (labelValue.length <= 0) {
|
|
2116
|
-
throw new Error("Empty value provided for input HTTP label:
|
|
2341
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2117
2342
|
}
|
|
2118
|
-
resolvedPath = resolvedPath.replace("{
|
|
2343
|
+
resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
|
|
2119
2344
|
}
|
|
2120
2345
|
else {
|
|
2121
|
-
throw new Error("No value provided for input HTTP label:
|
|
2346
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2122
2347
|
}
|
|
2123
|
-
|
|
2348
|
+
if (input.botVersion !== undefined) {
|
|
2349
|
+
labelValue = input.botVersion;
|
|
2350
|
+
if (labelValue.length <= 0) {
|
|
2351
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2352
|
+
}
|
|
2353
|
+
resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
|
|
2354
|
+
}
|
|
2355
|
+
else {
|
|
2356
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2357
|
+
}
|
|
2358
|
+
if (input.localeId !== undefined) {
|
|
2359
|
+
labelValue = input.localeId;
|
|
2360
|
+
if (labelValue.length <= 0) {
|
|
2361
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2362
|
+
}
|
|
2363
|
+
resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
|
|
2364
|
+
}
|
|
2365
|
+
else {
|
|
2366
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2367
|
+
}
|
|
2368
|
+
body = JSON.stringify(__assign(__assign({}, (input.encryptionSetting !== undefined &&
|
|
2369
|
+
input.encryptionSetting !== null && {
|
|
2370
|
+
encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
|
|
2371
|
+
})), (input.transcriptSourceSetting !== undefined &&
|
|
2372
|
+
input.transcriptSourceSetting !== null && {
|
|
2373
|
+
transcriptSourceSetting: serializeAws_restJson1TranscriptSourceSetting(input.transcriptSourceSetting, context),
|
|
2374
|
+
})));
|
|
2124
2375
|
return [2, new __HttpRequest({
|
|
2125
2376
|
protocol: protocol,
|
|
2126
2377
|
hostname: hostname,
|
|
2127
2378
|
port: port,
|
|
2128
|
-
method: "
|
|
2379
|
+
method: "PUT",
|
|
2129
2380
|
headers: headers,
|
|
2130
2381
|
path: resolvedPath,
|
|
2131
2382
|
body: body,
|
|
@@ -2133,8 +2384,69 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
2133
2384
|
}
|
|
2134
2385
|
});
|
|
2135
2386
|
}); };
|
|
2136
|
-
export var
|
|
2137
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
2387
|
+
export var serializeAws_restJson1StartImportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2388
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
2389
|
+
return __generator(this, function (_c) {
|
|
2390
|
+
switch (_c.label) {
|
|
2391
|
+
case 0: return [4, context.endpoint()];
|
|
2392
|
+
case 1:
|
|
2393
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2394
|
+
headers = {
|
|
2395
|
+
"content-type": "application/json",
|
|
2396
|
+
};
|
|
2397
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/imports";
|
|
2398
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword })), (input.importId !== undefined && input.importId !== null && { importId: input.importId })), (input.mergeStrategy !== undefined && input.mergeStrategy !== null && { mergeStrategy: input.mergeStrategy })), (input.resourceSpecification !== undefined &&
|
|
2399
|
+
input.resourceSpecification !== null && {
|
|
2400
|
+
resourceSpecification: serializeAws_restJson1ImportResourceSpecification(input.resourceSpecification, context),
|
|
2401
|
+
})));
|
|
2402
|
+
return [2, new __HttpRequest({
|
|
2403
|
+
protocol: protocol,
|
|
2404
|
+
hostname: hostname,
|
|
2405
|
+
port: port,
|
|
2406
|
+
method: "PUT",
|
|
2407
|
+
headers: headers,
|
|
2408
|
+
path: resolvedPath,
|
|
2409
|
+
body: body,
|
|
2410
|
+
})];
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
}); };
|
|
2414
|
+
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2415
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
2416
|
+
return __generator(this, function (_c) {
|
|
2417
|
+
switch (_c.label) {
|
|
2418
|
+
case 0: return [4, context.endpoint()];
|
|
2419
|
+
case 1:
|
|
2420
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2421
|
+
headers = {
|
|
2422
|
+
"content-type": "application/json",
|
|
2423
|
+
};
|
|
2424
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceARN}";
|
|
2425
|
+
if (input.resourceARN !== undefined) {
|
|
2426
|
+
labelValue = input.resourceARN;
|
|
2427
|
+
if (labelValue.length <= 0) {
|
|
2428
|
+
throw new Error("Empty value provided for input HTTP label: resourceARN.");
|
|
2429
|
+
}
|
|
2430
|
+
resolvedPath = resolvedPath.replace("{resourceARN}", __extendedEncodeURIComponent(labelValue));
|
|
2431
|
+
}
|
|
2432
|
+
else {
|
|
2433
|
+
throw new Error("No value provided for input HTTP label: resourceARN.");
|
|
2434
|
+
}
|
|
2435
|
+
body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
2436
|
+
return [2, new __HttpRequest({
|
|
2437
|
+
protocol: protocol,
|
|
2438
|
+
hostname: hostname,
|
|
2439
|
+
port: port,
|
|
2440
|
+
method: "POST",
|
|
2441
|
+
headers: headers,
|
|
2442
|
+
path: resolvedPath,
|
|
2443
|
+
body: body,
|
|
2444
|
+
})];
|
|
2445
|
+
}
|
|
2446
|
+
});
|
|
2447
|
+
}); };
|
|
2448
|
+
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2449
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2138
2450
|
return __generator(this, function (_c) {
|
|
2139
2451
|
switch (_c.label) {
|
|
2140
2452
|
case 0: return [4, context.endpoint()];
|
|
@@ -2316,6 +2628,74 @@ export var serializeAws_restJson1UpdateBotLocaleCommand = function (input, conte
|
|
|
2316
2628
|
}
|
|
2317
2629
|
});
|
|
2318
2630
|
}); };
|
|
2631
|
+
export var serializeAws_restJson1UpdateBotRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2632
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
|
|
2633
|
+
return __generator(this, function (_c) {
|
|
2634
|
+
switch (_c.label) {
|
|
2635
|
+
case 0: return [4, context.endpoint()];
|
|
2636
|
+
case 1:
|
|
2637
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2638
|
+
headers = {
|
|
2639
|
+
"content-type": "application/json",
|
|
2640
|
+
};
|
|
2641
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2642
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}";
|
|
2643
|
+
if (input.botId !== undefined) {
|
|
2644
|
+
labelValue = input.botId;
|
|
2645
|
+
if (labelValue.length <= 0) {
|
|
2646
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2647
|
+
}
|
|
2648
|
+
resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
|
|
2649
|
+
}
|
|
2650
|
+
else {
|
|
2651
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2652
|
+
}
|
|
2653
|
+
if (input.botVersion !== undefined) {
|
|
2654
|
+
labelValue = input.botVersion;
|
|
2655
|
+
if (labelValue.length <= 0) {
|
|
2656
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2657
|
+
}
|
|
2658
|
+
resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
|
|
2659
|
+
}
|
|
2660
|
+
else {
|
|
2661
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2662
|
+
}
|
|
2663
|
+
if (input.localeId !== undefined) {
|
|
2664
|
+
labelValue = input.localeId;
|
|
2665
|
+
if (labelValue.length <= 0) {
|
|
2666
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2667
|
+
}
|
|
2668
|
+
resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
|
|
2669
|
+
}
|
|
2670
|
+
else {
|
|
2671
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2672
|
+
}
|
|
2673
|
+
if (input.botRecommendationId !== undefined) {
|
|
2674
|
+
labelValue = input.botRecommendationId;
|
|
2675
|
+
if (labelValue.length <= 0) {
|
|
2676
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
2677
|
+
}
|
|
2678
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
|
|
2679
|
+
}
|
|
2680
|
+
else {
|
|
2681
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
2682
|
+
}
|
|
2683
|
+
body = JSON.stringify(__assign({}, (input.encryptionSetting !== undefined &&
|
|
2684
|
+
input.encryptionSetting !== null && {
|
|
2685
|
+
encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
|
|
2686
|
+
})));
|
|
2687
|
+
return [2, new __HttpRequest({
|
|
2688
|
+
protocol: protocol,
|
|
2689
|
+
hostname: hostname,
|
|
2690
|
+
port: port,
|
|
2691
|
+
method: "PUT",
|
|
2692
|
+
headers: headers,
|
|
2693
|
+
path: resolvedPath,
|
|
2694
|
+
body: body,
|
|
2695
|
+
})];
|
|
2696
|
+
}
|
|
2697
|
+
});
|
|
2698
|
+
}); };
|
|
2319
2699
|
export var serializeAws_restJson1UpdateExportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2320
2700
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
2321
2701
|
return __generator(this, function (_c) {
|
|
@@ -2615,7 +2995,10 @@ export var serializeAws_restJson1UpdateSlotTypeCommand = function (input, contex
|
|
|
2615
2995
|
else {
|
|
2616
2996
|
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2617
2997
|
}
|
|
2618
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.
|
|
2998
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.externalSourceSetting !== undefined &&
|
|
2999
|
+
input.externalSourceSetting !== null && {
|
|
3000
|
+
externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
|
|
3001
|
+
})), (input.parentSlotTypeSignature !== undefined &&
|
|
2619
3002
|
input.parentSlotTypeSignature !== null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName !== undefined && input.slotTypeName !== null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues !== undefined &&
|
|
2620
3003
|
input.slotTypeValues !== null && {
|
|
2621
3004
|
slotTypeValues: serializeAws_restJson1SlotTypeValues(input.slotTypeValues, context),
|
|
@@ -3949,6 +4332,7 @@ export var deserializeAws_restJson1CreateSlotTypeCommand = function (output, con
|
|
|
3949
4332
|
botVersion: undefined,
|
|
3950
4333
|
creationDateTime: undefined,
|
|
3951
4334
|
description: undefined,
|
|
4335
|
+
externalSourceSetting: undefined,
|
|
3952
4336
|
localeId: undefined,
|
|
3953
4337
|
parentSlotTypeSignature: undefined,
|
|
3954
4338
|
slotTypeId: undefined,
|
|
@@ -3973,6 +4357,9 @@ export var deserializeAws_restJson1CreateSlotTypeCommand = function (output, con
|
|
|
3973
4357
|
if (data.description !== undefined && data.description !== null) {
|
|
3974
4358
|
contents.description = __expectString(data.description);
|
|
3975
4359
|
}
|
|
4360
|
+
if (data.externalSourceSetting !== undefined && data.externalSourceSetting !== null) {
|
|
4361
|
+
contents.externalSourceSetting = deserializeAws_restJson1ExternalSourceSetting(data.externalSourceSetting, context);
|
|
4362
|
+
}
|
|
3976
4363
|
if (data.localeId !== undefined && data.localeId !== null) {
|
|
3977
4364
|
contents.localeId = __expectString(data.localeId);
|
|
3978
4365
|
}
|
|
@@ -5634,6 +6021,7 @@ export var deserializeAws_restJson1DescribeBotLocaleCommand = function (output,
|
|
|
5634
6021
|
localeId: undefined,
|
|
5635
6022
|
localeName: undefined,
|
|
5636
6023
|
nluIntentConfidenceThreshold: undefined,
|
|
6024
|
+
recommendedActions: undefined,
|
|
5637
6025
|
slotTypesCount: undefined,
|
|
5638
6026
|
voiceSettings: undefined,
|
|
5639
6027
|
};
|
|
@@ -5681,6 +6069,9 @@ export var deserializeAws_restJson1DescribeBotLocaleCommand = function (output,
|
|
|
5681
6069
|
if (data.nluIntentConfidenceThreshold !== undefined && data.nluIntentConfidenceThreshold !== null) {
|
|
5682
6070
|
contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold);
|
|
5683
6071
|
}
|
|
6072
|
+
if (data.recommendedActions !== undefined && data.recommendedActions !== null) {
|
|
6073
|
+
contents.recommendedActions = deserializeAws_restJson1RecommendedActions(data.recommendedActions, context);
|
|
6074
|
+
}
|
|
5684
6075
|
if (data.slotTypesCount !== undefined && data.slotTypesCount !== null) {
|
|
5685
6076
|
contents.slotTypesCount = __expectInt32(data.slotTypesCount);
|
|
5686
6077
|
}
|
|
@@ -5761,6 +6152,132 @@ var deserializeAws_restJson1DescribeBotLocaleCommandError = function (output, co
|
|
|
5761
6152
|
}
|
|
5762
6153
|
});
|
|
5763
6154
|
}); };
|
|
6155
|
+
export var deserializeAws_restJson1DescribeBotRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6156
|
+
var contents, data, _a, _b;
|
|
6157
|
+
return __generator(this, function (_c) {
|
|
6158
|
+
switch (_c.label) {
|
|
6159
|
+
case 0:
|
|
6160
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6161
|
+
return [2, deserializeAws_restJson1DescribeBotRecommendationCommandError(output, context)];
|
|
6162
|
+
}
|
|
6163
|
+
contents = {
|
|
6164
|
+
$metadata: deserializeMetadata(output),
|
|
6165
|
+
botId: undefined,
|
|
6166
|
+
botRecommendationId: undefined,
|
|
6167
|
+
botRecommendationResults: undefined,
|
|
6168
|
+
botRecommendationStatus: undefined,
|
|
6169
|
+
botVersion: undefined,
|
|
6170
|
+
creationDateTime: undefined,
|
|
6171
|
+
encryptionSetting: undefined,
|
|
6172
|
+
failureReasons: undefined,
|
|
6173
|
+
lastUpdatedDateTime: undefined,
|
|
6174
|
+
localeId: undefined,
|
|
6175
|
+
transcriptSourceSetting: undefined,
|
|
6176
|
+
};
|
|
6177
|
+
_a = __expectNonNull;
|
|
6178
|
+
_b = __expectObject;
|
|
6179
|
+
return [4, parseBody(output.body, context)];
|
|
6180
|
+
case 1:
|
|
6181
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
6182
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
6183
|
+
contents.botId = __expectString(data.botId);
|
|
6184
|
+
}
|
|
6185
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
6186
|
+
contents.botRecommendationId = __expectString(data.botRecommendationId);
|
|
6187
|
+
}
|
|
6188
|
+
if (data.botRecommendationResults !== undefined && data.botRecommendationResults !== null) {
|
|
6189
|
+
contents.botRecommendationResults = deserializeAws_restJson1BotRecommendationResults(data.botRecommendationResults, context);
|
|
6190
|
+
}
|
|
6191
|
+
if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
|
|
6192
|
+
contents.botRecommendationStatus = __expectString(data.botRecommendationStatus);
|
|
6193
|
+
}
|
|
6194
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
6195
|
+
contents.botVersion = __expectString(data.botVersion);
|
|
6196
|
+
}
|
|
6197
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
6198
|
+
contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
|
|
6199
|
+
}
|
|
6200
|
+
if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
|
|
6201
|
+
contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
|
|
6202
|
+
}
|
|
6203
|
+
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
6204
|
+
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
6205
|
+
}
|
|
6206
|
+
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
6207
|
+
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
6208
|
+
}
|
|
6209
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
6210
|
+
contents.localeId = __expectString(data.localeId);
|
|
6211
|
+
}
|
|
6212
|
+
if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
|
|
6213
|
+
contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
|
|
6214
|
+
}
|
|
6215
|
+
return [2, Promise.resolve(contents)];
|
|
6216
|
+
}
|
|
6217
|
+
});
|
|
6218
|
+
}); };
|
|
6219
|
+
var deserializeAws_restJson1DescribeBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6220
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
6221
|
+
var _g;
|
|
6222
|
+
return __generator(this, function (_h) {
|
|
6223
|
+
switch (_h.label) {
|
|
6224
|
+
case 0:
|
|
6225
|
+
_a = [__assign({}, output)];
|
|
6226
|
+
_g = {};
|
|
6227
|
+
return [4, parseBody(output.body, context)];
|
|
6228
|
+
case 1:
|
|
6229
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
6230
|
+
errorCode = "UnknownError";
|
|
6231
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6232
|
+
_b = errorCode;
|
|
6233
|
+
switch (_b) {
|
|
6234
|
+
case "InternalServerException": return [3, 2];
|
|
6235
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
|
|
6236
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
6237
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
|
|
6238
|
+
case "ThrottlingException": return [3, 6];
|
|
6239
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 6];
|
|
6240
|
+
case "ValidationException": return [3, 8];
|
|
6241
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 8];
|
|
6242
|
+
}
|
|
6243
|
+
return [3, 10];
|
|
6244
|
+
case 2:
|
|
6245
|
+
_c = [{}];
|
|
6246
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
6247
|
+
case 3:
|
|
6248
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6249
|
+
return [3, 11];
|
|
6250
|
+
case 4:
|
|
6251
|
+
_d = [{}];
|
|
6252
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6253
|
+
case 5:
|
|
6254
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6255
|
+
return [3, 11];
|
|
6256
|
+
case 6:
|
|
6257
|
+
_e = [{}];
|
|
6258
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6259
|
+
case 7:
|
|
6260
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6261
|
+
return [3, 11];
|
|
6262
|
+
case 8:
|
|
6263
|
+
_f = [{}];
|
|
6264
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
6265
|
+
case 9:
|
|
6266
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6267
|
+
return [3, 11];
|
|
6268
|
+
case 10:
|
|
6269
|
+
parsedBody = parsedOutput.body;
|
|
6270
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6271
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6272
|
+
_h.label = 11;
|
|
6273
|
+
case 11:
|
|
6274
|
+
message = response.message || response.Message || errorCode;
|
|
6275
|
+
response.message = message;
|
|
6276
|
+
delete response.Message;
|
|
6277
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
6278
|
+
}
|
|
6279
|
+
});
|
|
6280
|
+
}); };
|
|
5764
6281
|
export var deserializeAws_restJson1DescribeBotVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5765
6282
|
var contents, data, _a, _b;
|
|
5766
6283
|
return __generator(this, function (_c) {
|
|
@@ -6527,6 +7044,7 @@ export var deserializeAws_restJson1DescribeSlotTypeCommand = function (output, c
|
|
|
6527
7044
|
botVersion: undefined,
|
|
6528
7045
|
creationDateTime: undefined,
|
|
6529
7046
|
description: undefined,
|
|
7047
|
+
externalSourceSetting: undefined,
|
|
6530
7048
|
lastUpdatedDateTime: undefined,
|
|
6531
7049
|
localeId: undefined,
|
|
6532
7050
|
parentSlotTypeSignature: undefined,
|
|
@@ -6552,6 +7070,9 @@ export var deserializeAws_restJson1DescribeSlotTypeCommand = function (output, c
|
|
|
6552
7070
|
if (data.description !== undefined && data.description !== null) {
|
|
6553
7071
|
contents.description = __expectString(data.description);
|
|
6554
7072
|
}
|
|
7073
|
+
if (data.externalSourceSetting !== undefined && data.externalSourceSetting !== null) {
|
|
7074
|
+
contents.externalSourceSetting = deserializeAws_restJson1ExternalSourceSetting(data.externalSourceSetting, context);
|
|
7075
|
+
}
|
|
6555
7076
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
6556
7077
|
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
6557
7078
|
}
|
|
@@ -6961,17 +7482,20 @@ var deserializeAws_restJson1ListBotLocalesCommandError = function (output, conte
|
|
|
6961
7482
|
}
|
|
6962
7483
|
});
|
|
6963
7484
|
}); };
|
|
6964
|
-
export var
|
|
7485
|
+
export var deserializeAws_restJson1ListBotRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6965
7486
|
var contents, data, _a, _b;
|
|
6966
7487
|
return __generator(this, function (_c) {
|
|
6967
7488
|
switch (_c.label) {
|
|
6968
7489
|
case 0:
|
|
6969
7490
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6970
|
-
return [2,
|
|
7491
|
+
return [2, deserializeAws_restJson1ListBotRecommendationsCommandError(output, context)];
|
|
6971
7492
|
}
|
|
6972
7493
|
contents = {
|
|
6973
7494
|
$metadata: deserializeMetadata(output),
|
|
6974
|
-
|
|
7495
|
+
botId: undefined,
|
|
7496
|
+
botRecommendationSummaries: undefined,
|
|
7497
|
+
botVersion: undefined,
|
|
7498
|
+
localeId: undefined,
|
|
6975
7499
|
nextToken: undefined,
|
|
6976
7500
|
};
|
|
6977
7501
|
_a = __expectNonNull;
|
|
@@ -6979,8 +7503,17 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
|
|
|
6979
7503
|
return [4, parseBody(output.body, context)];
|
|
6980
7504
|
case 1:
|
|
6981
7505
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
6982
|
-
if (data.
|
|
6983
|
-
contents.
|
|
7506
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
7507
|
+
contents.botId = __expectString(data.botId);
|
|
7508
|
+
}
|
|
7509
|
+
if (data.botRecommendationSummaries !== undefined && data.botRecommendationSummaries !== null) {
|
|
7510
|
+
contents.botRecommendationSummaries = deserializeAws_restJson1BotRecommendationSummaryList(data.botRecommendationSummaries, context);
|
|
7511
|
+
}
|
|
7512
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7513
|
+
contents.botVersion = __expectString(data.botVersion);
|
|
7514
|
+
}
|
|
7515
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
7516
|
+
contents.localeId = __expectString(data.localeId);
|
|
6984
7517
|
}
|
|
6985
7518
|
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
6986
7519
|
contents.nextToken = __expectString(data.nextToken);
|
|
@@ -6989,7 +7522,7 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
|
|
|
6989
7522
|
}
|
|
6990
7523
|
});
|
|
6991
7524
|
}); };
|
|
6992
|
-
var
|
|
7525
|
+
var deserializeAws_restJson1ListBotRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6993
7526
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
6994
7527
|
var _g;
|
|
6995
7528
|
return __generator(this, function (_h) {
|
|
@@ -7006,8 +7539,8 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
|
|
|
7006
7539
|
switch (_b) {
|
|
7007
7540
|
case "InternalServerException": return [3, 2];
|
|
7008
7541
|
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
|
|
7009
|
-
case "
|
|
7010
|
-
case "com.amazonaws.lexmodelsv2#
|
|
7542
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
7543
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
|
|
7011
7544
|
case "ThrottlingException": return [3, 6];
|
|
7012
7545
|
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 6];
|
|
7013
7546
|
case "ValidationException": return [3, 8];
|
|
@@ -7022,7 +7555,7 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
|
|
|
7022
7555
|
return [3, 11];
|
|
7023
7556
|
case 4:
|
|
7024
7557
|
_d = [{}];
|
|
7025
|
-
return [4,
|
|
7558
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7026
7559
|
case 5:
|
|
7027
7560
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7028
7561
|
return [3, 11];
|
|
@@ -7051,7 +7584,97 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
|
|
|
7051
7584
|
}
|
|
7052
7585
|
});
|
|
7053
7586
|
}); };
|
|
7054
|
-
export var
|
|
7587
|
+
export var deserializeAws_restJson1ListBotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7588
|
+
var contents, data, _a, _b;
|
|
7589
|
+
return __generator(this, function (_c) {
|
|
7590
|
+
switch (_c.label) {
|
|
7591
|
+
case 0:
|
|
7592
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7593
|
+
return [2, deserializeAws_restJson1ListBotsCommandError(output, context)];
|
|
7594
|
+
}
|
|
7595
|
+
contents = {
|
|
7596
|
+
$metadata: deserializeMetadata(output),
|
|
7597
|
+
botSummaries: undefined,
|
|
7598
|
+
nextToken: undefined,
|
|
7599
|
+
};
|
|
7600
|
+
_a = __expectNonNull;
|
|
7601
|
+
_b = __expectObject;
|
|
7602
|
+
return [4, parseBody(output.body, context)];
|
|
7603
|
+
case 1:
|
|
7604
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7605
|
+
if (data.botSummaries !== undefined && data.botSummaries !== null) {
|
|
7606
|
+
contents.botSummaries = deserializeAws_restJson1BotSummaryList(data.botSummaries, context);
|
|
7607
|
+
}
|
|
7608
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
7609
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
7610
|
+
}
|
|
7611
|
+
return [2, Promise.resolve(contents)];
|
|
7612
|
+
}
|
|
7613
|
+
});
|
|
7614
|
+
}); };
|
|
7615
|
+
var deserializeAws_restJson1ListBotsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7616
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
7617
|
+
var _g;
|
|
7618
|
+
return __generator(this, function (_h) {
|
|
7619
|
+
switch (_h.label) {
|
|
7620
|
+
case 0:
|
|
7621
|
+
_a = [__assign({}, output)];
|
|
7622
|
+
_g = {};
|
|
7623
|
+
return [4, parseBody(output.body, context)];
|
|
7624
|
+
case 1:
|
|
7625
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
7626
|
+
errorCode = "UnknownError";
|
|
7627
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7628
|
+
_b = errorCode;
|
|
7629
|
+
switch (_b) {
|
|
7630
|
+
case "InternalServerException": return [3, 2];
|
|
7631
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
|
|
7632
|
+
case "ServiceQuotaExceededException": return [3, 4];
|
|
7633
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 4];
|
|
7634
|
+
case "ThrottlingException": return [3, 6];
|
|
7635
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 6];
|
|
7636
|
+
case "ValidationException": return [3, 8];
|
|
7637
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 8];
|
|
7638
|
+
}
|
|
7639
|
+
return [3, 10];
|
|
7640
|
+
case 2:
|
|
7641
|
+
_c = [{}];
|
|
7642
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
7643
|
+
case 3:
|
|
7644
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7645
|
+
return [3, 11];
|
|
7646
|
+
case 4:
|
|
7647
|
+
_d = [{}];
|
|
7648
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
7649
|
+
case 5:
|
|
7650
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7651
|
+
return [3, 11];
|
|
7652
|
+
case 6:
|
|
7653
|
+
_e = [{}];
|
|
7654
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7655
|
+
case 7:
|
|
7656
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7657
|
+
return [3, 11];
|
|
7658
|
+
case 8:
|
|
7659
|
+
_f = [{}];
|
|
7660
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
7661
|
+
case 9:
|
|
7662
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7663
|
+
return [3, 11];
|
|
7664
|
+
case 10:
|
|
7665
|
+
parsedBody = parsedOutput.body;
|
|
7666
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7667
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7668
|
+
_h.label = 11;
|
|
7669
|
+
case 11:
|
|
7670
|
+
message = response.message || response.Message || errorCode;
|
|
7671
|
+
response.message = message;
|
|
7672
|
+
delete response.Message;
|
|
7673
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7674
|
+
}
|
|
7675
|
+
});
|
|
7676
|
+
}); };
|
|
7677
|
+
export var deserializeAws_restJson1ListBotVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7055
7678
|
var contents, data, _a, _b;
|
|
7056
7679
|
return __generator(this, function (_c) {
|
|
7057
7680
|
switch (_c.label) {
|
|
@@ -7615,6 +8238,120 @@ var deserializeAws_restJson1ListIntentsCommandError = function (output, context)
|
|
|
7615
8238
|
}
|
|
7616
8239
|
});
|
|
7617
8240
|
}); };
|
|
8241
|
+
export var deserializeAws_restJson1ListRecommendedIntentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8242
|
+
var contents, data, _a, _b;
|
|
8243
|
+
return __generator(this, function (_c) {
|
|
8244
|
+
switch (_c.label) {
|
|
8245
|
+
case 0:
|
|
8246
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8247
|
+
return [2, deserializeAws_restJson1ListRecommendedIntentsCommandError(output, context)];
|
|
8248
|
+
}
|
|
8249
|
+
contents = {
|
|
8250
|
+
$metadata: deserializeMetadata(output),
|
|
8251
|
+
botId: undefined,
|
|
8252
|
+
botRecommendationId: undefined,
|
|
8253
|
+
botVersion: undefined,
|
|
8254
|
+
localeId: undefined,
|
|
8255
|
+
nextToken: undefined,
|
|
8256
|
+
summaryList: undefined,
|
|
8257
|
+
};
|
|
8258
|
+
_a = __expectNonNull;
|
|
8259
|
+
_b = __expectObject;
|
|
8260
|
+
return [4, parseBody(output.body, context)];
|
|
8261
|
+
case 1:
|
|
8262
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8263
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
8264
|
+
contents.botId = __expectString(data.botId);
|
|
8265
|
+
}
|
|
8266
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
8267
|
+
contents.botRecommendationId = __expectString(data.botRecommendationId);
|
|
8268
|
+
}
|
|
8269
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
8270
|
+
contents.botVersion = __expectString(data.botVersion);
|
|
8271
|
+
}
|
|
8272
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
8273
|
+
contents.localeId = __expectString(data.localeId);
|
|
8274
|
+
}
|
|
8275
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
8276
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
8277
|
+
}
|
|
8278
|
+
if (data.summaryList !== undefined && data.summaryList !== null) {
|
|
8279
|
+
contents.summaryList = deserializeAws_restJson1RecommendedIntentSummaryList(data.summaryList, context);
|
|
8280
|
+
}
|
|
8281
|
+
return [2, Promise.resolve(contents)];
|
|
8282
|
+
}
|
|
8283
|
+
});
|
|
8284
|
+
}); };
|
|
8285
|
+
var deserializeAws_restJson1ListRecommendedIntentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8286
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
8287
|
+
var _h;
|
|
8288
|
+
return __generator(this, function (_j) {
|
|
8289
|
+
switch (_j.label) {
|
|
8290
|
+
case 0:
|
|
8291
|
+
_a = [__assign({}, output)];
|
|
8292
|
+
_h = {};
|
|
8293
|
+
return [4, parseBody(output.body, context)];
|
|
8294
|
+
case 1:
|
|
8295
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
8296
|
+
errorCode = "UnknownError";
|
|
8297
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8298
|
+
_b = errorCode;
|
|
8299
|
+
switch (_b) {
|
|
8300
|
+
case "InternalServerException": return [3, 2];
|
|
8301
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
|
|
8302
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
8303
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
|
|
8304
|
+
case "ServiceQuotaExceededException": return [3, 6];
|
|
8305
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 6];
|
|
8306
|
+
case "ThrottlingException": return [3, 8];
|
|
8307
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 8];
|
|
8308
|
+
case "ValidationException": return [3, 10];
|
|
8309
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 10];
|
|
8310
|
+
}
|
|
8311
|
+
return [3, 12];
|
|
8312
|
+
case 2:
|
|
8313
|
+
_c = [{}];
|
|
8314
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
8315
|
+
case 3:
|
|
8316
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8317
|
+
return [3, 13];
|
|
8318
|
+
case 4:
|
|
8319
|
+
_d = [{}];
|
|
8320
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8321
|
+
case 5:
|
|
8322
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8323
|
+
return [3, 13];
|
|
8324
|
+
case 6:
|
|
8325
|
+
_e = [{}];
|
|
8326
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
8327
|
+
case 7:
|
|
8328
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8329
|
+
return [3, 13];
|
|
8330
|
+
case 8:
|
|
8331
|
+
_f = [{}];
|
|
8332
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8333
|
+
case 9:
|
|
8334
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8335
|
+
return [3, 13];
|
|
8336
|
+
case 10:
|
|
8337
|
+
_g = [{}];
|
|
8338
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
8339
|
+
case 11:
|
|
8340
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8341
|
+
return [3, 13];
|
|
8342
|
+
case 12:
|
|
8343
|
+
parsedBody = parsedOutput.body;
|
|
8344
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8345
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8346
|
+
_j.label = 13;
|
|
8347
|
+
case 13:
|
|
8348
|
+
message = response.message || response.Message || errorCode;
|
|
8349
|
+
response.message = message;
|
|
8350
|
+
delete response.Message;
|
|
8351
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8352
|
+
}
|
|
8353
|
+
});
|
|
8354
|
+
}); };
|
|
7618
8355
|
export var deserializeAws_restJson1ListSlotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7619
8356
|
var contents, data, _a, _b;
|
|
7620
8357
|
return __generator(this, function (_c) {
|
|
@@ -7909,79 +8646,335 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
7909
8646
|
}
|
|
7910
8647
|
});
|
|
7911
8648
|
}); };
|
|
7912
|
-
export var
|
|
8649
|
+
export var deserializeAws_restJson1SearchAssociatedTranscriptsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7913
8650
|
var contents, data, _a, _b;
|
|
7914
8651
|
return __generator(this, function (_c) {
|
|
7915
8652
|
switch (_c.label) {
|
|
7916
8653
|
case 0:
|
|
7917
|
-
if (output.statusCode !==
|
|
7918
|
-
return [2,
|
|
8654
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8655
|
+
return [2, deserializeAws_restJson1SearchAssociatedTranscriptsCommandError(output, context)];
|
|
7919
8656
|
}
|
|
7920
8657
|
contents = {
|
|
7921
8658
|
$metadata: deserializeMetadata(output),
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
8659
|
+
associatedTranscripts: undefined,
|
|
8660
|
+
botId: undefined,
|
|
8661
|
+
botRecommendationId: undefined,
|
|
8662
|
+
botVersion: undefined,
|
|
8663
|
+
localeId: undefined,
|
|
8664
|
+
nextIndex: undefined,
|
|
8665
|
+
totalResults: undefined,
|
|
7927
8666
|
};
|
|
7928
8667
|
_a = __expectNonNull;
|
|
7929
8668
|
_b = __expectObject;
|
|
7930
8669
|
return [4, parseBody(output.body, context)];
|
|
7931
8670
|
case 1:
|
|
7932
8671
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7933
|
-
if (data.
|
|
7934
|
-
contents.
|
|
8672
|
+
if (data.associatedTranscripts !== undefined && data.associatedTranscripts !== null) {
|
|
8673
|
+
contents.associatedTranscripts = deserializeAws_restJson1AssociatedTranscriptList(data.associatedTranscripts, context);
|
|
7935
8674
|
}
|
|
7936
|
-
if (data.
|
|
7937
|
-
contents.
|
|
8675
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
8676
|
+
contents.botId = __expectString(data.botId);
|
|
7938
8677
|
}
|
|
7939
|
-
if (data.
|
|
7940
|
-
contents.
|
|
8678
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
8679
|
+
contents.botRecommendationId = __expectString(data.botRecommendationId);
|
|
7941
8680
|
}
|
|
7942
|
-
if (data.
|
|
7943
|
-
contents.
|
|
8681
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
8682
|
+
contents.botVersion = __expectString(data.botVersion);
|
|
7944
8683
|
}
|
|
7945
|
-
if (data.
|
|
7946
|
-
contents.
|
|
8684
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
8685
|
+
contents.localeId = __expectString(data.localeId);
|
|
8686
|
+
}
|
|
8687
|
+
if (data.nextIndex !== undefined && data.nextIndex !== null) {
|
|
8688
|
+
contents.nextIndex = __expectInt32(data.nextIndex);
|
|
8689
|
+
}
|
|
8690
|
+
if (data.totalResults !== undefined && data.totalResults !== null) {
|
|
8691
|
+
contents.totalResults = __expectInt32(data.totalResults);
|
|
7947
8692
|
}
|
|
7948
8693
|
return [2, Promise.resolve(contents)];
|
|
7949
8694
|
}
|
|
7950
8695
|
});
|
|
7951
8696
|
}); };
|
|
7952
|
-
var
|
|
7953
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g,
|
|
7954
|
-
var
|
|
7955
|
-
return __generator(this, function (
|
|
7956
|
-
switch (
|
|
8697
|
+
var deserializeAws_restJson1SearchAssociatedTranscriptsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8698
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
8699
|
+
var _h;
|
|
8700
|
+
return __generator(this, function (_j) {
|
|
8701
|
+
switch (_j.label) {
|
|
7957
8702
|
case 0:
|
|
7958
8703
|
_a = [__assign({}, output)];
|
|
7959
|
-
|
|
8704
|
+
_h = {};
|
|
7960
8705
|
return [4, parseBody(output.body, context)];
|
|
7961
8706
|
case 1:
|
|
7962
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
8707
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
7963
8708
|
errorCode = "UnknownError";
|
|
7964
8709
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7965
8710
|
_b = errorCode;
|
|
7966
8711
|
switch (_b) {
|
|
7967
|
-
case "
|
|
7968
|
-
case "com.amazonaws.lexmodelsv2#
|
|
7969
|
-
case "
|
|
7970
|
-
case "com.amazonaws.lexmodelsv2#
|
|
7971
|
-
case "
|
|
7972
|
-
case "com.amazonaws.lexmodelsv2#
|
|
7973
|
-
case "
|
|
7974
|
-
case "com.amazonaws.lexmodelsv2#
|
|
7975
|
-
case "
|
|
7976
|
-
case "com.amazonaws.lexmodelsv2#
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
8712
|
+
case "InternalServerException": return [3, 2];
|
|
8713
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
|
|
8714
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
8715
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
|
|
8716
|
+
case "ServiceQuotaExceededException": return [3, 6];
|
|
8717
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 6];
|
|
8718
|
+
case "ThrottlingException": return [3, 8];
|
|
8719
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 8];
|
|
8720
|
+
case "ValidationException": return [3, 10];
|
|
8721
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 10];
|
|
8722
|
+
}
|
|
8723
|
+
return [3, 12];
|
|
8724
|
+
case 2:
|
|
8725
|
+
_c = [{}];
|
|
8726
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
8727
|
+
case 3:
|
|
8728
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8729
|
+
return [3, 13];
|
|
8730
|
+
case 4:
|
|
8731
|
+
_d = [{}];
|
|
8732
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8733
|
+
case 5:
|
|
8734
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8735
|
+
return [3, 13];
|
|
8736
|
+
case 6:
|
|
8737
|
+
_e = [{}];
|
|
8738
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
8739
|
+
case 7:
|
|
8740
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8741
|
+
return [3, 13];
|
|
8742
|
+
case 8:
|
|
8743
|
+
_f = [{}];
|
|
8744
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8745
|
+
case 9:
|
|
8746
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8747
|
+
return [3, 13];
|
|
8748
|
+
case 10:
|
|
8749
|
+
_g = [{}];
|
|
8750
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
8751
|
+
case 11:
|
|
8752
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8753
|
+
return [3, 13];
|
|
8754
|
+
case 12:
|
|
8755
|
+
parsedBody = parsedOutput.body;
|
|
8756
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8757
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8758
|
+
_j.label = 13;
|
|
8759
|
+
case 13:
|
|
8760
|
+
message = response.message || response.Message || errorCode;
|
|
8761
|
+
response.message = message;
|
|
8762
|
+
delete response.Message;
|
|
8763
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8764
|
+
}
|
|
8765
|
+
});
|
|
8766
|
+
}); };
|
|
8767
|
+
export var deserializeAws_restJson1StartBotRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8768
|
+
var contents, data, _a, _b;
|
|
8769
|
+
return __generator(this, function (_c) {
|
|
8770
|
+
switch (_c.label) {
|
|
8771
|
+
case 0:
|
|
8772
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
8773
|
+
return [2, deserializeAws_restJson1StartBotRecommendationCommandError(output, context)];
|
|
8774
|
+
}
|
|
8775
|
+
contents = {
|
|
8776
|
+
$metadata: deserializeMetadata(output),
|
|
8777
|
+
botId: undefined,
|
|
8778
|
+
botRecommendationId: undefined,
|
|
8779
|
+
botRecommendationStatus: undefined,
|
|
8780
|
+
botVersion: undefined,
|
|
8781
|
+
creationDateTime: undefined,
|
|
8782
|
+
encryptionSetting: undefined,
|
|
8783
|
+
localeId: undefined,
|
|
8784
|
+
transcriptSourceSetting: undefined,
|
|
8785
|
+
};
|
|
8786
|
+
_a = __expectNonNull;
|
|
8787
|
+
_b = __expectObject;
|
|
8788
|
+
return [4, parseBody(output.body, context)];
|
|
8789
|
+
case 1:
|
|
8790
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8791
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
8792
|
+
contents.botId = __expectString(data.botId);
|
|
8793
|
+
}
|
|
8794
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
8795
|
+
contents.botRecommendationId = __expectString(data.botRecommendationId);
|
|
8796
|
+
}
|
|
8797
|
+
if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
|
|
8798
|
+
contents.botRecommendationStatus = __expectString(data.botRecommendationStatus);
|
|
8799
|
+
}
|
|
8800
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
8801
|
+
contents.botVersion = __expectString(data.botVersion);
|
|
8802
|
+
}
|
|
8803
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
8804
|
+
contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
|
|
8805
|
+
}
|
|
8806
|
+
if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
|
|
8807
|
+
contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
|
|
8808
|
+
}
|
|
8809
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
8810
|
+
contents.localeId = __expectString(data.localeId);
|
|
8811
|
+
}
|
|
8812
|
+
if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
|
|
8813
|
+
contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
|
|
8814
|
+
}
|
|
8815
|
+
return [2, Promise.resolve(contents)];
|
|
8816
|
+
}
|
|
8817
|
+
});
|
|
8818
|
+
}); };
|
|
8819
|
+
var deserializeAws_restJson1StartBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8820
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
8821
|
+
var _k;
|
|
8822
|
+
return __generator(this, function (_l) {
|
|
8823
|
+
switch (_l.label) {
|
|
8824
|
+
case 0:
|
|
8825
|
+
_a = [__assign({}, output)];
|
|
8826
|
+
_k = {};
|
|
8827
|
+
return [4, parseBody(output.body, context)];
|
|
8828
|
+
case 1:
|
|
8829
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
8830
|
+
errorCode = "UnknownError";
|
|
8831
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8832
|
+
_b = errorCode;
|
|
8833
|
+
switch (_b) {
|
|
8834
|
+
case "ConflictException": return [3, 2];
|
|
8835
|
+
case "com.amazonaws.lexmodelsv2#ConflictException": return [3, 2];
|
|
8836
|
+
case "InternalServerException": return [3, 4];
|
|
8837
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 4];
|
|
8838
|
+
case "PreconditionFailedException": return [3, 6];
|
|
8839
|
+
case "com.amazonaws.lexmodelsv2#PreconditionFailedException": return [3, 6];
|
|
8840
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
8841
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 8];
|
|
8842
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
8843
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 10];
|
|
8844
|
+
case "ThrottlingException": return [3, 12];
|
|
8845
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 12];
|
|
8846
|
+
case "ValidationException": return [3, 14];
|
|
8847
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 14];
|
|
8848
|
+
}
|
|
8849
|
+
return [3, 16];
|
|
8850
|
+
case 2:
|
|
8851
|
+
_c = [{}];
|
|
8852
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
8853
|
+
case 3:
|
|
8854
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8855
|
+
return [3, 17];
|
|
8856
|
+
case 4:
|
|
8857
|
+
_d = [{}];
|
|
8858
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
8859
|
+
case 5:
|
|
8860
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8861
|
+
return [3, 17];
|
|
8862
|
+
case 6:
|
|
8863
|
+
_e = [{}];
|
|
8864
|
+
return [4, deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)];
|
|
8865
|
+
case 7:
|
|
8866
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8867
|
+
return [3, 17];
|
|
8868
|
+
case 8:
|
|
8869
|
+
_f = [{}];
|
|
8870
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8871
|
+
case 9:
|
|
8872
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8873
|
+
return [3, 17];
|
|
8874
|
+
case 10:
|
|
8875
|
+
_g = [{}];
|
|
8876
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
8877
|
+
case 11:
|
|
8878
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8879
|
+
return [3, 17];
|
|
8880
|
+
case 12:
|
|
8881
|
+
_h = [{}];
|
|
8882
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8883
|
+
case 13:
|
|
8884
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8885
|
+
return [3, 17];
|
|
8886
|
+
case 14:
|
|
8887
|
+
_j = [{}];
|
|
8888
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
8889
|
+
case 15:
|
|
8890
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8891
|
+
return [3, 17];
|
|
8892
|
+
case 16:
|
|
8893
|
+
parsedBody = parsedOutput.body;
|
|
8894
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8895
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8896
|
+
_l.label = 17;
|
|
8897
|
+
case 17:
|
|
8898
|
+
message = response.message || response.Message || errorCode;
|
|
8899
|
+
response.message = message;
|
|
8900
|
+
delete response.Message;
|
|
8901
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8902
|
+
}
|
|
8903
|
+
});
|
|
8904
|
+
}); };
|
|
8905
|
+
export var deserializeAws_restJson1StartImportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8906
|
+
var contents, data, _a, _b;
|
|
8907
|
+
return __generator(this, function (_c) {
|
|
8908
|
+
switch (_c.label) {
|
|
8909
|
+
case 0:
|
|
8910
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
8911
|
+
return [2, deserializeAws_restJson1StartImportCommandError(output, context)];
|
|
8912
|
+
}
|
|
8913
|
+
contents = {
|
|
8914
|
+
$metadata: deserializeMetadata(output),
|
|
8915
|
+
creationDateTime: undefined,
|
|
8916
|
+
importId: undefined,
|
|
8917
|
+
importStatus: undefined,
|
|
8918
|
+
mergeStrategy: undefined,
|
|
8919
|
+
resourceSpecification: undefined,
|
|
8920
|
+
};
|
|
8921
|
+
_a = __expectNonNull;
|
|
8922
|
+
_b = __expectObject;
|
|
8923
|
+
return [4, parseBody(output.body, context)];
|
|
8924
|
+
case 1:
|
|
8925
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8926
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
8927
|
+
contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
|
|
8928
|
+
}
|
|
8929
|
+
if (data.importId !== undefined && data.importId !== null) {
|
|
8930
|
+
contents.importId = __expectString(data.importId);
|
|
8931
|
+
}
|
|
8932
|
+
if (data.importStatus !== undefined && data.importStatus !== null) {
|
|
8933
|
+
contents.importStatus = __expectString(data.importStatus);
|
|
8934
|
+
}
|
|
8935
|
+
if (data.mergeStrategy !== undefined && data.mergeStrategy !== null) {
|
|
8936
|
+
contents.mergeStrategy = __expectString(data.mergeStrategy);
|
|
8937
|
+
}
|
|
8938
|
+
if (data.resourceSpecification !== undefined && data.resourceSpecification !== null) {
|
|
8939
|
+
contents.resourceSpecification = deserializeAws_restJson1ImportResourceSpecification(data.resourceSpecification, context);
|
|
8940
|
+
}
|
|
8941
|
+
return [2, Promise.resolve(contents)];
|
|
8942
|
+
}
|
|
8943
|
+
});
|
|
8944
|
+
}); };
|
|
8945
|
+
var deserializeAws_restJson1StartImportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8946
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8947
|
+
var _j;
|
|
8948
|
+
return __generator(this, function (_k) {
|
|
8949
|
+
switch (_k.label) {
|
|
8950
|
+
case 0:
|
|
8951
|
+
_a = [__assign({}, output)];
|
|
8952
|
+
_j = {};
|
|
8953
|
+
return [4, parseBody(output.body, context)];
|
|
8954
|
+
case 1:
|
|
8955
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
8956
|
+
errorCode = "UnknownError";
|
|
8957
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8958
|
+
_b = errorCode;
|
|
8959
|
+
switch (_b) {
|
|
8960
|
+
case "ConflictException": return [3, 2];
|
|
8961
|
+
case "com.amazonaws.lexmodelsv2#ConflictException": return [3, 2];
|
|
8962
|
+
case "InternalServerException": return [3, 4];
|
|
8963
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 4];
|
|
8964
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
8965
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 6];
|
|
8966
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
8967
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 8];
|
|
8968
|
+
case "ThrottlingException": return [3, 10];
|
|
8969
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 10];
|
|
8970
|
+
case "ValidationException": return [3, 12];
|
|
8971
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 12];
|
|
8972
|
+
}
|
|
8973
|
+
return [3, 14];
|
|
8974
|
+
case 2:
|
|
8975
|
+
_c = [{}];
|
|
8976
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
8977
|
+
case 3:
|
|
7985
8978
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7986
8979
|
return [3, 15];
|
|
7987
8980
|
case 4:
|
|
@@ -8375,17 +9368,163 @@ export var deserializeAws_restJson1UpdateBotAliasCommand = function (output, con
|
|
|
8375
9368
|
if (data.description !== undefined && data.description !== null) {
|
|
8376
9369
|
contents.description = __expectString(data.description);
|
|
8377
9370
|
}
|
|
8378
|
-
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
8379
|
-
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
9371
|
+
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
9372
|
+
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
9373
|
+
}
|
|
9374
|
+
if (data.sentimentAnalysisSettings !== undefined && data.sentimentAnalysisSettings !== null) {
|
|
9375
|
+
contents.sentimentAnalysisSettings = deserializeAws_restJson1SentimentAnalysisSettings(data.sentimentAnalysisSettings, context);
|
|
9376
|
+
}
|
|
9377
|
+
return [2, Promise.resolve(contents)];
|
|
9378
|
+
}
|
|
9379
|
+
});
|
|
9380
|
+
}); };
|
|
9381
|
+
var deserializeAws_restJson1UpdateBotAliasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9382
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
9383
|
+
var _j;
|
|
9384
|
+
return __generator(this, function (_k) {
|
|
9385
|
+
switch (_k.label) {
|
|
9386
|
+
case 0:
|
|
9387
|
+
_a = [__assign({}, output)];
|
|
9388
|
+
_j = {};
|
|
9389
|
+
return [4, parseBody(output.body, context)];
|
|
9390
|
+
case 1:
|
|
9391
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
9392
|
+
errorCode = "UnknownError";
|
|
9393
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
9394
|
+
_b = errorCode;
|
|
9395
|
+
switch (_b) {
|
|
9396
|
+
case "ConflictException": return [3, 2];
|
|
9397
|
+
case "com.amazonaws.lexmodelsv2#ConflictException": return [3, 2];
|
|
9398
|
+
case "InternalServerException": return [3, 4];
|
|
9399
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 4];
|
|
9400
|
+
case "PreconditionFailedException": return [3, 6];
|
|
9401
|
+
case "com.amazonaws.lexmodelsv2#PreconditionFailedException": return [3, 6];
|
|
9402
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
9403
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 8];
|
|
9404
|
+
case "ThrottlingException": return [3, 10];
|
|
9405
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 10];
|
|
9406
|
+
case "ValidationException": return [3, 12];
|
|
9407
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 12];
|
|
9408
|
+
}
|
|
9409
|
+
return [3, 14];
|
|
9410
|
+
case 2:
|
|
9411
|
+
_c = [{}];
|
|
9412
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
9413
|
+
case 3:
|
|
9414
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9415
|
+
return [3, 15];
|
|
9416
|
+
case 4:
|
|
9417
|
+
_d = [{}];
|
|
9418
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
9419
|
+
case 5:
|
|
9420
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9421
|
+
return [3, 15];
|
|
9422
|
+
case 6:
|
|
9423
|
+
_e = [{}];
|
|
9424
|
+
return [4, deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)];
|
|
9425
|
+
case 7:
|
|
9426
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9427
|
+
return [3, 15];
|
|
9428
|
+
case 8:
|
|
9429
|
+
_f = [{}];
|
|
9430
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
9431
|
+
case 9:
|
|
9432
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9433
|
+
return [3, 15];
|
|
9434
|
+
case 10:
|
|
9435
|
+
_g = [{}];
|
|
9436
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
9437
|
+
case 11:
|
|
9438
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9439
|
+
return [3, 15];
|
|
9440
|
+
case 12:
|
|
9441
|
+
_h = [{}];
|
|
9442
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
9443
|
+
case 13:
|
|
9444
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9445
|
+
return [3, 15];
|
|
9446
|
+
case 14:
|
|
9447
|
+
parsedBody = parsedOutput.body;
|
|
9448
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
9449
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
9450
|
+
_k.label = 15;
|
|
9451
|
+
case 15:
|
|
9452
|
+
message = response.message || response.Message || errorCode;
|
|
9453
|
+
response.message = message;
|
|
9454
|
+
delete response.Message;
|
|
9455
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
9456
|
+
}
|
|
9457
|
+
});
|
|
9458
|
+
}); };
|
|
9459
|
+
export var deserializeAws_restJson1UpdateBotLocaleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9460
|
+
var contents, data, _a, _b;
|
|
9461
|
+
return __generator(this, function (_c) {
|
|
9462
|
+
switch (_c.label) {
|
|
9463
|
+
case 0:
|
|
9464
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
9465
|
+
return [2, deserializeAws_restJson1UpdateBotLocaleCommandError(output, context)];
|
|
9466
|
+
}
|
|
9467
|
+
contents = {
|
|
9468
|
+
$metadata: deserializeMetadata(output),
|
|
9469
|
+
botId: undefined,
|
|
9470
|
+
botLocaleStatus: undefined,
|
|
9471
|
+
botVersion: undefined,
|
|
9472
|
+
creationDateTime: undefined,
|
|
9473
|
+
description: undefined,
|
|
9474
|
+
failureReasons: undefined,
|
|
9475
|
+
lastUpdatedDateTime: undefined,
|
|
9476
|
+
localeId: undefined,
|
|
9477
|
+
localeName: undefined,
|
|
9478
|
+
nluIntentConfidenceThreshold: undefined,
|
|
9479
|
+
recommendedActions: undefined,
|
|
9480
|
+
voiceSettings: undefined,
|
|
9481
|
+
};
|
|
9482
|
+
_a = __expectNonNull;
|
|
9483
|
+
_b = __expectObject;
|
|
9484
|
+
return [4, parseBody(output.body, context)];
|
|
9485
|
+
case 1:
|
|
9486
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
9487
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
9488
|
+
contents.botId = __expectString(data.botId);
|
|
9489
|
+
}
|
|
9490
|
+
if (data.botLocaleStatus !== undefined && data.botLocaleStatus !== null) {
|
|
9491
|
+
contents.botLocaleStatus = __expectString(data.botLocaleStatus);
|
|
9492
|
+
}
|
|
9493
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
9494
|
+
contents.botVersion = __expectString(data.botVersion);
|
|
9495
|
+
}
|
|
9496
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
9497
|
+
contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
|
|
9498
|
+
}
|
|
9499
|
+
if (data.description !== undefined && data.description !== null) {
|
|
9500
|
+
contents.description = __expectString(data.description);
|
|
9501
|
+
}
|
|
9502
|
+
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
9503
|
+
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
9504
|
+
}
|
|
9505
|
+
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
9506
|
+
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
9507
|
+
}
|
|
9508
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
9509
|
+
contents.localeId = __expectString(data.localeId);
|
|
9510
|
+
}
|
|
9511
|
+
if (data.localeName !== undefined && data.localeName !== null) {
|
|
9512
|
+
contents.localeName = __expectString(data.localeName);
|
|
9513
|
+
}
|
|
9514
|
+
if (data.nluIntentConfidenceThreshold !== undefined && data.nluIntentConfidenceThreshold !== null) {
|
|
9515
|
+
contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold);
|
|
8380
9516
|
}
|
|
8381
|
-
if (data.
|
|
8382
|
-
contents.
|
|
9517
|
+
if (data.recommendedActions !== undefined && data.recommendedActions !== null) {
|
|
9518
|
+
contents.recommendedActions = deserializeAws_restJson1RecommendedActions(data.recommendedActions, context);
|
|
9519
|
+
}
|
|
9520
|
+
if (data.voiceSettings !== undefined && data.voiceSettings !== null) {
|
|
9521
|
+
contents.voiceSettings = deserializeAws_restJson1VoiceSettings(data.voiceSettings, context);
|
|
8383
9522
|
}
|
|
8384
9523
|
return [2, Promise.resolve(contents)];
|
|
8385
9524
|
}
|
|
8386
9525
|
});
|
|
8387
9526
|
}); };
|
|
8388
|
-
var
|
|
9527
|
+
var deserializeAws_restJson1UpdateBotLocaleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8389
9528
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8390
9529
|
var _j;
|
|
8391
9530
|
return __generator(this, function (_k) {
|
|
@@ -8463,27 +9602,25 @@ var deserializeAws_restJson1UpdateBotAliasCommandError = function (output, conte
|
|
|
8463
9602
|
}
|
|
8464
9603
|
});
|
|
8465
9604
|
}); };
|
|
8466
|
-
export var
|
|
9605
|
+
export var deserializeAws_restJson1UpdateBotRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8467
9606
|
var contents, data, _a, _b;
|
|
8468
9607
|
return __generator(this, function (_c) {
|
|
8469
9608
|
switch (_c.label) {
|
|
8470
9609
|
case 0:
|
|
8471
9610
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
8472
|
-
return [2,
|
|
9611
|
+
return [2, deserializeAws_restJson1UpdateBotRecommendationCommandError(output, context)];
|
|
8473
9612
|
}
|
|
8474
9613
|
contents = {
|
|
8475
9614
|
$metadata: deserializeMetadata(output),
|
|
8476
9615
|
botId: undefined,
|
|
8477
|
-
|
|
9616
|
+
botRecommendationId: undefined,
|
|
9617
|
+
botRecommendationStatus: undefined,
|
|
8478
9618
|
botVersion: undefined,
|
|
8479
9619
|
creationDateTime: undefined,
|
|
8480
|
-
|
|
8481
|
-
failureReasons: undefined,
|
|
9620
|
+
encryptionSetting: undefined,
|
|
8482
9621
|
lastUpdatedDateTime: undefined,
|
|
8483
9622
|
localeId: undefined,
|
|
8484
|
-
|
|
8485
|
-
nluIntentConfidenceThreshold: undefined,
|
|
8486
|
-
voiceSettings: undefined,
|
|
9623
|
+
transcriptSourceSetting: undefined,
|
|
8487
9624
|
};
|
|
8488
9625
|
_a = __expectNonNull;
|
|
8489
9626
|
_b = __expectObject;
|
|
@@ -8493,8 +9630,11 @@ export var deserializeAws_restJson1UpdateBotLocaleCommand = function (output, co
|
|
|
8493
9630
|
if (data.botId !== undefined && data.botId !== null) {
|
|
8494
9631
|
contents.botId = __expectString(data.botId);
|
|
8495
9632
|
}
|
|
8496
|
-
if (data.
|
|
8497
|
-
contents.
|
|
9633
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
9634
|
+
contents.botRecommendationId = __expectString(data.botRecommendationId);
|
|
9635
|
+
}
|
|
9636
|
+
if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
|
|
9637
|
+
contents.botRecommendationStatus = __expectString(data.botRecommendationStatus);
|
|
8498
9638
|
}
|
|
8499
9639
|
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
8500
9640
|
contents.botVersion = __expectString(data.botVersion);
|
|
@@ -8502,11 +9642,8 @@ export var deserializeAws_restJson1UpdateBotLocaleCommand = function (output, co
|
|
|
8502
9642
|
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
8503
9643
|
contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
|
|
8504
9644
|
}
|
|
8505
|
-
if (data.
|
|
8506
|
-
contents.
|
|
8507
|
-
}
|
|
8508
|
-
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
8509
|
-
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
9645
|
+
if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
|
|
9646
|
+
contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
|
|
8510
9647
|
}
|
|
8511
9648
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
8512
9649
|
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
@@ -8514,30 +9651,24 @@ export var deserializeAws_restJson1UpdateBotLocaleCommand = function (output, co
|
|
|
8514
9651
|
if (data.localeId !== undefined && data.localeId !== null) {
|
|
8515
9652
|
contents.localeId = __expectString(data.localeId);
|
|
8516
9653
|
}
|
|
8517
|
-
if (data.
|
|
8518
|
-
contents.
|
|
8519
|
-
}
|
|
8520
|
-
if (data.nluIntentConfidenceThreshold !== undefined && data.nluIntentConfidenceThreshold !== null) {
|
|
8521
|
-
contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold);
|
|
8522
|
-
}
|
|
8523
|
-
if (data.voiceSettings !== undefined && data.voiceSettings !== null) {
|
|
8524
|
-
contents.voiceSettings = deserializeAws_restJson1VoiceSettings(data.voiceSettings, context);
|
|
9654
|
+
if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
|
|
9655
|
+
contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
|
|
8525
9656
|
}
|
|
8526
9657
|
return [2, Promise.resolve(contents)];
|
|
8527
9658
|
}
|
|
8528
9659
|
});
|
|
8529
9660
|
}); };
|
|
8530
|
-
var
|
|
8531
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8532
|
-
var
|
|
8533
|
-
return __generator(this, function (
|
|
8534
|
-
switch (
|
|
9661
|
+
var deserializeAws_restJson1UpdateBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9662
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
9663
|
+
var _k;
|
|
9664
|
+
return __generator(this, function (_l) {
|
|
9665
|
+
switch (_l.label) {
|
|
8535
9666
|
case 0:
|
|
8536
9667
|
_a = [__assign({}, output)];
|
|
8537
|
-
|
|
9668
|
+
_k = {};
|
|
8538
9669
|
return [4, parseBody(output.body, context)];
|
|
8539
9670
|
case 1:
|
|
8540
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
9671
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
8541
9672
|
errorCode = "UnknownError";
|
|
8542
9673
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8543
9674
|
_b = errorCode;
|
|
@@ -8548,56 +9679,64 @@ var deserializeAws_restJson1UpdateBotLocaleCommandError = function (output, cont
|
|
|
8548
9679
|
case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 4];
|
|
8549
9680
|
case "PreconditionFailedException": return [3, 6];
|
|
8550
9681
|
case "com.amazonaws.lexmodelsv2#PreconditionFailedException": return [3, 6];
|
|
8551
|
-
case "
|
|
8552
|
-
case "com.amazonaws.lexmodelsv2#
|
|
8553
|
-
case "
|
|
8554
|
-
case "com.amazonaws.lexmodelsv2#
|
|
8555
|
-
case "
|
|
8556
|
-
case "com.amazonaws.lexmodelsv2#
|
|
9682
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
9683
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 8];
|
|
9684
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
9685
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 10];
|
|
9686
|
+
case "ThrottlingException": return [3, 12];
|
|
9687
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 12];
|
|
9688
|
+
case "ValidationException": return [3, 14];
|
|
9689
|
+
case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 14];
|
|
8557
9690
|
}
|
|
8558
|
-
return [3,
|
|
9691
|
+
return [3, 16];
|
|
8559
9692
|
case 2:
|
|
8560
9693
|
_c = [{}];
|
|
8561
9694
|
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
8562
9695
|
case 3:
|
|
8563
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
8564
|
-
return [3,
|
|
9696
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9697
|
+
return [3, 17];
|
|
8565
9698
|
case 4:
|
|
8566
9699
|
_d = [{}];
|
|
8567
9700
|
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
8568
9701
|
case 5:
|
|
8569
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
8570
|
-
return [3,
|
|
9702
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9703
|
+
return [3, 17];
|
|
8571
9704
|
case 6:
|
|
8572
9705
|
_e = [{}];
|
|
8573
9706
|
return [4, deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)];
|
|
8574
9707
|
case 7:
|
|
8575
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
8576
|
-
return [3,
|
|
9708
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9709
|
+
return [3, 17];
|
|
8577
9710
|
case 8:
|
|
8578
9711
|
_f = [{}];
|
|
8579
|
-
return [4,
|
|
9712
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8580
9713
|
case 9:
|
|
8581
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
8582
|
-
return [3,
|
|
9714
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9715
|
+
return [3, 17];
|
|
8583
9716
|
case 10:
|
|
8584
9717
|
_g = [{}];
|
|
8585
|
-
return [4,
|
|
9718
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
8586
9719
|
case 11:
|
|
8587
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
8588
|
-
return [3,
|
|
9720
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9721
|
+
return [3, 17];
|
|
8589
9722
|
case 12:
|
|
8590
9723
|
_h = [{}];
|
|
8591
|
-
return [4,
|
|
9724
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8592
9725
|
case 13:
|
|
8593
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(
|
|
8594
|
-
return [3,
|
|
9726
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9727
|
+
return [3, 17];
|
|
8595
9728
|
case 14:
|
|
9729
|
+
_j = [{}];
|
|
9730
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
9731
|
+
case 15:
|
|
9732
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9733
|
+
return [3, 17];
|
|
9734
|
+
case 16:
|
|
8596
9735
|
parsedBody = parsedOutput.body;
|
|
8597
9736
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8598
9737
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8599
|
-
|
|
8600
|
-
case
|
|
9738
|
+
_l.label = 17;
|
|
9739
|
+
case 17:
|
|
8601
9740
|
message = response.message || response.Message || errorCode;
|
|
8602
9741
|
response.message = message;
|
|
8603
9742
|
delete response.Message;
|
|
@@ -9167,6 +10306,7 @@ export var deserializeAws_restJson1UpdateSlotTypeCommand = function (output, con
|
|
|
9167
10306
|
botVersion: undefined,
|
|
9168
10307
|
creationDateTime: undefined,
|
|
9169
10308
|
description: undefined,
|
|
10309
|
+
externalSourceSetting: undefined,
|
|
9170
10310
|
lastUpdatedDateTime: undefined,
|
|
9171
10311
|
localeId: undefined,
|
|
9172
10312
|
parentSlotTypeSignature: undefined,
|
|
@@ -9192,6 +10332,9 @@ export var deserializeAws_restJson1UpdateSlotTypeCommand = function (output, con
|
|
|
9192
10332
|
if (data.description !== undefined && data.description !== null) {
|
|
9193
10333
|
contents.description = __expectString(data.description);
|
|
9194
10334
|
}
|
|
10335
|
+
if (data.externalSourceSetting !== undefined && data.externalSourceSetting !== null) {
|
|
10336
|
+
contents.externalSourceSetting = deserializeAws_restJson1ExternalSourceSetting(data.externalSourceSetting, context);
|
|
10337
|
+
}
|
|
9195
10338
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
9196
10339
|
contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
|
|
9197
10340
|
}
|
|
@@ -9428,6 +10571,20 @@ var serializeAws_restJson1AggregatedUtterancesFilters = function (input, context
|
|
|
9428
10571
|
var serializeAws_restJson1AggregatedUtterancesSortBy = function (input, context) {
|
|
9429
10572
|
return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
|
|
9430
10573
|
};
|
|
10574
|
+
var serializeAws_restJson1AssociatedTranscriptFilter = function (input, context) {
|
|
10575
|
+
return __assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.values !== undefined &&
|
|
10576
|
+
input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
|
|
10577
|
+
};
|
|
10578
|
+
var serializeAws_restJson1AssociatedTranscriptFilters = function (input, context) {
|
|
10579
|
+
return input
|
|
10580
|
+
.filter(function (e) { return e != null; })
|
|
10581
|
+
.map(function (entry) {
|
|
10582
|
+
if (entry === null) {
|
|
10583
|
+
return null;
|
|
10584
|
+
}
|
|
10585
|
+
return serializeAws_restJson1AssociatedTranscriptFilter(entry, context);
|
|
10586
|
+
});
|
|
10587
|
+
};
|
|
9431
10588
|
var serializeAws_restJson1AudioLogDestination = function (input, context) {
|
|
9432
10589
|
return __assign({}, (input.s3Bucket !== undefined &&
|
|
9433
10590
|
input.s3Bucket !== null && { s3Bucket: serializeAws_restJson1S3BucketLogDestination(input.s3Bucket, context) }));
|
|
@@ -9603,9 +10760,21 @@ var serializeAws_restJson1CustomPayload = function (input, context) {
|
|
|
9603
10760
|
var serializeAws_restJson1DataPrivacy = function (input, context) {
|
|
9604
10761
|
return __assign({}, (input.childDirected !== undefined && input.childDirected !== null && { childDirected: input.childDirected }));
|
|
9605
10762
|
};
|
|
10763
|
+
var serializeAws_restJson1DateRangeFilter = function (input, context) {
|
|
10764
|
+
return __assign(__assign({}, (input.endDateTime !== undefined &&
|
|
10765
|
+
input.endDateTime !== null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) })), (input.startDateTime !== undefined &&
|
|
10766
|
+
input.startDateTime !== null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }));
|
|
10767
|
+
};
|
|
9606
10768
|
var serializeAws_restJson1DialogCodeHookSettings = function (input, context) {
|
|
9607
10769
|
return __assign({}, (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }));
|
|
9608
10770
|
};
|
|
10771
|
+
var serializeAws_restJson1EncryptionSetting = function (input, context) {
|
|
10772
|
+
return __assign(__assign(__assign({}, (input.associatedTranscriptsPassword !== undefined &&
|
|
10773
|
+
input.associatedTranscriptsPassword !== null && {
|
|
10774
|
+
associatedTranscriptsPassword: input.associatedTranscriptsPassword,
|
|
10775
|
+
})), (input.botLocaleExportPassword !== undefined &&
|
|
10776
|
+
input.botLocaleExportPassword !== null && { botLocaleExportPassword: input.botLocaleExportPassword })), (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn }));
|
|
10777
|
+
};
|
|
9609
10778
|
var serializeAws_restJson1ExportFilter = function (input, context) {
|
|
9610
10779
|
return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
|
|
9611
10780
|
input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
|
|
@@ -9632,6 +10801,12 @@ var serializeAws_restJson1ExportResourceSpecification = function (input, context
|
|
|
9632
10801
|
var serializeAws_restJson1ExportSortBy = function (input, context) {
|
|
9633
10802
|
return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
|
|
9634
10803
|
};
|
|
10804
|
+
var serializeAws_restJson1ExternalSourceSetting = function (input, context) {
|
|
10805
|
+
return __assign({}, (input.grammarSlotTypeSetting !== undefined &&
|
|
10806
|
+
input.grammarSlotTypeSetting !== null && {
|
|
10807
|
+
grammarSlotTypeSetting: serializeAws_restJson1GrammarSlotTypeSetting(input.grammarSlotTypeSetting, context),
|
|
10808
|
+
}));
|
|
10809
|
+
};
|
|
9635
10810
|
var serializeAws_restJson1FilterValues = function (input, context) {
|
|
9636
10811
|
return input
|
|
9637
10812
|
.filter(function (e) { return e != null; })
|
|
@@ -9677,6 +10852,13 @@ var serializeAws_restJson1FulfillmentUpdatesSpecification = function (input, con
|
|
|
9677
10852
|
updateResponse: serializeAws_restJson1FulfillmentUpdateResponseSpecification(input.updateResponse, context),
|
|
9678
10853
|
}));
|
|
9679
10854
|
};
|
|
10855
|
+
var serializeAws_restJson1GrammarSlotTypeSetting = function (input, context) {
|
|
10856
|
+
return __assign({}, (input.source !== undefined &&
|
|
10857
|
+
input.source !== null && { source: serializeAws_restJson1GrammarSlotTypeSource(input.source, context) }));
|
|
10858
|
+
};
|
|
10859
|
+
var serializeAws_restJson1GrammarSlotTypeSource = function (input, context) {
|
|
10860
|
+
return __assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName })), (input.s3ObjectKey !== undefined && input.s3ObjectKey !== null && { s3ObjectKey: input.s3ObjectKey }));
|
|
10861
|
+
};
|
|
9680
10862
|
var serializeAws_restJson1ImageResponseCard = function (input, context) {
|
|
9681
10863
|
return __assign(__assign(__assign(__assign({}, (input.buttons !== undefined &&
|
|
9682
10864
|
input.buttons !== null && { buttons: serializeAws_restJson1ButtonsList(input.buttons, context) })), (input.imageUrl !== undefined && input.imageUrl !== null && { imageUrl: input.imageUrl })), (input.subtitle !== undefined && input.subtitle !== null && { subtitle: input.subtitle })), (input.title !== undefined && input.title !== null && { title: input.title }));
|
|
@@ -9761,6 +10943,12 @@ var serializeAws_restJson1LambdaCodeHook = function (input, context) {
|
|
|
9761
10943
|
return __assign(__assign({}, (input.codeHookInterfaceVersion !== undefined &&
|
|
9762
10944
|
input.codeHookInterfaceVersion !== null && { codeHookInterfaceVersion: input.codeHookInterfaceVersion })), (input.lambdaARN !== undefined && input.lambdaARN !== null && { lambdaARN: input.lambdaARN }));
|
|
9763
10945
|
};
|
|
10946
|
+
var serializeAws_restJson1LexTranscriptFilter = function (input, context) {
|
|
10947
|
+
return __assign({}, (input.dateRangeFilter !== undefined &&
|
|
10948
|
+
input.dateRangeFilter !== null && {
|
|
10949
|
+
dateRangeFilter: serializeAws_restJson1DateRangeFilter(input.dateRangeFilter, context),
|
|
10950
|
+
}));
|
|
10951
|
+
};
|
|
9764
10952
|
var serializeAws_restJson1Message = function (input, context) {
|
|
9765
10953
|
return __assign(__assign(__assign(__assign({}, (input.customPayload !== undefined &&
|
|
9766
10954
|
input.customPayload !== null && {
|
|
@@ -9809,6 +10997,16 @@ var serializeAws_restJson1ObfuscationSetting = function (input, context) {
|
|
|
9809
10997
|
return __assign({}, (input.obfuscationSettingType !== undefined &&
|
|
9810
10998
|
input.obfuscationSettingType !== null && { obfuscationSettingType: input.obfuscationSettingType }));
|
|
9811
10999
|
};
|
|
11000
|
+
var serializeAws_restJson1ObjectPrefixes = function (input, context) {
|
|
11001
|
+
return input
|
|
11002
|
+
.filter(function (e) { return e != null; })
|
|
11003
|
+
.map(function (entry) {
|
|
11004
|
+
if (entry === null) {
|
|
11005
|
+
return null;
|
|
11006
|
+
}
|
|
11007
|
+
return entry;
|
|
11008
|
+
});
|
|
11009
|
+
};
|
|
9812
11010
|
var serializeAws_restJson1OperationList = function (input, context) {
|
|
9813
11011
|
return input
|
|
9814
11012
|
.filter(function (e) { return e != null; })
|
|
@@ -9833,6 +11031,12 @@ var serializeAws_restJson1OutputContextsList = function (input, context) {
|
|
|
9833
11031
|
return serializeAws_restJson1OutputContext(entry, context);
|
|
9834
11032
|
});
|
|
9835
11033
|
};
|
|
11034
|
+
var serializeAws_restJson1PathFormat = function (input, context) {
|
|
11035
|
+
return __assign({}, (input.objectPrefixes !== undefined &&
|
|
11036
|
+
input.objectPrefixes !== null && {
|
|
11037
|
+
objectPrefixes: serializeAws_restJson1ObjectPrefixes(input.objectPrefixes, context),
|
|
11038
|
+
}));
|
|
11039
|
+
};
|
|
9836
11040
|
var serializeAws_restJson1PlainTextMessage = function (input, context) {
|
|
9837
11041
|
return __assign({}, (input.value !== undefined && input.value !== null && { value: input.value }));
|
|
9838
11042
|
};
|
|
@@ -9881,6 +11085,14 @@ var serializeAws_restJson1ResponseSpecification = function (input, context) {
|
|
|
9881
11085
|
var serializeAws_restJson1S3BucketLogDestination = function (input, context) {
|
|
9882
11086
|
return __assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.logPrefix !== undefined && input.logPrefix !== null && { logPrefix: input.logPrefix })), (input.s3BucketArn !== undefined && input.s3BucketArn !== null && { s3BucketArn: input.s3BucketArn }));
|
|
9883
11087
|
};
|
|
11088
|
+
var serializeAws_restJson1S3BucketTranscriptSource = function (input, context) {
|
|
11089
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.pathFormat !== undefined &&
|
|
11090
|
+
input.pathFormat !== null && { pathFormat: serializeAws_restJson1PathFormat(input.pathFormat, context) })), (input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName })), (input.transcriptFilter !== undefined &&
|
|
11091
|
+
input.transcriptFilter !== null && {
|
|
11092
|
+
transcriptFilter: serializeAws_restJson1TranscriptFilter(input.transcriptFilter, context),
|
|
11093
|
+
})), (input.transcriptFormat !== undefined &&
|
|
11094
|
+
input.transcriptFormat !== null && { transcriptFormat: input.transcriptFormat }));
|
|
11095
|
+
};
|
|
9884
11096
|
var serializeAws_restJson1SampleUtterance = function (input, context) {
|
|
9885
11097
|
return __assign({}, (input.utterance !== undefined && input.utterance !== null && { utterance: input.utterance }));
|
|
9886
11098
|
};
|
|
@@ -10062,6 +11274,18 @@ var serializeAws_restJson1TextLogSettingsList = function (input, context) {
|
|
|
10062
11274
|
return serializeAws_restJson1TextLogSetting(entry, context);
|
|
10063
11275
|
});
|
|
10064
11276
|
};
|
|
11277
|
+
var serializeAws_restJson1TranscriptFilter = function (input, context) {
|
|
11278
|
+
return __assign({}, (input.lexTranscriptFilter !== undefined &&
|
|
11279
|
+
input.lexTranscriptFilter !== null && {
|
|
11280
|
+
lexTranscriptFilter: serializeAws_restJson1LexTranscriptFilter(input.lexTranscriptFilter, context),
|
|
11281
|
+
}));
|
|
11282
|
+
};
|
|
11283
|
+
var serializeAws_restJson1TranscriptSourceSetting = function (input, context) {
|
|
11284
|
+
return __assign({}, (input.s3BucketTranscriptSource !== undefined &&
|
|
11285
|
+
input.s3BucketTranscriptSource !== null && {
|
|
11286
|
+
s3BucketTranscriptSource: serializeAws_restJson1S3BucketTranscriptSource(input.s3BucketTranscriptSource, context),
|
|
11287
|
+
}));
|
|
11288
|
+
};
|
|
10065
11289
|
var serializeAws_restJson1UtteranceAggregationDuration = function (input, context) {
|
|
10066
11290
|
return __assign({}, (input.relativeAggregationDuration !== undefined &&
|
|
10067
11291
|
input.relativeAggregationDuration !== null && {
|
|
@@ -10069,7 +11293,7 @@ var serializeAws_restJson1UtteranceAggregationDuration = function (input, contex
|
|
|
10069
11293
|
}));
|
|
10070
11294
|
};
|
|
10071
11295
|
var serializeAws_restJson1VoiceSettings = function (input, context) {
|
|
10072
|
-
return __assign({}, (input.voiceId !== undefined && input.voiceId !== null && { voiceId: input.voiceId }));
|
|
11296
|
+
return __assign(__assign({}, (input.engine !== undefined && input.engine !== null && { engine: input.engine })), (input.voiceId !== undefined && input.voiceId !== null && { voiceId: input.voiceId }));
|
|
10073
11297
|
};
|
|
10074
11298
|
var serializeAws_restJson1WaitAndContinueSpecification = function (input, context) {
|
|
10075
11299
|
return __assign(__assign(__assign(__assign({}, (input.active !== undefined && input.active !== null && { active: input.active })), (input.continueResponse !== undefined &&
|
|
@@ -10109,6 +11333,21 @@ var deserializeAws_restJson1AggregatedUtterancesSummaryList = function (output,
|
|
|
10109
11333
|
return deserializeAws_restJson1AggregatedUtterancesSummary(entry, context);
|
|
10110
11334
|
});
|
|
10111
11335
|
};
|
|
11336
|
+
var deserializeAws_restJson1AssociatedTranscript = function (output, context) {
|
|
11337
|
+
return {
|
|
11338
|
+
transcript: __expectString(output.transcript),
|
|
11339
|
+
};
|
|
11340
|
+
};
|
|
11341
|
+
var deserializeAws_restJson1AssociatedTranscriptList = function (output, context) {
|
|
11342
|
+
return (output || [])
|
|
11343
|
+
.filter(function (e) { return e != null; })
|
|
11344
|
+
.map(function (entry) {
|
|
11345
|
+
if (entry === null) {
|
|
11346
|
+
return null;
|
|
11347
|
+
}
|
|
11348
|
+
return deserializeAws_restJson1AssociatedTranscript(entry, context);
|
|
11349
|
+
});
|
|
11350
|
+
};
|
|
10112
11351
|
var deserializeAws_restJson1AudioLogDestination = function (output, context) {
|
|
10113
11352
|
return {
|
|
10114
11353
|
s3Bucket: output.s3Bucket !== undefined && output.s3Bucket !== null
|
|
@@ -10280,6 +11519,47 @@ var deserializeAws_restJson1BotLocaleSummaryList = function (output, context) {
|
|
|
10280
11519
|
return deserializeAws_restJson1BotLocaleSummary(entry, context);
|
|
10281
11520
|
});
|
|
10282
11521
|
};
|
|
11522
|
+
var deserializeAws_restJson1BotRecommendationResults = function (output, context) {
|
|
11523
|
+
return {
|
|
11524
|
+
associatedTranscriptsUrl: __expectString(output.associatedTranscriptsUrl),
|
|
11525
|
+
botLocaleExportUrl: __expectString(output.botLocaleExportUrl),
|
|
11526
|
+
statistics: output.statistics !== undefined && output.statistics !== null
|
|
11527
|
+
? deserializeAws_restJson1BotRecommendationResultStatistics(output.statistics, context)
|
|
11528
|
+
: undefined,
|
|
11529
|
+
};
|
|
11530
|
+
};
|
|
11531
|
+
var deserializeAws_restJson1BotRecommendationResultStatistics = function (output, context) {
|
|
11532
|
+
return {
|
|
11533
|
+
intents: output.intents !== undefined && output.intents !== null
|
|
11534
|
+
? deserializeAws_restJson1IntentStatistics(output.intents, context)
|
|
11535
|
+
: undefined,
|
|
11536
|
+
slotTypes: output.slotTypes !== undefined && output.slotTypes !== null
|
|
11537
|
+
? deserializeAws_restJson1SlotTypeStatistics(output.slotTypes, context)
|
|
11538
|
+
: undefined,
|
|
11539
|
+
};
|
|
11540
|
+
};
|
|
11541
|
+
var deserializeAws_restJson1BotRecommendationSummary = function (output, context) {
|
|
11542
|
+
return {
|
|
11543
|
+
botRecommendationId: __expectString(output.botRecommendationId),
|
|
11544
|
+
botRecommendationStatus: __expectString(output.botRecommendationStatus),
|
|
11545
|
+
creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
|
|
11546
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
|
|
11547
|
+
: undefined,
|
|
11548
|
+
lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
|
|
11549
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
|
|
11550
|
+
: undefined,
|
|
11551
|
+
};
|
|
11552
|
+
};
|
|
11553
|
+
var deserializeAws_restJson1BotRecommendationSummaryList = function (output, context) {
|
|
11554
|
+
return (output || [])
|
|
11555
|
+
.filter(function (e) { return e != null; })
|
|
11556
|
+
.map(function (entry) {
|
|
11557
|
+
if (entry === null) {
|
|
11558
|
+
return null;
|
|
11559
|
+
}
|
|
11560
|
+
return deserializeAws_restJson1BotRecommendationSummary(entry, context);
|
|
11561
|
+
});
|
|
11562
|
+
};
|
|
10283
11563
|
var deserializeAws_restJson1BotSummary = function (output, context) {
|
|
10284
11564
|
return {
|
|
10285
11565
|
botId: __expectString(output.botId),
|
|
@@ -10419,11 +11699,28 @@ var deserializeAws_restJson1DataPrivacy = function (output, context) {
|
|
|
10419
11699
|
childDirected: __expectBoolean(output.childDirected),
|
|
10420
11700
|
};
|
|
10421
11701
|
};
|
|
11702
|
+
var deserializeAws_restJson1DateRangeFilter = function (output, context) {
|
|
11703
|
+
return {
|
|
11704
|
+
endDateTime: output.endDateTime !== undefined && output.endDateTime !== null
|
|
11705
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDateTime)))
|
|
11706
|
+
: undefined,
|
|
11707
|
+
startDateTime: output.startDateTime !== undefined && output.startDateTime !== null
|
|
11708
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDateTime)))
|
|
11709
|
+
: undefined,
|
|
11710
|
+
};
|
|
11711
|
+
};
|
|
10422
11712
|
var deserializeAws_restJson1DialogCodeHookSettings = function (output, context) {
|
|
10423
11713
|
return {
|
|
10424
11714
|
enabled: __expectBoolean(output.enabled),
|
|
10425
11715
|
};
|
|
10426
11716
|
};
|
|
11717
|
+
var deserializeAws_restJson1EncryptionSetting = function (output, context) {
|
|
11718
|
+
return {
|
|
11719
|
+
associatedTranscriptsPassword: __expectString(output.associatedTranscriptsPassword),
|
|
11720
|
+
botLocaleExportPassword: __expectString(output.botLocaleExportPassword),
|
|
11721
|
+
kmsKeyArn: __expectString(output.kmsKeyArn),
|
|
11722
|
+
};
|
|
11723
|
+
};
|
|
10427
11724
|
var deserializeAws_restJson1ExportResourceSpecification = function (output, context) {
|
|
10428
11725
|
return {
|
|
10429
11726
|
botExportSpecification: output.botExportSpecification !== undefined && output.botExportSpecification !== null
|
|
@@ -10460,6 +11757,13 @@ var deserializeAws_restJson1ExportSummaryList = function (output, context) {
|
|
|
10460
11757
|
return deserializeAws_restJson1ExportSummary(entry, context);
|
|
10461
11758
|
});
|
|
10462
11759
|
};
|
|
11760
|
+
var deserializeAws_restJson1ExternalSourceSetting = function (output, context) {
|
|
11761
|
+
return {
|
|
11762
|
+
grammarSlotTypeSetting: output.grammarSlotTypeSetting !== undefined && output.grammarSlotTypeSetting !== null
|
|
11763
|
+
? deserializeAws_restJson1GrammarSlotTypeSetting(output.grammarSlotTypeSetting, context)
|
|
11764
|
+
: undefined,
|
|
11765
|
+
};
|
|
11766
|
+
};
|
|
10463
11767
|
var deserializeAws_restJson1FailureReasons = function (output, context) {
|
|
10464
11768
|
return (output || [])
|
|
10465
11769
|
.filter(function (e) { return e != null; })
|
|
@@ -10511,6 +11815,20 @@ var deserializeAws_restJson1FulfillmentUpdatesSpecification = function (output,
|
|
|
10511
11815
|
: undefined,
|
|
10512
11816
|
};
|
|
10513
11817
|
};
|
|
11818
|
+
var deserializeAws_restJson1GrammarSlotTypeSetting = function (output, context) {
|
|
11819
|
+
return {
|
|
11820
|
+
source: output.source !== undefined && output.source !== null
|
|
11821
|
+
? deserializeAws_restJson1GrammarSlotTypeSource(output.source, context)
|
|
11822
|
+
: undefined,
|
|
11823
|
+
};
|
|
11824
|
+
};
|
|
11825
|
+
var deserializeAws_restJson1GrammarSlotTypeSource = function (output, context) {
|
|
11826
|
+
return {
|
|
11827
|
+
kmsKeyArn: __expectString(output.kmsKeyArn),
|
|
11828
|
+
s3BucketName: __expectString(output.s3BucketName),
|
|
11829
|
+
s3ObjectKey: __expectString(output.s3ObjectKey),
|
|
11830
|
+
};
|
|
11831
|
+
};
|
|
10514
11832
|
var deserializeAws_restJson1ImageResponseCard = function (output, context) {
|
|
10515
11833
|
return {
|
|
10516
11834
|
buttons: output.buttons !== undefined && output.buttons !== null
|
|
@@ -10590,6 +11908,11 @@ var deserializeAws_restJson1IntentConfirmationSetting = function (output, contex
|
|
|
10590
11908
|
: undefined,
|
|
10591
11909
|
};
|
|
10592
11910
|
};
|
|
11911
|
+
var deserializeAws_restJson1IntentStatistics = function (output, context) {
|
|
11912
|
+
return {
|
|
11913
|
+
discoveredIntentCount: __expectInt32(output.discoveredIntentCount),
|
|
11914
|
+
};
|
|
11915
|
+
};
|
|
10593
11916
|
var deserializeAws_restJson1IntentSummary = function (output, context) {
|
|
10594
11917
|
return {
|
|
10595
11918
|
description: __expectString(output.description),
|
|
@@ -10630,6 +11953,13 @@ var deserializeAws_restJson1LambdaCodeHook = function (output, context) {
|
|
|
10630
11953
|
lambdaARN: __expectString(output.lambdaARN),
|
|
10631
11954
|
};
|
|
10632
11955
|
};
|
|
11956
|
+
var deserializeAws_restJson1LexTranscriptFilter = function (output, context) {
|
|
11957
|
+
return {
|
|
11958
|
+
dateRangeFilter: output.dateRangeFilter !== undefined && output.dateRangeFilter !== null
|
|
11959
|
+
? deserializeAws_restJson1DateRangeFilter(output.dateRangeFilter, context)
|
|
11960
|
+
: undefined,
|
|
11961
|
+
};
|
|
11962
|
+
};
|
|
10633
11963
|
var deserializeAws_restJson1Message = function (output, context) {
|
|
10634
11964
|
return {
|
|
10635
11965
|
customPayload: output.customPayload !== undefined && output.customPayload !== null
|
|
@@ -10686,6 +12016,16 @@ var deserializeAws_restJson1ObfuscationSetting = function (output, context) {
|
|
|
10686
12016
|
obfuscationSettingType: __expectString(output.obfuscationSettingType),
|
|
10687
12017
|
};
|
|
10688
12018
|
};
|
|
12019
|
+
var deserializeAws_restJson1ObjectPrefixes = function (output, context) {
|
|
12020
|
+
return (output || [])
|
|
12021
|
+
.filter(function (e) { return e != null; })
|
|
12022
|
+
.map(function (entry) {
|
|
12023
|
+
if (entry === null) {
|
|
12024
|
+
return null;
|
|
12025
|
+
}
|
|
12026
|
+
return __expectString(entry);
|
|
12027
|
+
});
|
|
12028
|
+
};
|
|
10689
12029
|
var deserializeAws_restJson1OutputContext = function (output, context) {
|
|
10690
12030
|
return {
|
|
10691
12031
|
name: __expectString(output.name),
|
|
@@ -10703,6 +12043,13 @@ var deserializeAws_restJson1OutputContextsList = function (output, context) {
|
|
|
10703
12043
|
return deserializeAws_restJson1OutputContext(entry, context);
|
|
10704
12044
|
});
|
|
10705
12045
|
};
|
|
12046
|
+
var deserializeAws_restJson1PathFormat = function (output, context) {
|
|
12047
|
+
return {
|
|
12048
|
+
objectPrefixes: output.objectPrefixes !== undefined && output.objectPrefixes !== null
|
|
12049
|
+
? deserializeAws_restJson1ObjectPrefixes(output.objectPrefixes, context)
|
|
12050
|
+
: undefined,
|
|
12051
|
+
};
|
|
12052
|
+
};
|
|
10706
12053
|
var deserializeAws_restJson1PlainTextMessage = function (output, context) {
|
|
10707
12054
|
return {
|
|
10708
12055
|
value: __expectString(output.value),
|
|
@@ -10730,6 +12077,33 @@ var deserializeAws_restJson1PromptSpecification = function (output, context) {
|
|
|
10730
12077
|
: undefined,
|
|
10731
12078
|
};
|
|
10732
12079
|
};
|
|
12080
|
+
var deserializeAws_restJson1RecommendedActions = function (output, context) {
|
|
12081
|
+
return (output || [])
|
|
12082
|
+
.filter(function (e) { return e != null; })
|
|
12083
|
+
.map(function (entry) {
|
|
12084
|
+
if (entry === null) {
|
|
12085
|
+
return null;
|
|
12086
|
+
}
|
|
12087
|
+
return __expectString(entry);
|
|
12088
|
+
});
|
|
12089
|
+
};
|
|
12090
|
+
var deserializeAws_restJson1RecommendedIntentSummary = function (output, context) {
|
|
12091
|
+
return {
|
|
12092
|
+
intentId: __expectString(output.intentId),
|
|
12093
|
+
intentName: __expectString(output.intentName),
|
|
12094
|
+
sampleUtterancesCount: __expectInt32(output.sampleUtterancesCount),
|
|
12095
|
+
};
|
|
12096
|
+
};
|
|
12097
|
+
var deserializeAws_restJson1RecommendedIntentSummaryList = function (output, context) {
|
|
12098
|
+
return (output || [])
|
|
12099
|
+
.filter(function (e) { return e != null; })
|
|
12100
|
+
.map(function (entry) {
|
|
12101
|
+
if (entry === null) {
|
|
12102
|
+
return null;
|
|
12103
|
+
}
|
|
12104
|
+
return deserializeAws_restJson1RecommendedIntentSummary(entry, context);
|
|
12105
|
+
});
|
|
12106
|
+
};
|
|
10733
12107
|
var deserializeAws_restJson1RelativeAggregationDuration = function (output, context) {
|
|
10734
12108
|
return {
|
|
10735
12109
|
timeDimension: __expectString(output.timeDimension),
|
|
@@ -10751,6 +12125,19 @@ var deserializeAws_restJson1S3BucketLogDestination = function (output, context)
|
|
|
10751
12125
|
s3BucketArn: __expectString(output.s3BucketArn),
|
|
10752
12126
|
};
|
|
10753
12127
|
};
|
|
12128
|
+
var deserializeAws_restJson1S3BucketTranscriptSource = function (output, context) {
|
|
12129
|
+
return {
|
|
12130
|
+
kmsKeyArn: __expectString(output.kmsKeyArn),
|
|
12131
|
+
pathFormat: output.pathFormat !== undefined && output.pathFormat !== null
|
|
12132
|
+
? deserializeAws_restJson1PathFormat(output.pathFormat, context)
|
|
12133
|
+
: undefined,
|
|
12134
|
+
s3BucketName: __expectString(output.s3BucketName),
|
|
12135
|
+
transcriptFilter: output.transcriptFilter !== undefined && output.transcriptFilter !== null
|
|
12136
|
+
? deserializeAws_restJson1TranscriptFilter(output.transcriptFilter, context)
|
|
12137
|
+
: undefined,
|
|
12138
|
+
transcriptFormat: __expectString(output.transcriptFormat),
|
|
12139
|
+
};
|
|
12140
|
+
};
|
|
10754
12141
|
var deserializeAws_restJson1SampleUtterance = function (output, context) {
|
|
10755
12142
|
return {
|
|
10756
12143
|
utterance: __expectString(output.utterance),
|
|
@@ -10839,6 +12226,11 @@ var deserializeAws_restJson1SlotSummaryList = function (output, context) {
|
|
|
10839
12226
|
return deserializeAws_restJson1SlotSummary(entry, context);
|
|
10840
12227
|
});
|
|
10841
12228
|
};
|
|
12229
|
+
var deserializeAws_restJson1SlotTypeStatistics = function (output, context) {
|
|
12230
|
+
return {
|
|
12231
|
+
discoveredSlotTypeCount: __expectInt32(output.discoveredSlotTypeCount),
|
|
12232
|
+
};
|
|
12233
|
+
};
|
|
10842
12234
|
var deserializeAws_restJson1SlotTypeSummary = function (output, context) {
|
|
10843
12235
|
return {
|
|
10844
12236
|
description: __expectString(output.description),
|
|
@@ -10846,6 +12238,7 @@ var deserializeAws_restJson1SlotTypeSummary = function (output, context) {
|
|
|
10846
12238
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
|
|
10847
12239
|
: undefined,
|
|
10848
12240
|
parentSlotTypeSignature: __expectString(output.parentSlotTypeSignature),
|
|
12241
|
+
slotTypeCategory: __expectString(output.slotTypeCategory),
|
|
10849
12242
|
slotTypeId: __expectString(output.slotTypeId),
|
|
10850
12243
|
slotTypeName: __expectString(output.slotTypeName),
|
|
10851
12244
|
};
|
|
@@ -10970,6 +12363,20 @@ var deserializeAws_restJson1TextLogSettingsList = function (output, context) {
|
|
|
10970
12363
|
return deserializeAws_restJson1TextLogSetting(entry, context);
|
|
10971
12364
|
});
|
|
10972
12365
|
};
|
|
12366
|
+
var deserializeAws_restJson1TranscriptFilter = function (output, context) {
|
|
12367
|
+
return {
|
|
12368
|
+
lexTranscriptFilter: output.lexTranscriptFilter !== undefined && output.lexTranscriptFilter !== null
|
|
12369
|
+
? deserializeAws_restJson1LexTranscriptFilter(output.lexTranscriptFilter, context)
|
|
12370
|
+
: undefined,
|
|
12371
|
+
};
|
|
12372
|
+
};
|
|
12373
|
+
var deserializeAws_restJson1TranscriptSourceSetting = function (output, context) {
|
|
12374
|
+
return {
|
|
12375
|
+
s3BucketTranscriptSource: output.s3BucketTranscriptSource !== undefined && output.s3BucketTranscriptSource !== null
|
|
12376
|
+
? deserializeAws_restJson1S3BucketTranscriptSource(output.s3BucketTranscriptSource, context)
|
|
12377
|
+
: undefined,
|
|
12378
|
+
};
|
|
12379
|
+
};
|
|
10973
12380
|
var deserializeAws_restJson1UtteranceAggregationDuration = function (output, context) {
|
|
10974
12381
|
return {
|
|
10975
12382
|
relativeAggregationDuration: output.relativeAggregationDuration !== undefined && output.relativeAggregationDuration !== null
|
|
@@ -10979,6 +12386,7 @@ var deserializeAws_restJson1UtteranceAggregationDuration = function (output, con
|
|
|
10979
12386
|
};
|
|
10980
12387
|
var deserializeAws_restJson1VoiceSettings = function (output, context) {
|
|
10981
12388
|
return {
|
|
12389
|
+
engine: __expectString(output.engine),
|
|
10982
12390
|
voiceId: __expectString(output.voiceId),
|
|
10983
12391
|
};
|
|
10984
12392
|
};
|