@aws-sdk/client-lex-models-v2 3.451.0 → 3.458.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 (64) hide show
  1. package/README.md +124 -92
  2. package/dist-cjs/LexModelsV2.js +8 -0
  3. package/dist-cjs/commands/DescribeBotResourceGenerationCommand.js +51 -0
  4. package/dist-cjs/commands/GenerateBotElementCommand.js +51 -0
  5. package/dist-cjs/commands/ListBotResourceGenerationsCommand.js +51 -0
  6. package/dist-cjs/commands/StartBotResourceGenerationCommand.js +51 -0
  7. package/dist-cjs/commands/index.js +4 -0
  8. package/dist-cjs/models/models_0.js +10 -5
  9. package/dist-cjs/models/models_1.js +9 -1
  10. package/dist-cjs/pagination/ListBotResourceGenerationsPaginator.js +29 -0
  11. package/dist-cjs/pagination/index.js +1 -0
  12. package/dist-cjs/protocols/Aws_restJson1.js +336 -4
  13. package/dist-es/LexModelsV2.js +8 -0
  14. package/dist-es/commands/DescribeBotResourceGenerationCommand.js +47 -0
  15. package/dist-es/commands/GenerateBotElementCommand.js +47 -0
  16. package/dist-es/commands/ListBotResourceGenerationsCommand.js +47 -0
  17. package/dist-es/commands/StartBotResourceGenerationCommand.js +47 -0
  18. package/dist-es/commands/index.js +4 -0
  19. package/dist-es/models/models_0.js +9 -4
  20. package/dist-es/models/models_1.js +8 -0
  21. package/dist-es/pagination/ListBotResourceGenerationsPaginator.js +25 -0
  22. package/dist-es/pagination/index.js +1 -0
  23. package/dist-es/protocols/Aws_restJson1.js +324 -0
  24. package/dist-types/LexModelsV2.d.ts +28 -0
  25. package/dist-types/LexModelsV2Client.d.ts +6 -2
  26. package/dist-types/commands/CreateBotLocaleCommand.d.ts +48 -0
  27. package/dist-types/commands/CreateBotVersionCommand.d.ts +5 -6
  28. package/dist-types/commands/CreateSlotCommand.d.ts +6 -0
  29. package/dist-types/commands/DescribeBotLocaleCommand.d.ts +24 -0
  30. package/dist-types/commands/DescribeBotResourceGenerationCommand.d.ts +107 -0
  31. package/dist-types/commands/DescribeImportCommand.d.ts +2 -1
  32. package/dist-types/commands/DescribeIntentCommand.d.ts +1 -2
  33. package/dist-types/commands/DescribeResourcePolicyCommand.d.ts +1 -1
  34. package/dist-types/commands/DescribeSlotCommand.d.ts +4 -2
  35. package/dist-types/commands/DescribeSlotTypeCommand.d.ts +1 -2
  36. package/dist-types/commands/GenerateBotElementCommand.d.ts +113 -0
  37. package/dist-types/commands/ListBotResourceGenerationsCommand.d.ts +108 -0
  38. package/dist-types/commands/StartBotResourceGenerationCommand.d.ts +111 -0
  39. package/dist-types/commands/UpdateBotLocaleCommand.d.ts +48 -0
  40. package/dist-types/commands/UpdateSlotCommand.d.ts +6 -0
  41. package/dist-types/commands/index.d.ts +4 -0
  42. package/dist-types/models/models_0.d.ts +240 -318
  43. package/dist-types/models/models_1.d.ts +594 -1
  44. package/dist-types/pagination/ListBotResourceGenerationsPaginator.d.ts +7 -0
  45. package/dist-types/pagination/index.d.ts +1 -0
  46. package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
  47. package/dist-types/ts3.4/LexModelsV2.d.ts +68 -0
  48. package/dist-types/ts3.4/LexModelsV2Client.d.ts +24 -0
  49. package/dist-types/ts3.4/commands/DescribeBotResourceGenerationCommand.d.ts +42 -0
  50. package/dist-types/ts3.4/commands/DescribeImportCommand.d.ts +2 -4
  51. package/dist-types/ts3.4/commands/DescribeIntentCommand.d.ts +4 -2
  52. package/dist-types/ts3.4/commands/DescribeResourcePolicyCommand.d.ts +1 -1
  53. package/dist-types/ts3.4/commands/DescribeSlotCommand.d.ts +1 -2
  54. package/dist-types/ts3.4/commands/DescribeSlotTypeCommand.d.ts +4 -2
  55. package/dist-types/ts3.4/commands/GenerateBotElementCommand.d.ts +39 -0
  56. package/dist-types/ts3.4/commands/ListBotResourceGenerationsCommand.d.ts +42 -0
  57. package/dist-types/ts3.4/commands/StartBotResourceGenerationCommand.d.ts +42 -0
  58. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  59. package/dist-types/ts3.4/models/models_0.d.ts +64 -72
  60. package/dist-types/ts3.4/models/models_1.d.ts +140 -4
  61. package/dist-types/ts3.4/pagination/ListBotResourceGenerationsPaginator.d.ts +11 -0
  62. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  63. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
  64. package/package.json +3 -3
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_ListBotResourceGenerationsCommand, se_ListBotResourceGenerationsCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListBotResourceGenerationsCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListBotResourceGenerationsCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "LexModelsV2Client";
26
+ const commandName = "ListBotResourceGenerationsCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "LexModelBuildingServiceV2",
35
+ operation: "ListBotResourceGenerations",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_ListBotResourceGenerationsCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_ListBotResourceGenerationsCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_StartBotResourceGenerationCommand, se_StartBotResourceGenerationCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class StartBotResourceGenerationCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, StartBotResourceGenerationCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "LexModelsV2Client";
26
+ const commandName = "StartBotResourceGenerationCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "LexModelBuildingServiceV2",
35
+ operation: "StartBotResourceGeneration",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_StartBotResourceGenerationCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_StartBotResourceGenerationCommand(output, context);
46
+ }
47
+ }
@@ -32,6 +32,7 @@ export * from "./DescribeBotAliasCommand";
32
32
  export * from "./DescribeBotCommand";
