@aws-sdk/client-lex-models-v2 3.40.0 → 3.44.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist-cjs/LexModelsV2.js +90 -0
  3. package/dist-cjs/commands/DescribeBotRecommendationCommand.js +36 -0
  4. package/dist-cjs/commands/ListBotRecommendationsCommand.js +36 -0
  5. package/dist-cjs/commands/ListRecommendedIntentsCommand.js +36 -0
  6. package/dist-cjs/commands/SearchAssociatedTranscriptsCommand.js +36 -0
  7. package/dist-cjs/commands/StartBotRecommendationCommand.js +36 -0
  8. package/dist-cjs/commands/UpdateBotRecommendationCommand.js +36 -0
  9. package/dist-cjs/commands/index.js +6 -0
  10. package/dist-cjs/endpoints.js +8 -0
  11. package/dist-cjs/models/models_0.js +206 -5
  12. package/dist-cjs/pagination/ListBotRecommendationsPaginator.js +35 -0
  13. package/dist-cjs/pagination/ListRecommendedIntentsPaginator.js +35 -0
  14. package/dist-cjs/pagination/index.js +2 -0
  15. package/dist-cjs/protocols/Aws_restJson1.js +1472 -208
  16. package/dist-es/LexModelsV2.js +90 -0
  17. package/dist-es/commands/DescribeBotRecommendationCommand.js +39 -0
  18. package/dist-es/commands/ListBotRecommendationsCommand.js +39 -0
  19. package/dist-es/commands/ListRecommendedIntentsCommand.js +39 -0
  20. package/dist-es/commands/SearchAssociatedTranscriptsCommand.js +39 -0
  21. package/dist-es/commands/StartBotRecommendationCommand.js +39 -0
  22. package/dist-es/commands/UpdateBotRecommendationCommand.js +39 -0
  23. package/dist-es/commands/index.js +6 -0
  24. package/dist-es/endpoints.js +8 -0
  25. package/dist-es/models/models_0.js +139 -0
  26. package/dist-es/pagination/ListBotRecommendationsPaginator.js +74 -0
  27. package/dist-es/pagination/ListRecommendedIntentsPaginator.js +74 -0
  28. package/dist-es/pagination/index.js +2 -0
  29. package/dist-es/protocols/Aws_restJson1.js +1370 -33
  30. package/dist-types/LexModelsV2.d.ts +56 -6
  31. package/dist-types/LexModelsV2Client.d.ts +8 -2
  32. package/dist-types/commands/BuildBotLocaleCommand.d.ts +1 -1
  33. package/dist-types/commands/CreateBotAliasCommand.d.ts +1 -1
  34. package/dist-types/commands/CreateBotCommand.d.ts +1 -1
  35. package/dist-types/commands/CreateBotLocaleCommand.d.ts +1 -1
  36. package/dist-types/commands/CreateBotVersionCommand.d.ts +1 -1
  37. package/dist-types/commands/CreateExportCommand.d.ts +1 -1
  38. package/dist-types/commands/CreateIntentCommand.d.ts +1 -1
  39. package/dist-types/commands/CreateResourcePolicyCommand.d.ts +1 -1
  40. package/dist-types/commands/CreateResourcePolicyStatementCommand.d.ts +1 -1
  41. package/dist-types/commands/CreateSlotCommand.d.ts +1 -1
  42. package/dist-types/commands/CreateSlotTypeCommand.d.ts +1 -1
  43. package/dist-types/commands/CreateUploadUrlCommand.d.ts +1 -1
  44. package/dist-types/commands/DeleteBotAliasCommand.d.ts +1 -1
  45. package/dist-types/commands/DeleteBotCommand.d.ts +1 -1
  46. package/dist-types/commands/DeleteBotLocaleCommand.d.ts +1 -1
  47. package/dist-types/commands/DeleteBotVersionCommand.d.ts +2 -2
  48. package/dist-types/commands/DeleteExportCommand.d.ts +1 -1
  49. package/dist-types/commands/DeleteImportCommand.d.ts +1 -1
  50. package/dist-types/commands/DeleteIntentCommand.d.ts +1 -1
  51. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +1 -1
  52. package/dist-types/commands/DeleteResourcePolicyStatementCommand.d.ts +1 -1
  53. package/dist-types/commands/DeleteSlotCommand.d.ts +1 -1
  54. package/dist-types/commands/DeleteSlotTypeCommand.d.ts +1 -1
  55. package/dist-types/commands/DeleteUtterancesCommand.d.ts +4 -4
  56. package/dist-types/commands/DescribeBotAliasCommand.d.ts +1 -1
  57. package/dist-types/commands/DescribeBotCommand.d.ts +1 -1
  58. package/dist-types/commands/DescribeBotLocaleCommand.d.ts +1 -1
  59. package/dist-types/commands/DescribeBotRecommendationCommand.d.ts +39 -0
  60. package/dist-types/commands/DescribeBotVersionCommand.d.ts +1 -1
  61. package/dist-types/commands/DescribeExportCommand.d.ts +1 -1
  62. package/dist-types/commands/DescribeImportCommand.d.ts +1 -1
  63. package/dist-types/commands/DescribeIntentCommand.d.ts +1 -1
  64. package/dist-types/commands/DescribeResourcePolicyCommand.d.ts +1 -1
  65. package/dist-types/commands/DescribeSlotCommand.d.ts +1 -1
  66. package/dist-types/commands/DescribeSlotTypeCommand.d.ts +1 -1
  67. package/dist-types/commands/ListAggregatedUtterancesCommand.d.ts +1 -1
  68. package/dist-types/commands/ListBotAliasesCommand.d.ts +1 -1
  69. package/dist-types/commands/ListBotLocalesCommand.d.ts +1 -1
  70. package/dist-types/commands/ListBotRecommendationsCommand.d.ts +36 -0
  71. package/dist-types/commands/ListBotVersionsCommand.d.ts +1 -1
  72. package/dist-types/commands/ListBotsCommand.d.ts +1 -1
  73. package/dist-types/commands/ListBuiltInIntentsCommand.d.ts +2 -2
  74. package/dist-types/commands/ListBuiltInSlotTypesCommand.d.ts +1 -1
  75. package/dist-types/commands/ListExportsCommand.d.ts +1 -1
  76. package/dist-types/commands/ListImportsCommand.d.ts +1 -1
  77. package/dist-types/commands/ListIntentsCommand.d.ts +1 -1
  78. package/dist-types/commands/ListRecommendedIntentsCommand.d.ts +36 -0
  79. package/dist-types/commands/ListSlotTypesCommand.d.ts +1 -1
  80. package/dist-types/commands/ListSlotsCommand.d.ts +1 -1
  81. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  82. package/dist-types/commands/SearchAssociatedTranscriptsCommand.d.ts +36 -0
  83. package/dist-types/commands/StartBotRecommendationCommand.d.ts +36 -0
  84. package/dist-types/commands/StartImportCommand.d.ts +1 -1
  85. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  86. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  87. package/dist-types/commands/UpdateBotAliasCommand.d.ts +1 -1
  88. package/dist-types/commands/UpdateBotCommand.d.ts +1 -1
  89. package/dist-types/commands/UpdateBotLocaleCommand.d.ts +1 -1
  90. package/dist-types/commands/UpdateBotRecommendationCommand.d.ts +35 -0
  91. package/dist-types/commands/UpdateExportCommand.d.ts +2 -2
  92. package/dist-types/commands/UpdateIntentCommand.d.ts +1 -1
  93. package/dist-types/commands/UpdateResourcePolicyCommand.d.ts +1 -1
  94. package/dist-types/commands/UpdateSlotCommand.d.ts +1 -1
  95. package/dist-types/commands/UpdateSlotTypeCommand.d.ts +1 -1
  96. package/dist-types/commands/index.d.ts +6 -0
  97. package/dist-types/models/models_0.d.ts +925 -25
  98. package/dist-types/pagination/ListBotRecommendationsPaginator.d.ts +4 -0
  99. package/dist-types/pagination/ListRecommendedIntentsPaginator.d.ts +4 -0
  100. package/dist-types/pagination/index.d.ts +2 -0
  101. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  102. package/dist-types/ts3.4/LexModelsV2.d.ts +30 -0
  103. package/dist-types/ts3.4/LexModelsV2Client.d.ts +8 -2
  104. package/dist-types/ts3.4/commands/DescribeBotRecommendationCommand.d.ts +17 -0
  105. package/dist-types/ts3.4/commands/ListBotRecommendationsCommand.d.ts +17 -0
  106. package/dist-types/ts3.4/commands/ListRecommendedIntentsCommand.d.ts +17 -0
  107. package/dist-types/ts3.4/commands/SearchAssociatedTranscriptsCommand.d.ts +17 -0
  108. package/dist-types/ts3.4/commands/StartBotRecommendationCommand.d.ts +17 -0
  109. package/dist-types/ts3.4/commands/UpdateBotRecommendationCommand.d.ts +17 -0
  110. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  111. package/dist-types/ts3.4/models/models_0.d.ts +425 -0
  112. package/dist-types/ts3.4/pagination/ListBotRecommendationsPaginator.d.ts +4 -0
  113. package/dist-types/ts3.4/pagination/ListRecommendedIntentsPaginator.d.ts +4 -0
  114. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  115. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -0
  116. package/package.json +4 -4
@@ -1227,6 +1227,68 @@ export var serializeAws_restJson1DescribeBotLocaleCommand = function (input, con
1227
1227
  }
1228
1228
  });
1229
1229
  }); };
