@aws-sdk/client-lex-models-v2 3.42.0 → 3.46.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 +50 -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-cjs/runtimeConfig.js +0 -2
- 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-es/runtimeConfig.js +0 -2
- 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 +37 -44
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_restJson1UpdateSlotTypeCommand = exports.deserializeAws_restJson1UpdateSlotCommand = exports.deserializeAws_restJson1UpdateResourcePolicyCommand = exports.deserializeAws_restJson1UpdateIntentCommand = exports.deserializeAws_restJson1UpdateExportCommand = exports.deserializeAws_restJson1UpdateBotLocaleCommand = exports.deserializeAws_restJson1UpdateBotAliasCommand = exports.deserializeAws_restJson1UpdateBotCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartImportCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSlotTypesCommand = exports.deserializeAws_restJson1ListSlotsCommand = exports.deserializeAws_restJson1ListIntentsCommand = exports.deserializeAws_restJson1ListImportsCommand = void 0;
|
|
3
|
+
exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSlotTypesCommand = exports.serializeAws_restJson1ListSlotsCommand = exports.serializeAws_restJson1ListRecommendedIntentsCommand = exports.serializeAws_restJson1ListIntentsCommand = exports.serializeAws_restJson1ListImportsCommand = exports.serializeAws_restJson1ListExportsCommand = exports.serializeAws_restJson1ListBuiltInSlotTypesCommand = exports.serializeAws_restJson1ListBuiltInIntentsCommand = exports.serializeAws_restJson1ListBotVersionsCommand = exports.serializeAws_restJson1ListBotsCommand = exports.serializeAws_restJson1ListBotRecommendationsCommand = exports.serializeAws_restJson1ListBotLocalesCommand = exports.serializeAws_restJson1ListBotAliasesCommand = exports.serializeAws_restJson1ListAggregatedUtterancesCommand = exports.serializeAws_restJson1DescribeSlotTypeCommand = exports.serializeAws_restJson1DescribeSlotCommand = exports.serializeAws_restJson1DescribeResourcePolicyCommand = exports.serializeAws_restJson1DescribeIntentCommand = exports.serializeAws_restJson1DescribeImportCommand = exports.serializeAws_restJson1DescribeExportCommand = exports.serializeAws_restJson1DescribeBotVersionCommand = exports.serializeAws_restJson1DescribeBotRecommendationCommand = exports.serializeAws_restJson1DescribeBotLocaleCommand = exports.serializeAws_restJson1DescribeBotAliasCommand = exports.serializeAws_restJson1DescribeBotCommand = exports.serializeAws_restJson1DeleteUtterancesCommand = exports.serializeAws_restJson1DeleteSlotTypeCommand = exports.serializeAws_restJson1DeleteSlotCommand = exports.serializeAws_restJson1DeleteResourcePolicyStatementCommand = exports.serializeAws_restJson1DeleteResourcePolicyCommand = exports.serializeAws_restJson1DeleteIntentCommand = exports.serializeAws_restJson1DeleteImportCommand = exports.serializeAws_restJson1DeleteExportCommand = exports.serializeAws_restJson1DeleteBotVersionCommand = exports.serializeAws_restJson1DeleteBotLocaleCommand = exports.serializeAws_restJson1DeleteBotAliasCommand = exports.serializeAws_restJson1DeleteBotCommand = exports.serializeAws_restJson1CreateUploadUrlCommand = exports.serializeAws_restJson1CreateSlotTypeCommand = exports.serializeAws_restJson1CreateSlotCommand = exports.serializeAws_restJson1CreateResourcePolicyStatementCommand = exports.serializeAws_restJson1CreateResourcePolicyCommand = exports.serializeAws_restJson1CreateIntentCommand = exports.serializeAws_restJson1CreateExportCommand = exports.serializeAws_restJson1CreateBotVersionCommand = exports.serializeAws_restJson1CreateBotLocaleCommand = exports.serializeAws_restJson1CreateBotAliasCommand = exports.serializeAws_restJson1CreateBotCommand = exports.serializeAws_restJson1BuildBotLocaleCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1ListAggregatedUtterancesCommand = exports.deserializeAws_restJson1DescribeSlotTypeCommand = exports.deserializeAws_restJson1DescribeSlotCommand = exports.deserializeAws_restJson1DescribeResourcePolicyCommand = exports.deserializeAws_restJson1DescribeIntentCommand = exports.deserializeAws_restJson1DescribeImportCommand = exports.deserializeAws_restJson1DescribeExportCommand = exports.deserializeAws_restJson1DescribeBotVersionCommand = exports.deserializeAws_restJson1DescribeBotRecommendationCommand = exports.deserializeAws_restJson1DescribeBotLocaleCommand = exports.deserializeAws_restJson1DescribeBotAliasCommand = exports.deserializeAws_restJson1DescribeBotCommand = exports.deserializeAws_restJson1DeleteUtterancesCommand = exports.deserializeAws_restJson1DeleteSlotTypeCommand = exports.deserializeAws_restJson1DeleteSlotCommand = exports.deserializeAws_restJson1DeleteResourcePolicyStatementCommand = exports.deserializeAws_restJson1DeleteResourcePolicyCommand = exports.deserializeAws_restJson1DeleteIntentCommand = exports.deserializeAws_restJson1DeleteImportCommand = exports.deserializeAws_restJson1DeleteExportCommand = exports.deserializeAws_restJson1DeleteBotVersionCommand = exports.deserializeAws_restJson1DeleteBotLocaleCommand = exports.deserializeAws_restJson1DeleteBotAliasCommand = exports.deserializeAws_restJson1DeleteBotCommand = exports.deserializeAws_restJson1CreateUploadUrlCommand = exports.deserializeAws_restJson1CreateSlotTypeCommand = exports.deserializeAws_restJson1CreateSlotCommand = exports.deserializeAws_restJson1CreateResourcePolicyStatementCommand = exports.deserializeAws_restJson1CreateResourcePolicyCommand = exports.deserializeAws_restJson1CreateIntentCommand = exports.deserializeAws_restJson1CreateExportCommand = exports.deserializeAws_restJson1CreateBotVersionCommand = exports.deserializeAws_restJson1CreateBotLocaleCommand = exports.deserializeAws_restJson1CreateBotAliasCommand = exports.deserializeAws_restJson1CreateBotCommand = exports.deserializeAws_restJson1BuildBotLocaleCommand = exports.serializeAws_restJson1UpdateSlotTypeCommand = exports.serializeAws_restJson1UpdateSlotCommand = exports.serializeAws_restJson1UpdateResourcePolicyCommand = exports.serializeAws_restJson1UpdateIntentCommand = exports.serializeAws_restJson1UpdateExportCommand = exports.serializeAws_restJson1UpdateBotRecommendationCommand = exports.serializeAws_restJson1UpdateBotLocaleCommand = exports.serializeAws_restJson1UpdateBotAliasCommand = exports.serializeAws_restJson1UpdateBotCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartImportCommand = exports.serializeAws_restJson1StartBotRecommendationCommand = exports.serializeAws_restJson1SearchAssociatedTranscriptsCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateSlotTypeCommand = exports.deserializeAws_restJson1UpdateSlotCommand = exports.deserializeAws_restJson1UpdateResourcePolicyCommand = exports.deserializeAws_restJson1UpdateIntentCommand = exports.deserializeAws_restJson1UpdateExportCommand = exports.deserializeAws_restJson1UpdateBotRecommendationCommand = exports.deserializeAws_restJson1UpdateBotLocaleCommand = exports.deserializeAws_restJson1UpdateBotAliasCommand = exports.deserializeAws_restJson1UpdateBotCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartImportCommand = exports.deserializeAws_restJson1StartBotRecommendationCommand = exports.deserializeAws_restJson1SearchAssociatedTranscriptsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSlotTypesCommand = exports.deserializeAws_restJson1ListSlotsCommand = exports.deserializeAws_restJson1ListRecommendedIntentsCommand = exports.deserializeAws_restJson1ListIntentsCommand = exports.deserializeAws_restJson1ListImportsCommand = exports.deserializeAws_restJson1ListExportsCommand = exports.deserializeAws_restJson1ListBuiltInSlotTypesCommand = exports.deserializeAws_restJson1ListBuiltInIntentsCommand = exports.deserializeAws_restJson1ListBotVersionsCommand = exports.deserializeAws_restJson1ListBotsCommand = exports.deserializeAws_restJson1ListBotRecommendationsCommand = exports.deserializeAws_restJson1ListBotLocalesCommand = exports.deserializeAws_restJson1ListBotAliasesCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const serializeAws_restJson1BuildBotLocaleCommand = async (input, context) => {
|
|
@@ -519,6 +519,10 @@ const serializeAws_restJson1CreateSlotTypeCommand = async (input, context) => {
|
|
|
519
519
|
let body;
|
|
520
520
|
body = JSON.stringify({
|
|
521
521
|
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
522
|
+
...(input.externalSourceSetting !== undefined &&
|
|
523
|
+
input.externalSourceSetting !== null && {
|
|
524
|
+
externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
|
|
525
|
+
}),
|
|
522
526
|
...(input.parentSlotTypeSignature !== undefined &&
|
|
523
527
|
input.parentSlotTypeSignature !== null && { parentSlotTypeSignature: input.parentSlotTypeSignature }),
|
|
524
528
|
...(input.slotTypeName !== undefined && input.slotTypeName !== null && { slotTypeName: input.slotTypeName }),
|
|
@@ -1174,6 +1178,63 @@ const serializeAws_restJson1DescribeBotLocaleCommand = async (input, context) =>
|
|
|
1174
1178
|
});
|
|
1175
1179
|
};
|
|
1176
1180
|
exports.serializeAws_restJson1DescribeBotLocaleCommand = serializeAws_restJson1DescribeBotLocaleCommand;
|
|
1181
|
+
const serializeAws_restJson1DescribeBotRecommendationCommand = async (input, context) => {
|
|
1182
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1183
|
+
const headers = {};
|
|
1184
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1185
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}";
|
|
1186
|
+
if (input.botId !== undefined) {
|
|
1187
|
+
const labelValue = input.botId;
|
|
1188
|
+
if (labelValue.length <= 0) {
|
|
1189
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
1190
|
+
}
|
|
1191
|
+
resolvedPath = resolvedPath.replace("{botId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1192
|
+
}
|
|
1193
|
+
else {
|
|
1194
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
1195
|
+
}
|
|
1196
|
+
if (input.botVersion !== undefined) {
|
|
1197
|
+
const labelValue = input.botVersion;
|
|
1198
|
+
if (labelValue.length <= 0) {
|
|
1199
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
1200
|
+
}
|
|
1201
|
+
resolvedPath = resolvedPath.replace("{botVersion}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1202
|
+
}
|
|
1203
|
+
else {
|
|
1204
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
1205
|
+
}
|
|
1206
|
+
if (input.localeId !== undefined) {
|
|
1207
|
+
const labelValue = input.localeId;
|
|
1208
|
+
if (labelValue.length <= 0) {
|
|
1209
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
1210
|
+
}
|
|
1211
|
+
resolvedPath = resolvedPath.replace("{localeId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1212
|
+
}
|
|
1213
|
+
else {
|
|
1214
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
1215
|
+
}
|
|
1216
|
+
if (input.botRecommendationId !== undefined) {
|
|
1217
|
+
const labelValue = input.botRecommendationId;
|
|
1218
|
+
if (labelValue.length <= 0) {
|
|
1219
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
1220
|
+
}
|
|
1221
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1222
|
+
}
|
|
1223
|
+
else {
|
|
1224
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
1225
|
+
}
|
|
1226
|
+
let body;
|
|
1227
|
+
return new protocol_http_1.HttpRequest({
|
|
1228
|
+
protocol,
|
|
1229
|
+
hostname,
|
|
1230
|
+
port,
|
|
1231
|
+
method: "GET",
|
|
1232
|
+
headers,
|
|
1233
|
+
path: resolvedPath,
|
|
1234
|
+
body,
|
|
1235
|
+
});
|
|
1236
|
+
};
|
|
1237
|
+
exports.serializeAws_restJson1DescribeBotRecommendationCommand = serializeAws_restJson1DescribeBotRecommendationCommand;
|
|
1177
1238
|
const serializeAws_restJson1DescribeBotVersionCommand = async (input, context) => {
|
|
1178
1239
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1179
1240
|
const headers = {};
|
|
@@ -1591,6 +1652,59 @@ const serializeAws_restJson1ListBotLocalesCommand = async (input, context) => {
|
|
|
1591
1652
|
});
|
|
1592
1653
|
};
|
|
1593
1654
|
exports.serializeAws_restJson1ListBotLocalesCommand = serializeAws_restJson1ListBotLocalesCommand;
|
|
1655
|
+
const serializeAws_restJson1ListBotRecommendationsCommand = async (input, context) => {
|
|
1656
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1657
|
+
const headers = {
|
|
1658
|
+
"content-type": "application/json",
|
|
1659
|
+
};
|
|
1660
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1661
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations";
|
|
1662
|
+
if (input.botId !== undefined) {
|
|
1663
|
+
const labelValue = input.botId;
|
|
1664
|
+
if (labelValue.length <= 0) {
|
|
1665
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
1666
|
+
}
|
|
1667
|
+
resolvedPath = resolvedPath.replace("{botId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1668
|
+
}
|
|
1669
|
+
else {
|
|
1670
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
1671
|
+
}
|
|
1672
|
+
if (input.botVersion !== undefined) {
|
|
1673
|
+
const labelValue = input.botVersion;
|
|
1674
|
+
if (labelValue.length <= 0) {
|
|
1675
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
1676
|
+
}
|
|
1677
|
+
resolvedPath = resolvedPath.replace("{botVersion}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1678
|
+
}
|
|
1679
|
+
else {
|
|
1680
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
1681
|
+
}
|
|
1682
|
+
if (input.localeId !== undefined) {
|
|
1683
|
+
const labelValue = input.localeId;
|
|
1684
|
+
if (labelValue.length <= 0) {
|
|
1685
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
1686
|
+
}
|
|
1687
|
+
resolvedPath = resolvedPath.replace("{localeId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1688
|
+
}
|
|
1689
|
+
else {
|
|
1690
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
1691
|
+
}
|
|
1692
|
+
let body;
|
|
1693
|
+
body = JSON.stringify({
|
|
1694
|
+
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
1695
|
+
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
1696
|
+
});
|
|
1697
|
+
return new protocol_http_1.HttpRequest({
|
|
1698
|
+
protocol,
|
|
1699
|
+
hostname,
|
|
1700
|
+
port,
|
|
1701
|
+
method: "POST",
|
|
1702
|
+
headers,
|
|
1703
|
+
path: resolvedPath,
|
|
1704
|
+
body,
|
|
1705
|
+
});
|
|
1706
|
+
};
|
|
1707
|
+
exports.serializeAws_restJson1ListBotRecommendationsCommand = serializeAws_restJson1ListBotRecommendationsCommand;
|
|
1594
1708
|
const serializeAws_restJson1ListBotsCommand = async (input, context) => {
|
|
1595
1709
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1596
1710
|
const headers = {
|
|
@@ -1832,6 +1946,69 @@ const serializeAws_restJson1ListIntentsCommand = async (input, context) => {
|
|
|
1832
1946
|
});
|
|
1833
1947
|
};
|
|
1834
1948
|
exports.serializeAws_restJson1ListIntentsCommand = serializeAws_restJson1ListIntentsCommand;
|
|
1949
|
+
const serializeAws_restJson1ListRecommendedIntentsCommand = async (input, context) => {
|
|
1950
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1951
|
+
const headers = {
|
|
1952
|
+
"content-type": "application/json",
|
|
1953
|
+
};
|
|
1954
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1955
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}/intents";
|
|
1956
|
+
if (input.botId !== undefined) {
|
|
1957
|
+
const labelValue = input.botId;
|
|
1958
|
+
if (labelValue.length <= 0) {
|
|
1959
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
1960
|
+
}
|
|
1961
|
+
resolvedPath = resolvedPath.replace("{botId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1962
|
+
}
|
|
1963
|
+
else {
|
|
1964
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
1965
|
+
}
|
|
1966
|
+
if (input.botVersion !== undefined) {
|
|
1967
|
+
const labelValue = input.botVersion;
|
|
1968
|
+
if (labelValue.length <= 0) {
|
|
1969
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
1970
|
+
}
|
|
1971
|
+
resolvedPath = resolvedPath.replace("{botVersion}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1972
|
+
}
|
|
1973
|
+
else {
|
|
1974
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
1975
|
+
}
|
|
1976
|
+
if (input.localeId !== undefined) {
|
|
1977
|
+
const labelValue = input.localeId;
|
|
1978
|
+
if (labelValue.length <= 0) {
|
|
1979
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
1980
|
+
}
|
|
1981
|
+
resolvedPath = resolvedPath.replace("{localeId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1982
|
+
}
|
|
1983
|
+
else {
|
|
1984
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
1985
|
+
}
|
|
1986
|
+
if (input.botRecommendationId !== undefined) {
|
|
1987
|
+
const labelValue = input.botRecommendationId;
|
|
1988
|
+
if (labelValue.length <= 0) {
|
|
1989
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
1990
|
+
}
|
|
1991
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1992
|
+
}
|
|
1993
|
+
else {
|
|
1994
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
1995
|
+
}
|
|
1996
|
+
let body;
|
|
1997
|
+
body = JSON.stringify({
|
|
1998
|
+
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
1999
|
+
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
2000
|
+
});
|
|
2001
|
+
return new protocol_http_1.HttpRequest({
|
|
2002
|
+
protocol,
|
|
2003
|
+
hostname,
|
|
2004
|
+
port,
|
|
2005
|
+
method: "POST",
|
|
2006
|
+
headers,
|
|
2007
|
+
path: resolvedPath,
|
|
2008
|
+
body,
|
|
2009
|
+
});
|
|
2010
|
+
};
|
|
2011
|
+
exports.serializeAws_restJson1ListRecommendedIntentsCommand = serializeAws_restJson1ListRecommendedIntentsCommand;
|
|
1835
2012
|
const serializeAws_restJson1ListSlotsCommand = async (input, context) => {
|
|
1836
2013
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1837
2014
|
const headers = {
|
|
@@ -1982,100 +2159,79 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
1982
2159
|
});
|
|
1983
2160
|
};
|
|
1984
2161
|
exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
|
|
1985
|
-
const
|
|
1986
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1987
|
-
const headers = {
|
|
1988
|
-
"content-type": "application/json",
|
|
1989
|
-
};
|
|
1990
|
-
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/imports";
|
|
1991
|
-
let body;
|
|
1992
|
-
body = JSON.stringify({
|
|
1993
|
-
...(input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword }),
|
|
1994
|
-
...(input.importId !== undefined && input.importId !== null && { importId: input.importId }),
|
|
1995
|
-
...(input.mergeStrategy !== undefined && input.mergeStrategy !== null && { mergeStrategy: input.mergeStrategy }),
|
|
1996
|
-
...(input.resourceSpecification !== undefined &&
|
|
1997
|
-
input.resourceSpecification !== null && {
|
|
1998
|
-
resourceSpecification: serializeAws_restJson1ImportResourceSpecification(input.resourceSpecification, context),
|
|
1999
|
-
}),
|
|
2000
|
-
});
|
|
2001
|
-
return new protocol_http_1.HttpRequest({
|
|
2002
|
-
protocol,
|
|
2003
|
-
hostname,
|
|
2004
|
-
port,
|
|
2005
|
-
method: "PUT",
|
|
2006
|
-
headers,
|
|
2007
|
-
path: resolvedPath,
|
|
2008
|
-
body,
|
|
2009
|
-
});
|
|
2010
|
-
};
|
|
2011
|
-
exports.serializeAws_restJson1StartImportCommand = serializeAws_restJson1StartImportCommand;
|
|
2012
|
-
const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
2162
|
+
const serializeAws_restJson1SearchAssociatedTranscriptsCommand = async (input, context) => {
|
|
2013
2163
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2014
2164
|
const headers = {
|
|
2015
2165
|
"content-type": "application/json",
|
|
2016
2166
|
};
|
|
2017
|
-
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
2018
|
-
|
|
2019
|
-
|
|
2167
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
2168
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}/associatedtranscripts";
|
|
2169
|
+
if (input.botId !== undefined) {
|
|
2170
|
+
const labelValue = input.botId;
|
|
2020
2171
|
if (labelValue.length <= 0) {
|
|
2021
|
-
throw new Error("Empty value provided for input HTTP label:
|
|
2172
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2022
2173
|
}
|
|
2023
|
-
resolvedPath = resolvedPath.replace("{
|
|
2174
|
+
resolvedPath = resolvedPath.replace("{botId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2024
2175
|
}
|
|
2025
2176
|
else {
|
|
2026
|
-
throw new Error("No value provided for input HTTP label:
|
|
2177
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2027
2178
|
}
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
2031
|
-
});
|
|
2032
|
-
return new protocol_http_1.HttpRequest({
|
|
2033
|
-
protocol,
|
|
2034
|
-
hostname,
|
|
2035
|
-
port,
|
|
2036
|
-
method: "POST",
|
|
2037
|
-
headers,
|
|
2038
|
-
path: resolvedPath,
|
|
2039
|
-
body,
|
|
2040
|
-
});
|
|
2041
|
-
};
|
|
2042
|
-
exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand;
|
|
2043
|
-
const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
2044
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2045
|
-
const headers = {};
|
|
2046
|
-
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceARN}";
|
|
2047
|
-
if (input.resourceARN !== undefined) {
|
|
2048
|
-
const labelValue = input.resourceARN;
|
|
2179
|
+
if (input.botVersion !== undefined) {
|
|
2180
|
+
const labelValue = input.botVersion;
|
|
2049
2181
|
if (labelValue.length <= 0) {
|
|
2050
|
-
throw new Error("Empty value provided for input HTTP label:
|
|
2182
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2051
2183
|
}
|
|
2052
|
-
resolvedPath = resolvedPath.replace("{
|
|
2184
|
+
resolvedPath = resolvedPath.replace("{botVersion}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2053
2185
|
}
|
|
2054
2186
|
else {
|
|
2055
|
-
throw new Error("No value provided for input HTTP label:
|
|
2187
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2188
|
+
}
|
|
2189
|
+
if (input.localeId !== undefined) {
|
|
2190
|
+
const labelValue = input.localeId;
|
|
2191
|
+
if (labelValue.length <= 0) {
|
|
2192
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2193
|
+
}
|
|
2194
|
+
resolvedPath = resolvedPath.replace("{localeId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2195
|
+
}
|
|
2196
|
+
else {
|
|
2197
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2198
|
+
}
|
|
2199
|
+
if (input.botRecommendationId !== undefined) {
|
|
2200
|
+
const labelValue = input.botRecommendationId;
|
|
2201
|
+
if (labelValue.length <= 0) {
|
|
2202
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
2203
|
+
}
|
|
2204
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2205
|
+
}
|
|
2206
|
+
else {
|
|
2207
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
2056
2208
|
}
|
|
2057
|
-
const query = {
|
|
2058
|
-
...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
|
|
2059
|
-
};
|
|
2060
2209
|
let body;
|
|
2210
|
+
body = JSON.stringify({
|
|
2211
|
+
...(input.filters !== undefined &&
|
|
2212
|
+
input.filters !== null && { filters: serializeAws_restJson1AssociatedTranscriptFilters(input.filters, context) }),
|
|
2213
|
+
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
2214
|
+
...(input.nextIndex !== undefined && input.nextIndex !== null && { nextIndex: input.nextIndex }),
|
|
2215
|
+
...(input.searchOrder !== undefined && input.searchOrder !== null && { searchOrder: input.searchOrder }),
|
|
2216
|
+
});
|
|
2061
2217
|
return new protocol_http_1.HttpRequest({
|
|
2062
2218
|
protocol,
|
|
2063
2219
|
hostname,
|
|
2064
2220
|
port,
|
|
2065
|
-
method: "
|
|
2221
|
+
method: "POST",
|
|
2066
2222
|
headers,
|
|
2067
2223
|
path: resolvedPath,
|
|
2068
|
-
query,
|
|
2069
2224
|
body,
|
|
2070
2225
|
});
|
|
2071
2226
|
};
|
|
2072
|
-
exports.
|
|
2073
|
-
const
|
|
2227
|
+
exports.serializeAws_restJson1SearchAssociatedTranscriptsCommand = serializeAws_restJson1SearchAssociatedTranscriptsCommand;
|
|
2228
|
+
const serializeAws_restJson1StartBotRecommendationCommand = async (input, context) => {
|
|
2074
2229
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2075
2230
|
const headers = {
|
|
2076
2231
|
"content-type": "application/json",
|
|
2077
2232
|
};
|
|
2078
|
-
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
2233
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
2234
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations";
|
|
2079
2235
|
if (input.botId !== undefined) {
|
|
2080
2236
|
const labelValue = input.botId;
|
|
2081
2237
|
if (labelValue.length <= 0) {
|
|
@@ -2086,9 +2242,155 @@ const serializeAws_restJson1UpdateBotCommand = async (input, context) => {
|
|
|
2086
2242
|
else {
|
|
2087
2243
|
throw new Error("No value provided for input HTTP label: botId.");
|
|
2088
2244
|
}
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2245
|
+
if (input.botVersion !== undefined) {
|
|
2246
|
+
const labelValue = input.botVersion;
|
|
2247
|
+
if (labelValue.length <= 0) {
|
|
2248
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2249
|
+
}
|
|
2250
|
+
resolvedPath = resolvedPath.replace("{botVersion}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2251
|
+
}
|
|
2252
|
+
else {
|
|
2253
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2254
|
+
}
|
|
2255
|
+
if (input.localeId !== undefined) {
|
|
2256
|
+
const labelValue = input.localeId;
|
|
2257
|
+
if (labelValue.length <= 0) {
|
|
2258
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2259
|
+
}
|
|
2260
|
+
resolvedPath = resolvedPath.replace("{localeId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2261
|
+
}
|
|
2262
|
+
else {
|
|
2263
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2264
|
+
}
|
|
2265
|
+
let body;
|
|
2266
|
+
body = JSON.stringify({
|
|
2267
|
+
...(input.encryptionSetting !== undefined &&
|
|
2268
|
+
input.encryptionSetting !== null && {
|
|
2269
|
+
encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
|
|
2270
|
+
}),
|
|
2271
|
+
...(input.transcriptSourceSetting !== undefined &&
|
|
2272
|
+
input.transcriptSourceSetting !== null && {
|
|
2273
|
+
transcriptSourceSetting: serializeAws_restJson1TranscriptSourceSetting(input.transcriptSourceSetting, context),
|
|
2274
|
+
}),
|
|
2275
|
+
});
|
|
2276
|
+
return new protocol_http_1.HttpRequest({
|
|
2277
|
+
protocol,
|
|
2278
|
+
hostname,
|
|
2279
|
+
port,
|
|
2280
|
+
method: "PUT",
|
|
2281
|
+
headers,
|
|
2282
|
+
path: resolvedPath,
|
|
2283
|
+
body,
|
|
2284
|
+
});
|
|
2285
|
+
};
|
|
2286
|
+
exports.serializeAws_restJson1StartBotRecommendationCommand = serializeAws_restJson1StartBotRecommendationCommand;
|
|
2287
|
+
const serializeAws_restJson1StartImportCommand = async (input, context) => {
|
|
2288
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2289
|
+
const headers = {
|
|
2290
|
+
"content-type": "application/json",
|
|
2291
|
+
};
|
|
2292
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/imports";
|
|
2293
|
+
let body;
|
|
2294
|
+
body = JSON.stringify({
|
|
2295
|
+
...(input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword }),
|
|
2296
|
+
...(input.importId !== undefined && input.importId !== null && { importId: input.importId }),
|
|
2297
|
+
...(input.mergeStrategy !== undefined && input.mergeStrategy !== null && { mergeStrategy: input.mergeStrategy }),
|
|
2298
|
+
...(input.resourceSpecification !== undefined &&
|
|
2299
|
+
input.resourceSpecification !== null && {
|
|
2300
|
+
resourceSpecification: serializeAws_restJson1ImportResourceSpecification(input.resourceSpecification, context),
|
|
2301
|
+
}),
|
|
2302
|
+
});
|
|
2303
|
+
return new protocol_http_1.HttpRequest({
|
|
2304
|
+
protocol,
|
|
2305
|
+
hostname,
|
|
2306
|
+
port,
|
|
2307
|
+
method: "PUT",
|
|
2308
|
+
headers,
|
|
2309
|
+
path: resolvedPath,
|
|
2310
|
+
body,
|
|
2311
|
+
});
|
|
2312
|
+
};
|
|
2313
|
+
exports.serializeAws_restJson1StartImportCommand = serializeAws_restJson1StartImportCommand;
|
|
2314
|
+
const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
2315
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2316
|
+
const headers = {
|
|
2317
|
+
"content-type": "application/json",
|
|
2318
|
+
};
|
|
2319
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceARN}";
|
|
2320
|
+
if (input.resourceARN !== undefined) {
|
|
2321
|
+
const labelValue = input.resourceARN;
|
|
2322
|
+
if (labelValue.length <= 0) {
|
|
2323
|
+
throw new Error("Empty value provided for input HTTP label: resourceARN.");
|
|
2324
|
+
}
|
|
2325
|
+
resolvedPath = resolvedPath.replace("{resourceARN}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2326
|
+
}
|
|
2327
|
+
else {
|
|
2328
|
+
throw new Error("No value provided for input HTTP label: resourceARN.");
|
|
2329
|
+
}
|
|
2330
|
+
let body;
|
|
2331
|
+
body = JSON.stringify({
|
|
2332
|
+
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
2333
|
+
});
|
|
2334
|
+
return new protocol_http_1.HttpRequest({
|
|
2335
|
+
protocol,
|
|
2336
|
+
hostname,
|
|
2337
|
+
port,
|
|
2338
|
+
method: "POST",
|
|
2339
|
+
headers,
|
|
2340
|
+
path: resolvedPath,
|
|
2341
|
+
body,
|
|
2342
|
+
});
|
|
2343
|
+
};
|
|
2344
|
+
exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand;
|
|
2345
|
+
const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
2346
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2347
|
+
const headers = {};
|
|
2348
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceARN}";
|
|
2349
|
+
if (input.resourceARN !== undefined) {
|
|
2350
|
+
const labelValue = input.resourceARN;
|
|
2351
|
+
if (labelValue.length <= 0) {
|
|
2352
|
+
throw new Error("Empty value provided for input HTTP label: resourceARN.");
|
|
2353
|
+
}
|
|
2354
|
+
resolvedPath = resolvedPath.replace("{resourceARN}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2355
|
+
}
|
|
2356
|
+
else {
|
|
2357
|
+
throw new Error("No value provided for input HTTP label: resourceARN.");
|
|
2358
|
+
}
|
|
2359
|
+
const query = {
|
|
2360
|
+
...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
|
|
2361
|
+
};
|
|
2362
|
+
let body;
|
|
2363
|
+
return new protocol_http_1.HttpRequest({
|
|
2364
|
+
protocol,
|
|
2365
|
+
hostname,
|
|
2366
|
+
port,
|
|
2367
|
+
method: "DELETE",
|
|
2368
|
+
headers,
|
|
2369
|
+
path: resolvedPath,
|
|
2370
|
+
query,
|
|
2371
|
+
body,
|
|
2372
|
+
});
|
|
2373
|
+
};
|
|
2374
|
+
exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
|
|
2375
|
+
const serializeAws_restJson1UpdateBotCommand = async (input, context) => {
|
|
2376
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2377
|
+
const headers = {
|
|
2378
|
+
"content-type": "application/json",
|
|
2379
|
+
};
|
|
2380
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}";
|
|
2381
|
+
if (input.botId !== undefined) {
|
|
2382
|
+
const labelValue = input.botId;
|
|
2383
|
+
if (labelValue.length <= 0) {
|
|
2384
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2385
|
+
}
|
|
2386
|
+
resolvedPath = resolvedPath.replace("{botId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2387
|
+
}
|
|
2388
|
+
else {
|
|
2389
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2390
|
+
}
|
|
2391
|
+
let body;
|
|
2392
|
+
body = JSON.stringify({
|
|
2393
|
+
...(input.botName !== undefined && input.botName !== null && { botName: input.botName }),
|
|
2092
2394
|
...(input.dataPrivacy !== undefined &&
|
|
2093
2395
|
input.dataPrivacy !== null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) }),
|
|
2094
2396
|
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
@@ -2222,6 +2524,71 @@ const serializeAws_restJson1UpdateBotLocaleCommand = async (input, context) => {
|
|
|
2222
2524
|
});
|
|
2223
2525
|
};
|
|
2224
2526
|
exports.serializeAws_restJson1UpdateBotLocaleCommand = serializeAws_restJson1UpdateBotLocaleCommand;
|
|
2527
|
+
const serializeAws_restJson1UpdateBotRecommendationCommand = async (input, context) => {
|
|
2528
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2529
|
+
const headers = {
|
|
2530
|
+
"content-type": "application/json",
|
|
2531
|
+
};
|
|
2532
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
2533
|
+
"/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}";
|
|
2534
|
+
if (input.botId !== undefined) {
|
|
2535
|
+
const labelValue = input.botId;
|
|
2536
|
+
if (labelValue.length <= 0) {
|
|
2537
|
+
throw new Error("Empty value provided for input HTTP label: botId.");
|
|
2538
|
+
}
|
|
2539
|
+
resolvedPath = resolvedPath.replace("{botId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2540
|
+
}
|
|
2541
|
+
else {
|
|
2542
|
+
throw new Error("No value provided for input HTTP label: botId.");
|
|
2543
|
+
}
|
|
2544
|
+
if (input.botVersion !== undefined) {
|
|
2545
|
+
const labelValue = input.botVersion;
|
|
2546
|
+
if (labelValue.length <= 0) {
|
|
2547
|
+
throw new Error("Empty value provided for input HTTP label: botVersion.");
|
|
2548
|
+
}
|
|
2549
|
+
resolvedPath = resolvedPath.replace("{botVersion}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2550
|
+
}
|
|
2551
|
+
else {
|
|
2552
|
+
throw new Error("No value provided for input HTTP label: botVersion.");
|
|
2553
|
+
}
|
|
2554
|
+
if (input.localeId !== undefined) {
|
|
2555
|
+
const labelValue = input.localeId;
|
|
2556
|
+
if (labelValue.length <= 0) {
|
|
2557
|
+
throw new Error("Empty value provided for input HTTP label: localeId.");
|
|
2558
|
+
}
|
|
2559
|
+
resolvedPath = resolvedPath.replace("{localeId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2560
|
+
}
|
|
2561
|
+
else {
|
|
2562
|
+
throw new Error("No value provided for input HTTP label: localeId.");
|
|
2563
|
+
}
|
|
2564
|
+
if (input.botRecommendationId !== undefined) {
|
|
2565
|
+
const labelValue = input.botRecommendationId;
|
|
2566
|
+
if (labelValue.length <= 0) {
|
|
2567
|
+
throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
|
|
2568
|
+
}
|
|
2569
|
+
resolvedPath = resolvedPath.replace("{botRecommendationId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2570
|
+
}
|
|
2571
|
+
else {
|
|
2572
|
+
throw new Error("No value provided for input HTTP label: botRecommendationId.");
|
|
2573
|
+
}
|
|
2574
|
+
let body;
|
|
2575
|
+
body = JSON.stringify({
|
|
2576
|
+
...(input.encryptionSetting !== undefined &&
|
|
2577
|
+
input.encryptionSetting !== null && {
|
|
2578
|
+
encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
|
|
2579
|
+
}),
|
|
2580
|
+
});
|
|
2581
|
+
return new protocol_http_1.HttpRequest({
|
|
2582
|
+
protocol,
|
|
2583
|
+
hostname,
|
|
2584
|
+
port,
|
|
2585
|
+
method: "PUT",
|
|
2586
|
+
headers,
|
|
2587
|
+
path: resolvedPath,
|
|
2588
|
+
body,
|
|
2589
|
+
});
|
|
2590
|
+
};
|
|
2591
|
+
exports.serializeAws_restJson1UpdateBotRecommendationCommand = serializeAws_restJson1UpdateBotRecommendationCommand;
|
|
2225
2592
|
const serializeAws_restJson1UpdateExportCommand = async (input, context) => {
|
|
2226
2593
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2227
2594
|
const headers = {
|
|
@@ -2525,6 +2892,10 @@ const serializeAws_restJson1UpdateSlotTypeCommand = async (input, context) => {
|
|
|
2525
2892
|
let body;
|
|
2526
2893
|
body = JSON.stringify({
|
|
2527
2894
|
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
2895
|
+
...(input.externalSourceSetting !== undefined &&
|
|
2896
|
+
input.externalSourceSetting !== null && {
|
|
2897
|
+
externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
|
|
2898
|
+
}),
|
|
2528
2899
|
...(input.parentSlotTypeSignature !== undefined &&
|
|
2529
2900
|
input.parentSlotTypeSignature !== null && { parentSlotTypeSignature: input.parentSlotTypeSignature }),
|
|
2530
2901
|
...(input.slotTypeName !== undefined && input.slotTypeName !== null && { slotTypeName: input.slotTypeName }),
|
|
@@ -3718,6 +4089,7 @@ const deserializeAws_restJson1CreateSlotTypeCommand = async (output, context) =>
|
|
|
3718
4089
|
botVersion: undefined,
|
|
3719
4090
|
creationDateTime: undefined,
|
|
3720
4091
|
description: undefined,
|
|
4092
|
+
externalSourceSetting: undefined,
|
|
3721
4093
|
localeId: undefined,
|
|
3722
4094
|
parentSlotTypeSignature: undefined,
|
|
3723
4095
|
slotTypeId: undefined,
|
|
@@ -3738,6 +4110,9 @@ const deserializeAws_restJson1CreateSlotTypeCommand = async (output, context) =>
|
|
|
3738
4110
|
if (data.description !== undefined && data.description !== null) {
|
|
3739
4111
|
contents.description = smithy_client_1.expectString(data.description);
|
|
3740
4112
|
}
|
|
4113
|
+
if (data.externalSourceSetting !== undefined && data.externalSourceSetting !== null) {
|
|
4114
|
+
contents.externalSourceSetting = deserializeAws_restJson1ExternalSourceSetting(data.externalSourceSetting, context);
|
|
4115
|
+
}
|
|
3741
4116
|
if (data.localeId !== undefined && data.localeId !== null) {
|
|
3742
4117
|
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
3743
4118
|
}
|
|
@@ -5187,6 +5562,7 @@ const deserializeAws_restJson1DescribeBotLocaleCommand = async (output, context)
|
|
|
5187
5562
|
localeId: undefined,
|
|
5188
5563
|
localeName: undefined,
|
|
5189
5564
|
nluIntentConfidenceThreshold: undefined,
|
|
5565
|
+
recommendedActions: undefined,
|
|
5190
5566
|
slotTypesCount: undefined,
|
|
5191
5567
|
voiceSettings: undefined,
|
|
5192
5568
|
};
|
|
@@ -5230,6 +5606,9 @@ const deserializeAws_restJson1DescribeBotLocaleCommand = async (output, context)
|
|
|
5230
5606
|
if (data.nluIntentConfidenceThreshold !== undefined && data.nluIntentConfidenceThreshold !== null) {
|
|
5231
5607
|
contents.nluIntentConfidenceThreshold = smithy_client_1.limitedParseDouble(data.nluIntentConfidenceThreshold);
|
|
5232
5608
|
}
|
|
5609
|
+
if (data.recommendedActions !== undefined && data.recommendedActions !== null) {
|
|
5610
|
+
contents.recommendedActions = deserializeAws_restJson1RecommendedActions(data.recommendedActions, context);
|
|
5611
|
+
}
|
|
5233
5612
|
if (data.slotTypesCount !== undefined && data.slotTypesCount !== null) {
|
|
5234
5613
|
contents.slotTypesCount = smithy_client_1.expectInt32(data.slotTypesCount);
|
|
5235
5614
|
}
|
|
@@ -5304,32 +5683,36 @@ const deserializeAws_restJson1DescribeBotLocaleCommandError = async (output, con
|
|
|
5304
5683
|
delete response.Message;
|
|
5305
5684
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
5306
5685
|
};
|
|
5307
|
-
const
|
|
5686
|
+
const deserializeAws_restJson1DescribeBotRecommendationCommand = async (output, context) => {
|
|
5308
5687
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5309
|
-
return
|
|
5688
|
+
return deserializeAws_restJson1DescribeBotRecommendationCommandError(output, context);
|
|
5310
5689
|
}
|
|
5311
5690
|
const contents = {
|
|
5312
5691
|
$metadata: deserializeMetadata(output),
|
|
5313
5692
|
botId: undefined,
|
|
5314
|
-
|
|
5315
|
-
|
|
5693
|
+
botRecommendationId: undefined,
|
|
5694
|
+
botRecommendationResults: undefined,
|
|
5695
|
+
botRecommendationStatus: undefined,
|
|
5316
5696
|
botVersion: undefined,
|
|
5317
5697
|
creationDateTime: undefined,
|
|
5318
|
-
|
|
5319
|
-
description: undefined,
|
|
5698
|
+
encryptionSetting: undefined,
|
|
5320
5699
|
failureReasons: undefined,
|
|
5321
|
-
|
|
5322
|
-
|
|
5700
|
+
lastUpdatedDateTime: undefined,
|
|
5701
|
+
localeId: undefined,
|
|
5702
|
+
transcriptSourceSetting: undefined,
|
|
5323
5703
|
};
|
|
5324
5704
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
5325
5705
|
if (data.botId !== undefined && data.botId !== null) {
|
|
5326
5706
|
contents.botId = smithy_client_1.expectString(data.botId);
|
|
5327
5707
|
}
|
|
5328
|
-
if (data.
|
|
5329
|
-
contents.
|
|
5708
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
5709
|
+
contents.botRecommendationId = smithy_client_1.expectString(data.botRecommendationId);
|
|
5330
5710
|
}
|
|
5331
|
-
if (data.
|
|
5332
|
-
contents.
|
|
5711
|
+
if (data.botRecommendationResults !== undefined && data.botRecommendationResults !== null) {
|
|
5712
|
+
contents.botRecommendationResults = deserializeAws_restJson1BotRecommendationResults(data.botRecommendationResults, context);
|
|
5713
|
+
}
|
|
5714
|
+
if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
|
|
5715
|
+
contents.botRecommendationStatus = smithy_client_1.expectString(data.botRecommendationStatus);
|
|
5333
5716
|
}
|
|
5334
5717
|
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
5335
5718
|
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
@@ -5337,25 +5720,25 @@ const deserializeAws_restJson1DescribeBotVersionCommand = async (output, context
|
|
|
5337
5720
|
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
5338
5721
|
contents.creationDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.creationDateTime)));
|
|
5339
5722
|
}
|
|
5340
|
-
if (data.
|
|
5341
|
-
contents.
|
|
5342
|
-
}
|
|
5343
|
-
if (data.description !== undefined && data.description !== null) {
|
|
5344
|
-
contents.description = smithy_client_1.expectString(data.description);
|
|
5723
|
+
if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
|
|
5724
|
+
contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
|
|
5345
5725
|
}
|
|
5346
5726
|
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
5347
5727
|
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
5348
5728
|
}
|
|
5349
|
-
if (data.
|
|
5350
|
-
contents.
|
|
5729
|
+
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
5730
|
+
contents.lastUpdatedDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdatedDateTime)));
|
|
5351
5731
|
}
|
|
5352
|
-
if (data.
|
|
5353
|
-
contents.
|
|
5732
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
5733
|
+
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
5734
|
+
}
|
|
5735
|
+
if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
|
|
5736
|
+
contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
|
|
5354
5737
|
}
|
|
5355
5738
|
return Promise.resolve(contents);
|
|
5356
5739
|
};
|
|
5357
|
-
exports.
|
|
5358
|
-
const
|
|
5740
|
+
exports.deserializeAws_restJson1DescribeBotRecommendationCommand = deserializeAws_restJson1DescribeBotRecommendationCommand;
|
|
5741
|
+
const deserializeAws_restJson1DescribeBotRecommendationCommandError = async (output, context) => {
|
|
5359
5742
|
const parsedOutput = {
|
|
5360
5743
|
...output,
|
|
5361
5744
|
body: await parseBody(output.body, context),
|
|
@@ -5380,14 +5763,6 @@ const deserializeAws_restJson1DescribeBotVersionCommandError = async (output, co
|
|
|
5380
5763
|
$metadata: deserializeMetadata(output),
|
|
5381
5764
|
};
|
|
5382
5765
|
break;
|
|
5383
|
-
case "ServiceQuotaExceededException":
|
|
5384
|
-
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
5385
|
-
response = {
|
|
5386
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
5387
|
-
name: errorCode,
|
|
5388
|
-
$metadata: deserializeMetadata(output),
|
|
5389
|
-
};
|
|
5390
|
-
break;
|
|
5391
5766
|
case "ThrottlingException":
|
|
5392
5767
|
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
5393
5768
|
response = {
|
|
@@ -5420,20 +5795,136 @@ const deserializeAws_restJson1DescribeBotVersionCommandError = async (output, co
|
|
|
5420
5795
|
delete response.Message;
|
|
5421
5796
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
5422
5797
|
};
|
|
5423
|
-
const
|
|
5798
|
+
const deserializeAws_restJson1DescribeBotVersionCommand = async (output, context) => {
|
|
5424
5799
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5425
|
-
return
|
|
5800
|
+
return deserializeAws_restJson1DescribeBotVersionCommandError(output, context);
|
|
5426
5801
|
}
|
|
5427
5802
|
const contents = {
|
|
5428
5803
|
$metadata: deserializeMetadata(output),
|
|
5804
|
+
botId: undefined,
|
|
5805
|
+
botName: undefined,
|
|
5806
|
+
botStatus: undefined,
|
|
5807
|
+
botVersion: undefined,
|
|
5429
5808
|
creationDateTime: undefined,
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
exportStatus: undefined,
|
|
5809
|
+
dataPrivacy: undefined,
|
|
5810
|
+
description: undefined,
|
|
5433
5811
|
failureReasons: undefined,
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5812
|
+
idleSessionTTLInSeconds: undefined,
|
|
5813
|
+
roleArn: undefined,
|
|
5814
|
+
};
|
|
5815
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
5816
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
5817
|
+
contents.botId = smithy_client_1.expectString(data.botId);
|
|
5818
|
+
}
|
|
5819
|
+
if (data.botName !== undefined && data.botName !== null) {
|
|
5820
|
+
contents.botName = smithy_client_1.expectString(data.botName);
|
|
5821
|
+
}
|
|
5822
|
+
if (data.botStatus !== undefined && data.botStatus !== null) {
|
|
5823
|
+
contents.botStatus = smithy_client_1.expectString(data.botStatus);
|
|
5824
|
+
}
|
|
5825
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
5826
|
+
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
5827
|
+
}
|
|
5828
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
5829
|
+
contents.creationDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.creationDateTime)));
|
|
5830
|
+
}
|
|
5831
|
+
if (data.dataPrivacy !== undefined && data.dataPrivacy !== null) {
|
|
5832
|
+
contents.dataPrivacy = deserializeAws_restJson1DataPrivacy(data.dataPrivacy, context);
|
|
5833
|
+
}
|
|
5834
|
+
if (data.description !== undefined && data.description !== null) {
|
|
5835
|
+
contents.description = smithy_client_1.expectString(data.description);
|
|
5836
|
+
}
|
|
5837
|
+
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
5838
|
+
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
5839
|
+
}
|
|
5840
|
+
if (data.idleSessionTTLInSeconds !== undefined && data.idleSessionTTLInSeconds !== null) {
|
|
5841
|
+
contents.idleSessionTTLInSeconds = smithy_client_1.expectInt32(data.idleSessionTTLInSeconds);
|
|
5842
|
+
}
|
|
5843
|
+
if (data.roleArn !== undefined && data.roleArn !== null) {
|
|
5844
|
+
contents.roleArn = smithy_client_1.expectString(data.roleArn);
|
|
5845
|
+
}
|
|
5846
|
+
return Promise.resolve(contents);
|
|
5847
|
+
};
|
|
5848
|
+
exports.deserializeAws_restJson1DescribeBotVersionCommand = deserializeAws_restJson1DescribeBotVersionCommand;
|
|
5849
|
+
const deserializeAws_restJson1DescribeBotVersionCommandError = async (output, context) => {
|
|
5850
|
+
const parsedOutput = {
|
|
5851
|
+
...output,
|
|
5852
|
+
body: await parseBody(output.body, context),
|
|
5853
|
+
};
|
|
5854
|
+
let response;
|
|
5855
|
+
let errorCode = "UnknownError";
|
|
5856
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5857
|
+
switch (errorCode) {
|
|
5858
|
+
case "InternalServerException":
|
|
5859
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
5860
|
+
response = {
|
|
5861
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
5862
|
+
name: errorCode,
|
|
5863
|
+
$metadata: deserializeMetadata(output),
|
|
5864
|
+
};
|
|
5865
|
+
break;
|
|
5866
|
+
case "ResourceNotFoundException":
|
|
5867
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
5868
|
+
response = {
|
|
5869
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
5870
|
+
name: errorCode,
|
|
5871
|
+
$metadata: deserializeMetadata(output),
|
|
5872
|
+
};
|
|
5873
|
+
break;
|
|
5874
|
+
case "ServiceQuotaExceededException":
|
|
5875
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
5876
|
+
response = {
|
|
5877
|
+
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
5878
|
+
name: errorCode,
|
|
5879
|
+
$metadata: deserializeMetadata(output),
|
|
5880
|
+
};
|
|
5881
|
+
break;
|
|
5882
|
+
case "ThrottlingException":
|
|
5883
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
5884
|
+
response = {
|
|
5885
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
5886
|
+
name: errorCode,
|
|
5887
|
+
$metadata: deserializeMetadata(output),
|
|
5888
|
+
};
|
|
5889
|
+
break;
|
|
5890
|
+
case "ValidationException":
|
|
5891
|
+
case "com.amazonaws.lexmodelsv2#ValidationException":
|
|
5892
|
+
response = {
|
|
5893
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
5894
|
+
name: errorCode,
|
|
5895
|
+
$metadata: deserializeMetadata(output),
|
|
5896
|
+
};
|
|
5897
|
+
break;
|
|
5898
|
+
default:
|
|
5899
|
+
const parsedBody = parsedOutput.body;
|
|
5900
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5901
|
+
response = {
|
|
5902
|
+
...parsedBody,
|
|
5903
|
+
name: `${errorCode}`,
|
|
5904
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
5905
|
+
$fault: "client",
|
|
5906
|
+
$metadata: deserializeMetadata(output),
|
|
5907
|
+
};
|
|
5908
|
+
}
|
|
5909
|
+
const message = response.message || response.Message || errorCode;
|
|
5910
|
+
response.message = message;
|
|
5911
|
+
delete response.Message;
|
|
5912
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
5913
|
+
};
|
|
5914
|
+
const deserializeAws_restJson1DescribeExportCommand = async (output, context) => {
|
|
5915
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5916
|
+
return deserializeAws_restJson1DescribeExportCommandError(output, context);
|
|
5917
|
+
}
|
|
5918
|
+
const contents = {
|
|
5919
|
+
$metadata: deserializeMetadata(output),
|
|
5920
|
+
creationDateTime: undefined,
|
|
5921
|
+
downloadUrl: undefined,
|
|
5922
|
+
exportId: undefined,
|
|
5923
|
+
exportStatus: undefined,
|
|
5924
|
+
failureReasons: undefined,
|
|
5925
|
+
fileFormat: undefined,
|
|
5926
|
+
lastUpdatedDateTime: undefined,
|
|
5927
|
+
resourceSpecification: undefined,
|
|
5437
5928
|
};
|
|
5438
5929
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
5439
5930
|
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
@@ -5982,6 +6473,7 @@ const deserializeAws_restJson1DescribeSlotTypeCommand = async (output, context)
|
|
|
5982
6473
|
botVersion: undefined,
|
|
5983
6474
|
creationDateTime: undefined,
|
|
5984
6475
|
description: undefined,
|
|
6476
|
+
externalSourceSetting: undefined,
|
|
5985
6477
|
lastUpdatedDateTime: undefined,
|
|
5986
6478
|
localeId: undefined,
|
|
5987
6479
|
parentSlotTypeSignature: undefined,
|
|
@@ -6003,6 +6495,9 @@ const deserializeAws_restJson1DescribeSlotTypeCommand = async (output, context)
|
|
|
6003
6495
|
if (data.description !== undefined && data.description !== null) {
|
|
6004
6496
|
contents.description = smithy_client_1.expectString(data.description);
|
|
6005
6497
|
}
|
|
6498
|
+
if (data.externalSourceSetting !== undefined && data.externalSourceSetting !== null) {
|
|
6499
|
+
contents.externalSourceSetting = deserializeAws_restJson1ExternalSourceSetting(data.externalSourceSetting, context);
|
|
6500
|
+
}
|
|
6006
6501
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
6007
6502
|
contents.lastUpdatedDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdatedDateTime)));
|
|
6008
6503
|
}
|
|
@@ -6364,6 +6859,94 @@ const deserializeAws_restJson1ListBotLocalesCommandError = async (output, contex
|
|
|
6364
6859
|
delete response.Message;
|
|
6365
6860
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
6366
6861
|
};
|
|
6862
|
+
const deserializeAws_restJson1ListBotRecommendationsCommand = async (output, context) => {
|
|
6863
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6864
|
+
return deserializeAws_restJson1ListBotRecommendationsCommandError(output, context);
|
|
6865
|
+
}
|
|
6866
|
+
const contents = {
|
|
6867
|
+
$metadata: deserializeMetadata(output),
|
|
6868
|
+
botId: undefined,
|
|
6869
|
+
botRecommendationSummaries: undefined,
|
|
6870
|
+
botVersion: undefined,
|
|
6871
|
+
localeId: undefined,
|
|
6872
|
+
nextToken: undefined,
|
|
6873
|
+
};
|
|
6874
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
6875
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
6876
|
+
contents.botId = smithy_client_1.expectString(data.botId);
|
|
6877
|
+
}
|
|
6878
|
+
if (data.botRecommendationSummaries !== undefined && data.botRecommendationSummaries !== null) {
|
|
6879
|
+
contents.botRecommendationSummaries = deserializeAws_restJson1BotRecommendationSummaryList(data.botRecommendationSummaries, context);
|
|
6880
|
+
}
|
|
6881
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
6882
|
+
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
6883
|
+
}
|
|
6884
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
6885
|
+
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
6886
|
+
}
|
|
6887
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
6888
|
+
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
6889
|
+
}
|
|
6890
|
+
return Promise.resolve(contents);
|
|
6891
|
+
};
|
|
6892
|
+
exports.deserializeAws_restJson1ListBotRecommendationsCommand = deserializeAws_restJson1ListBotRecommendationsCommand;
|
|
6893
|
+
const deserializeAws_restJson1ListBotRecommendationsCommandError = async (output, context) => {
|
|
6894
|
+
const parsedOutput = {
|
|
6895
|
+
...output,
|
|
6896
|
+
body: await parseBody(output.body, context),
|
|
6897
|
+
};
|
|
6898
|
+
let response;
|
|
6899
|
+
let errorCode = "UnknownError";
|
|
6900
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6901
|
+
switch (errorCode) {
|
|
6902
|
+
case "InternalServerException":
|
|
6903
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
6904
|
+
response = {
|
|
6905
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
6906
|
+
name: errorCode,
|
|
6907
|
+
$metadata: deserializeMetadata(output),
|
|
6908
|
+
};
|
|
6909
|
+
break;
|
|
6910
|
+
case "ResourceNotFoundException":
|
|
6911
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
6912
|
+
response = {
|
|
6913
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
6914
|
+
name: errorCode,
|
|
6915
|
+
$metadata: deserializeMetadata(output),
|
|
6916
|
+
};
|
|
6917
|
+
break;
|
|
6918
|
+
case "ThrottlingException":
|
|
6919
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
6920
|
+
response = {
|
|
6921
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
6922
|
+
name: errorCode,
|
|
6923
|
+
$metadata: deserializeMetadata(output),
|
|
6924
|
+
};
|
|
6925
|
+
break;
|
|
6926
|
+
case "ValidationException":
|
|
6927
|
+
case "com.amazonaws.lexmodelsv2#ValidationException":
|
|
6928
|
+
response = {
|
|
6929
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
6930
|
+
name: errorCode,
|
|
6931
|
+
$metadata: deserializeMetadata(output),
|
|
6932
|
+
};
|
|
6933
|
+
break;
|
|
6934
|
+
default:
|
|
6935
|
+
const parsedBody = parsedOutput.body;
|
|
6936
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6937
|
+
response = {
|
|
6938
|
+
...parsedBody,
|
|
6939
|
+
name: `${errorCode}`,
|
|
6940
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
6941
|
+
$fault: "client",
|
|
6942
|
+
$metadata: deserializeMetadata(output),
|
|
6943
|
+
};
|
|
6944
|
+
}
|
|
6945
|
+
const message = response.message || response.Message || errorCode;
|
|
6946
|
+
response.message = message;
|
|
6947
|
+
delete response.Message;
|
|
6948
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
6949
|
+
};
|
|
6367
6950
|
const deserializeAws_restJson1ListBotsCommand = async (output, context) => {
|
|
6368
6951
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6369
6952
|
return deserializeAws_restJson1ListBotsCommandError(output, context);
|
|
@@ -6920,42 +7503,42 @@ const deserializeAws_restJson1ListIntentsCommandError = async (output, context)
|
|
|
6920
7503
|
delete response.Message;
|
|
6921
7504
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
6922
7505
|
};
|
|
6923
|
-
const
|
|
7506
|
+
const deserializeAws_restJson1ListRecommendedIntentsCommand = async (output, context) => {
|
|
6924
7507
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6925
|
-
return
|
|
7508
|
+
return deserializeAws_restJson1ListRecommendedIntentsCommandError(output, context);
|
|
6926
7509
|
}
|
|
6927
7510
|
const contents = {
|
|
6928
7511
|
$metadata: deserializeMetadata(output),
|
|
6929
7512
|
botId: undefined,
|
|
7513
|
+
botRecommendationId: undefined,
|
|
6930
7514
|
botVersion: undefined,
|
|
6931
|
-
intentId: undefined,
|
|
6932
7515
|
localeId: undefined,
|
|
6933
7516
|
nextToken: undefined,
|
|
6934
|
-
|
|
7517
|
+
summaryList: undefined,
|
|
6935
7518
|
};
|
|
6936
7519
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
6937
7520
|
if (data.botId !== undefined && data.botId !== null) {
|
|
6938
7521
|
contents.botId = smithy_client_1.expectString(data.botId);
|
|
6939
7522
|
}
|
|
7523
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
7524
|
+
contents.botRecommendationId = smithy_client_1.expectString(data.botRecommendationId);
|
|
7525
|
+
}
|
|
6940
7526
|
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
6941
7527
|
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
6942
7528
|
}
|
|
6943
|
-
if (data.intentId !== undefined && data.intentId !== null) {
|
|
6944
|
-
contents.intentId = smithy_client_1.expectString(data.intentId);
|
|
6945
|
-
}
|
|
6946
7529
|
if (data.localeId !== undefined && data.localeId !== null) {
|
|
6947
7530
|
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
6948
7531
|
}
|
|
6949
7532
|
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
6950
7533
|
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
6951
7534
|
}
|
|
6952
|
-
if (data.
|
|
6953
|
-
contents.
|
|
7535
|
+
if (data.summaryList !== undefined && data.summaryList !== null) {
|
|
7536
|
+
contents.summaryList = deserializeAws_restJson1RecommendedIntentSummaryList(data.summaryList, context);
|
|
6954
7537
|
}
|
|
6955
7538
|
return Promise.resolve(contents);
|
|
6956
7539
|
};
|
|
6957
|
-
exports.
|
|
6958
|
-
const
|
|
7540
|
+
exports.deserializeAws_restJson1ListRecommendedIntentsCommand = deserializeAws_restJson1ListRecommendedIntentsCommand;
|
|
7541
|
+
const deserializeAws_restJson1ListRecommendedIntentsCommandError = async (output, context) => {
|
|
6959
7542
|
const parsedOutput = {
|
|
6960
7543
|
...output,
|
|
6961
7544
|
body: await parseBody(output.body, context),
|
|
@@ -6972,6 +7555,14 @@ const deserializeAws_restJson1ListSlotsCommandError = async (output, context) =>
|
|
|
6972
7555
|
$metadata: deserializeMetadata(output),
|
|
6973
7556
|
};
|
|
6974
7557
|
break;
|
|
7558
|
+
case "ResourceNotFoundException":
|
|
7559
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
7560
|
+
response = {
|
|
7561
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
7562
|
+
name: errorCode,
|
|
7563
|
+
$metadata: deserializeMetadata(output),
|
|
7564
|
+
};
|
|
7565
|
+
break;
|
|
6975
7566
|
case "ServiceQuotaExceededException":
|
|
6976
7567
|
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
6977
7568
|
response = {
|
|
@@ -7012,17 +7603,18 @@ const deserializeAws_restJson1ListSlotsCommandError = async (output, context) =>
|
|
|
7012
7603
|
delete response.Message;
|
|
7013
7604
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
7014
7605
|
};
|
|
7015
|
-
const
|
|
7606
|
+
const deserializeAws_restJson1ListSlotsCommand = async (output, context) => {
|
|
7016
7607
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7017
|
-
return
|
|
7608
|
+
return deserializeAws_restJson1ListSlotsCommandError(output, context);
|
|
7018
7609
|
}
|
|
7019
7610
|
const contents = {
|
|
7020
7611
|
$metadata: deserializeMetadata(output),
|
|
7021
7612
|
botId: undefined,
|
|
7022
7613
|
botVersion: undefined,
|
|
7614
|
+
intentId: undefined,
|
|
7023
7615
|
localeId: undefined,
|
|
7024
7616
|
nextToken: undefined,
|
|
7025
|
-
|
|
7617
|
+
slotSummaries: undefined,
|
|
7026
7618
|
};
|
|
7027
7619
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7028
7620
|
if (data.botId !== undefined && data.botId !== null) {
|
|
@@ -7031,19 +7623,22 @@ const deserializeAws_restJson1ListSlotTypesCommand = async (output, context) =>
|
|
|
7031
7623
|
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7032
7624
|
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
7033
7625
|
}
|
|
7626
|
+
if (data.intentId !== undefined && data.intentId !== null) {
|
|
7627
|
+
contents.intentId = smithy_client_1.expectString(data.intentId);
|
|
7628
|
+
}
|
|
7034
7629
|
if (data.localeId !== undefined && data.localeId !== null) {
|
|
7035
7630
|
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
7036
7631
|
}
|
|
7037
7632
|
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
7038
7633
|
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
7039
7634
|
}
|
|
7040
|
-
if (data.
|
|
7041
|
-
contents.
|
|
7635
|
+
if (data.slotSummaries !== undefined && data.slotSummaries !== null) {
|
|
7636
|
+
contents.slotSummaries = deserializeAws_restJson1SlotSummaryList(data.slotSummaries, context);
|
|
7042
7637
|
}
|
|
7043
7638
|
return Promise.resolve(contents);
|
|
7044
7639
|
};
|
|
7045
|
-
exports.
|
|
7046
|
-
const
|
|
7640
|
+
exports.deserializeAws_restJson1ListSlotsCommand = deserializeAws_restJson1ListSlotsCommand;
|
|
7641
|
+
const deserializeAws_restJson1ListSlotsCommandError = async (output, context) => {
|
|
7047
7642
|
const parsedOutput = {
|
|
7048
7643
|
...output,
|
|
7049
7644
|
body: await parseBody(output.body, context),
|
|
@@ -7100,30 +7695,330 @@ const deserializeAws_restJson1ListSlotTypesCommandError = async (output, context
|
|
|
7100
7695
|
delete response.Message;
|
|
7101
7696
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
7102
7697
|
};
|
|
7103
|
-
const
|
|
7698
|
+
const deserializeAws_restJson1ListSlotTypesCommand = async (output, context) => {
|
|
7104
7699
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7105
|
-
return
|
|
7700
|
+
return deserializeAws_restJson1ListSlotTypesCommandError(output, context);
|
|
7106
7701
|
}
|
|
7107
7702
|
const contents = {
|
|
7108
7703
|
$metadata: deserializeMetadata(output),
|
|
7109
|
-
|
|
7704
|
+
botId: undefined,
|
|
7705
|
+
botVersion: undefined,
|
|
7706
|
+
localeId: undefined,
|
|
7707
|
+
nextToken: undefined,
|
|
7708
|
+
slotTypeSummaries: undefined,
|
|
7110
7709
|
};
|
|
7111
7710
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7112
|
-
if (data.
|
|
7113
|
-
contents.
|
|
7711
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
7712
|
+
contents.botId = smithy_client_1.expectString(data.botId);
|
|
7114
7713
|
}
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7714
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7715
|
+
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
7716
|
+
}
|
|
7717
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
7718
|
+
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
7719
|
+
}
|
|
7720
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
7721
|
+
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
7722
|
+
}
|
|
7723
|
+
if (data.slotTypeSummaries !== undefined && data.slotTypeSummaries !== null) {
|
|
7724
|
+
contents.slotTypeSummaries = deserializeAws_restJson1SlotTypeSummaryList(data.slotTypeSummaries, context);
|
|
7725
|
+
}
|
|
7726
|
+
return Promise.resolve(contents);
|
|
7727
|
+
};
|
|
7728
|
+
exports.deserializeAws_restJson1ListSlotTypesCommand = deserializeAws_restJson1ListSlotTypesCommand;
|
|
7729
|
+
const deserializeAws_restJson1ListSlotTypesCommandError = async (output, context) => {
|
|
7730
|
+
const parsedOutput = {
|
|
7731
|
+
...output,
|
|
7732
|
+
body: await parseBody(output.body, context),
|
|
7733
|
+
};
|
|
7734
|
+
let response;
|
|
7735
|
+
let errorCode = "UnknownError";
|
|
7736
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7737
|
+
switch (errorCode) {
|
|
7738
|
+
case "InternalServerException":
|
|
7739
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
7740
|
+
response = {
|
|
7741
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
7742
|
+
name: errorCode,
|
|
7743
|
+
$metadata: deserializeMetadata(output),
|
|
7744
|
+
};
|
|
7745
|
+
break;
|
|
7746
|
+
case "ServiceQuotaExceededException":
|
|
7747
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
7748
|
+
response = {
|
|
7749
|
+
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
7750
|
+
name: errorCode,
|
|
7751
|
+
$metadata: deserializeMetadata(output),
|
|
7752
|
+
};
|
|
7753
|
+
break;
|
|
7754
|
+
case "ThrottlingException":
|
|
7755
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
7756
|
+
response = {
|
|
7757
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
7758
|
+
name: errorCode,
|
|
7759
|
+
$metadata: deserializeMetadata(output),
|
|
7760
|
+
};
|
|
7761
|
+
break;
|
|
7762
|
+
case "ValidationException":
|
|
7763
|
+
case "com.amazonaws.lexmodelsv2#ValidationException":
|
|
7764
|
+
response = {
|
|
7765
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
7766
|
+
name: errorCode,
|
|
7767
|
+
$metadata: deserializeMetadata(output),
|
|
7768
|
+
};
|
|
7769
|
+
break;
|
|
7770
|
+
default:
|
|
7771
|
+
const parsedBody = parsedOutput.body;
|
|
7772
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7773
|
+
response = {
|
|
7774
|
+
...parsedBody,
|
|
7775
|
+
name: `${errorCode}`,
|
|
7776
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
7777
|
+
$fault: "client",
|
|
7778
|
+
$metadata: deserializeMetadata(output),
|
|
7779
|
+
};
|
|
7780
|
+
}
|
|
7781
|
+
const message = response.message || response.Message || errorCode;
|
|
7782
|
+
response.message = message;
|
|
7783
|
+
delete response.Message;
|
|
7784
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
7785
|
+
};
|
|
7786
|
+
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
7787
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7788
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
7789
|
+
}
|
|
7790
|
+
const contents = {
|
|
7791
|
+
$metadata: deserializeMetadata(output),
|
|
7792
|
+
tags: undefined,
|
|
7793
|
+
};
|
|
7794
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7795
|
+
if (data.tags !== undefined && data.tags !== null) {
|
|
7796
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
7797
|
+
}
|
|
7798
|
+
return Promise.resolve(contents);
|
|
7799
|
+
};
|
|
7800
|
+
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
7801
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
7802
|
+
const parsedOutput = {
|
|
7803
|
+
...output,
|
|
7804
|
+
body: await parseBody(output.body, context),
|
|
7805
|
+
};
|
|
7806
|
+
let response;
|
|
7807
|
+
let errorCode = "UnknownError";
|
|
7808
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7809
|
+
switch (errorCode) {
|
|
7810
|
+
case "InternalServerException":
|
|
7811
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
7812
|
+
response = {
|
|
7813
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
7814
|
+
name: errorCode,
|
|
7815
|
+
$metadata: deserializeMetadata(output),
|
|
7816
|
+
};
|
|
7817
|
+
break;
|
|
7818
|
+
case "ResourceNotFoundException":
|
|
7819
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
7820
|
+
response = {
|
|
7821
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
7822
|
+
name: errorCode,
|
|
7823
|
+
$metadata: deserializeMetadata(output),
|
|
7824
|
+
};
|
|
7825
|
+
break;
|
|
7826
|
+
case "ThrottlingException":
|
|
7827
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
7828
|
+
response = {
|
|
7829
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
7830
|
+
name: errorCode,
|
|
7831
|
+
$metadata: deserializeMetadata(output),
|
|
7832
|
+
};
|
|
7833
|
+
break;
|
|
7834
|
+
case "ValidationException":
|
|
7835
|
+
case "com.amazonaws.lexmodelsv2#ValidationException":
|
|
7836
|
+
response = {
|
|
7837
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
7838
|
+
name: errorCode,
|
|
7839
|
+
$metadata: deserializeMetadata(output),
|
|
7840
|
+
};
|
|
7841
|
+
break;
|
|
7842
|
+
default:
|
|
7843
|
+
const parsedBody = parsedOutput.body;
|
|
7844
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7845
|
+
response = {
|
|
7846
|
+
...parsedBody,
|
|
7847
|
+
name: `${errorCode}`,
|
|
7848
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
7849
|
+
$fault: "client",
|
|
7850
|
+
$metadata: deserializeMetadata(output),
|
|
7851
|
+
};
|
|
7852
|
+
}
|
|
7853
|
+
const message = response.message || response.Message || errorCode;
|
|
7854
|
+
response.message = message;
|
|
7855
|
+
delete response.Message;
|
|
7856
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
7857
|
+
};
|
|
7858
|
+
const deserializeAws_restJson1SearchAssociatedTranscriptsCommand = async (output, context) => {
|
|
7859
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7860
|
+
return deserializeAws_restJson1SearchAssociatedTranscriptsCommandError(output, context);
|
|
7861
|
+
}
|
|
7862
|
+
const contents = {
|
|
7863
|
+
$metadata: deserializeMetadata(output),
|
|
7864
|
+
associatedTranscripts: undefined,
|
|
7865
|
+
botId: undefined,
|
|
7866
|
+
botRecommendationId: undefined,
|
|
7867
|
+
botVersion: undefined,
|
|
7868
|
+
localeId: undefined,
|
|
7869
|
+
nextIndex: undefined,
|
|
7870
|
+
totalResults: undefined,
|
|
7871
|
+
};
|
|
7872
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7873
|
+
if (data.associatedTranscripts !== undefined && data.associatedTranscripts !== null) {
|
|
7874
|
+
contents.associatedTranscripts = deserializeAws_restJson1AssociatedTranscriptList(data.associatedTranscripts, context);
|
|
7875
|
+
}
|
|
7876
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
7877
|
+
contents.botId = smithy_client_1.expectString(data.botId);
|
|
7878
|
+
}
|
|
7879
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
7880
|
+
contents.botRecommendationId = smithy_client_1.expectString(data.botRecommendationId);
|
|
7881
|
+
}
|
|
7882
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7883
|
+
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
7884
|
+
}
|
|
7885
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
7886
|
+
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
7887
|
+
}
|
|
7888
|
+
if (data.nextIndex !== undefined && data.nextIndex !== null) {
|
|
7889
|
+
contents.nextIndex = smithy_client_1.expectInt32(data.nextIndex);
|
|
7890
|
+
}
|
|
7891
|
+
if (data.totalResults !== undefined && data.totalResults !== null) {
|
|
7892
|
+
contents.totalResults = smithy_client_1.expectInt32(data.totalResults);
|
|
7893
|
+
}
|
|
7894
|
+
return Promise.resolve(contents);
|
|
7895
|
+
};
|
|
7896
|
+
exports.deserializeAws_restJson1SearchAssociatedTranscriptsCommand = deserializeAws_restJson1SearchAssociatedTranscriptsCommand;
|
|
7897
|
+
const deserializeAws_restJson1SearchAssociatedTranscriptsCommandError = async (output, context) => {
|
|
7898
|
+
const parsedOutput = {
|
|
7899
|
+
...output,
|
|
7900
|
+
body: await parseBody(output.body, context),
|
|
7901
|
+
};
|
|
7902
|
+
let response;
|
|
7903
|
+
let errorCode = "UnknownError";
|
|
7904
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7905
|
+
switch (errorCode) {
|
|
7906
|
+
case "InternalServerException":
|
|
7907
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
7908
|
+
response = {
|
|
7909
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
7910
|
+
name: errorCode,
|
|
7911
|
+
$metadata: deserializeMetadata(output),
|
|
7912
|
+
};
|
|
7913
|
+
break;
|
|
7914
|
+
case "ResourceNotFoundException":
|
|
7915
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
7916
|
+
response = {
|
|
7917
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
7918
|
+
name: errorCode,
|
|
7919
|
+
$metadata: deserializeMetadata(output),
|
|
7920
|
+
};
|
|
7921
|
+
break;
|
|
7922
|
+
case "ServiceQuotaExceededException":
|
|
7923
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
7924
|
+
response = {
|
|
7925
|
+
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
7926
|
+
name: errorCode,
|
|
7927
|
+
$metadata: deserializeMetadata(output),
|
|
7928
|
+
};
|
|
7929
|
+
break;
|
|
7930
|
+
case "ThrottlingException":
|
|
7931
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
7932
|
+
response = {
|
|
7933
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
7934
|
+
name: errorCode,
|
|
7935
|
+
$metadata: deserializeMetadata(output),
|
|
7936
|
+
};
|
|
7937
|
+
break;
|
|
7938
|
+
case "ValidationException":
|
|
7939
|
+
case "com.amazonaws.lexmodelsv2#ValidationException":
|
|
7940
|
+
response = {
|
|
7941
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
7942
|
+
name: errorCode,
|
|
7943
|
+
$metadata: deserializeMetadata(output),
|
|
7944
|
+
};
|
|
7945
|
+
break;
|
|
7946
|
+
default:
|
|
7947
|
+
const parsedBody = parsedOutput.body;
|
|
7948
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7949
|
+
response = {
|
|
7950
|
+
...parsedBody,
|
|
7951
|
+
name: `${errorCode}`,
|
|
7952
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
7953
|
+
$fault: "client",
|
|
7954
|
+
$metadata: deserializeMetadata(output),
|
|
7955
|
+
};
|
|
7956
|
+
}
|
|
7957
|
+
const message = response.message || response.Message || errorCode;
|
|
7958
|
+
response.message = message;
|
|
7959
|
+
delete response.Message;
|
|
7960
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
7961
|
+
};
|
|
7962
|
+
const deserializeAws_restJson1StartBotRecommendationCommand = async (output, context) => {
|
|
7963
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
7964
|
+
return deserializeAws_restJson1StartBotRecommendationCommandError(output, context);
|
|
7965
|
+
}
|
|
7966
|
+
const contents = {
|
|
7967
|
+
$metadata: deserializeMetadata(output),
|
|
7968
|
+
botId: undefined,
|
|
7969
|
+
botRecommendationId: undefined,
|
|
7970
|
+
botRecommendationStatus: undefined,
|
|
7971
|
+
botVersion: undefined,
|
|
7972
|
+
creationDateTime: undefined,
|
|
7973
|
+
encryptionSetting: undefined,
|
|
7974
|
+
localeId: undefined,
|
|
7975
|
+
transcriptSourceSetting: undefined,
|
|
7976
|
+
};
|
|
7977
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7978
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
7979
|
+
contents.botId = smithy_client_1.expectString(data.botId);
|
|
7980
|
+
}
|
|
7981
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
7982
|
+
contents.botRecommendationId = smithy_client_1.expectString(data.botRecommendationId);
|
|
7983
|
+
}
|
|
7984
|
+
if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
|
|
7985
|
+
contents.botRecommendationStatus = smithy_client_1.expectString(data.botRecommendationStatus);
|
|
7986
|
+
}
|
|
7987
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7988
|
+
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
7989
|
+
}
|
|
7990
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
7991
|
+
contents.creationDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.creationDateTime)));
|
|
7992
|
+
}
|
|
7993
|
+
if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
|
|
7994
|
+
contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
|
|
7995
|
+
}
|
|
7996
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
7997
|
+
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
7998
|
+
}
|
|
7999
|
+
if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
|
|
8000
|
+
contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
|
|
8001
|
+
}
|
|
8002
|
+
return Promise.resolve(contents);
|
|
8003
|
+
};
|
|
8004
|
+
exports.deserializeAws_restJson1StartBotRecommendationCommand = deserializeAws_restJson1StartBotRecommendationCommand;
|
|
8005
|
+
const deserializeAws_restJson1StartBotRecommendationCommandError = async (output, context) => {
|
|
8006
|
+
const parsedOutput = {
|
|
8007
|
+
...output,
|
|
8008
|
+
body: await parseBody(output.body, context),
|
|
8009
|
+
};
|
|
7123
8010
|
let response;
|
|
7124
8011
|
let errorCode = "UnknownError";
|
|
7125
8012
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7126
8013
|
switch (errorCode) {
|
|
8014
|
+
case "ConflictException":
|
|
8015
|
+
case "com.amazonaws.lexmodelsv2#ConflictException":
|
|
8016
|
+
response = {
|
|
8017
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
8018
|
+
name: errorCode,
|
|
8019
|
+
$metadata: deserializeMetadata(output),
|
|
8020
|
+
};
|
|
8021
|
+
break;
|
|
7127
8022
|
case "InternalServerException":
|
|
7128
8023
|
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
7129
8024
|
response = {
|
|
@@ -7132,6 +8027,14 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
7132
8027
|
$metadata: deserializeMetadata(output),
|
|
7133
8028
|
};
|
|
7134
8029
|
break;
|
|
8030
|
+
case "PreconditionFailedException":
|
|
8031
|
+
case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
|
|
8032
|
+
response = {
|
|
8033
|
+
...(await deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)),
|
|
8034
|
+
name: errorCode,
|
|
8035
|
+
$metadata: deserializeMetadata(output),
|
|
8036
|
+
};
|
|
8037
|
+
break;
|
|
7135
8038
|
case "ResourceNotFoundException":
|
|
7136
8039
|
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
7137
8040
|
response = {
|
|
@@ -7140,6 +8043,14 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
7140
8043
|
$metadata: deserializeMetadata(output),
|
|
7141
8044
|
};
|
|
7142
8045
|
break;
|
|
8046
|
+
case "ServiceQuotaExceededException":
|
|
8047
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
8048
|
+
response = {
|
|
8049
|
+
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
8050
|
+
name: errorCode,
|
|
8051
|
+
$metadata: deserializeMetadata(output),
|
|
8052
|
+
};
|
|
8053
|
+
break;
|
|
7143
8054
|
case "ThrottlingException":
|
|
7144
8055
|
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
7145
8056
|
response = {
|
|
@@ -7551,43 +8462,175 @@ const deserializeAws_restJson1UpdateBotAliasCommand = async (output, context) =>
|
|
|
7551
8462
|
sentimentAnalysisSettings: undefined,
|
|
7552
8463
|
};
|
|
7553
8464
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7554
|
-
if (data.botAliasId !== undefined && data.botAliasId !== null) {
|
|
7555
|
-
contents.botAliasId = smithy_client_1.expectString(data.botAliasId);
|
|
7556
|
-
}
|
|
7557
|
-
if (data.botAliasLocaleSettings !== undefined && data.botAliasLocaleSettings !== null) {
|
|
7558
|
-
contents.botAliasLocaleSettings = deserializeAws_restJson1BotAliasLocaleSettingsMap(data.botAliasLocaleSettings, context);
|
|
7559
|
-
}
|
|
7560
|
-
if (data.botAliasName !== undefined && data.botAliasName !== null) {
|
|
7561
|
-
contents.botAliasName = smithy_client_1.expectString(data.botAliasName);
|
|
7562
|
-
}
|
|
7563
|
-
if (data.botAliasStatus !== undefined && data.botAliasStatus !== null) {
|
|
7564
|
-
contents.botAliasStatus = smithy_client_1.expectString(data.botAliasStatus);
|
|
7565
|
-
}
|
|
8465
|
+
if (data.botAliasId !== undefined && data.botAliasId !== null) {
|
|
8466
|
+
contents.botAliasId = smithy_client_1.expectString(data.botAliasId);
|
|
8467
|
+
}
|
|
8468
|
+
if (data.botAliasLocaleSettings !== undefined && data.botAliasLocaleSettings !== null) {
|
|
8469
|
+
contents.botAliasLocaleSettings = deserializeAws_restJson1BotAliasLocaleSettingsMap(data.botAliasLocaleSettings, context);
|
|
8470
|
+
}
|
|
8471
|
+
if (data.botAliasName !== undefined && data.botAliasName !== null) {
|
|
8472
|
+
contents.botAliasName = smithy_client_1.expectString(data.botAliasName);
|
|
8473
|
+
}
|
|
8474
|
+
if (data.botAliasStatus !== undefined && data.botAliasStatus !== null) {
|
|
8475
|
+
contents.botAliasStatus = smithy_client_1.expectString(data.botAliasStatus);
|
|
8476
|
+
}
|
|
8477
|
+
if (data.botId !== undefined && data.botId !== null) {
|
|
8478
|
+
contents.botId = smithy_client_1.expectString(data.botId);
|
|
8479
|
+
}
|
|
8480
|
+
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
8481
|
+
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
8482
|
+
}
|
|
8483
|
+
if (data.conversationLogSettings !== undefined && data.conversationLogSettings !== null) {
|
|
8484
|
+
contents.conversationLogSettings = deserializeAws_restJson1ConversationLogSettings(data.conversationLogSettings, context);
|
|
8485
|
+
}
|
|
8486
|
+
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
8487
|
+
contents.creationDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.creationDateTime)));
|
|
8488
|
+
}
|
|
8489
|
+
if (data.description !== undefined && data.description !== null) {
|
|
8490
|
+
contents.description = smithy_client_1.expectString(data.description);
|
|
8491
|
+
}
|
|
8492
|
+
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
8493
|
+
contents.lastUpdatedDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdatedDateTime)));
|
|
8494
|
+
}
|
|
8495
|
+
if (data.sentimentAnalysisSettings !== undefined && data.sentimentAnalysisSettings !== null) {
|
|
8496
|
+
contents.sentimentAnalysisSettings = deserializeAws_restJson1SentimentAnalysisSettings(data.sentimentAnalysisSettings, context);
|
|
8497
|
+
}
|
|
8498
|
+
return Promise.resolve(contents);
|
|
8499
|
+
};
|
|
8500
|
+
exports.deserializeAws_restJson1UpdateBotAliasCommand = deserializeAws_restJson1UpdateBotAliasCommand;
|
|
8501
|
+
const deserializeAws_restJson1UpdateBotAliasCommandError = async (output, context) => {
|
|
8502
|
+
const parsedOutput = {
|
|
8503
|
+
...output,
|
|
8504
|
+
body: await parseBody(output.body, context),
|
|
8505
|
+
};
|
|
8506
|
+
let response;
|
|
8507
|
+
let errorCode = "UnknownError";
|
|
8508
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8509
|
+
switch (errorCode) {
|
|
8510
|
+
case "ConflictException":
|
|
8511
|
+
case "com.amazonaws.lexmodelsv2#ConflictException":
|
|
8512
|
+
response = {
|
|
8513
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
8514
|
+
name: errorCode,
|
|
8515
|
+
$metadata: deserializeMetadata(output),
|
|
8516
|
+
};
|
|
8517
|
+
break;
|
|
8518
|
+
case "InternalServerException":
|
|
8519
|
+
case "com.amazonaws.lexmodelsv2#InternalServerException":
|
|
8520
|
+
response = {
|
|
8521
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
8522
|
+
name: errorCode,
|
|
8523
|
+
$metadata: deserializeMetadata(output),
|
|
8524
|
+
};
|
|
8525
|
+
break;
|
|
8526
|
+
case "PreconditionFailedException":
|
|
8527
|
+
case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
|
|
8528
|
+
response = {
|
|
8529
|
+
...(await deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)),
|
|
8530
|
+
name: errorCode,
|
|
8531
|
+
$metadata: deserializeMetadata(output),
|
|
8532
|
+
};
|
|
8533
|
+
break;
|
|
8534
|
+
case "ServiceQuotaExceededException":
|
|
8535
|
+
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
8536
|
+
response = {
|
|
8537
|
+
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
8538
|
+
name: errorCode,
|
|
8539
|
+
$metadata: deserializeMetadata(output),
|
|
8540
|
+
};
|
|
8541
|
+
break;
|
|
8542
|
+
case "ThrottlingException":
|
|
8543
|
+
case "com.amazonaws.lexmodelsv2#ThrottlingException":
|
|
8544
|
+
response = {
|
|
8545
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
8546
|
+
name: errorCode,
|
|
8547
|
+
$metadata: deserializeMetadata(output),
|
|
8548
|
+
};
|
|
8549
|
+
break;
|
|
8550
|
+
case "ValidationException":
|
|
8551
|
+
case "com.amazonaws.lexmodelsv2#ValidationException":
|
|
8552
|
+
response = {
|
|
8553
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
8554
|
+
name: errorCode,
|
|
8555
|
+
$metadata: deserializeMetadata(output),
|
|
8556
|
+
};
|
|
8557
|
+
break;
|
|
8558
|
+
default:
|
|
8559
|
+
const parsedBody = parsedOutput.body;
|
|
8560
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8561
|
+
response = {
|
|
8562
|
+
...parsedBody,
|
|
8563
|
+
name: `${errorCode}`,
|
|
8564
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
8565
|
+
$fault: "client",
|
|
8566
|
+
$metadata: deserializeMetadata(output),
|
|
8567
|
+
};
|
|
8568
|
+
}
|
|
8569
|
+
const message = response.message || response.Message || errorCode;
|
|
8570
|
+
response.message = message;
|
|
8571
|
+
delete response.Message;
|
|
8572
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
8573
|
+
};
|
|
8574
|
+
const deserializeAws_restJson1UpdateBotLocaleCommand = async (output, context) => {
|
|
8575
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
8576
|
+
return deserializeAws_restJson1UpdateBotLocaleCommandError(output, context);
|
|
8577
|
+
}
|
|
8578
|
+
const contents = {
|
|
8579
|
+
$metadata: deserializeMetadata(output),
|
|
8580
|
+
botId: undefined,
|
|
8581
|
+
botLocaleStatus: undefined,
|
|
8582
|
+
botVersion: undefined,
|
|
8583
|
+
creationDateTime: undefined,
|
|
8584
|
+
description: undefined,
|
|
8585
|
+
failureReasons: undefined,
|
|
8586
|
+
lastUpdatedDateTime: undefined,
|
|
8587
|
+
localeId: undefined,
|
|
8588
|
+
localeName: undefined,
|
|
8589
|
+
nluIntentConfidenceThreshold: undefined,
|
|
8590
|
+
recommendedActions: undefined,
|
|
8591
|
+
voiceSettings: undefined,
|
|
8592
|
+
};
|
|
8593
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7566
8594
|
if (data.botId !== undefined && data.botId !== null) {
|
|
7567
8595
|
contents.botId = smithy_client_1.expectString(data.botId);
|
|
7568
8596
|
}
|
|
8597
|
+
if (data.botLocaleStatus !== undefined && data.botLocaleStatus !== null) {
|
|
8598
|
+
contents.botLocaleStatus = smithy_client_1.expectString(data.botLocaleStatus);
|
|
8599
|
+
}
|
|
7569
8600
|
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7570
8601
|
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
7571
8602
|
}
|
|
7572
|
-
if (data.conversationLogSettings !== undefined && data.conversationLogSettings !== null) {
|
|
7573
|
-
contents.conversationLogSettings = deserializeAws_restJson1ConversationLogSettings(data.conversationLogSettings, context);
|
|
7574
|
-
}
|
|
7575
8603
|
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
7576
8604
|
contents.creationDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.creationDateTime)));
|
|
7577
8605
|
}
|
|
7578
8606
|
if (data.description !== undefined && data.description !== null) {
|
|
7579
8607
|
contents.description = smithy_client_1.expectString(data.description);
|
|
7580
8608
|
}
|
|
8609
|
+
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
8610
|
+
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
8611
|
+
}
|
|
7581
8612
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
7582
8613
|
contents.lastUpdatedDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdatedDateTime)));
|
|
7583
8614
|
}
|
|
7584
|
-
if (data.
|
|
7585
|
-
contents.
|
|
8615
|
+
if (data.localeId !== undefined && data.localeId !== null) {
|
|
8616
|
+
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
8617
|
+
}
|
|
8618
|
+
if (data.localeName !== undefined && data.localeName !== null) {
|
|
8619
|
+
contents.localeName = smithy_client_1.expectString(data.localeName);
|
|
8620
|
+
}
|
|
8621
|
+
if (data.nluIntentConfidenceThreshold !== undefined && data.nluIntentConfidenceThreshold !== null) {
|
|
8622
|
+
contents.nluIntentConfidenceThreshold = smithy_client_1.limitedParseDouble(data.nluIntentConfidenceThreshold);
|
|
8623
|
+
}
|
|
8624
|
+
if (data.recommendedActions !== undefined && data.recommendedActions !== null) {
|
|
8625
|
+
contents.recommendedActions = deserializeAws_restJson1RecommendedActions(data.recommendedActions, context);
|
|
8626
|
+
}
|
|
8627
|
+
if (data.voiceSettings !== undefined && data.voiceSettings !== null) {
|
|
8628
|
+
contents.voiceSettings = deserializeAws_restJson1VoiceSettings(data.voiceSettings, context);
|
|
7586
8629
|
}
|
|
7587
8630
|
return Promise.resolve(contents);
|
|
7588
8631
|
};
|
|
7589
|
-
exports.
|
|
7590
|
-
const
|
|
8632
|
+
exports.deserializeAws_restJson1UpdateBotLocaleCommand = deserializeAws_restJson1UpdateBotLocaleCommand;
|
|
8633
|
+
const deserializeAws_restJson1UpdateBotLocaleCommandError = async (output, context) => {
|
|
7591
8634
|
const parsedOutput = {
|
|
7592
8635
|
...output,
|
|
7593
8636
|
body: await parseBody(output.body, context),
|
|
@@ -7660,30 +8703,31 @@ const deserializeAws_restJson1UpdateBotAliasCommandError = async (output, contex
|
|
|
7660
8703
|
delete response.Message;
|
|
7661
8704
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
7662
8705
|
};
|
|
7663
|
-
const
|
|
8706
|
+
const deserializeAws_restJson1UpdateBotRecommendationCommand = async (output, context) => {
|
|
7664
8707
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
7665
|
-
return
|
|
8708
|
+
return deserializeAws_restJson1UpdateBotRecommendationCommandError(output, context);
|
|
7666
8709
|
}
|
|
7667
8710
|
const contents = {
|
|
7668
8711
|
$metadata: deserializeMetadata(output),
|
|
7669
8712
|
botId: undefined,
|
|
7670
|
-
|
|
8713
|
+
botRecommendationId: undefined,
|
|
8714
|
+
botRecommendationStatus: undefined,
|
|
7671
8715
|
botVersion: undefined,
|
|
7672
8716
|
creationDateTime: undefined,
|
|
7673
|
-
|
|
7674
|
-
failureReasons: undefined,
|
|
8717
|
+
encryptionSetting: undefined,
|
|
7675
8718
|
lastUpdatedDateTime: undefined,
|
|
7676
8719
|
localeId: undefined,
|
|
7677
|
-
|
|
7678
|
-
nluIntentConfidenceThreshold: undefined,
|
|
7679
|
-
voiceSettings: undefined,
|
|
8720
|
+
transcriptSourceSetting: undefined,
|
|
7680
8721
|
};
|
|
7681
8722
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
7682
8723
|
if (data.botId !== undefined && data.botId !== null) {
|
|
7683
8724
|
contents.botId = smithy_client_1.expectString(data.botId);
|
|
7684
8725
|
}
|
|
7685
|
-
if (data.
|
|
7686
|
-
contents.
|
|
8726
|
+
if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
|
|
8727
|
+
contents.botRecommendationId = smithy_client_1.expectString(data.botRecommendationId);
|
|
8728
|
+
}
|
|
8729
|
+
if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
|
|
8730
|
+
contents.botRecommendationStatus = smithy_client_1.expectString(data.botRecommendationStatus);
|
|
7687
8731
|
}
|
|
7688
8732
|
if (data.botVersion !== undefined && data.botVersion !== null) {
|
|
7689
8733
|
contents.botVersion = smithy_client_1.expectString(data.botVersion);
|
|
@@ -7691,11 +8735,8 @@ const deserializeAws_restJson1UpdateBotLocaleCommand = async (output, context) =
|
|
|
7691
8735
|
if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
|
|
7692
8736
|
contents.creationDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.creationDateTime)));
|
|
7693
8737
|
}
|
|
7694
|
-
if (data.
|
|
7695
|
-
contents.
|
|
7696
|
-
}
|
|
7697
|
-
if (data.failureReasons !== undefined && data.failureReasons !== null) {
|
|
7698
|
-
contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
|
|
8738
|
+
if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
|
|
8739
|
+
contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
|
|
7699
8740
|
}
|
|
7700
8741
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
7701
8742
|
contents.lastUpdatedDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdatedDateTime)));
|
|
@@ -7703,19 +8744,13 @@ const deserializeAws_restJson1UpdateBotLocaleCommand = async (output, context) =
|
|
|
7703
8744
|
if (data.localeId !== undefined && data.localeId !== null) {
|
|
7704
8745
|
contents.localeId = smithy_client_1.expectString(data.localeId);
|
|
7705
8746
|
}
|
|
7706
|
-
if (data.
|
|
7707
|
-
contents.
|
|
7708
|
-
}
|
|
7709
|
-
if (data.nluIntentConfidenceThreshold !== undefined && data.nluIntentConfidenceThreshold !== null) {
|
|
7710
|
-
contents.nluIntentConfidenceThreshold = smithy_client_1.limitedParseDouble(data.nluIntentConfidenceThreshold);
|
|
7711
|
-
}
|
|
7712
|
-
if (data.voiceSettings !== undefined && data.voiceSettings !== null) {
|
|
7713
|
-
contents.voiceSettings = deserializeAws_restJson1VoiceSettings(data.voiceSettings, context);
|
|
8747
|
+
if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
|
|
8748
|
+
contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
|
|
7714
8749
|
}
|
|
7715
8750
|
return Promise.resolve(contents);
|
|
7716
8751
|
};
|
|
7717
|
-
exports.
|
|
7718
|
-
const
|
|
8752
|
+
exports.deserializeAws_restJson1UpdateBotRecommendationCommand = deserializeAws_restJson1UpdateBotRecommendationCommand;
|
|
8753
|
+
const deserializeAws_restJson1UpdateBotRecommendationCommandError = async (output, context) => {
|
|
7719
8754
|
const parsedOutput = {
|
|
7720
8755
|
...output,
|
|
7721
8756
|
body: await parseBody(output.body, context),
|
|
@@ -7748,6 +8783,14 @@ const deserializeAws_restJson1UpdateBotLocaleCommandError = async (output, conte
|
|
|
7748
8783
|
$metadata: deserializeMetadata(output),
|
|
7749
8784
|
};
|
|
7750
8785
|
break;
|
|
8786
|
+
case "ResourceNotFoundException":
|
|
8787
|
+
case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
|
|
8788
|
+
response = {
|
|
8789
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
8790
|
+
name: errorCode,
|
|
8791
|
+
$metadata: deserializeMetadata(output),
|
|
8792
|
+
};
|
|
8793
|
+
break;
|
|
7751
8794
|
case "ServiceQuotaExceededException":
|
|
7752
8795
|
case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
|
|
7753
8796
|
response = {
|
|
@@ -8290,6 +9333,7 @@ const deserializeAws_restJson1UpdateSlotTypeCommand = async (output, context) =>
|
|
|
8290
9333
|
botVersion: undefined,
|
|
8291
9334
|
creationDateTime: undefined,
|
|
8292
9335
|
description: undefined,
|
|
9336
|
+
externalSourceSetting: undefined,
|
|
8293
9337
|
lastUpdatedDateTime: undefined,
|
|
8294
9338
|
localeId: undefined,
|
|
8295
9339
|
parentSlotTypeSignature: undefined,
|
|
@@ -8311,6 +9355,9 @@ const deserializeAws_restJson1UpdateSlotTypeCommand = async (output, context) =>
|
|
|
8311
9355
|
if (data.description !== undefined && data.description !== null) {
|
|
8312
9356
|
contents.description = smithy_client_1.expectString(data.description);
|
|
8313
9357
|
}
|
|
9358
|
+
if (data.externalSourceSetting !== undefined && data.externalSourceSetting !== null) {
|
|
9359
|
+
contents.externalSourceSetting = deserializeAws_restJson1ExternalSourceSetting(data.externalSourceSetting, context);
|
|
9360
|
+
}
|
|
8314
9361
|
if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
|
|
8315
9362
|
contents.lastUpdatedDateTime = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdatedDateTime)));
|
|
8316
9363
|
}
|
|
@@ -8527,6 +9574,23 @@ const serializeAws_restJson1AggregatedUtterancesSortBy = (input, context) => {
|
|
|
8527
9574
|
...(input.order !== undefined && input.order !== null && { order: input.order }),
|
|
8528
9575
|
};
|
|
8529
9576
|
};
|
|
9577
|
+
const serializeAws_restJson1AssociatedTranscriptFilter = (input, context) => {
|
|
9578
|
+
return {
|
|
9579
|
+
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
9580
|
+
...(input.values !== undefined &&
|
|
9581
|
+
input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }),
|
|
9582
|
+
};
|
|
9583
|
+
};
|
|
9584
|
+
const serializeAws_restJson1AssociatedTranscriptFilters = (input, context) => {
|
|
9585
|
+
return input
|
|
9586
|
+
.filter((e) => e != null)
|
|
9587
|
+
.map((entry) => {
|
|
9588
|
+
if (entry === null) {
|
|
9589
|
+
return null;
|
|
9590
|
+
}
|
|
9591
|
+
return serializeAws_restJson1AssociatedTranscriptFilter(entry, context);
|
|
9592
|
+
});
|
|
9593
|
+
};
|
|
8530
9594
|
const serializeAws_restJson1AudioLogDestination = (input, context) => {
|
|
8531
9595
|
return {
|
|
8532
9596
|
...(input.s3Bucket !== undefined &&
|
|
@@ -8774,11 +9838,30 @@ const serializeAws_restJson1DataPrivacy = (input, context) => {
|
|
|
8774
9838
|
...(input.childDirected !== undefined && input.childDirected !== null && { childDirected: input.childDirected }),
|
|
8775
9839
|
};
|
|
8776
9840
|
};
|
|
9841
|
+
const serializeAws_restJson1DateRangeFilter = (input, context) => {
|
|
9842
|
+
return {
|
|
9843
|
+
...(input.endDateTime !== undefined &&
|
|
9844
|
+
input.endDateTime !== null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) }),
|
|
9845
|
+
...(input.startDateTime !== undefined &&
|
|
9846
|
+
input.startDateTime !== null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }),
|
|
9847
|
+
};
|
|
9848
|
+
};
|
|
8777
9849
|
const serializeAws_restJson1DialogCodeHookSettings = (input, context) => {
|
|
8778
9850
|
return {
|
|
8779
9851
|
...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
|
|
8780
9852
|
};
|
|
8781
9853
|
};
|
|
9854
|
+
const serializeAws_restJson1EncryptionSetting = (input, context) => {
|
|
9855
|
+
return {
|
|
9856
|
+
...(input.associatedTranscriptsPassword !== undefined &&
|
|
9857
|
+
input.associatedTranscriptsPassword !== null && {
|
|
9858
|
+
associatedTranscriptsPassword: input.associatedTranscriptsPassword,
|
|
9859
|
+
}),
|
|
9860
|
+
...(input.botLocaleExportPassword !== undefined &&
|
|
9861
|
+
input.botLocaleExportPassword !== null && { botLocaleExportPassword: input.botLocaleExportPassword }),
|
|
9862
|
+
...(input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn }),
|
|
9863
|
+
};
|
|
9864
|
+
};
|
|
8782
9865
|
const serializeAws_restJson1ExportFilter = (input, context) => {
|
|
8783
9866
|
return {
|
|
8784
9867
|
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
@@ -8815,6 +9898,14 @@ const serializeAws_restJson1ExportSortBy = (input, context) => {
|
|
|
8815
9898
|
...(input.order !== undefined && input.order !== null && { order: input.order }),
|
|
8816
9899
|
};
|
|
8817
9900
|
};
|
|
9901
|
+
const serializeAws_restJson1ExternalSourceSetting = (input, context) => {
|
|
9902
|
+
return {
|
|
9903
|
+
...(input.grammarSlotTypeSetting !== undefined &&
|
|
9904
|
+
input.grammarSlotTypeSetting !== null && {
|
|
9905
|
+
grammarSlotTypeSetting: serializeAws_restJson1GrammarSlotTypeSetting(input.grammarSlotTypeSetting, context),
|
|
9906
|
+
}),
|
|
9907
|
+
};
|
|
9908
|
+
};
|
|
8818
9909
|
const serializeAws_restJson1FilterValues = (input, context) => {
|
|
8819
9910
|
return input
|
|
8820
9911
|
.filter((e) => e != null)
|
|
@@ -8877,6 +9968,19 @@ const serializeAws_restJson1FulfillmentUpdatesSpecification = (input, context) =
|
|
|
8877
9968
|
}),
|
|
8878
9969
|
};
|
|
8879
9970
|
};
|
|
9971
|
+
const serializeAws_restJson1GrammarSlotTypeSetting = (input, context) => {
|
|
9972
|
+
return {
|
|
9973
|
+
...(input.source !== undefined &&
|
|
9974
|
+
input.source !== null && { source: serializeAws_restJson1GrammarSlotTypeSource(input.source, context) }),
|
|
9975
|
+
};
|
|
9976
|
+
};
|
|
9977
|
+
const serializeAws_restJson1GrammarSlotTypeSource = (input, context) => {
|
|
9978
|
+
return {
|
|
9979
|
+
...(input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn }),
|
|
9980
|
+
...(input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName }),
|
|
9981
|
+
...(input.s3ObjectKey !== undefined && input.s3ObjectKey !== null && { s3ObjectKey: input.s3ObjectKey }),
|
|
9982
|
+
};
|
|
9983
|
+
};
|
|
8880
9984
|
const serializeAws_restJson1ImageResponseCard = (input, context) => {
|
|
8881
9985
|
return {
|
|
8882
9986
|
...(input.buttons !== undefined &&
|
|
@@ -8999,6 +10103,14 @@ const serializeAws_restJson1LambdaCodeHook = (input, context) => {
|
|
|
8999
10103
|
...(input.lambdaARN !== undefined && input.lambdaARN !== null && { lambdaARN: input.lambdaARN }),
|
|
9000
10104
|
};
|
|
9001
10105
|
};
|
|
10106
|
+
const serializeAws_restJson1LexTranscriptFilter = (input, context) => {
|
|
10107
|
+
return {
|
|
10108
|
+
...(input.dateRangeFilter !== undefined &&
|
|
10109
|
+
input.dateRangeFilter !== null && {
|
|
10110
|
+
dateRangeFilter: serializeAws_restJson1DateRangeFilter(input.dateRangeFilter, context),
|
|
10111
|
+
}),
|
|
10112
|
+
};
|
|
10113
|
+
};
|
|
9002
10114
|
const serializeAws_restJson1Message = (input, context) => {
|
|
9003
10115
|
return {
|
|
9004
10116
|
...(input.customPayload !== undefined &&
|
|
@@ -9059,6 +10171,16 @@ const serializeAws_restJson1ObfuscationSetting = (input, context) => {
|
|
|
9059
10171
|
input.obfuscationSettingType !== null && { obfuscationSettingType: input.obfuscationSettingType }),
|
|
9060
10172
|
};
|
|
9061
10173
|
};
|
|
10174
|
+
const serializeAws_restJson1ObjectPrefixes = (input, context) => {
|
|
10175
|
+
return input
|
|
10176
|
+
.filter((e) => e != null)
|
|
10177
|
+
.map((entry) => {
|
|
10178
|
+
if (entry === null) {
|
|
10179
|
+
return null;
|
|
10180
|
+
}
|
|
10181
|
+
return entry;
|
|
10182
|
+
});
|
|
10183
|
+
};
|
|
9062
10184
|
const serializeAws_restJson1OperationList = (input, context) => {
|
|
9063
10185
|
return input
|
|
9064
10186
|
.filter((e) => e != null)
|
|
@@ -9087,6 +10209,14 @@ const serializeAws_restJson1OutputContextsList = (input, context) => {
|
|
|
9087
10209
|
return serializeAws_restJson1OutputContext(entry, context);
|
|
9088
10210
|
});
|
|
9089
10211
|
};
|
|
10212
|
+
const serializeAws_restJson1PathFormat = (input, context) => {
|
|
10213
|
+
return {
|
|
10214
|
+
...(input.objectPrefixes !== undefined &&
|
|
10215
|
+
input.objectPrefixes !== null && {
|
|
10216
|
+
objectPrefixes: serializeAws_restJson1ObjectPrefixes(input.objectPrefixes, context),
|
|
10217
|
+
}),
|
|
10218
|
+
};
|
|
10219
|
+
};
|
|
9090
10220
|
const serializeAws_restJson1PlainTextMessage = (input, context) => {
|
|
9091
10221
|
return {
|
|
9092
10222
|
...(input.value !== undefined && input.value !== null && { value: input.value }),
|
|
@@ -9158,6 +10288,20 @@ const serializeAws_restJson1S3BucketLogDestination = (input, context) => {
|
|
|
9158
10288
|
...(input.s3BucketArn !== undefined && input.s3BucketArn !== null && { s3BucketArn: input.s3BucketArn }),
|
|
9159
10289
|
};
|
|
9160
10290
|
};
|
|
10291
|
+
const serializeAws_restJson1S3BucketTranscriptSource = (input, context) => {
|
|
10292
|
+
return {
|
|
10293
|
+
...(input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn }),
|
|
10294
|
+
...(input.pathFormat !== undefined &&
|
|
10295
|
+
input.pathFormat !== null && { pathFormat: serializeAws_restJson1PathFormat(input.pathFormat, context) }),
|
|
10296
|
+
...(input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName }),
|
|
10297
|
+
...(input.transcriptFilter !== undefined &&
|
|
10298
|
+
input.transcriptFilter !== null && {
|
|
10299
|
+
transcriptFilter: serializeAws_restJson1TranscriptFilter(input.transcriptFilter, context),
|
|
10300
|
+
}),
|
|
10301
|
+
...(input.transcriptFormat !== undefined &&
|
|
10302
|
+
input.transcriptFormat !== null && { transcriptFormat: input.transcriptFormat }),
|
|
10303
|
+
};
|
|
10304
|
+
};
|
|
9161
10305
|
const serializeAws_restJson1SampleUtterance = (input, context) => {
|
|
9162
10306
|
return {
|
|
9163
10307
|
...(input.utterance !== undefined && input.utterance !== null && { utterance: input.utterance }),
|
|
@@ -9393,6 +10537,22 @@ const serializeAws_restJson1TextLogSettingsList = (input, context) => {
|
|
|
9393
10537
|
return serializeAws_restJson1TextLogSetting(entry, context);
|
|
9394
10538
|
});
|
|
9395
10539
|
};
|
|
10540
|
+
const serializeAws_restJson1TranscriptFilter = (input, context) => {
|
|
10541
|
+
return {
|
|
10542
|
+
...(input.lexTranscriptFilter !== undefined &&
|
|
10543
|
+
input.lexTranscriptFilter !== null && {
|
|
10544
|
+
lexTranscriptFilter: serializeAws_restJson1LexTranscriptFilter(input.lexTranscriptFilter, context),
|
|
10545
|
+
}),
|
|
10546
|
+
};
|
|
10547
|
+
};
|
|
10548
|
+
const serializeAws_restJson1TranscriptSourceSetting = (input, context) => {
|
|
10549
|
+
return {
|
|
10550
|
+
...(input.s3BucketTranscriptSource !== undefined &&
|
|
10551
|
+
input.s3BucketTranscriptSource !== null && {
|
|
10552
|
+
s3BucketTranscriptSource: serializeAws_restJson1S3BucketTranscriptSource(input.s3BucketTranscriptSource, context),
|
|
10553
|
+
}),
|
|
10554
|
+
};
|
|
10555
|
+
};
|
|
9396
10556
|
const serializeAws_restJson1UtteranceAggregationDuration = (input, context) => {
|
|
9397
10557
|
return {
|
|
9398
10558
|
...(input.relativeAggregationDuration !== undefined &&
|
|
@@ -9403,6 +10563,7 @@ const serializeAws_restJson1UtteranceAggregationDuration = (input, context) => {
|
|
|
9403
10563
|
};
|
|
9404
10564
|
const serializeAws_restJson1VoiceSettings = (input, context) => {
|
|
9405
10565
|
return {
|
|
10566
|
+
...(input.engine !== undefined && input.engine !== null && { engine: input.engine }),
|
|
9406
10567
|
...(input.voiceId !== undefined && input.voiceId !== null && { voiceId: input.voiceId }),
|
|
9407
10568
|
};
|
|
9408
10569
|
};
|
|
@@ -9449,6 +10610,21 @@ const deserializeAws_restJson1AggregatedUtterancesSummaryList = (output, context
|
|
|
9449
10610
|
return deserializeAws_restJson1AggregatedUtterancesSummary(entry, context);
|
|
9450
10611
|
});
|
|
9451
10612
|
};
|
|
10613
|
+
const deserializeAws_restJson1AssociatedTranscript = (output, context) => {
|
|
10614
|
+
return {
|
|
10615
|
+
transcript: smithy_client_1.expectString(output.transcript),
|
|
10616
|
+
};
|
|
10617
|
+
};
|
|
10618
|
+
const deserializeAws_restJson1AssociatedTranscriptList = (output, context) => {
|
|
10619
|
+
return (output || [])
|
|
10620
|
+
.filter((e) => e != null)
|
|
10621
|
+
.map((entry) => {
|
|
10622
|
+
if (entry === null) {
|
|
10623
|
+
return null;
|
|
10624
|
+
}
|
|
10625
|
+
return deserializeAws_restJson1AssociatedTranscript(entry, context);
|
|
10626
|
+
});
|
|
10627
|
+
};
|
|
9452
10628
|
const deserializeAws_restJson1AudioLogDestination = (output, context) => {
|
|
9453
10629
|
return {
|
|
9454
10630
|
s3Bucket: output.s3Bucket !== undefined && output.s3Bucket !== null
|
|
@@ -9621,6 +10797,47 @@ const deserializeAws_restJson1BotLocaleSummaryList = (output, context) => {
|
|
|
9621
10797
|
return deserializeAws_restJson1BotLocaleSummary(entry, context);
|
|
9622
10798
|
});
|
|
9623
10799
|
};
|
|
10800
|
+
const deserializeAws_restJson1BotRecommendationResults = (output, context) => {
|
|
10801
|
+
return {
|
|
10802
|
+
associatedTranscriptsUrl: smithy_client_1.expectString(output.associatedTranscriptsUrl),
|
|
10803
|
+
botLocaleExportUrl: smithy_client_1.expectString(output.botLocaleExportUrl),
|
|
10804
|
+
statistics: output.statistics !== undefined && output.statistics !== null
|
|
10805
|
+
? deserializeAws_restJson1BotRecommendationResultStatistics(output.statistics, context)
|
|
10806
|
+
: undefined,
|
|
10807
|
+
};
|
|
10808
|
+
};
|
|
10809
|
+
const deserializeAws_restJson1BotRecommendationResultStatistics = (output, context) => {
|
|
10810
|
+
return {
|
|
10811
|
+
intents: output.intents !== undefined && output.intents !== null
|
|
10812
|
+
? deserializeAws_restJson1IntentStatistics(output.intents, context)
|
|
10813
|
+
: undefined,
|
|
10814
|
+
slotTypes: output.slotTypes !== undefined && output.slotTypes !== null
|
|
10815
|
+
? deserializeAws_restJson1SlotTypeStatistics(output.slotTypes, context)
|
|
10816
|
+
: undefined,
|
|
10817
|
+
};
|
|
10818
|
+
};
|
|
10819
|
+
const deserializeAws_restJson1BotRecommendationSummary = (output, context) => {
|
|
10820
|
+
return {
|
|
10821
|
+
botRecommendationId: smithy_client_1.expectString(output.botRecommendationId),
|
|
10822
|
+
botRecommendationStatus: smithy_client_1.expectString(output.botRecommendationStatus),
|
|
10823
|
+
creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
|
|
10824
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.creationDateTime)))
|
|
10825
|
+
: undefined,
|
|
10826
|
+
lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
|
|
10827
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastUpdatedDateTime)))
|
|
10828
|
+
: undefined,
|
|
10829
|
+
};
|
|
10830
|
+
};
|
|
10831
|
+
const deserializeAws_restJson1BotRecommendationSummaryList = (output, context) => {
|
|
10832
|
+
return (output || [])
|
|
10833
|
+
.filter((e) => e != null)
|
|
10834
|
+
.map((entry) => {
|
|
10835
|
+
if (entry === null) {
|
|
10836
|
+
return null;
|
|
10837
|
+
}
|
|
10838
|
+
return deserializeAws_restJson1BotRecommendationSummary(entry, context);
|
|
10839
|
+
});
|
|
10840
|
+
};
|
|
9624
10841
|
const deserializeAws_restJson1BotSummary = (output, context) => {
|
|
9625
10842
|
return {
|
|
9626
10843
|
botId: smithy_client_1.expectString(output.botId),
|
|
@@ -9761,11 +10978,28 @@ const deserializeAws_restJson1DataPrivacy = (output, context) => {
|
|
|
9761
10978
|
childDirected: smithy_client_1.expectBoolean(output.childDirected),
|
|
9762
10979
|
};
|
|
9763
10980
|
};
|
|
10981
|
+
const deserializeAws_restJson1DateRangeFilter = (output, context) => {
|
|
10982
|
+
return {
|
|
10983
|
+
endDateTime: output.endDateTime !== undefined && output.endDateTime !== null
|
|
10984
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.endDateTime)))
|
|
10985
|
+
: undefined,
|
|
10986
|
+
startDateTime: output.startDateTime !== undefined && output.startDateTime !== null
|
|
10987
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.startDateTime)))
|
|
10988
|
+
: undefined,
|
|
10989
|
+
};
|
|
10990
|
+
};
|
|
9764
10991
|
const deserializeAws_restJson1DialogCodeHookSettings = (output, context) => {
|
|
9765
10992
|
return {
|
|
9766
10993
|
enabled: smithy_client_1.expectBoolean(output.enabled),
|
|
9767
10994
|
};
|
|
9768
10995
|
};
|
|
10996
|
+
const deserializeAws_restJson1EncryptionSetting = (output, context) => {
|
|
10997
|
+
return {
|
|
10998
|
+
associatedTranscriptsPassword: smithy_client_1.expectString(output.associatedTranscriptsPassword),
|
|
10999
|
+
botLocaleExportPassword: smithy_client_1.expectString(output.botLocaleExportPassword),
|
|
11000
|
+
kmsKeyArn: smithy_client_1.expectString(output.kmsKeyArn),
|
|
11001
|
+
};
|
|
11002
|
+
};
|
|
9769
11003
|
const deserializeAws_restJson1ExportResourceSpecification = (output, context) => {
|
|
9770
11004
|
return {
|
|
9771
11005
|
botExportSpecification: output.botExportSpecification !== undefined && output.botExportSpecification !== null
|
|
@@ -9802,6 +11036,13 @@ const deserializeAws_restJson1ExportSummaryList = (output, context) => {
|
|
|
9802
11036
|
return deserializeAws_restJson1ExportSummary(entry, context);
|
|
9803
11037
|
});
|
|
9804
11038
|
};
|
|
11039
|
+
const deserializeAws_restJson1ExternalSourceSetting = (output, context) => {
|
|
11040
|
+
return {
|
|
11041
|
+
grammarSlotTypeSetting: output.grammarSlotTypeSetting !== undefined && output.grammarSlotTypeSetting !== null
|
|
11042
|
+
? deserializeAws_restJson1GrammarSlotTypeSetting(output.grammarSlotTypeSetting, context)
|
|
11043
|
+
: undefined,
|
|
11044
|
+
};
|
|
11045
|
+
};
|
|
9805
11046
|
const deserializeAws_restJson1FailureReasons = (output, context) => {
|
|
9806
11047
|
return (output || [])
|
|
9807
11048
|
.filter((e) => e != null)
|
|
@@ -9853,6 +11094,20 @@ const deserializeAws_restJson1FulfillmentUpdatesSpecification = (output, context
|
|
|
9853
11094
|
: undefined,
|
|
9854
11095
|
};
|
|
9855
11096
|
};
|
|
11097
|
+
const deserializeAws_restJson1GrammarSlotTypeSetting = (output, context) => {
|
|
11098
|
+
return {
|
|
11099
|
+
source: output.source !== undefined && output.source !== null
|
|
11100
|
+
? deserializeAws_restJson1GrammarSlotTypeSource(output.source, context)
|
|
11101
|
+
: undefined,
|
|
11102
|
+
};
|
|
11103
|
+
};
|
|
11104
|
+
const deserializeAws_restJson1GrammarSlotTypeSource = (output, context) => {
|
|
11105
|
+
return {
|
|
11106
|
+
kmsKeyArn: smithy_client_1.expectString(output.kmsKeyArn),
|
|
11107
|
+
s3BucketName: smithy_client_1.expectString(output.s3BucketName),
|
|
11108
|
+
s3ObjectKey: smithy_client_1.expectString(output.s3ObjectKey),
|
|
11109
|
+
};
|
|
11110
|
+
};
|
|
9856
11111
|
const deserializeAws_restJson1ImageResponseCard = (output, context) => {
|
|
9857
11112
|
return {
|
|
9858
11113
|
buttons: output.buttons !== undefined && output.buttons !== null
|
|
@@ -9932,6 +11187,11 @@ const deserializeAws_restJson1IntentConfirmationSetting = (output, context) => {
|
|
|
9932
11187
|
: undefined,
|
|
9933
11188
|
};
|
|
9934
11189
|
};
|
|
11190
|
+
const deserializeAws_restJson1IntentStatistics = (output, context) => {
|
|
11191
|
+
return {
|
|
11192
|
+
discoveredIntentCount: smithy_client_1.expectInt32(output.discoveredIntentCount),
|
|
11193
|
+
};
|
|
11194
|
+
};
|
|
9935
11195
|
const deserializeAws_restJson1IntentSummary = (output, context) => {
|
|
9936
11196
|
return {
|
|
9937
11197
|
description: smithy_client_1.expectString(output.description),
|
|
@@ -9972,6 +11232,13 @@ const deserializeAws_restJson1LambdaCodeHook = (output, context) => {
|
|
|
9972
11232
|
lambdaARN: smithy_client_1.expectString(output.lambdaARN),
|
|
9973
11233
|
};
|
|
9974
11234
|
};
|
|
11235
|
+
const deserializeAws_restJson1LexTranscriptFilter = (output, context) => {
|
|
11236
|
+
return {
|
|
11237
|
+
dateRangeFilter: output.dateRangeFilter !== undefined && output.dateRangeFilter !== null
|
|
11238
|
+
? deserializeAws_restJson1DateRangeFilter(output.dateRangeFilter, context)
|
|
11239
|
+
: undefined,
|
|
11240
|
+
};
|
|
11241
|
+
};
|
|
9975
11242
|
const deserializeAws_restJson1Message = (output, context) => {
|
|
9976
11243
|
return {
|
|
9977
11244
|
customPayload: output.customPayload !== undefined && output.customPayload !== null
|
|
@@ -10028,6 +11295,16 @@ const deserializeAws_restJson1ObfuscationSetting = (output, context) => {
|
|
|
10028
11295
|
obfuscationSettingType: smithy_client_1.expectString(output.obfuscationSettingType),
|
|
10029
11296
|
};
|
|
10030
11297
|
};
|
|
11298
|
+
const deserializeAws_restJson1ObjectPrefixes = (output, context) => {
|
|
11299
|
+
return (output || [])
|
|
11300
|
+
.filter((e) => e != null)
|
|
11301
|
+
.map((entry) => {
|
|
11302
|
+
if (entry === null) {
|
|
11303
|
+
return null;
|
|
11304
|
+
}
|
|
11305
|
+
return smithy_client_1.expectString(entry);
|
|
11306
|
+
});
|
|
11307
|
+
};
|
|
10031
11308
|
const deserializeAws_restJson1OutputContext = (output, context) => {
|
|
10032
11309
|
return {
|
|
10033
11310
|
name: smithy_client_1.expectString(output.name),
|
|
@@ -10045,6 +11322,13 @@ const deserializeAws_restJson1OutputContextsList = (output, context) => {
|
|
|
10045
11322
|
return deserializeAws_restJson1OutputContext(entry, context);
|
|
10046
11323
|
});
|
|
10047
11324
|
};
|
|
11325
|
+
const deserializeAws_restJson1PathFormat = (output, context) => {
|
|
11326
|
+
return {
|
|
11327
|
+
objectPrefixes: output.objectPrefixes !== undefined && output.objectPrefixes !== null
|
|
11328
|
+
? deserializeAws_restJson1ObjectPrefixes(output.objectPrefixes, context)
|
|
11329
|
+
: undefined,
|
|
11330
|
+
};
|
|
11331
|
+
};
|
|
10048
11332
|
const deserializeAws_restJson1PlainTextMessage = (output, context) => {
|
|
10049
11333
|
return {
|
|
10050
11334
|
value: smithy_client_1.expectString(output.value),
|
|
@@ -10072,6 +11356,33 @@ const deserializeAws_restJson1PromptSpecification = (output, context) => {
|
|
|
10072
11356
|
: undefined,
|
|
10073
11357
|
};
|
|
10074
11358
|
};
|
|
11359
|
+
const deserializeAws_restJson1RecommendedActions = (output, context) => {
|
|
11360
|
+
return (output || [])
|
|
11361
|
+
.filter((e) => e != null)
|
|
11362
|
+
.map((entry) => {
|
|
11363
|
+
if (entry === null) {
|
|
11364
|
+
return null;
|
|
11365
|
+
}
|
|
11366
|
+
return smithy_client_1.expectString(entry);
|
|
11367
|
+
});
|
|
11368
|
+
};
|
|
11369
|
+
const deserializeAws_restJson1RecommendedIntentSummary = (output, context) => {
|
|
11370
|
+
return {
|
|
11371
|
+
intentId: smithy_client_1.expectString(output.intentId),
|
|
11372
|
+
intentName: smithy_client_1.expectString(output.intentName),
|
|
11373
|
+
sampleUtterancesCount: smithy_client_1.expectInt32(output.sampleUtterancesCount),
|
|
11374
|
+
};
|
|
11375
|
+
};
|
|
11376
|
+
const deserializeAws_restJson1RecommendedIntentSummaryList = (output, context) => {
|
|
11377
|
+
return (output || [])
|
|
11378
|
+
.filter((e) => e != null)
|
|
11379
|
+
.map((entry) => {
|
|
11380
|
+
if (entry === null) {
|
|
11381
|
+
return null;
|
|
11382
|
+
}
|
|
11383
|
+
return deserializeAws_restJson1RecommendedIntentSummary(entry, context);
|
|
11384
|
+
});
|
|
11385
|
+
};
|
|
10075
11386
|
const deserializeAws_restJson1RelativeAggregationDuration = (output, context) => {
|
|
10076
11387
|
return {
|
|
10077
11388
|
timeDimension: smithy_client_1.expectString(output.timeDimension),
|
|
@@ -10093,6 +11404,19 @@ const deserializeAws_restJson1S3BucketLogDestination = (output, context) => {
|
|
|
10093
11404
|
s3BucketArn: smithy_client_1.expectString(output.s3BucketArn),
|
|
10094
11405
|
};
|
|
10095
11406
|
};
|
|
11407
|
+
const deserializeAws_restJson1S3BucketTranscriptSource = (output, context) => {
|
|
11408
|
+
return {
|
|
11409
|
+
kmsKeyArn: smithy_client_1.expectString(output.kmsKeyArn),
|
|
11410
|
+
pathFormat: output.pathFormat !== undefined && output.pathFormat !== null
|
|
11411
|
+
? deserializeAws_restJson1PathFormat(output.pathFormat, context)
|
|
11412
|
+
: undefined,
|
|
11413
|
+
s3BucketName: smithy_client_1.expectString(output.s3BucketName),
|
|
11414
|
+
transcriptFilter: output.transcriptFilter !== undefined && output.transcriptFilter !== null
|
|
11415
|
+
? deserializeAws_restJson1TranscriptFilter(output.transcriptFilter, context)
|
|
11416
|
+
: undefined,
|
|
11417
|
+
transcriptFormat: smithy_client_1.expectString(output.transcriptFormat),
|
|
11418
|
+
};
|
|
11419
|
+
};
|
|
10096
11420
|
const deserializeAws_restJson1SampleUtterance = (output, context) => {
|
|
10097
11421
|
return {
|
|
10098
11422
|
utterance: smithy_client_1.expectString(output.utterance),
|
|
@@ -10181,6 +11505,11 @@ const deserializeAws_restJson1SlotSummaryList = (output, context) => {
|
|
|
10181
11505
|
return deserializeAws_restJson1SlotSummary(entry, context);
|
|
10182
11506
|
});
|
|
10183
11507
|
};
|
|
11508
|
+
const deserializeAws_restJson1SlotTypeStatistics = (output, context) => {
|
|
11509
|
+
return {
|
|
11510
|
+
discoveredSlotTypeCount: smithy_client_1.expectInt32(output.discoveredSlotTypeCount),
|
|
11511
|
+
};
|
|
11512
|
+
};
|
|
10184
11513
|
const deserializeAws_restJson1SlotTypeSummary = (output, context) => {
|
|
10185
11514
|
return {
|
|
10186
11515
|
description: smithy_client_1.expectString(output.description),
|
|
@@ -10188,6 +11517,7 @@ const deserializeAws_restJson1SlotTypeSummary = (output, context) => {
|
|
|
10188
11517
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastUpdatedDateTime)))
|
|
10189
11518
|
: undefined,
|
|
10190
11519
|
parentSlotTypeSignature: smithy_client_1.expectString(output.parentSlotTypeSignature),
|
|
11520
|
+
slotTypeCategory: smithy_client_1.expectString(output.slotTypeCategory),
|
|
10191
11521
|
slotTypeId: smithy_client_1.expectString(output.slotTypeId),
|
|
10192
11522
|
slotTypeName: smithy_client_1.expectString(output.slotTypeName),
|
|
10193
11523
|
};
|
|
@@ -10313,6 +11643,20 @@ const deserializeAws_restJson1TextLogSettingsList = (output, context) => {
|
|
|
10313
11643
|
return deserializeAws_restJson1TextLogSetting(entry, context);
|
|
10314
11644
|
});
|
|
10315
11645
|
};
|
|
11646
|
+
const deserializeAws_restJson1TranscriptFilter = (output, context) => {
|
|
11647
|
+
return {
|
|
11648
|
+
lexTranscriptFilter: output.lexTranscriptFilter !== undefined && output.lexTranscriptFilter !== null
|
|
11649
|
+
? deserializeAws_restJson1LexTranscriptFilter(output.lexTranscriptFilter, context)
|
|
11650
|
+
: undefined,
|
|
11651
|
+
};
|
|
11652
|
+
};
|
|
11653
|
+
const deserializeAws_restJson1TranscriptSourceSetting = (output, context) => {
|
|
11654
|
+
return {
|
|
11655
|
+
s3BucketTranscriptSource: output.s3BucketTranscriptSource !== undefined && output.s3BucketTranscriptSource !== null
|
|
11656
|
+
? deserializeAws_restJson1S3BucketTranscriptSource(output.s3BucketTranscriptSource, context)
|
|
11657
|
+
: undefined,
|
|
11658
|
+
};
|
|
11659
|
+
};
|
|
10316
11660
|
const deserializeAws_restJson1UtteranceAggregationDuration = (output, context) => {
|
|
10317
11661
|
return {
|
|
10318
11662
|
relativeAggregationDuration: output.relativeAggregationDuration !== undefined && output.relativeAggregationDuration !== null
|
|
@@ -10322,6 +11666,7 @@ const deserializeAws_restJson1UtteranceAggregationDuration = (output, context) =
|
|
|
10322
11666
|
};
|
|
10323
11667
|
const deserializeAws_restJson1VoiceSettings = (output, context) => {
|
|
10324
11668
|
return {
|
|
11669
|
+
engine: smithy_client_1.expectString(output.engine),
|
|
10325
11670
|
voiceId: smithy_client_1.expectString(output.voiceId),
|
|
10326
11671
|
};
|
|
10327
11672
|
};
|