33
33
  export * from "./DescribeBotLocaleCommand";
34
34
  export * from "./DescribeBotRecommendationCommand";
35
+ export * from "./DescribeBotResourceGenerationCommand";
35
36
  export * from "./DescribeBotVersionCommand";
36
37
  export * from "./DescribeCustomVocabularyMetadataCommand";
37
38
  export * from "./DescribeExportCommand";
@@ -44,11 +45,13 @@ export * from "./DescribeTestExecutionCommand";
44
45
  export * from "./DescribeTestSetCommand";
45
46
  export * from "./DescribeTestSetDiscrepancyReportCommand";
46
47
  export * from "./DescribeTestSetGenerationCommand";
48
+ export * from "./GenerateBotElementCommand";
47
49
  export * from "./GetTestExecutionArtifactsUrlCommand";
48
50
  export * from "./ListAggregatedUtterancesCommand";
49
51
  export * from "./ListBotAliasesCommand";
50
52
  export * from "./ListBotLocalesCommand";
51
53
  export * from "./ListBotRecommendationsCommand";
54
+ export * from "./ListBotResourceGenerationsCommand";
52
55
  export * from "./ListBotVersionsCommand";
53
56
  export * from "./ListBotsCommand";
54
57
  export * from "./ListBuiltInIntentsCommand";
@@ -74,6 +77,7 @@ export * from "./ListUtteranceAnalyticsDataCommand";
74
77
  export * from "./ListUtteranceMetricsCommand";
75
78
  export * from "./SearchAssociatedTranscriptsCommand";
76
79
  export * from "./StartBotRecommendationCommand";
80
+ export * from "./StartBotResourceGenerationCommand";
77
81
  export * from "./StartImportCommand";
78
82
  export * from "./StartTestExecutionCommand";
79
83
  export * from "./StartTestSetGenerationCommand";