1230
+ export var serializeAws_restJson1DescribeBotRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1231
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
1232
+ return __generator(this, function (_c) {
1233
+ switch (_c.label) {
1234
+ case 0: return [4, context.endpoint()];
1235
+ case 1:
1236
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1237
+ headers = {};
1238
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1239
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}";
1240
+ if (input.botId !== undefined) {
1241
+ labelValue = input.botId;
1242
+ if (labelValue.length <= 0) {
1243
+ throw new Error("Empty value provided for input HTTP label: botId.");
1244
+ }
1245
+ resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
1246
+ }
1247
+ else {
1248
+ throw new Error("No value provided for input HTTP label: botId.");
1249
+ }
1250
+ if (input.botVersion !== undefined) {
1251
+ labelValue = input.botVersion;
1252
+ if (labelValue.length <= 0) {
1253
+ throw new Error("Empty value provided for input HTTP label: botVersion.");
1254
+ }
1255
+ resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
1256
+ }
1257
+ else {
1258
+ throw new Error("No value provided for input HTTP label: botVersion.");
1259
+ }
1260
+ if (input.localeId !== undefined) {
1261
+ labelValue = input.localeId;
1262
+ if (labelValue.length <= 0) {
1263
+ throw new Error("Empty value provided for input HTTP label: localeId.");
1264
+ }
1265
+ resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
1266
+ }
1267
+ else {
1268
+ throw new Error("No value provided for input HTTP label: localeId.");
1269
+ }
1270
+ if (input.botRecommendationId !== undefined) {
1271
+ labelValue = input.botRecommendationId;
1272
+ if (labelValue.length <= 0) {
1273
+ throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
1274
+ }
1275
+ resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
1276
+ }
1277
+ else {
1278
+ throw new Error("No value provided for input HTTP label: botRecommendationId.");
1279
+ }
1280
+ return [2, new __HttpRequest({
1281
+ protocol: protocol,
1282
+ hostname: hostname,
1283
+ port: port,
1284
+ method: "GET",
1285
+ headers: headers,
1286
+ path: resolvedPath,
1287
+ body: body,
1288
+ })];
1289
+ }
1290
+ });
1291
+ }); };
1230
1292
  export var serializeAws_restJson1DescribeBotVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1231
1293
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1232
1294
  return __generator(this, function (_c) {
@@ -1677,6 +1739,61 @@ export var serializeAws_restJson1ListBotLocalesCommand = function (input, contex
1677
1739
  }
1678
1740
  });
1679
1741
  }); };
1742
+ export var serializeAws_restJson1ListBotRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1743
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
1744
+ return __generator(this, function (_c) {
1745
+ switch (_c.label) {
1746
+ case 0: return [4, context.endpoint()];
1747
+ case 1:
1748
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1749
+ headers = {
1750
+ "content-type": "application/json",
1751
+ };
1752
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1753
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations";
1754
+ if (input.botId !== undefined) {
1755
+ labelValue = input.botId;
1756
+ if (labelValue.length <= 0) {
1757
+ throw new Error("Empty value provided for input HTTP label: botId.");
1758
+ }
1759
+ resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
1760
+ }
1761
+ else {
1762
+ throw new Error("No value provided for input HTTP label: botId.");
1763
+ }
1764
+ if (input.botVersion !== undefined) {
1765
+ labelValue = input.botVersion;
1766
+ if (labelValue.length <= 0) {
1767
+ throw new Error("Empty value provided for input HTTP label: botVersion.");
1768
+ }
1769
+ resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
1770
+ }
1771
+ else {
1772
+ throw new Error("No value provided for input HTTP label: botVersion.");
1773
+ }
1774
+ if (input.localeId !== undefined) {
1775
+ labelValue = input.localeId;
1776
+ if (labelValue.length <= 0) {
1777
+ throw new Error("Empty value provided for input HTTP label: localeId.");
1778
+ }
1779
+ resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
1780
+ }
1781
+ else {
1782
+ throw new Error("No value provided for input HTTP label: localeId.");
1783
+ }
1784
+ body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
1785
+ return [2, new __HttpRequest({
1786
+ protocol: protocol,
1787
+ hostname: hostname,
1788
+ port: port,
1789
+ method: "POST",
1790
+ headers: headers,
1791
+ path: resolvedPath,
1792
+ body: body,
1793
+ })];
1794
+ }
1795
+ });
1796
+ }); };
1680
1797
  export var serializeAws_restJson1ListBotsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1681
1798
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1682
1799
  return __generator(this, function (_c) {
@@ -1917,6 +2034,71 @@ export var serializeAws_restJson1ListIntentsCommand = function (input, context)
1917
2034
  }
1918
2035
  });
1919
2036
  }); };
2037
+ export var serializeAws_restJson1ListRecommendedIntentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2038
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
2039
+ return __generator(this, function (_c) {
2040
+ switch (_c.label) {
2041
+ case 0: return [4, context.endpoint()];
2042
+ case 1:
2043
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2044
+ headers = {
2045
+ "content-type": "application/json",
2046
+ };
2047
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2048
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}/intents";
2049
+ if (input.botId !== undefined) {
2050
+ labelValue = input.botId;
2051
+ if (labelValue.length <= 0) {
2052
+ throw new Error("Empty value provided for input HTTP label: botId.");
2053
+ }
2054
+ resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
2055
+ }
2056
+ else {
2057
+ throw new Error("No value provided for input HTTP label: botId.");
2058
+ }
2059
+ if (input.botVersion !== undefined) {
2060
+ labelValue = input.botVersion;
2061
+ if (labelValue.length <= 0) {
2062
+ throw new Error("Empty value provided for input HTTP label: botVersion.");
2063
+ }
2064
+ resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
2065
+ }
2066
+ else {
2067
+ throw new Error("No value provided for input HTTP label: botVersion.");
2068
+ }
2069
+ if (input.localeId !== undefined) {
2070
+ labelValue = input.localeId;
2071
+ if (labelValue.length <= 0) {
2072
+ throw new Error("Empty value provided for input HTTP label: localeId.");
2073
+ }
2074
+ resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
2075
+ }
2076
+ else {
2077
+ throw new Error("No value provided for input HTTP label: localeId.");
2078
+ }
2079
+ if (input.botRecommendationId !== undefined) {
2080
+ labelValue = input.botRecommendationId;
2081
+ if (labelValue.length <= 0) {
2082
+ throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
2083
+ }
2084
+ resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
2085
+ }
2086
+ else {
2087
+ throw new Error("No value provided for input HTTP label: botRecommendationId.");
2088
+ }
2089
+ body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
2090
+ return [2, new __HttpRequest({
2091
+ protocol: protocol,
2092
+ hostname: hostname,
2093
+ port: port,
2094
+ method: "POST",
2095
+ headers: headers,
2096
+ path: resolvedPath,
2097
+ body: body,
2098
+ })];
2099
+ }
2100
+ });
2101
+ }); };
1920
2102
  export var serializeAws_restJson1ListSlotsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1921
2103
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
1922
2104
  return __generator(this, function (_c) {
@@ -2072,8 +2254,8 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
2072
2254
  }
2073
2255
  });
2074
2256
  }); };
2075
- export var serializeAws_restJson1StartImportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2076
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
2257
+ export var serializeAws_restJson1SearchAssociatedTranscriptsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2258
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
2077
2259
  return __generator(this, function (_c) {
2078
2260
  switch (_c.label) {
2079
2261
  case 0: return [4, context.endpoint()];
@@ -2082,16 +2264,55 @@ export var serializeAws_restJson1StartImportCommand = function (input, context)
2082
2264
  headers = {
2083
2265
  "content-type": "application/json",
2084
2266
  };
2085
- resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/imports";
2086
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword })), (input.importId !== undefined && input.importId !== null && { importId: input.importId })), (input.mergeStrategy !== undefined && input.mergeStrategy !== null && { mergeStrategy: input.mergeStrategy })), (input.resourceSpecification !== undefined &&
2087
- input.resourceSpecification !== null && {
2088
- resourceSpecification: serializeAws_restJson1ImportResourceSpecification(input.resourceSpecification, context),
2089
- })));
2267
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2268
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}/associatedtranscripts";
2269
+ if (input.botId !== undefined) {
2270
+ labelValue = input.botId;
2271
+ if (labelValue.length <= 0) {
2272
+ throw new Error("Empty value provided for input HTTP label: botId.");
2273
+ }
2274
+ resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
2275
+ }
2276
+ else {
2277
+ throw new Error("No value provided for input HTTP label: botId.");
2278
+ }
2279
+ if (input.botVersion !== undefined) {
2280
+ labelValue = input.botVersion;
2281
+ if (labelValue.length <= 0) {
2282
+ throw new Error("Empty value provided for input HTTP label: botVersion.");
2283
+ }
2284
+ resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
2285
+ }
2286
+ else {
2287
+ throw new Error("No value provided for input HTTP label: botVersion.");
2288
+ }
2289
+ if (input.localeId !== undefined) {
2290
+ labelValue = input.localeId;
2291
+ if (labelValue.length <= 0) {
2292
+ throw new Error("Empty value provided for input HTTP label: localeId.");
2293
+ }
2294
+ resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
2295
+ }
2296
+ else {
2297
+ throw new Error("No value provided for input HTTP label: localeId.");
2298
+ }
2299
+ if (input.botRecommendationId !== undefined) {
2300
+ labelValue = input.botRecommendationId;
2301
+ if (labelValue.length <= 0) {
2302
+ throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
2303
+ }
2304
+ resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
2305
+ }
2306
+ else {
2307
+ throw new Error("No value provided for input HTTP label: botRecommendationId.");
2308
+ }
2309
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
2310
+ input.filters !== null && { filters: serializeAws_restJson1AssociatedTranscriptFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextIndex !== undefined && input.nextIndex !== null && { nextIndex: input.nextIndex })), (input.searchOrder !== undefined && input.searchOrder !== null && { searchOrder: input.searchOrder })));
2090
2311
  return [2, new __HttpRequest({
2091
2312
  protocol: protocol,
2092
2313
  hostname: hostname,
2093
2314
  port: port,
2094
- method: "PUT",
2315
+ method: "POST",
2095
2316
  headers: headers,
2096
2317
  path: resolvedPath,
2097
2318
  body: body,
@@ -2099,8 +2320,8 @@ export var serializeAws_restJson1StartImportCommand = function (input, context)
2099
2320
  }
2100
2321
  });
2101
2322
  }); };
2102
- export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2103
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
2323
+ export var serializeAws_restJson1StartBotRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2324
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
2104
2325
  return __generator(this, function (_c) {
2105
2326
  switch (_c.label) {
2106
2327
  case 0: return [4, context.endpoint()];
@@ -2109,23 +2330,50 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
2109
2330
  headers = {
2110
2331
  "content-type": "application/json",
2111
2332
  };
2112
- resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceARN}";
2113
- if (input.resourceARN !== undefined) {
2114
- labelValue = input.resourceARN;
2333
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2334
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations";
2335
+ if (input.botId !== undefined) {
2336
+ labelValue = input.botId;
2115
2337
  if (labelValue.length <= 0) {
2116
- throw new Error("Empty value provided for input HTTP label: resourceARN.");
2338
+ throw new Error("Empty value provided for input HTTP label: botId.");
2117
2339
  }
2118
- resolvedPath = resolvedPath.replace("{resourceARN}", __extendedEncodeURIComponent(labelValue));
2340
+ resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
2119
2341
  }
2120
2342
  else {
2121
- throw new Error("No value provided for input HTTP label: resourceARN.");
2343
+ throw new Error("No value provided for input HTTP label: botId.");
2122
2344
  }
2123
- body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
2345
+ if (input.botVersion !== undefined) {
2346
+ labelValue = input.botVersion;
2347
+ if (labelValue.length <= 0) {
2348
+ throw new Error("Empty value provided for input HTTP label: botVersion.");
2349
+ }
2350
+ resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
2351
+ }
2352
+ else {
2353
+ throw new Error("No value provided for input HTTP label: botVersion.");
2354
+ }
2355
+ if (input.localeId !== undefined) {
2356
+ labelValue = input.localeId;
2357
+ if (labelValue.length <= 0) {
2358
+ throw new Error("Empty value provided for input HTTP label: localeId.");
2359
+ }
2360
+ resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
2361
+ }
2362
+ else {
2363
+ throw new Error("No value provided for input HTTP label: localeId.");
2364
+ }
2365
+ body = JSON.stringify(__assign(__assign({}, (input.encryptionSetting !== undefined &&
2366
+ input.encryptionSetting !== null && {
2367
+ encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
2368
+ })), (input.transcriptSourceSetting !== undefined &&
2369
+ input.transcriptSourceSetting !== null && {
2370
+ transcriptSourceSetting: serializeAws_restJson1TranscriptSourceSetting(input.transcriptSourceSetting, context),
2371
+ })));
2124
2372
  return [2, new __HttpRequest({
2125
2373
  protocol: protocol,
2126
2374
  hostname: hostname,
2127
2375
  port: port,
2128
- method: "POST",
2376
+ method: "PUT",
2129
2377
  headers: headers,
2130
2378
  path: resolvedPath,
2131
2379
  body: body,
@@ -2133,8 +2381,69 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
2133
2381
  }
2134
2382
  });
2135
2383
  }); };
2136
- export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2137
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
2384
+ export var serializeAws_restJson1StartImportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2385
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
2386
+ return __generator(this, function (_c) {
2387
+ switch (_c.label) {
2388
+ case 0: return [4, context.endpoint()];
2389
+ case 1:
2390
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2391
+ headers = {
2392
+ "content-type": "application/json",
2393
+ };
2394
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/imports";
2395
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword })), (input.importId !== undefined && input.importId !== null && { importId: input.importId })), (input.mergeStrategy !== undefined && input.mergeStrategy !== null && { mergeStrategy: input.mergeStrategy })), (input.resourceSpecification !== undefined &&
2396
+ input.resourceSpecification !== null && {
2397
+ resourceSpecification: serializeAws_restJson1ImportResourceSpecification(input.resourceSpecification, context),
2398
+ })));
2399
+ return [2, new __HttpRequest({
2400
+ protocol: protocol,
2401
+ hostname: hostname,
2402
+ port: port,
2403
+ method: "PUT",
2404
+ headers: headers,
2405
+ path: resolvedPath,
2406
+ body: body,
2407
+ })];
2408
+ }
2409
+ });
2410
+ }); };
2411
+ export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2412
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
2413
+ return __generator(this, function (_c) {
2414
+ switch (_c.label) {
2415
+ case 0: return [4, context.endpoint()];
2416
+ case 1:
2417
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2418
+ headers = {
2419
+ "content-type": "application/json",
2420
+ };
2421
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceARN}";
2422
+ if (input.resourceARN !== undefined) {
2423
+ labelValue = input.resourceARN;
2424
+ if (labelValue.length <= 0) {
2425
+ throw new Error("Empty value provided for input HTTP label: resourceARN.");
2426
+ }
2427
+ resolvedPath = resolvedPath.replace("{resourceARN}", __extendedEncodeURIComponent(labelValue));
2428
+ }
2429
+ else {
2430
+ throw new Error("No value provided for input HTTP label: resourceARN.");
2431
+ }
2432
+ body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
2433
+ return [2, new __HttpRequest({
2434
+ protocol: protocol,
2435
+ hostname: hostname,
2436
+ port: port,
2437
+ method: "POST",
2438
+ headers: headers,
2439
+ path: resolvedPath,
2440
+ body: body,
2441
+ })];
2442
+ }
2443
+ });
2444
+ }); };
2445
+ export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2446
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
2138
2447
  return __generator(this, function (_c) {
2139
2448
  switch (_c.label) {
2140
2449
  case 0: return [4, context.endpoint()];
@@ -2316,6 +2625,74 @@ export var serializeAws_restJson1UpdateBotLocaleCommand = function (input, conte
2316
2625
  }
2317
2626
  });
2318
2627
  }); };
2628
+ export var serializeAws_restJson1UpdateBotRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2629
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, labelValue, body;
2630
+ return __generator(this, function (_c) {
2631
+ switch (_c.label) {
2632
+ case 0: return [4, context.endpoint()];
2633
+ case 1:
2634
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2635
+ headers = {
2636
+ "content-type": "application/json",
2637
+ };
2638
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2639
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/botrecommendations/{botRecommendationId}";
2640
+ if (input.botId !== undefined) {
2641
+ labelValue = input.botId;
2642
+ if (labelValue.length <= 0) {
2643
+ throw new Error("Empty value provided for input HTTP label: botId.");
2644
+ }
2645
+ resolvedPath = resolvedPath.replace("{botId}", __extendedEncodeURIComponent(labelValue));
2646
+ }
2647
+ else {
2648
+ throw new Error("No value provided for input HTTP label: botId.");
2649
+ }
2650
+ if (input.botVersion !== undefined) {
2651
+ labelValue = input.botVersion;
2652
+ if (labelValue.length <= 0) {
2653
+ throw new Error("Empty value provided for input HTTP label: botVersion.");
2654
+ }
2655
+ resolvedPath = resolvedPath.replace("{botVersion}", __extendedEncodeURIComponent(labelValue));
2656
+ }
2657
+ else {
2658
+ throw new Error("No value provided for input HTTP label: botVersion.");
2659
+ }
2660
+ if (input.localeId !== undefined) {
2661
+ labelValue = input.localeId;
2662
+ if (labelValue.length <= 0) {
2663
+ throw new Error("Empty value provided for input HTTP label: localeId.");
2664
+ }
2665
+ resolvedPath = resolvedPath.replace("{localeId}", __extendedEncodeURIComponent(labelValue));
2666
+ }
2667
+ else {
2668
+ throw new Error("No value provided for input HTTP label: localeId.");
2669
+ }
2670
+ if (input.botRecommendationId !== undefined) {
2671
+ labelValue = input.botRecommendationId;
2672
+ if (labelValue.length <= 0) {
2673
+ throw new Error("Empty value provided for input HTTP label: botRecommendationId.");
2674
+ }
2675
+ resolvedPath = resolvedPath.replace("{botRecommendationId}", __extendedEncodeURIComponent(labelValue));
2676
+ }
2677
+ else {
2678
+ throw new Error("No value provided for input HTTP label: botRecommendationId.");
2679
+ }
2680
+ body = JSON.stringify(__assign({}, (input.encryptionSetting !== undefined &&
2681
+ input.encryptionSetting !== null && {
2682
+ encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
2683
+ })));
2684
+ return [2, new __HttpRequest({
2685
+ protocol: protocol,
2686
+ hostname: hostname,
2687
+ port: port,
2688
+ method: "PUT",
2689
+ headers: headers,
2690
+ path: resolvedPath,
2691
+ body: body,
2692
+ })];
2693
+ }
2694
+ });
2695
+ }); };
2319
2696
  export var serializeAws_restJson1UpdateExportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2320
2697
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
2321
2698
  return __generator(this, function (_c) {
@@ -5761,6 +6138,132 @@ var deserializeAws_restJson1DescribeBotLocaleCommandError = function (output, co
5761
6138
  }
5762
6139
  });
5763
6140
  }); };