@@ -395,6 +395,10 @@ export const SlotConstraint = {
395
395
  Optional: "Optional",
396
396
  Required: "Required",
397
397
  };
398
+ export const SlotResolutionStrategy = {
399
+ Default: "Default",
400
+ EnhancedFallback: "EnhancedFallback",
401
+ };
398
402
  export const SlotValueResolutionStrategy = {
399
403
  Concatenation: "Concatenation",
400
404
  OriginalValue: "OriginalValue",
@@ -416,15 +420,16 @@ export const ImportStatus = {
416
420
  export const TranscriptFormat = {
417
421
  Lex: "Lex",
418
422
  };
423
+ export const GenerationStatus = {
424
+ Complete: "Complete",
425
+ Failed: "Failed",
426
+ InProgress: "InProgress",
427
+ };
419
428
  export const MergeStrategy = {
420
429
  Append: "Append",
421
430
  FailOnConflict: "FailOnConflict",
422
431
  Overwrite: "Overwrite",
423
432
  };
424
- export const TestSetModality = {
425
- Audio: "Audio",
426
- Text: "Text",
427
- };
428
433
  export const CreateExportRequestFilterSensitiveLog = (obj) => ({
429
434
  ...obj,
430
435
  ...(obj.filePassword && { filePassword: SENSITIVE_STRING }),
@@ -1,5 +1,9 @@
1
1
  import { SENSITIVE_STRING } from "@smithy/smithy-client";
2
2
  import { EncryptionSettingFilterSensitiveLog, } from "./models_0";
3
+ export const TestSetModality = {
4
+ Audio: "Audio",
5
+ Text: "Text",
6
+ };
3
7
  export const TestExecutionApiMode = {
4
8
  NonStreaming: "NonStreaming",
5
9
  Streaming: "Streaming",
@@ -45,6 +49,10 @@ export const ExportFilterOperator = {
45
49
  export const ExportSortAttribute = {
46
50
  LastUpdatedDateTime: "LastUpdatedDateTime",
47
51
  };
52
+ export const GenerationSortByAttribute = {
53
+ creationStartTime: "creationStartTime",
54
+ lastUpdatedTime: "lastUpdatedTime",
55
+ };
48
56
  export const ImportFilterName = {
49
57
  ImportResourceType: "ImportResourceType",
50
58
  };
@@ -0,0 +1,25 @@
1
+ import { ListBotResourceGenerationsCommand, } from "../commands/ListBotResourceGenerationsCommand";
2
+ import { LexModelsV2Client } from "../LexModelsV2Client";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListBotResourceGenerationsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListBotResourceGenerations(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof LexModelsV2Client) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -3,6 +3,7 @@ export * from "./ListAggregatedUtterancesPaginator";
3
3
  export * from "./ListBotAliasesPaginator";
4
4
  export * from "./ListBotLocalesPaginator";
5
5
  export * from "./ListBotRecommendationsPaginator";
6
+ export * from "./ListBotResourceGenerationsPaginator";
6
7
  export * from "./ListBotVersionsPaginator";
7
8
  export * from "./ListBotsPaginator";
8
9
  export * from "./ListBuiltInIntentsPaginator";
@@ -160,6 +160,7 @@ export const se_CreateBotLocaleCommand = async (input, context) => {
160
160
  let body;
161
161
  body = JSON.stringify(take(input, {
162
162
  description: [],
163
+ generativeAISettings: (_) => _json(_),
163
164
  localeId: [],
164
165
  nluIntentConfidenceThreshold: (_) => __serializeFloat(_),
165
166
  voiceSettings: (_) => _json(_),
@@ -763,6 +764,26 @@ export const se_DescribeBotRecommendationCommand = async (input, context) => {
763
764
  body,
764
765
  });
765
766
  };
767
+ export const se_DescribeBotResourceGenerationCommand = async (input, context) => {
768
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
769
+ const headers = {};
770
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
771
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/generations/{generationId}";
772
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
773
+ resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion, "{botVersion}", false);
774
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
775
+ resolvedPath = __resolvedPath(resolvedPath, input, "generationId", () => input.generationId, "{generationId}", false);
776
+ let body;
777
+ return new __HttpRequest({
778
+ protocol,
779
+ hostname,
780
+ port,
781
+ method: "GET",
782
+ headers,
783
+ path: resolvedPath,
784
+ body,
785
+ });
786
+ };
766
787
  export const se_DescribeBotVersionCommand = async (input, context) => {
767
788
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
768
789
  const headers = {};
@@ -973,6 +994,30 @@ export const se_DescribeTestSetGenerationCommand = async (input, context) => {
973
994
  body,
974
995
  });
975
996
  };
997
+ export const se_GenerateBotElementCommand = async (input, context) => {
998
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
999
+ const headers = {
1000
+ "content-type": "application/json",
1001
+ };
1002
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1003
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/generate";
1004
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
1005
+ resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion, "{botVersion}", false);
1006
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
1007
+ let body;
1008
+ body = JSON.stringify(take(input, {
1009
+ intentId: [],
1010
+ }));
1011
+ return new __HttpRequest({
1012
+ protocol,
1013
+ hostname,
1014
+ port,
1015
+ method: "POST",
1016
+ headers,
1017
+ path: resolvedPath,
1018
+ body,
1019
+ });
1020
+ };
976
1021
  export const se_GetTestExecutionArtifactsUrlCommand = async (input, context) => {
977
1022
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
978
1023
  const headers = {};
@@ -1091,6 +1136,32 @@ export const se_ListBotRecommendationsCommand = async (input, context) => {
1091
1136
  body,
1092
1137
  });
1093
1138
  };
1139
+ export const se_ListBotResourceGenerationsCommand = async (input, context) => {
1140
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1141
+ const headers = {
1142
+ "content-type": "application/json",
1143
+ };
1144
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1145
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/generations";
1146
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
1147
+ resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion, "{botVersion}", false);
1148
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
1149
+ let body;
1150
+ body = JSON.stringify(take(input, {
1151
+ maxResults: [],
1152
+ nextToken: [],
1153
+ sortBy: (_) => _json(_),
1154
+ }));
1155
+ return new __HttpRequest({
1156
+ protocol,
1157
+ hostname,
1158
+ port,
1159
+ method: "POST",
1160
+ headers,
1161
+ path: resolvedPath,
1162
+ body,
1163
+ });
1164
+ };
1094
1165
  export const se_ListBotsCommand = async (input, context) => {
1095
1166
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1096
1167
  const headers = {
@@ -1716,6 +1787,30 @@ export const se_StartBotRecommendationCommand = async (input, context) => {
1716
1787
  body,
1717
1788
  });
1718
1789
  };
1790
+ export const se_StartBotResourceGenerationCommand = async (input, context) => {
1791
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1792
+ const headers = {
1793
+ "content-type": "application/json",
1794
+ };
1795
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1796
+ "/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/startgeneration";
1797
+ resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId, "{botId}", false);
1798
+ resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion, "{botVersion}", false);
1799
+ resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
1800
+ let body;
1801
+ body = JSON.stringify(take(input, {
1802
+ generationInputPrompt: [],
1803
+ }));
1804
+ return new __HttpRequest({
1805
+ protocol,
1806
+ hostname,
1807
+ port,
1808
+ method: "PUT",
1809
+ headers,
1810
+ path: resolvedPath,
1811
+ body,
1812
+ });
1813
+ };
1719
1814
  export const se_StartImportCommand = async (input, context) => {
1720
1815
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1721
1816
  const headers = {
@@ -1918,6 +2013,7 @@ export const se_UpdateBotLocaleCommand = async (input, context) => {
1918
2013
  let body;
1919
2014
  body = JSON.stringify(take(input, {
1920
2015
  description: [],
2016
+ generativeAISettings: (_) => _json(_),
1921
2017
  nluIntentConfidenceThreshold: (_) => __serializeFloat(_),
1922
2018
  voiceSettings: (_) => _json(_),
1923
2019
  }));
@@ -2454,6 +2550,7 @@ export const de_CreateBotLocaleCommand = async (output, context) => {
2454
2550
  botVersion: __expectString,
2455
2551
  creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2456
2552
  description: __expectString,
2553
+ generativeAISettings: _json,
2457
2554
  localeId: __expectString,
2458
2555
  localeName: __expectString,
2459
2556
  nluIntentConfidenceThreshold: __limitedParseDouble,
@@ -3751,6 +3848,7 @@ export const de_DescribeBotLocaleCommand = async (output, context) => {
3751
3848
  creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3752
3849
  description: __expectString,
3753
3850
  failureReasons: _json,
3851
+ generativeAISettings: _json,
3754
3852
  intentsCount: __expectInt32,
3755
3853
  lastBuildSubmittedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3756
3854
  lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -3847,6 +3945,58 @@ const de_DescribeBotRecommendationCommandError = async (output, context) => {
3847
3945
  });
3848
3946
  }
3849
3947
  };
3948
+ export const de_DescribeBotResourceGenerationCommand = async (output, context) => {
3949
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3950
+ return de_DescribeBotResourceGenerationCommandError(output, context);
3951
+ }
3952
+ const contents = map({
3953
+ $metadata: deserializeMetadata(output),
3954
+ });
3955
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3956
+ const doc = take(data, {
3957
+ botId: __expectString,
3958
+ botVersion: __expectString,
3959
+ creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3960
+ failureReasons: _json,
3961
+ generatedBotLocaleUrl: __expectString,
3962
+ generationId: __expectString,
3963
+ generationInputPrompt: __expectString,
3964
+ generationStatus: __expectString,
3965
+ lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3966
+ localeId: __expectString,
3967
+ modelArn: __expectString,
3968
+ });
3969
+ Object.assign(contents, doc);
3970
+ return contents;
3971
+ };
3972
+ const de_DescribeBotResourceGenerationCommandError = async (output, context) => {
3973
+ const parsedOutput = {
3974
+ ...output,
3975
+ body: await parseErrorBody(output.body, context),
3976
+ };
3977
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3978
+ switch (errorCode) {
3979
+ case "InternalServerException":
3980
+ case "com.amazonaws.lexmodelsv2#InternalServerException":
3981
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3982
+ case "ResourceNotFoundException":
3983
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3984
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3985
+ case "ThrottlingException":
3986
+ case "com.amazonaws.lexmodelsv2#ThrottlingException":
3987
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3988
+ case "ValidationException":
3989
+ case "com.amazonaws.lexmodelsv2#ValidationException":
3990
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3991
+ default:
3992
+ const parsedBody = parsedOutput.body;
3993
+ return throwDefaultError({
3994
+ output,
3995
+ parsedBody,
3996
+ errorCode,
3997
+ });
3998
+ }
3999
+ };
3850
4000
  export const de_DescribeBotVersionCommand = async (output, context) => {
3851
4001
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3852
4002
  return de_DescribeBotVersionCommandError(output, context);
@@ -4488,6 +4638,61 @@ const de_DescribeTestSetGenerationCommandError = async (output, context) => {
4488
4638
  });
4489
4639
  }
4490
4640
  };
4641
+ export const de_GenerateBotElementCommand = async (output, context) => {
4642
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
4643
+ return de_GenerateBotElementCommandError(output, context);
4644
+ }
4645
+ const contents = map({
4646
+ $metadata: deserializeMetadata(output),
4647
+ });
4648
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4649
+ const doc = take(data, {
4650
+ botId: __expectString,
4651
+ botVersion: __expectString,
4652
+ intentId: __expectString,
4653
+ localeId: __expectString,
4654
+ sampleUtterances: _json,
4655
+ });
4656
+ Object.assign(contents, doc);
4657
+ return contents;
4658
+ };
4659
+ const de_GenerateBotElementCommandError = async (output, context) => {
4660
+ const parsedOutput = {
4661
+ ...output,
4662
+ body: await parseErrorBody(output.body, context),
4663
+ };
4664
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4665
+ switch (errorCode) {
4666
+ case "ConflictException":
4667
+ case "com.amazonaws.lexmodelsv2#ConflictException":
4668
+ throw await de_ConflictExceptionRes(parsedOutput, context);
4669
+ case "InternalServerException":
4670
+ case "com.amazonaws.lexmodelsv2#InternalServerException":
4671
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
4672
+ case "PreconditionFailedException":
4673
+ case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
4674
+ throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
4675
+ case "ResourceNotFoundException":
4676
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4677
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4678
+ case "ServiceQuotaExceededException":
4679
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4680
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4681
+ case "ThrottlingException":
4682
+ case "com.amazonaws.lexmodelsv2#ThrottlingException":
4683
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
4684
+ case "ValidationException":
4685
+ case "com.amazonaws.lexmodelsv2#ValidationException":
4686
+ throw await de_ValidationExceptionRes(parsedOutput, context);
4687
+ default:
4688
+ const parsedBody = parsedOutput.body;
4689
+ return throwDefaultError({
4690
+ output,
4691
+ parsedBody,
4692
+ errorCode,
4693
+ });
4694
+ }
4695
+ };
4491
4696
  export const de_GetTestExecutionArtifactsUrlCommand = async (output, context) => {
4492
4697
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4493
4698
  return de_GetTestExecutionArtifactsUrlCommandError(output, context);
@@ -4720,6 +4925,52 @@ const de_ListBotRecommendationsCommandError = async (output, context) => {
4720
4925
  });