6141
+ export var deserializeAws_restJson1DescribeBotRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6142
+ var contents, data, _a, _b;
6143
+ return __generator(this, function (_c) {
6144
+ switch (_c.label) {
6145
+ case 0:
6146
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6147
+ return [2, deserializeAws_restJson1DescribeBotRecommendationCommandError(output, context)];
6148
+ }
6149
+ contents = {
6150
+ $metadata: deserializeMetadata(output),
6151
+ botId: undefined,
6152
+ botRecommendationId: undefined,
6153
+ botRecommendationResults: undefined,
6154
+ botRecommendationStatus: undefined,
6155
+ botVersion: undefined,
6156
+ creationDateTime: undefined,
6157
+ encryptionSetting: undefined,
6158
+ failureReasons: undefined,
6159
+ lastUpdatedDateTime: undefined,
6160
+ localeId: undefined,
6161
+ transcriptSourceSetting: undefined,
6162
+ };
6163
+ _a = __expectNonNull;
6164
+ _b = __expectObject;
6165
+ return [4, parseBody(output.body, context)];
6166
+ case 1:
6167
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6168
+ if (data.botId !== undefined && data.botId !== null) {
6169
+ contents.botId = __expectString(data.botId);
6170
+ }
6171
+ if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
6172
+ contents.botRecommendationId = __expectString(data.botRecommendationId);
6173
+ }
6174
+ if (data.botRecommendationResults !== undefined && data.botRecommendationResults !== null) {
6175
+ contents.botRecommendationResults = deserializeAws_restJson1BotRecommendationResults(data.botRecommendationResults, context);
6176
+ }
6177
+ if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
6178
+ contents.botRecommendationStatus = __expectString(data.botRecommendationStatus);
6179
+ }
6180
+ if (data.botVersion !== undefined && data.botVersion !== null) {
6181
+ contents.botVersion = __expectString(data.botVersion);
6182
+ }
6183
+ if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
6184
+ contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
6185
+ }
6186
+ if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
6187
+ contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
6188
+ }
6189
+ if (data.failureReasons !== undefined && data.failureReasons !== null) {
6190
+ contents.failureReasons = deserializeAws_restJson1FailureReasons(data.failureReasons, context);
6191
+ }
6192
+ if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
6193
+ contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
6194
+ }
6195
+ if (data.localeId !== undefined && data.localeId !== null) {
6196
+ contents.localeId = __expectString(data.localeId);
6197
+ }
6198
+ if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
6199
+ contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
6200
+ }
6201
+ return [2, Promise.resolve(contents)];
6202
+ }
6203
+ });
6204
+ }); };
6205
+ var deserializeAws_restJson1DescribeBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6206
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
6207
+ var _g;
6208
+ return __generator(this, function (_h) {
6209
+ switch (_h.label) {
6210
+ case 0:
6211
+ _a = [__assign({}, output)];
6212
+ _g = {};
6213
+ return [4, parseBody(output.body, context)];
6214
+ case 1:
6215
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
6216
+ errorCode = "UnknownError";
6217
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6218
+ _b = errorCode;
6219
+ switch (_b) {
6220
+ case "InternalServerException": return [3, 2];
6221
+ case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
6222
+ case "ResourceNotFoundException": return [3, 4];
6223
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
6224
+ case "ThrottlingException": return [3, 6];
6225
+ case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 6];
6226
+ case "ValidationException": return [3, 8];
6227
+ case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 8];
6228
+ }
6229
+ return [3, 10];
6230
+ case 2:
6231
+ _c = [{}];
6232
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
6233
+ case 3:
6234
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6235
+ return [3, 11];
6236
+ case 4:
6237
+ _d = [{}];
6238
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6239
+ case 5:
6240
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6241
+ return [3, 11];
6242
+ case 6:
6243
+ _e = [{}];
6244
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6245
+ case 7:
6246
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6247
+ return [3, 11];
6248
+ case 8:
6249
+ _f = [{}];
6250
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
6251
+ case 9:
6252
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6253
+ return [3, 11];
6254
+ case 10:
6255
+ parsedBody = parsedOutput.body;
6256
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
6257
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
6258
+ _h.label = 11;
6259
+ case 11:
6260
+ message = response.message || response.Message || errorCode;
6261
+ response.message = message;
6262
+ delete response.Message;
6263
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
6264
+ }
6265
+ });
6266
+ }); };
5764
6267
  export var deserializeAws_restJson1DescribeBotVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5765
6268
  var contents, data, _a, _b;
5766
6269
  return __generator(this, function (_c) {
@@ -6961,17 +7464,20 @@ var deserializeAws_restJson1ListBotLocalesCommandError = function (output, conte
6961
7464
  }
6962
7465
  });
6963
7466
  }); };
6964
- export var deserializeAws_restJson1ListBotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7467
+ export var deserializeAws_restJson1ListBotRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6965
7468
  var contents, data, _a, _b;
6966
7469
  return __generator(this, function (_c) {
6967
7470
  switch (_c.label) {
6968
7471
  case 0:
6969
7472
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6970
- return [2, deserializeAws_restJson1ListBotsCommandError(output, context)];
7473
+ return [2, deserializeAws_restJson1ListBotRecommendationsCommandError(output, context)];
6971
7474
  }
6972
7475
  contents = {
6973
7476
  $metadata: deserializeMetadata(output),
6974
- botSummaries: undefined,
7477
+ botId: undefined,
7478
+ botRecommendationSummaries: undefined,
7479
+ botVersion: undefined,
7480
+ localeId: undefined,
6975
7481
  nextToken: undefined,
6976
7482
  };
6977
7483
  _a = __expectNonNull;
@@ -6979,8 +7485,17 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
6979
7485
  return [4, parseBody(output.body, context)];
6980
7486
  case 1:
6981
7487
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6982
- if (data.botSummaries !== undefined && data.botSummaries !== null) {
6983
- contents.botSummaries = deserializeAws_restJson1BotSummaryList(data.botSummaries, context);
7488
+ if (data.botId !== undefined && data.botId !== null) {
7489
+ contents.botId = __expectString(data.botId);
7490
+ }
7491
+ if (data.botRecommendationSummaries !== undefined && data.botRecommendationSummaries !== null) {
7492
+ contents.botRecommendationSummaries = deserializeAws_restJson1BotRecommendationSummaryList(data.botRecommendationSummaries, context);
7493
+ }
7494
+ if (data.botVersion !== undefined && data.botVersion !== null) {
7495
+ contents.botVersion = __expectString(data.botVersion);
7496
+ }
7497
+ if (data.localeId !== undefined && data.localeId !== null) {
7498
+ contents.localeId = __expectString(data.localeId);
6984
7499
  }
6985
7500
  if (data.nextToken !== undefined && data.nextToken !== null) {
6986
7501
  contents.nextToken = __expectString(data.nextToken);
@@ -6989,7 +7504,7 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
6989
7504
  }
6990
7505
  });
6991
7506
  }); };
6992
- var deserializeAws_restJson1ListBotsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7507
+ var deserializeAws_restJson1ListBotRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6993
7508
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
6994
7509
  var _g;
6995
7510
  return __generator(this, function (_h) {
@@ -7006,8 +7521,8 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
7006
7521
  switch (_b) {
7007
7522
  case "InternalServerException": return [3, 2];
7008
7523
  case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
7009
- case "ServiceQuotaExceededException": return [3, 4];
7010
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 4];
7524
+ case "ResourceNotFoundException": return [3, 4];
7525
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
7011
7526
  case "ThrottlingException": return [3, 6];
7012
7527
  case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 6];
7013
7528
  case "ValidationException": return [3, 8];
@@ -7022,7 +7537,7 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
7022
7537
  return [3, 11];
7023
7538
  case 4:
7024
7539
  _d = [{}];
7025
- return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
7540
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7026
7541
  case 5:
7027
7542
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7028
7543
  return [3, 11];
@@ -7051,17 +7566,107 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
7051
7566
  }
7052
7567
  });
7053
7568
  }); };
7054
- export var deserializeAws_restJson1ListBotVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7569
+ export var deserializeAws_restJson1ListBotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7055
7570
  var contents, data, _a, _b;
7056
7571
  return __generator(this, function (_c) {
7057
7572
  switch (_c.label) {
7058
7573
  case 0:
7059
7574
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7060
- return [2, deserializeAws_restJson1ListBotVersionsCommandError(output, context)];
7575
+ return [2, deserializeAws_restJson1ListBotsCommandError(output, context)];
7061
7576
  }
7062
7577
  contents = {
7063
7578
  $metadata: deserializeMetadata(output),
7064
- botId: undefined,
7579
+ botSummaries: undefined,
7580
+ nextToken: undefined,
7581
+ };
7582
+ _a = __expectNonNull;
7583
+ _b = __expectObject;
7584
+ return [4, parseBody(output.body, context)];
7585
+ case 1:
7586
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
7587
+ if (data.botSummaries !== undefined && data.botSummaries !== null) {
7588
+ contents.botSummaries = deserializeAws_restJson1BotSummaryList(data.botSummaries, context);
7589
+ }
7590
+ if (data.nextToken !== undefined && data.nextToken !== null) {
7591
+ contents.nextToken = __expectString(data.nextToken);
7592
+ }
7593
+ return [2, Promise.resolve(contents)];
7594
+ }
7595
+ });
7596
+ }); };
7597
+ var deserializeAws_restJson1ListBotsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7598
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
7599
+ var _g;
7600
+ return __generator(this, function (_h) {
7601
+ switch (_h.label) {
7602
+ case 0:
7603
+ _a = [__assign({}, output)];
7604
+ _g = {};
7605
+ return [4, parseBody(output.body, context)];
7606
+ case 1:
7607
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
7608
+ errorCode = "UnknownError";
7609
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7610
+ _b = errorCode;
7611
+ switch (_b) {
7612
+ case "InternalServerException": return [3, 2];
7613
+ case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
7614
+ case "ServiceQuotaExceededException": return [3, 4];
7615
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 4];
7616
+ case "ThrottlingException": return [3, 6];
7617
+ case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 6];
7618
+ case "ValidationException": return [3, 8];
7619
+ case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 8];
7620
+ }
7621
+ return [3, 10];
7622
+ case 2:
7623
+ _c = [{}];
7624
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
7625
+ case 3:
7626
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7627
+ return [3, 11];
7628
+ case 4:
7629
+ _d = [{}];
7630
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
7631
+ case 5:
7632
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7633
+ return [3, 11];
7634
+ case 6:
7635
+ _e = [{}];
7636
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7637
+ case 7:
7638
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7639
+ return [3, 11];
7640
+ case 8:
7641
+ _f = [{}];
7642
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
7643
+ case 9:
7644
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7645
+ return [3, 11];
7646
+ case 10:
7647
+ parsedBody = parsedOutput.body;
7648
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
7649
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
7650
+ _h.label = 11;
7651
+ case 11:
7652
+ message = response.message || response.Message || errorCode;
7653
+ response.message = message;
7654
+ delete response.Message;
7655
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
7656
+ }
7657
+ });
7658
+ }); };
7659
+ export var deserializeAws_restJson1ListBotVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7660
+ var contents, data, _a, _b;
7661
+ return __generator(this, function (_c) {
7662
+ switch (_c.label) {
7663
+ case 0:
7664
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7665
+ return [2, deserializeAws_restJson1ListBotVersionsCommandError(output, context)];
7666
+ }
7667
+ contents = {
7668
+ $metadata: deserializeMetadata(output),
7669
+ botId: undefined,
7065
7670
  botVersionSummaries: undefined,
7066
7671
  nextToken: undefined,
7067
7672
  };
@@ -7615,6 +8220,120 @@ var deserializeAws_restJson1ListIntentsCommandError = function (output, context)
7615
8220
  }
7616
8221
  });