4721
4926
  }
4722
4927
  };
4928
+ export const de_ListBotResourceGenerationsCommand = async (output, context) => {
4929
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4930
+ return de_ListBotResourceGenerationsCommandError(output, context);
4931
+ }
4932
+ const contents = map({
4933
+ $metadata: deserializeMetadata(output),
4934
+ });
4935
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4936
+ const doc = take(data, {
4937
+ botId: __expectString,
4938
+ botVersion: __expectString,
4939
+ generationSummaries: (_) => de_GenerationSummaryList(_, context),
4940
+ localeId: __expectString,
4941
+ nextToken: __expectString,
4942
+ });
4943
+ Object.assign(contents, doc);
4944
+ return contents;
4945
+ };
4946
+ const de_ListBotResourceGenerationsCommandError = async (output, context) => {
4947
+ const parsedOutput = {
4948
+ ...output,
4949
+ body: await parseErrorBody(output.body, context),
4950
+ };
4951
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4952
+ switch (errorCode) {
4953
+ case "InternalServerException":
4954
+ case "com.amazonaws.lexmodelsv2#InternalServerException":
4955
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
4956
+ case "ResourceNotFoundException":
4957
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4958
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4959
+ case "ThrottlingException":
4960
+ case "com.amazonaws.lexmodelsv2#ThrottlingException":
4961
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
4962
+ case "ValidationException":
4963
+ case "com.amazonaws.lexmodelsv2#ValidationException":
4964
+ throw await de_ValidationExceptionRes(parsedOutput, context);
4965
+ default:
4966
+ const parsedBody = parsedOutput.body;
4967
+ return throwDefaultError({
4968
+ output,
4969
+ parsedBody,
4970
+ errorCode,
4971
+ });
4972
+ }
4973
+ };
4723
4974
  export const de_ListBotsCommand = async (output, context) => {
4724
4975
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4725
4976
  return de_ListBotsCommandError(output, context);
@@ -5875,6 +6126,60 @@ const de_StartBotRecommendationCommandError = async (output, context) => {
5875
6126
  });