7617
8222
  }); };
8223
+ export var deserializeAws_restJson1ListRecommendedIntentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8224
+ var contents, data, _a, _b;
8225
+ return __generator(this, function (_c) {
8226
+ switch (_c.label) {
8227
+ case 0:
8228
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8229
+ return [2, deserializeAws_restJson1ListRecommendedIntentsCommandError(output, context)];
8230
+ }
8231
+ contents = {
8232
+ $metadata: deserializeMetadata(output),
8233
+ botId: undefined,
8234
+ botRecommendationId: undefined,
8235
+ botVersion: undefined,
8236
+ localeId: undefined,
8237
+ nextToken: undefined,
8238
+ summaryList: undefined,
8239
+ };
8240
+ _a = __expectNonNull;
8241
+ _b = __expectObject;
8242
+ return [4, parseBody(output.body, context)];
8243
+ case 1:
8244
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
8245
+ if (data.botId !== undefined && data.botId !== null) {
8246
+ contents.botId = __expectString(data.botId);
8247
+ }
8248
+ if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
8249
+ contents.botRecommendationId = __expectString(data.botRecommendationId);
8250
+ }
8251
+ if (data.botVersion !== undefined && data.botVersion !== null) {
8252
+ contents.botVersion = __expectString(data.botVersion);
8253
+ }
8254
+ if (data.localeId !== undefined && data.localeId !== null) {
8255
+ contents.localeId = __expectString(data.localeId);
8256
+ }
8257
+ if (data.nextToken !== undefined && data.nextToken !== null) {
8258
+ contents.nextToken = __expectString(data.nextToken);
8259
+ }
8260
+ if (data.summaryList !== undefined && data.summaryList !== null) {
8261
+ contents.summaryList = deserializeAws_restJson1RecommendedIntentSummaryList(data.summaryList, context);
8262
+ }
8263
+ return [2, Promise.resolve(contents)];
8264
+ }
8265
+ });
8266
+ }); };
8267
+ var deserializeAws_restJson1ListRecommendedIntentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8268
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
8269
+ var _h;
8270
+ return __generator(this, function (_j) {
8271
+ switch (_j.label) {
8272
+ case 0:
8273
+ _a = [__assign({}, output)];
8274
+ _h = {};
8275
+ return [4, parseBody(output.body, context)];
8276
+ case 1:
8277
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
8278
+ errorCode = "UnknownError";
8279
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8280
+ _b = errorCode;
8281
+ switch (_b) {
8282
+ case "InternalServerException": return [3, 2];
8283
+ case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
8284
+ case "ResourceNotFoundException": return [3, 4];
8285
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
8286
+ case "ServiceQuotaExceededException": return [3, 6];
8287
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 6];
8288
+ case "ThrottlingException": return [3, 8];
8289
+ case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 8];
8290
+ case "ValidationException": return [3, 10];
8291
+ case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 10];
8292
+ }
8293
+ return [3, 12];
8294
+ case 2:
8295
+ _c = [{}];
8296
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
8297
+ case 3:
8298
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8299
+ return [3, 13];
8300
+ case 4:
8301
+ _d = [{}];
8302
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
8303
+ case 5:
8304
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8305
+ return [3, 13];
8306
+ case 6:
8307
+ _e = [{}];
8308
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
8309
+ case 7:
8310
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8311
+ return [3, 13];
8312
+ case 8:
8313
+ _f = [{}];
8314
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8315
+ case 9:
8316
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8317
+ return [3, 13];
8318
+ case 10:
8319
+ _g = [{}];
8320
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
8321
+ case 11:
8322
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8323
+ return [3, 13];
8324
+ case 12:
8325
+ parsedBody = parsedOutput.body;
8326
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
8327
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
8328
+ _j.label = 13;
8329
+ case 13:
8330
+ message = response.message || response.Message || errorCode;
8331
+ response.message = message;
8332
+ delete response.Message;
8333
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
8334
+ }
8335
+ });
8336
+ }); };
7618
8337
  export var deserializeAws_restJson1ListSlotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7619
8338
  var contents, data, _a, _b;
7620
8339
  return __generator(this, function (_c) {
@@ -7909,6 +8628,262 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
7909
8628
  }
7910
8629
  });
7911
8630
  }); };
8631
+ export var deserializeAws_restJson1SearchAssociatedTranscriptsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8632
+ var contents, data, _a, _b;
8633
+ return __generator(this, function (_c) {
8634
+ switch (_c.label) {
8635
+ case 0:
8636
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8637
+ return [2, deserializeAws_restJson1SearchAssociatedTranscriptsCommandError(output, context)];
8638
+ }
8639
+ contents = {
8640
+ $metadata: deserializeMetadata(output),
8641
+ associatedTranscripts: undefined,
8642
+ botId: undefined,
8643
+ botRecommendationId: undefined,
8644
+ botVersion: undefined,
8645
+ localeId: undefined,
8646
+ nextIndex: undefined,
8647
+ totalResults: undefined,
8648
+ };
8649
+ _a = __expectNonNull;
8650
+ _b = __expectObject;
8651
+ return [4, parseBody(output.body, context)];
8652
+ case 1:
8653
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
8654
+ if (data.associatedTranscripts !== undefined && data.associatedTranscripts !== null) {
8655
+ contents.associatedTranscripts = deserializeAws_restJson1AssociatedTranscriptList(data.associatedTranscripts, context);
8656
+ }
8657
+ if (data.botId !== undefined && data.botId !== null) {
8658
+ contents.botId = __expectString(data.botId);
8659
+ }
8660
+ if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
8661
+ contents.botRecommendationId = __expectString(data.botRecommendationId);
8662
+ }
8663
+ if (data.botVersion !== undefined && data.botVersion !== null) {
8664
+ contents.botVersion = __expectString(data.botVersion);
8665
+ }
8666
+ if (data.localeId !== undefined && data.localeId !== null) {
8667
+ contents.localeId = __expectString(data.localeId);
8668
+ }
8669
+ if (data.nextIndex !== undefined && data.nextIndex !== null) {
8670
+ contents.nextIndex = __expectInt32(data.nextIndex);
8671
+ }
8672
+ if (data.totalResults !== undefined && data.totalResults !== null) {
8673
+ contents.totalResults = __expectInt32(data.totalResults);
8674
+ }
8675
+ return [2, Promise.resolve(contents)];
8676
+ }
8677
+ });
8678
+ }); };
8679
+ var deserializeAws_restJson1SearchAssociatedTranscriptsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8680
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
8681
+ var _h;
8682
+ return __generator(this, function (_j) {
8683
+ switch (_j.label) {
8684
+ case 0:
8685
+ _a = [__assign({}, output)];
8686
+ _h = {};
8687
+ return [4, parseBody(output.body, context)];
8688
+ case 1:
8689
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
8690
+ errorCode = "UnknownError";
8691
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8692
+ _b = errorCode;
8693
+ switch (_b) {
8694
+ case "InternalServerException": return [3, 2];
8695
+ case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 2];
8696
+ case "ResourceNotFoundException": return [3, 4];
8697
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 4];
8698
+ case "ServiceQuotaExceededException": return [3, 6];
8699
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 6];
8700
+ case "ThrottlingException": return [3, 8];
8701
+ case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 8];
8702
+ case "ValidationException": return [3, 10];
8703
+ case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 10];
8704
+ }
8705
+ return [3, 12];
8706
+ case 2:
8707
+ _c = [{}];
8708
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
8709
+ case 3:
8710
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8711
+ return [3, 13];
8712
+ case 4:
8713
+ _d = [{}];
8714
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
8715
+ case 5:
8716
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8717
+ return [3, 13];
8718
+ case 6:
8719
+ _e = [{}];
8720
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
8721
+ case 7:
8722
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8723
+ return [3, 13];
8724
+ case 8:
8725
+ _f = [{}];
8726
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8727
+ case 9:
8728
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8729
+ return [3, 13];
8730
+ case 10:
8731
+ _g = [{}];
8732
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
8733
+ case 11:
8734
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8735
+ return [3, 13];
8736
+ case 12:
8737
+ parsedBody = parsedOutput.body;
8738
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
8739
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
8740
+ _j.label = 13;
8741
+ case 13:
8742
+ message = response.message || response.Message || errorCode;
8743
+ response.message = message;
8744
+ delete response.Message;
8745
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
8746
+ }
8747
+ });
8748
+ }); };
8749
+ export var deserializeAws_restJson1StartBotRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8750
+ var contents, data, _a, _b;
8751
+ return __generator(this, function (_c) {
8752
+ switch (_c.label) {
8753
+ case 0:
8754
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
8755
+ return [2, deserializeAws_restJson1StartBotRecommendationCommandError(output, context)];
8756
+ }
8757
+ contents = {
8758
+ $metadata: deserializeMetadata(output),
8759
+ botId: undefined,
8760
+ botRecommendationId: undefined,
8761
+ botRecommendationStatus: undefined,
8762
+ botVersion: undefined,
8763
+ creationDateTime: undefined,
8764
+ encryptionSetting: undefined,
8765
+ localeId: undefined,
8766
+ transcriptSourceSetting: undefined,
8767
+ };
8768
+ _a = __expectNonNull;
8769
+ _b = __expectObject;
8770
+ return [4, parseBody(output.body, context)];
8771
+ case 1:
8772
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
8773
+ if (data.botId !== undefined && data.botId !== null) {
8774
+ contents.botId = __expectString(data.botId);
8775
+ }
8776
+ if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
8777
+ contents.botRecommendationId = __expectString(data.botRecommendationId);
8778
+ }
8779
+ if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
8780
+ contents.botRecommendationStatus = __expectString(data.botRecommendationStatus);
8781
+ }
8782
+ if (data.botVersion !== undefined && data.botVersion !== null) {
8783
+ contents.botVersion = __expectString(data.botVersion);
8784
+ }
8785
+ if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
8786
+ contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
8787
+ }
8788
+ if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
8789
+ contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
8790
+ }
8791
+ if (data.localeId !== undefined && data.localeId !== null) {
8792
+ contents.localeId = __expectString(data.localeId);
8793
+ }
8794
+ if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
8795
+ contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
8796
+ }
8797
+ return [2, Promise.resolve(contents)];
8798
+ }
8799
+ });
8800
+ }); };
8801
+ var deserializeAws_restJson1StartBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8802
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
8803
+ var _k;
8804
+ return __generator(this, function (_l) {
8805
+ switch (_l.label) {
8806
+ case 0:
8807
+ _a = [__assign({}, output)];
8808
+ _k = {};
8809
+ return [4, parseBody(output.body, context)];
8810
+ case 1:
8811
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
8812
+ errorCode = "UnknownError";
8813
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8814
+ _b = errorCode;
8815
+ switch (_b) {
8816
+ case "ConflictException": return [3, 2];
8817
+ case "com.amazonaws.lexmodelsv2#ConflictException": return [3, 2];
8818
+ case "InternalServerException": return [3, 4];
8819
+ case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 4];
8820
+ case "PreconditionFailedException": return [3, 6];
8821
+ case "com.amazonaws.lexmodelsv2#PreconditionFailedException": return [3, 6];
8822
+ case "ResourceNotFoundException": return [3, 8];
8823
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 8];
8824
+ case "ServiceQuotaExceededException": return [3, 10];
8825
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 10];
8826
+ case "ThrottlingException": return [3, 12];
8827
+ case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 12];
8828
+ case "ValidationException": return [3, 14];
8829
+ case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 14];
8830
+ }
8831
+ return [3, 16];
8832
+ case 2:
8833
+ _c = [{}];
8834
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
8835
+ case 3:
8836
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8837
+ return [3, 17];
8838
+ case 4:
8839
+ _d = [{}];
8840
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
8841
+ case 5:
8842
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8843
+ return [3, 17];
8844
+ case 6:
8845
+ _e = [{}];
8846
+ return [4, deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)];
8847
+ case 7:
8848
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8849
+ return [3, 17];
8850
+ case 8:
8851
+ _f = [{}];
8852
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
8853
+ case 9:
8854
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8855
+ return [3, 17];
8856
+ case 10:
8857
+ _g = [{}];
8858
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
8859
+ case 11:
8860
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8861
+ return [3, 17];
8862
+ case 12:
8863
+ _h = [{}];
8864
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8865
+ case 13:
8866
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8867
+ return [3, 17];
8868
+ case 14:
8869
+ _j = [{}];
8870
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
8871
+ case 15:
8872
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8873
+ return [3, 17];
8874
+ case 16:
8875
+ parsedBody = parsedOutput.body;
8876
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
8877
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
8878
+ _l.label = 17;
8879
+ case 17:
8880
+ message = response.message || response.Message || errorCode;
8881
+ response.message = message;
8882
+ delete response.Message;
8883
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
8884
+ }
8885
+ });
8886
+ }); };
7912
8887
  export var deserializeAws_restJson1StartImportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7913
8888
  var contents, data, _a, _b;
7914
8889
  return __generator(this, function (_c) {
@@ -8605,6 +9580,148 @@ var deserializeAws_restJson1UpdateBotLocaleCommandError = function (output, cont
8605
9580
  }
8606
9581
  });
8607
9582
  }); };
9583
+ export var deserializeAws_restJson1UpdateBotRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9584
+ var contents, data, _a, _b;
9585
+ return __generator(this, function (_c) {
9586
+ switch (_c.label) {
9587
+ case 0:
9588
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
9589
+ return [2, deserializeAws_restJson1UpdateBotRecommendationCommandError(output, context)];
9590
+ }
9591
+ contents = {
9592
+ $metadata: deserializeMetadata(output),
9593
+ botId: undefined,
9594
+ botRecommendationId: undefined,
9595
+ botRecommendationStatus: undefined,
9596
+ botVersion: undefined,
9597
+ creationDateTime: undefined,
9598
+ encryptionSetting: undefined,
9599
+ lastUpdatedDateTime: undefined,
9600
+ localeId: undefined,
9601
+ transcriptSourceSetting: undefined,
9602
+ };
9603
+ _a = __expectNonNull;
9604
+ _b = __expectObject;
9605
+ return [4, parseBody(output.body, context)];
9606
+ case 1:
9607
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
9608
+ if (data.botId !== undefined && data.botId !== null) {
9609
+ contents.botId = __expectString(data.botId);
9610
+ }
9611
+ if (data.botRecommendationId !== undefined && data.botRecommendationId !== null) {
9612
+ contents.botRecommendationId = __expectString(data.botRecommendationId);
9613
+ }
9614
+ if (data.botRecommendationStatus !== undefined && data.botRecommendationStatus !== null) {
9615
+ contents.botRecommendationStatus = __expectString(data.botRecommendationStatus);
9616
+ }
9617
+ if (data.botVersion !== undefined && data.botVersion !== null) {
9618
+ contents.botVersion = __expectString(data.botVersion);
9619
+ }
9620
+ if (data.creationDateTime !== undefined && data.creationDateTime !== null) {
9621
+ contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
9622
+ }
9623
+ if (data.encryptionSetting !== undefined && data.encryptionSetting !== null) {
9624
+ contents.encryptionSetting = deserializeAws_restJson1EncryptionSetting(data.encryptionSetting, context);
9625
+ }
9626
+ if (data.lastUpdatedDateTime !== undefined && data.lastUpdatedDateTime !== null) {
9627
+ contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime)));
9628
+ }
9629
+ if (data.localeId !== undefined && data.localeId !== null) {
9630
+ contents.localeId = __expectString(data.localeId);
9631
+ }
9632
+ if (data.transcriptSourceSetting !== undefined && data.transcriptSourceSetting !== null) {
9633
+ contents.transcriptSourceSetting = deserializeAws_restJson1TranscriptSourceSetting(data.transcriptSourceSetting, context);
9634
+ }
9635
+ return [2, Promise.resolve(contents)];
9636
+ }
9637
+ });
9638
+ }); };
9639
+ var deserializeAws_restJson1UpdateBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9640
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
9641
+ var _k;
9642
+ return __generator(this, function (_l) {
9643
+ switch (_l.label) {
9644
+ case 0:
9645
+ _a = [__assign({}, output)];
9646
+ _k = {};
9647
+ return [4, parseBody(output.body, context)];
9648
+ case 1:
9649
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
9650
+ errorCode = "UnknownError";
9651
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9652
+ _b = errorCode;
9653
+ switch (_b) {
9654
+ case "ConflictException": return [3, 2];
9655
+ case "com.amazonaws.lexmodelsv2#ConflictException": return [3, 2];
9656
+ case "InternalServerException": return [3, 4];
9657
+ case "com.amazonaws.lexmodelsv2#InternalServerException": return [3, 4];
9658
+ case "PreconditionFailedException": return [3, 6];
9659
+ case "com.amazonaws.lexmodelsv2#PreconditionFailedException": return [3, 6];
9660
+ case "ResourceNotFoundException": return [3, 8];
9661
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException": return [3, 8];
9662
+ case "ServiceQuotaExceededException": return [3, 10];
9663
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException": return [3, 10];
9664
+ case "ThrottlingException": return [3, 12];
9665
+ case "com.amazonaws.lexmodelsv2#ThrottlingException": return [3, 12];
9666
+ case "ValidationException": return [3, 14];
9667
+ case "com.amazonaws.lexmodelsv2#ValidationException": return [3, 14];
9668
+ }
9669
+ return [3, 16];
9670
+ case 2:
9671
+ _c = [{}];
9672
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
9673
+ case 3:
9674
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9675
+ return [3, 17];
9676
+ case 4:
9677
+ _d = [{}];
9678
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
9679
+ case 5:
9680
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9681
+ return [3, 17];
9682
+ case 6:
9683
+ _e = [{}];
9684
+ return [4, deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)];
9685
+ case 7:
9686
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9687
+ return [3, 17];
9688
+ case 8:
9689
+ _f = [{}];
9690
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
9691
+ case 9:
9692
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9693
+ return [3, 17];
9694
+ case 10:
9695
+ _g = [{}];
9696
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
9697
+ case 11:
9698
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9699
+ return [3, 17];
9700
+ case 12:
9701
+ _h = [{}];
9702
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
9703
+ case 13:
9704
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9705
+ return [3, 17];
9706
+ case 14:
9707
+ _j = [{}];
9708
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
9709
+ case 15:
9710
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9711
+ return [3, 17];
9712
+ case 16:
9713
+ parsedBody = parsedOutput.body;
9714
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
9715
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
9716
+ _l.label = 17;
9717
+ case 17:
9718
+ message = response.message || response.Message || errorCode;
9719
+ response.message = message;
9720
+ delete response.Message;
9721
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
9722
+ }
9723
+ });
9724
+ }); };
8608
9725
  export var deserializeAws_restJson1UpdateExportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8609
9726
  var contents, data, _a, _b;