5876
6127
  }
5877
6128
  };
6129
+ export const de_StartBotResourceGenerationCommand = async (output, context) => {
6130
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
6131
+ return de_StartBotResourceGenerationCommandError(output, context);
6132
+ }
6133
+ const contents = map({
6134
+ $metadata: deserializeMetadata(output),
6135
+ });
6136
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6137
+ const doc = take(data, {
6138
+ botId: __expectString,
6139
+ botVersion: __expectString,
6140
+ creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
6141
+ generationId: __expectString,
6142
+ generationInputPrompt: __expectString,
6143
+ generationStatus: __expectString,
6144
+ localeId: __expectString,
6145
+ });
6146
+ Object.assign(contents, doc);
6147
+ return contents;
6148
+ };
6149
+ const de_StartBotResourceGenerationCommandError = async (output, context) => {
6150
+ const parsedOutput = {
6151
+ ...output,
6152
+ body: await parseErrorBody(output.body, context),
6153
+ };
6154
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6155
+ switch (errorCode) {
6156
+ case "ConflictException":
6157
+ case "com.amazonaws.lexmodelsv2#ConflictException":
6158
+ throw await de_ConflictExceptionRes(parsedOutput, context);
6159
+ case "InternalServerException":
6160
+ case "com.amazonaws.lexmodelsv2#InternalServerException":
6161
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
6162
+ case "PreconditionFailedException":
6163
+ case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6164
+ throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6165
+ case "ServiceQuotaExceededException":
6166
+ case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6167
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6168
+ case "ThrottlingException":
6169
+ case "com.amazonaws.lexmodelsv2#ThrottlingException":
6170
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
6171
+ case "ValidationException":
6172
+ case "com.amazonaws.lexmodelsv2#ValidationException":
6173
+ throw await de_ValidationExceptionRes(parsedOutput, context);
6174
+ default:
6175
+ const parsedBody = parsedOutput.body;
6176
+ return throwDefaultError({
6177
+ output,
6178
+ parsedBody,
6179
+ errorCode,
6180
+ });
6181
+ }
6182
+ };
5878
6183
  export const de_StartImportCommand = async (output, context) => {
5879
6184
  if (output.statusCode !== 202 && output.statusCode >= 300) {
5880
6185
  return de_StartImportCommandError(output, context);
@@ -6298,6 +6603,7 @@ export const de_UpdateBotLocaleCommand = async (output, context) => {
6298
6603
  creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
6299
6604
  description: __expectString,
6300
6605
  failureReasons: _json,
6606
+ generativeAISettings: _json,
6301
6607
  lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
6302
6608
  localeId: __expectString,
6303
6609
  localeName: __expectString,
@@ -7031,6 +7337,7 @@ const se_SlotValueElicitationSetting = (input, context) => {
7031
7337
  sampleUtterances: _json,
7032
7338
  slotCaptureSetting: (_) => se_SlotCaptureSetting(_, context),
7033
7339
  slotConstraint: [],
7340
+ slotResolutionSetting: _json,
7034
7341
  waitAndContinueSpecification: _json,
7035
7342
  });
7036
7343
  };
@@ -7450,6 +7757,22 @@ const de_FulfillmentCodeHookSettings = (output, context) => {
7450
7757
  postFulfillmentStatusSpecification: (_) => de_PostFulfillmentStatusSpecification(_, context),
7451
7758
  });
7452
7759
  };
7760
+ const de_GenerationSummary = (output, context) => {
7761
+ return take(output, {
7762
+ creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
7763
+ generationId: __expectString,
7764
+ generationStatus: __expectString,
7765
+ lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
7766
+ });
7767
+ };
7768
+ const de_GenerationSummaryList = (output, context) => {
7769
+ const retVal = (output || [])
7770
+ .filter((e) => e != null)
7771
+ .map((entry) => {
7772
+ return de_GenerationSummary(entry, context);
7773
+ });
7774
+ return retVal;
7775
+ };
7453
7776
  const de_ImportResourceSpecification = (output, context) => {
7454
7777
  return take(output, {
7455
7778
  botImportSpecification: _json,
@@ -7693,6 +8016,7 @@ const de_SlotValueElicitationSetting = (output, context) => {
7693
8016
  sampleUtterances: _json,
7694
8017
  slotCaptureSetting: (_) => de_SlotCaptureSetting(_, context),
7695
8018
  slotConstraint: __expectString,
8019
+ slotResolutionSetting: _json,
7696
8020
  waitAndContinueSpecification: _json,
7697
8021
  });
7698
8022
  };