8610
9727
  return __generator(this, function (_c) {
@@ -9428,6 +10545,20 @@ var serializeAws_restJson1AggregatedUtterancesFilters = function (input, context
9428
10545
  var serializeAws_restJson1AggregatedUtterancesSortBy = function (input, context) {
9429
10546
  return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9430
10547
  };
10548
+ var serializeAws_restJson1AssociatedTranscriptFilter = function (input, context) {
10549
+ return __assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.values !== undefined &&
10550
+ input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
10551
+ };
10552
+ var serializeAws_restJson1AssociatedTranscriptFilters = function (input, context) {
10553
+ return input
10554
+ .filter(function (e) { return e != null; })
10555
+ .map(function (entry) {
10556
+ if (entry === null) {
10557
+ return null;
10558
+ }
10559
+ return serializeAws_restJson1AssociatedTranscriptFilter(entry, context);
10560
+ });
10561
+ };
9431
10562
  var serializeAws_restJson1AudioLogDestination = function (input, context) {
9432
10563
  return __assign({}, (input.s3Bucket !== undefined &&
9433
10564
  input.s3Bucket !== null && { s3Bucket: serializeAws_restJson1S3BucketLogDestination(input.s3Bucket, context) }));
@@ -9603,9 +10734,21 @@ var serializeAws_restJson1CustomPayload = function (input, context) {
9603
10734
  var serializeAws_restJson1DataPrivacy = function (input, context) {
9604
10735
  return __assign({}, (input.childDirected !== undefined && input.childDirected !== null && { childDirected: input.childDirected }));
9605
10736
  };
10737
+ var serializeAws_restJson1DateRangeFilter = function (input, context) {
10738
+ return __assign(__assign({}, (input.endDateTime !== undefined &&
10739
+ input.endDateTime !== null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) })), (input.startDateTime !== undefined &&
10740
+ input.startDateTime !== null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }));
10741
+ };
9606
10742
  var serializeAws_restJson1DialogCodeHookSettings = function (input, context) {
9607
10743
  return __assign({}, (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }));
9608
10744
  };
10745
+ var serializeAws_restJson1EncryptionSetting = function (input, context) {
10746
+ return __assign(__assign(__assign({}, (input.associatedTranscriptsPassword !== undefined &&
10747
+ input.associatedTranscriptsPassword !== null && {
10748
+ associatedTranscriptsPassword: input.associatedTranscriptsPassword,
10749
+ })), (input.botLocaleExportPassword !== undefined &&
10750
+ input.botLocaleExportPassword !== null && { botLocaleExportPassword: input.botLocaleExportPassword })), (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn }));
10751
+ };
9609
10752
  var serializeAws_restJson1ExportFilter = function (input, context) {
9610
10753
  return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9611
10754
  input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
@@ -9761,6 +10904,12 @@ var serializeAws_restJson1LambdaCodeHook = function (input, context) {
9761
10904
  return __assign(__assign({}, (input.codeHookInterfaceVersion !== undefined &&
9762
10905
  input.codeHookInterfaceVersion !== null && { codeHookInterfaceVersion: input.codeHookInterfaceVersion })), (input.lambdaARN !== undefined && input.lambdaARN !== null && { lambdaARN: input.lambdaARN }));
9763
10906
  };
10907
+ var serializeAws_restJson1LexTranscriptFilter = function (input, context) {
10908
+ return __assign({}, (input.dateRangeFilter !== undefined &&
10909
+ input.dateRangeFilter !== null && {
10910
+ dateRangeFilter: serializeAws_restJson1DateRangeFilter(input.dateRangeFilter, context),
10911
+ }));
10912
+ };
9764
10913
  var serializeAws_restJson1Message = function (input, context) {
9765
10914
  return __assign(__assign(__assign(__assign({}, (input.customPayload !== undefined &&
9766
10915
  input.customPayload !== null && {
@@ -9809,6 +10958,16 @@ var serializeAws_restJson1ObfuscationSetting = function (input, context) {
9809
10958
  return __assign({}, (input.obfuscationSettingType !== undefined &&
9810
10959
  input.obfuscationSettingType !== null && { obfuscationSettingType: input.obfuscationSettingType }));
9811
10960
  };
10961
+ var serializeAws_restJson1ObjectPrefixes = function (input, context) {
10962
+ return input
10963
+ .filter(function (e) { return e != null; })
10964
+ .map(function (entry) {
10965
+ if (entry === null) {
10966
+ return null;
10967
+ }
10968
+ return entry;
10969
+ });
10970
+ };
9812
10971
  var serializeAws_restJson1OperationList = function (input, context) {
9813
10972
  return input
9814
10973
  .filter(function (e) { return e != null; })
@@ -9833,6 +10992,12 @@ var serializeAws_restJson1OutputContextsList = function (input, context) {
9833
10992
  return serializeAws_restJson1OutputContext(entry, context);
9834
10993
  });
9835
10994
  };
10995
+ var serializeAws_restJson1PathFormat = function (input, context) {
10996
+ return __assign({}, (input.objectPrefixes !== undefined &&
10997
+ input.objectPrefixes !== null && {
10998
+ objectPrefixes: serializeAws_restJson1ObjectPrefixes(input.objectPrefixes, context),
10999
+ }));
11000
+ };
9836
11001
  var serializeAws_restJson1PlainTextMessage = function (input, context) {
9837
11002
  return __assign({}, (input.value !== undefined && input.value !== null && { value: input.value }));
9838
11003
  };
@@ -9881,6 +11046,14 @@ var serializeAws_restJson1ResponseSpecification = function (input, context) {
9881
11046
  var serializeAws_restJson1S3BucketLogDestination = function (input, context) {
9882
11047
  return __assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.logPrefix !== undefined && input.logPrefix !== null && { logPrefix: input.logPrefix })), (input.s3BucketArn !== undefined && input.s3BucketArn !== null && { s3BucketArn: input.s3BucketArn }));
9883
11048
  };
11049
+ var serializeAws_restJson1S3BucketTranscriptSource = function (input, context) {
11050
+ return __assign(__assign(__assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.pathFormat !== undefined &&
11051
+ input.pathFormat !== null && { pathFormat: serializeAws_restJson1PathFormat(input.pathFormat, context) })), (input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName })), (input.transcriptFilter !== undefined &&
11052
+ input.transcriptFilter !== null && {
11053
+ transcriptFilter: serializeAws_restJson1TranscriptFilter(input.transcriptFilter, context),
11054
+ })), (input.transcriptFormat !== undefined &&
11055
+ input.transcriptFormat !== null && { transcriptFormat: input.transcriptFormat }));
11056
+ };
9884
11057
  var serializeAws_restJson1SampleUtterance = function (input, context) {
9885
11058
  return __assign({}, (input.utterance !== undefined && input.utterance !== null && { utterance: input.utterance }));
9886
11059
  };
@@ -10062,6 +11235,18 @@ var serializeAws_restJson1TextLogSettingsList = function (input, context) {
10062
11235
  return serializeAws_restJson1TextLogSetting(entry, context);
10063
11236
  });
10064
11237
  };
11238
+ var serializeAws_restJson1TranscriptFilter = function (input, context) {
11239
+ return __assign({}, (input.lexTranscriptFilter !== undefined &&
11240
+ input.lexTranscriptFilter !== null && {
11241
+ lexTranscriptFilter: serializeAws_restJson1LexTranscriptFilter(input.lexTranscriptFilter, context),
11242
+ }));
11243
+ };
11244
+ var serializeAws_restJson1TranscriptSourceSetting = function (input, context) {
11245
+ return __assign({}, (input.s3BucketTranscriptSource !== undefined &&
11246
+ input.s3BucketTranscriptSource !== null && {
11247
+ s3BucketTranscriptSource: serializeAws_restJson1S3BucketTranscriptSource(input.s3BucketTranscriptSource, context),
11248
+ }));
11249
+ };
10065
11250
  var serializeAws_restJson1UtteranceAggregationDuration = function (input, context) {
10066
11251
  return __assign({}, (input.relativeAggregationDuration !== undefined &&
10067
11252
  input.relativeAggregationDuration !== null && {
@@ -10069,7 +11254,7 @@ var serializeAws_restJson1UtteranceAggregationDuration = function (input, contex
10069
11254
  }));
10070
11255
  };
10071
11256
  var serializeAws_restJson1VoiceSettings = function (input, context) {
10072
- return __assign({}, (input.voiceId !== undefined && input.voiceId !== null && { voiceId: input.voiceId }));
11257
+ return __assign(__assign({}, (input.engine !== undefined && input.engine !== null && { engine: input.engine })), (input.voiceId !== undefined && input.voiceId !== null && { voiceId: input.voiceId }));
10073
11258
  };
10074
11259
  var serializeAws_restJson1WaitAndContinueSpecification = function (input, context) {
10075
11260
  return __assign(__assign(__assign(__assign({}, (input.active !== undefined && input.active !== null && { active: input.active })), (input.continueResponse !== undefined &&
@@ -10109,6 +11294,21 @@ var deserializeAws_restJson1AggregatedUtterancesSummaryList = function (output,
10109
11294
  return deserializeAws_restJson1AggregatedUtterancesSummary(entry, context);
10110
11295
  });
10111
11296
  };
11297
+ var deserializeAws_restJson1AssociatedTranscript = function (output, context) {
11298
+ return {
11299
+ transcript: __expectString(output.transcript),
11300
+ };
11301
+ };
11302
+ var deserializeAws_restJson1AssociatedTranscriptList = function (output, context) {
11303
+ return (output || [])
11304
+ .filter(function (e) { return e != null; })
11305
+ .map(function (entry) {
11306
+ if (entry === null) {
11307
+ return null;
11308
+ }
11309
+ return deserializeAws_restJson1AssociatedTranscript(entry, context);
11310
+ });
11311
+ };
10112
11312
  var deserializeAws_restJson1AudioLogDestination = function (output, context) {
10113
11313
  return {
10114
11314
  s3Bucket: output.s3Bucket !== undefined && output.s3Bucket !== null
@@ -10280,6 +11480,47 @@ var deserializeAws_restJson1BotLocaleSummaryList = function (output, context) {
10280
11480
  return deserializeAws_restJson1BotLocaleSummary(entry, context);
10281
11481
  });
10282
11482
  };
11483
+ var deserializeAws_restJson1BotRecommendationResults = function (output, context) {
11484
+ return {
11485
+ associatedTranscriptsUrl: __expectString(output.associatedTranscriptsUrl),
11486
+ botLocaleExportUrl: __expectString(output.botLocaleExportUrl),
11487
+ statistics: output.statistics !== undefined && output.statistics !== null
11488
+ ? deserializeAws_restJson1BotRecommendationResultStatistics(output.statistics, context)
11489
+ : undefined,
11490
+ };
11491
+ };
11492
+ var deserializeAws_restJson1BotRecommendationResultStatistics = function (output, context) {
11493
+ return {
11494
+ intents: output.intents !== undefined && output.intents !== null
11495
+ ? deserializeAws_restJson1IntentStatistics(output.intents, context)
11496
+ : undefined,
11497
+ slotTypes: output.slotTypes !== undefined && output.slotTypes !== null
11498
+ ? deserializeAws_restJson1SlotTypeStatistics(output.slotTypes, context)
11499
+ : undefined,
11500
+ };
11501
+ };
11502
+ var deserializeAws_restJson1BotRecommendationSummary = function (output, context) {
11503
+ return {
11504
+ botRecommendationId: __expectString(output.botRecommendationId),
11505
+ botRecommendationStatus: __expectString(output.botRecommendationStatus),
11506
+ creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
11507
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
11508
+ : undefined,
11509
+ lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
11510
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
11511
+ : undefined,
11512
+ };
11513
+ };
11514
+ var deserializeAws_restJson1BotRecommendationSummaryList = function (output, context) {
11515
+ return (output || [])
11516
+ .filter(function (e) { return e != null; })
11517
+ .map(function (entry) {
11518
+ if (entry === null) {
11519
+ return null;
11520
+ }
11521
+ return deserializeAws_restJson1BotRecommendationSummary(entry, context);
11522
+ });
11523
+ };
10283
11524
  var deserializeAws_restJson1BotSummary = function (output, context) {
10284
11525
  return {
10285
11526
  botId: __expectString(output.botId),
@@ -10419,11 +11660,28 @@ var deserializeAws_restJson1DataPrivacy = function (output, context) {
10419
11660
  childDirected: __expectBoolean(output.childDirected),
10420
11661
  };
10421
11662
  };
11663
+ var deserializeAws_restJson1DateRangeFilter = function (output, context) {
11664
+ return {
11665
+ endDateTime: output.endDateTime !== undefined && output.endDateTime !== null
11666
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDateTime)))
11667
+ : undefined,
11668
+ startDateTime: output.startDateTime !== undefined && output.startDateTime !== null
11669
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDateTime)))
11670
+ : undefined,
11671
+ };
11672
+ };
10422
11673
  var deserializeAws_restJson1DialogCodeHookSettings = function (output, context) {
10423
11674
  return {
10424
11675
  enabled: __expectBoolean(output.enabled),
10425
11676
  };
10426
11677
  };
11678
+ var deserializeAws_restJson1EncryptionSetting = function (output, context) {
11679
+ return {
11680
+ associatedTranscriptsPassword: __expectString(output.associatedTranscriptsPassword),
11681
+ botLocaleExportPassword: __expectString(output.botLocaleExportPassword),
11682
+ kmsKeyArn: __expectString(output.kmsKeyArn),
11683
+ };
11684
+ };
10427
11685
  var deserializeAws_restJson1ExportResourceSpecification = function (output, context) {
10428
11686
  return {
10429
11687
  botExportSpecification: output.botExportSpecification !== undefined && output.botExportSpecification !== null
@@ -10590,6 +11848,11 @@ var deserializeAws_restJson1IntentConfirmationSetting = function (output, contex
10590
11848
  : undefined,
10591
11849
  };
10592
11850
  };
11851
+ var deserializeAws_restJson1IntentStatistics = function (output, context) {
11852
+ return {
11853
+ discoveredIntentCount: __expectInt32(output.discoveredIntentCount),
11854
+ };
11855
+ };
10593
11856
  var deserializeAws_restJson1IntentSummary = function (output, context) {
10594
11857
  return {
10595
11858
  description: __expectString(output.description),
@@ -10630,6 +11893,13 @@ var deserializeAws_restJson1LambdaCodeHook = function (output, context) {
10630
11893
  lambdaARN: __expectString(output.lambdaARN),
10631
11894
  };
10632
11895
  };
11896
+ var deserializeAws_restJson1LexTranscriptFilter = function (output, context) {
11897
+ return {
11898
+ dateRangeFilter: output.dateRangeFilter !== undefined && output.dateRangeFilter !== null
11899
+ ? deserializeAws_restJson1DateRangeFilter(output.dateRangeFilter, context)
11900
+ : undefined,
11901
+ };
11902
+ };
10633
11903
  var deserializeAws_restJson1Message = function (output, context) {
10634
11904
  return {
10635
11905
  customPayload: output.customPayload !== undefined && output.customPayload !== null
@@ -10686,6 +11956,16 @@ var deserializeAws_restJson1ObfuscationSetting = function (output, context) {
10686
11956
  obfuscationSettingType: __expectString(output.obfuscationSettingType),
10687
11957
  };
10688
11958
  };
11959
+ var deserializeAws_restJson1ObjectPrefixes = function (output, context) {
11960
+ return (output || [])
11961
+ .filter(function (e) { return e != null; })
11962
+ .map(function (entry) {
11963
+ if (entry === null) {
11964
+ return null;
11965
+ }
11966
+ return __expectString(entry);
11967
+ });
11968
+ };
10689
11969
  var deserializeAws_restJson1OutputContext = function (output, context) {
10690
11970
  return {
10691
11971
  name: __expectString(output.name),
@@ -10703,6 +11983,13 @@ var deserializeAws_restJson1OutputContextsList = function (output, context) {
10703
11983
  return deserializeAws_restJson1OutputContext(entry, context);
10704
11984
  });
10705
11985
  };
11986
+ var deserializeAws_restJson1PathFormat = function (output, context) {
11987
+ return {
11988
+ objectPrefixes: output.objectPrefixes !== undefined && output.objectPrefixes !== null
11989
+ ? deserializeAws_restJson1ObjectPrefixes(output.objectPrefixes, context)
11990
+ : undefined,
11991
+ };
11992
+ };
10706
11993
  var deserializeAws_restJson1PlainTextMessage = function (output, context) {
10707
11994
  return {
10708
11995
  value: __expectString(output.value),
@@ -10730,6 +12017,23 @@ var deserializeAws_restJson1PromptSpecification = function (output, context) {
10730
12017
  : undefined,
10731
12018
  };
10732
12019
  };
12020
+ var deserializeAws_restJson1RecommendedIntentSummary = function (output, context) {
12021
+ return {
12022
+ intentId: __expectString(output.intentId),
12023
+ intentName: __expectString(output.intentName),
12024
+ sampleUtterancesCount: __expectInt32(output.sampleUtterancesCount),
12025
+ };
12026
+ };
12027
+ var deserializeAws_restJson1RecommendedIntentSummaryList = function (output, context) {
12028
+ return (output || [])
12029
+ .filter(function (e) { return e != null; })
12030
+ .map(function (entry) {
12031
+ if (entry === null) {
12032
+ return null;
12033
+ }
12034
+ return deserializeAws_restJson1RecommendedIntentSummary(entry, context);
12035
+ });
12036
+ };
10733
12037
  var deserializeAws_restJson1RelativeAggregationDuration = function (output, context) {
10734
12038
  return {
10735
12039
  timeDimension: __expectString(output.timeDimension),
@@ -10751,6 +12055,19 @@ var deserializeAws_restJson1S3BucketLogDestination = function (output, context)
10751
12055
  s3BucketArn: __expectString(output.s3BucketArn),
10752
12056
  };
10753
12057
  };
12058
+ var deserializeAws_restJson1S3BucketTranscriptSource = function (output, context) {
12059
+ return {
12060
+ kmsKeyArn: __expectString(output.kmsKeyArn),
12061
+ pathFormat: output.pathFormat !== undefined && output.pathFormat !== null
12062
+ ? deserializeAws_restJson1PathFormat(output.pathFormat, context)
12063
+ : undefined,
12064
+ s3BucketName: __expectString(output.s3BucketName),
12065
+ transcriptFilter: output.transcriptFilter !== undefined && output.transcriptFilter !== null
12066
+ ? deserializeAws_restJson1TranscriptFilter(output.transcriptFilter, context)
12067
+ : undefined,
12068
+ transcriptFormat: __expectString(output.transcriptFormat),
12069
+ };
12070
+ };
10754
12071
  var deserializeAws_restJson1SampleUtterance = function (output, context) {
10755
12072
  return {
10756
12073
  utterance: __expectString(output.utterance),
@@ -10839,6 +12156,11 @@ var deserializeAws_restJson1SlotSummaryList = function (output, context) {
10839
12156
  return deserializeAws_restJson1SlotSummary(entry, context);
10840
12157
  });
10841
12158
  };
12159
+ var deserializeAws_restJson1SlotTypeStatistics = function (output, context) {
12160
+ return {
12161
+ discoveredSlotTypeCount: __expectInt32(output.discoveredSlotTypeCount),
12162
+ };
12163
+ };
10842
12164
  var deserializeAws_restJson1SlotTypeSummary = function (output, context) {
10843
12165
  return {
10844
12166
  description: __expectString(output.description),
@@ -10970,6 +12292,20 @@ var deserializeAws_restJson1TextLogSettingsList = function (output, context) {
10970
12292
  return deserializeAws_restJson1TextLogSetting(entry, context);
10971
12293
  });
10972
12294
  };
12295
+ var deserializeAws_restJson1TranscriptFilter = function (output, context) {
12296
+ return {
12297
+ lexTranscriptFilter: output.lexTranscriptFilter !== undefined && output.lexTranscriptFilter !== null
12298
+ ? deserializeAws_restJson1LexTranscriptFilter(output.lexTranscriptFilter, context)
12299
+ : undefined,
12300
+ };
12301
+ };
12302
+ var deserializeAws_restJson1TranscriptSourceSetting = function (output, context) {
12303
+ return {
12304
+ s3BucketTranscriptSource: output.s3BucketTranscriptSource !== undefined && output.s3BucketTranscriptSource !== null
12305
+ ? deserializeAws_restJson1S3BucketTranscriptSource(output.s3BucketTranscriptSource, context)
12306
+ : undefined,
12307
+ };
12308
+ };
10973
12309
  var deserializeAws_restJson1UtteranceAggregationDuration = function (output, context) {
10974
12310
  return {
10975
12311
  relativeAggregationDuration: output.relativeAggregationDuration !== undefined && output.relativeAggregationDuration !== null
@@ -10979,6 +12315,7 @@ var deserializeAws_restJson1UtteranceAggregationDuration = function (output, con
10979
12315
  };
10980
12316
  var deserializeAws_restJson1VoiceSettings = function (output, context) {
10981
12317
  return {
12318
+ engine: __expectString(output.engine),
10982
12319
  voiceId: __expectString(output.voiceId),
10983
12320
  };
10984
12321
  };