@aws-sdk/client-bedrock-agent 3.461.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +526 -0
- package/dist-cjs/BedrockAgent.js +91 -0
- package/dist-cjs/BedrockAgentClient.js +43 -0
- package/dist-cjs/commands/AssociateAgentKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/CreateAgentActionGroupCommand.js +52 -0
- package/dist-cjs/commands/CreateAgentAliasCommand.js +51 -0
- package/dist-cjs/commands/CreateAgentCommand.js +52 -0
- package/dist-cjs/commands/CreateDataSourceCommand.js +51 -0
- package/dist-cjs/commands/CreateKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/DeleteAgentActionGroupCommand.js +51 -0
- package/dist-cjs/commands/DeleteAgentAliasCommand.js +51 -0
- package/dist-cjs/commands/DeleteAgentCommand.js +51 -0
- package/dist-cjs/commands/DeleteAgentVersionCommand.js +51 -0
- package/dist-cjs/commands/DeleteDataSourceCommand.js +51 -0
- package/dist-cjs/commands/DeleteKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/DisassociateAgentKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/GetAgentActionGroupCommand.js +52 -0
- package/dist-cjs/commands/GetAgentAliasCommand.js +51 -0
- package/dist-cjs/commands/GetAgentCommand.js +52 -0
- package/dist-cjs/commands/GetAgentKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/GetAgentVersionCommand.js +52 -0
- package/dist-cjs/commands/GetDataSourceCommand.js +51 -0
- package/dist-cjs/commands/GetIngestionJobCommand.js +51 -0
- package/dist-cjs/commands/GetKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/ListAgentActionGroupsCommand.js +51 -0
- package/dist-cjs/commands/ListAgentAliasesCommand.js +51 -0
- package/dist-cjs/commands/ListAgentKnowledgeBasesCommand.js +51 -0
- package/dist-cjs/commands/ListAgentVersionsCommand.js +51 -0
- package/dist-cjs/commands/ListAgentsCommand.js +51 -0
- package/dist-cjs/commands/ListDataSourcesCommand.js +51 -0
- package/dist-cjs/commands/ListIngestionJobsCommand.js +51 -0
- package/dist-cjs/commands/ListKnowledgeBasesCommand.js +51 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
- package/dist-cjs/commands/PrepareAgentCommand.js +51 -0
- package/dist-cjs/commands/StartIngestionJobCommand.js +51 -0
- package/dist-cjs/commands/TagResourceCommand.js +51 -0
- package/dist-cjs/commands/UntagResourceCommand.js +51 -0
- package/dist-cjs/commands/UpdateAgentActionGroupCommand.js +52 -0
- package/dist-cjs/commands/UpdateAgentAliasCommand.js +51 -0
- package/dist-cjs/commands/UpdateAgentCommand.js +52 -0
- package/dist-cjs/commands/UpdateAgentKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/UpdateDataSourceCommand.js +51 -0
- package/dist-cjs/commands/UpdateKnowledgeBaseCommand.js +51 -0
- package/dist-cjs/commands/index.js +43 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/BedrockAgentServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +293 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListAgentActionGroupsPaginator.js +29 -0
- package/dist-cjs/pagination/ListAgentAliasesPaginator.js +29 -0
- package/dist-cjs/pagination/ListAgentKnowledgeBasesPaginator.js +29 -0
- package/dist-cjs/pagination/ListAgentVersionsPaginator.js +29 -0
- package/dist-cjs/pagination/ListAgentsPaginator.js +29 -0
- package/dist-cjs/pagination/ListDataSourcesPaginator.js +29 -0
- package/dist-cjs/pagination/ListIngestionJobsPaginator.js +29 -0
- package/dist-cjs/pagination/ListKnowledgeBasesPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +12 -0
- package/dist-cjs/protocols/Aws_restJson1.js +3362 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/BedrockAgent.js +87 -0
- package/dist-es/BedrockAgentClient.js +39 -0
- package/dist-es/commands/AssociateAgentKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/CreateAgentActionGroupCommand.js +48 -0
- package/dist-es/commands/CreateAgentAliasCommand.js +47 -0
- package/dist-es/commands/CreateAgentCommand.js +48 -0
- package/dist-es/commands/CreateDataSourceCommand.js +47 -0
- package/dist-es/commands/CreateKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/DeleteAgentActionGroupCommand.js +47 -0
- package/dist-es/commands/DeleteAgentAliasCommand.js +47 -0
- package/dist-es/commands/DeleteAgentCommand.js +47 -0
- package/dist-es/commands/DeleteAgentVersionCommand.js +47 -0
- package/dist-es/commands/DeleteDataSourceCommand.js +47 -0
- package/dist-es/commands/DeleteKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/DisassociateAgentKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/GetAgentActionGroupCommand.js +48 -0
- package/dist-es/commands/GetAgentAliasCommand.js +47 -0
- package/dist-es/commands/GetAgentCommand.js +48 -0
- package/dist-es/commands/GetAgentKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/GetAgentVersionCommand.js +48 -0
- package/dist-es/commands/GetDataSourceCommand.js +47 -0
- package/dist-es/commands/GetIngestionJobCommand.js +47 -0
- package/dist-es/commands/GetKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/ListAgentActionGroupsCommand.js +47 -0
- package/dist-es/commands/ListAgentAliasesCommand.js +47 -0
- package/dist-es/commands/ListAgentKnowledgeBasesCommand.js +47 -0
- package/dist-es/commands/ListAgentVersionsCommand.js +47 -0
- package/dist-es/commands/ListAgentsCommand.js +47 -0
- package/dist-es/commands/ListDataSourcesCommand.js +47 -0
- package/dist-es/commands/ListIngestionJobsCommand.js +47 -0
- package/dist-es/commands/ListKnowledgeBasesCommand.js +47 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
- package/dist-es/commands/PrepareAgentCommand.js +47 -0
- package/dist-es/commands/StartIngestionJobCommand.js +47 -0
- package/dist-es/commands/TagResourceCommand.js +47 -0
- package/dist-es/commands/UntagResourceCommand.js +47 -0
- package/dist-es/commands/UpdateAgentActionGroupCommand.js +48 -0
- package/dist-es/commands/UpdateAgentAliasCommand.js +47 -0
- package/dist-es/commands/UpdateAgentCommand.js +48 -0
- package/dist-es/commands/UpdateAgentKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/UpdateDataSourceCommand.js +47 -0
- package/dist-es/commands/UpdateKnowledgeBaseCommand.js +47 -0
- package/dist-es/commands/index.js +40 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/BedrockAgentServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +267 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAgentActionGroupsPaginator.js +25 -0
- package/dist-es/pagination/ListAgentAliasesPaginator.js +25 -0
- package/dist-es/pagination/ListAgentKnowledgeBasesPaginator.js +25 -0
- package/dist-es/pagination/ListAgentVersionsPaginator.js +25 -0
- package/dist-es/pagination/ListAgentsPaginator.js +25 -0
- package/dist-es/pagination/ListDataSourcesPaginator.js +25 -0
- package/dist-es/pagination/ListIngestionJobsPaginator.js +25 -0
- package/dist-es/pagination/ListKnowledgeBasesPaginator.js +25 -0
- package/dist-es/pagination/index.js +9 -0
- package/dist-es/protocols/Aws_restJson1.js +3278 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/BedrockAgent.d.ts +291 -0
- package/dist-types/BedrockAgentClient.d.ts +210 -0
- package/dist-types/commands/AssociateAgentKnowledgeBaseCommand.d.ts +106 -0
- package/dist-types/commands/CreateAgentActionGroupCommand.d.ts +131 -0
- package/dist-types/commands/CreateAgentAliasCommand.d.ts +131 -0
- package/dist-types/commands/CreateAgentCommand.d.ts +165 -0
- package/dist-types/commands/CreateDataSourceCommand.d.ts +147 -0
- package/dist-types/commands/CreateKnowledgeBaseCommand.d.ts +183 -0
- package/dist-types/commands/DeleteAgentActionGroupCommand.d.ts +92 -0
- package/dist-types/commands/DeleteAgentAliasCommand.d.ts +91 -0
- package/dist-types/commands/DeleteAgentCommand.d.ts +93 -0
- package/dist-types/commands/DeleteAgentVersionCommand.d.ts +95 -0
- package/dist-types/commands/DeleteDataSourceCommand.d.ts +94 -0
- package/dist-types/commands/DeleteKnowledgeBaseCommand.d.ts +92 -0
- package/dist-types/commands/DisassociateAgentKnowledgeBaseCommand.d.ts +91 -0
- package/dist-types/commands/GetAgentActionGroupCommand.d.ts +111 -0
- package/dist-types/commands/GetAgentAliasCommand.d.ts +115 -0
- package/dist-types/commands/GetAgentCommand.d.ts +131 -0
- package/dist-types/commands/GetAgentKnowledgeBaseCommand.d.ts +98 -0
- package/dist-types/commands/GetAgentVersionCommand.d.ts +130 -0
- package/dist-types/commands/GetDataSourceCommand.d.ts +118 -0
- package/dist-types/commands/GetIngestionJobCommand.d.ts +108 -0
- package/dist-types/commands/GetKnowledgeBaseCommand.d.ts +137 -0
- package/dist-types/commands/ListAgentActionGroupsCommand.d.ts +100 -0
- package/dist-types/commands/ListAgentAliasesCommand.d.ts +105 -0
- package/dist-types/commands/ListAgentKnowledgeBasesCommand.d.ts +99 -0
- package/dist-types/commands/ListAgentVersionsCommand.d.ts +100 -0
- package/dist-types/commands/ListAgentsCommand.d.ts +96 -0
- package/dist-types/commands/ListDataSourcesCommand.d.ts +100 -0
- package/dist-types/commands/ListIngestionJobsCommand.d.ts +122 -0
- package/dist-types/commands/ListKnowledgeBasesCommand.d.ts +95 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +90 -0
- package/dist-types/commands/PrepareAgentCommand.d.ts +97 -0
- package/dist-types/commands/StartIngestionJobCommand.d.ts +115 -0
- package/dist-types/commands/TagResourceCommand.d.ts +92 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +89 -0
- package/dist-types/commands/UpdateAgentActionGroupCommand.d.ts +131 -0
- package/dist-types/commands/UpdateAgentAliasCommand.d.ts +128 -0
- package/dist-types/commands/UpdateAgentCommand.d.ts +165 -0
- package/dist-types/commands/UpdateAgentKnowledgeBaseCommand.d.ts +103 -0
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +144 -0
- package/dist-types/commands/UpdateKnowledgeBaseCommand.d.ts +180 -0
- package/dist-types/commands/index.d.ts +40 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +16 -0
- package/dist-types/models/BedrockAgentServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +3256 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAgentActionGroupsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAgentAliasesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAgentKnowledgeBasesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAgentVersionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAgentsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDataSourcesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListIngestionJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListKnowledgeBasesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +9 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +362 -0
- package/dist-types/runtimeConfig.browser.d.ts +46 -0
- package/dist-types/runtimeConfig.d.ts +46 -0
- package/dist-types/runtimeConfig.native.d.ts +45 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/BedrockAgent.d.ts +687 -0
- package/dist-types/ts3.4/BedrockAgentClient.d.ts +359 -0
- package/dist-types/ts3.4/commands/AssociateAgentKnowledgeBaseCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/CreateAgentActionGroupCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/CreateAgentAliasCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateAgentCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/CreateDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateKnowledgeBaseCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeleteAgentActionGroupCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteAgentAliasCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteAgentCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/DeleteAgentVersionCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeleteDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteKnowledgeBaseCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DisassociateAgentKnowledgeBaseCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetAgentActionGroupCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetAgentAliasCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetAgentCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetAgentKnowledgeBaseCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetAgentVersionCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetIngestionJobCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetKnowledgeBaseCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListAgentActionGroupsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListAgentAliasesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListAgentKnowledgeBasesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListAgentVersionsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListAgentsCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListDataSourcesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListIngestionJobsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListKnowledgeBasesCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/PrepareAgentCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/StartIngestionJobCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateAgentActionGroupCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdateAgentAliasCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateAgentCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UpdateAgentKnowledgeBaseCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdateDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateKnowledgeBaseCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +40 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/BedrockAgentServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +915 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAgentActionGroupsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAgentAliasesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAgentKnowledgeBasesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAgentVersionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAgentsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDataSourcesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListIngestionJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListKnowledgeBasesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +9 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +485 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +104 -0
|
@@ -0,0 +1,3362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_DeleteAgentVersionCommand = exports.de_DeleteAgentAliasCommand = exports.de_DeleteAgentActionGroupCommand = exports.de_DeleteAgentCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateDataSourceCommand = exports.de_CreateAgentAliasCommand = exports.de_CreateAgentActionGroupCommand = exports.de_CreateAgentCommand = exports.de_AssociateAgentKnowledgeBaseCommand = exports.se_UpdateKnowledgeBaseCommand = exports.se_UpdateDataSourceCommand = exports.se_UpdateAgentKnowledgeBaseCommand = exports.se_UpdateAgentAliasCommand = exports.se_UpdateAgentActionGroupCommand = exports.se_UpdateAgentCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartIngestionJobCommand = exports.se_PrepareAgentCommand = exports.se_ListTagsForResourceCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListIngestionJobsCommand = exports.se_ListDataSourcesCommand = exports.se_ListAgentVersionsCommand = exports.se_ListAgentsCommand = exports.se_ListAgentKnowledgeBasesCommand = exports.se_ListAgentAliasesCommand = exports.se_ListAgentActionGroupsCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetIngestionJobCommand = exports.se_GetDataSourceCommand = exports.se_GetAgentVersionCommand = exports.se_GetAgentKnowledgeBaseCommand = exports.se_GetAgentAliasCommand = exports.se_GetAgentActionGroupCommand = exports.se_GetAgentCommand = exports.se_DisassociateAgentKnowledgeBaseCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteDataSourceCommand = exports.se_DeleteAgentVersionCommand = exports.se_DeleteAgentAliasCommand = exports.se_DeleteAgentActionGroupCommand = exports.se_DeleteAgentCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateDataSourceCommand = exports.se_CreateAgentAliasCommand = exports.se_CreateAgentActionGroupCommand = exports.se_CreateAgentCommand = exports.se_AssociateAgentKnowledgeBaseCommand = void 0;
|
|
4
|
+
exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDataSourceCommand = exports.de_UpdateAgentKnowledgeBaseCommand = exports.de_UpdateAgentAliasCommand = exports.de_UpdateAgentActionGroupCommand = exports.de_UpdateAgentCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartIngestionJobCommand = exports.de_PrepareAgentCommand = exports.de_ListTagsForResourceCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListIngestionJobsCommand = exports.de_ListDataSourcesCommand = exports.de_ListAgentVersionsCommand = exports.de_ListAgentsCommand = exports.de_ListAgentKnowledgeBasesCommand = exports.de_ListAgentAliasesCommand = exports.de_ListAgentActionGroupsCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetIngestionJobCommand = exports.de_GetDataSourceCommand = exports.de_GetAgentVersionCommand = exports.de_GetAgentKnowledgeBaseCommand = exports.de_GetAgentAliasCommand = exports.de_GetAgentActionGroupCommand = exports.de_GetAgentCommand = exports.de_DisassociateAgentKnowledgeBaseCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteDataSourceCommand = void 0;
|
|
5
|
+
const core_1 = require("@aws-sdk/core");
|
|
6
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
7
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
+
const uuid_1 = require("uuid");
|
|
9
|
+
const BedrockAgentServiceException_1 = require("../models/BedrockAgentServiceException");
|
|
10
|
+
const models_0_1 = require("../models/models_0");
|
|
11
|
+
const se_AssociateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
12
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
13
|
+
const headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
17
|
+
"/agents/{agentId}/agentversions/{agentVersion}/knowledgebases";
|
|
18
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
19
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
20
|
+
let body;
|
|
21
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
22
|
+
description: [],
|
|
23
|
+
knowledgeBaseId: [],
|
|
24
|
+
knowledgeBaseState: [],
|
|
25
|
+
}));
|
|
26
|
+
return new protocol_http_1.HttpRequest({
|
|
27
|
+
protocol,
|
|
28
|
+
hostname,
|
|
29
|
+
port,
|
|
30
|
+
method: "PUT",
|
|
31
|
+
headers,
|
|
32
|
+
path: resolvedPath,
|
|
33
|
+
body,
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.se_AssociateAgentKnowledgeBaseCommand = se_AssociateAgentKnowledgeBaseCommand;
|
|
37
|
+
const se_CreateAgentCommand = async (input, context) => {
|
|
38
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
39
|
+
const headers = {
|
|
40
|
+
"content-type": "application/json",
|
|
41
|
+
};
|
|
42
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents";
|
|
43
|
+
let body;
|
|
44
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
45
|
+
agentName: [],
|
|
46
|
+
agentResourceRoleArn: [],
|
|
47
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
48
|
+
customerEncryptionKeyArn: [],
|
|
49
|
+
description: [],
|
|
50
|
+
foundationModel: [],
|
|
51
|
+
idleSessionTTLInSeconds: [],
|
|
52
|
+
instruction: [],
|
|
53
|
+
promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
|
|
54
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
55
|
+
}));
|
|
56
|
+
return new protocol_http_1.HttpRequest({
|
|
57
|
+
protocol,
|
|
58
|
+
hostname,
|
|
59
|
+
port,
|
|
60
|
+
method: "PUT",
|
|
61
|
+
headers,
|
|
62
|
+
path: resolvedPath,
|
|
63
|
+
body,
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
exports.se_CreateAgentCommand = se_CreateAgentCommand;
|
|
67
|
+
const se_CreateAgentActionGroupCommand = async (input, context) => {
|
|
68
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/json",
|
|
71
|
+
};
|
|
72
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
73
|
+
"/agents/{agentId}/agentversions/{agentVersion}/actiongroups";
|
|
74
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
75
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
76
|
+
let body;
|
|
77
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
78
|
+
actionGroupExecutor: (_) => (0, smithy_client_1._json)(_),
|
|
79
|
+
actionGroupName: [],
|
|
80
|
+
actionGroupState: [],
|
|
81
|
+
apiSchema: (_) => (0, smithy_client_1._json)(_),
|
|
82
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
83
|
+
description: [],
|
|
84
|
+
parentActionGroupSignature: [],
|
|
85
|
+
}));
|
|
86
|
+
return new protocol_http_1.HttpRequest({
|
|
87
|
+
protocol,
|
|
88
|
+
hostname,
|
|
89
|
+
port,
|
|
90
|
+
method: "PUT",
|
|
91
|
+
headers,
|
|
92
|
+
path: resolvedPath,
|
|
93
|
+
body,
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
exports.se_CreateAgentActionGroupCommand = se_CreateAgentActionGroupCommand;
|
|
97
|
+
const se_CreateAgentAliasCommand = async (input, context) => {
|
|
98
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
99
|
+
const headers = {
|
|
100
|
+
"content-type": "application/json",
|
|
101
|
+
};
|
|
102
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}/agentaliases";
|
|
103
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
104
|
+
let body;
|
|
105
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
106
|
+
agentAliasName: [],
|
|
107
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
108
|
+
description: [],
|
|
109
|
+
routingConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
110
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
111
|
+
}));
|
|
112
|
+
return new protocol_http_1.HttpRequest({
|
|
113
|
+
protocol,
|
|
114
|
+
hostname,
|
|
115
|
+
port,
|
|
116
|
+
method: "PUT",
|
|
117
|
+
headers,
|
|
118
|
+
path: resolvedPath,
|
|
119
|
+
body,
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
exports.se_CreateAgentAliasCommand = se_CreateAgentAliasCommand;
|
|
123
|
+
const se_CreateDataSourceCommand = async (input, context) => {
|
|
124
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
125
|
+
const headers = {
|
|
126
|
+
"content-type": "application/json",
|
|
127
|
+
};
|
|
128
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
129
|
+
"/knowledgebases/{knowledgeBaseId}/datasources";
|
|
130
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
131
|
+
let body;
|
|
132
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
133
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
134
|
+
dataSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
135
|
+
description: [],
|
|
136
|
+
name: [],
|
|
137
|
+
serverSideEncryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
138
|
+
vectorIngestionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
139
|
+
}));
|
|
140
|
+
return new protocol_http_1.HttpRequest({
|
|
141
|
+
protocol,
|
|
142
|
+
hostname,
|
|
143
|
+
port,
|
|
144
|
+
method: "PUT",
|
|
145
|
+
headers,
|
|
146
|
+
path: resolvedPath,
|
|
147
|
+
body,
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
exports.se_CreateDataSourceCommand = se_CreateDataSourceCommand;
|
|
151
|
+
const se_CreateKnowledgeBaseCommand = async (input, context) => {
|
|
152
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
153
|
+
const headers = {
|
|
154
|
+
"content-type": "application/json",
|
|
155
|
+
};
|
|
156
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases";
|
|
157
|
+
let body;
|
|
158
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
159
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
160
|
+
description: [],
|
|
161
|
+
knowledgeBaseConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
162
|
+
name: [],
|
|
163
|
+
roleArn: [],
|
|
164
|
+
storageConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
165
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
166
|
+
}));
|
|
167
|
+
return new protocol_http_1.HttpRequest({
|
|
168
|
+
protocol,
|
|
169
|
+
hostname,
|
|
170
|
+
port,
|
|
171
|
+
method: "PUT",
|
|
172
|
+
headers,
|
|
173
|
+
path: resolvedPath,
|
|
174
|
+
body,
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
exports.se_CreateKnowledgeBaseCommand = se_CreateKnowledgeBaseCommand;
|
|
178
|
+
const se_DeleteAgentCommand = async (input, context) => {
|
|
179
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
180
|
+
const headers = {};
|
|
181
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
|
|
182
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
183
|
+
const query = (0, smithy_client_1.map)({
|
|
184
|
+
skipResourceInUseCheck: [
|
|
185
|
+
() => input.skipResourceInUseCheck !== void 0,
|
|
186
|
+
() => input.skipResourceInUseCheck.toString(),
|
|
187
|
+
],
|
|
188
|
+
});
|
|
189
|
+
let body;
|
|
190
|
+
return new protocol_http_1.HttpRequest({
|
|
191
|
+
protocol,
|
|
192
|
+
hostname,
|
|
193
|
+
port,
|
|
194
|
+
method: "DELETE",
|
|
195
|
+
headers,
|
|
196
|
+
path: resolvedPath,
|
|
197
|
+
query,
|
|
198
|
+
body,
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
exports.se_DeleteAgentCommand = se_DeleteAgentCommand;
|
|
202
|
+
const se_DeleteAgentActionGroupCommand = async (input, context) => {
|
|
203
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
204
|
+
const headers = {};
|
|
205
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
206
|
+
"/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}";
|
|
207
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
208
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
209
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
|
|
210
|
+
const query = (0, smithy_client_1.map)({
|
|
211
|
+
skipResourceInUseCheck: [
|
|
212
|
+
() => input.skipResourceInUseCheck !== void 0,
|
|
213
|
+
() => input.skipResourceInUseCheck.toString(),
|
|
214
|
+
],
|
|
215
|
+
});
|
|
216
|
+
let body;
|
|
217
|
+
return new protocol_http_1.HttpRequest({
|
|
218
|
+
protocol,
|
|
219
|
+
hostname,
|
|
220
|
+
port,
|
|
221
|
+
method: "DELETE",
|
|
222
|
+
headers,
|
|
223
|
+
path: resolvedPath,
|
|
224
|
+
query,
|
|
225
|
+
body,
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
exports.se_DeleteAgentActionGroupCommand = se_DeleteAgentActionGroupCommand;
|
|
229
|
+
const se_DeleteAgentAliasCommand = async (input, context) => {
|
|
230
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
231
|
+
const headers = {};
|
|
232
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
233
|
+
"/agents/{agentId}/agentaliases/{agentAliasId}";
|
|
234
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
235
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
|
|
236
|
+
let body;
|
|
237
|
+
return new protocol_http_1.HttpRequest({
|
|
238
|
+
protocol,
|
|
239
|
+
hostname,
|
|
240
|
+
port,
|
|
241
|
+
method: "DELETE",
|
|
242
|
+
headers,
|
|
243
|
+
path: resolvedPath,
|
|
244
|
+
body,
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
exports.se_DeleteAgentAliasCommand = se_DeleteAgentAliasCommand;
|
|
248
|
+
const se_DeleteAgentVersionCommand = async (input, context) => {
|
|
249
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
250
|
+
const headers = {};
|
|
251
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
252
|
+
"/agents/{agentId}/agentversions/{agentVersion}";
|
|
253
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
254
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
255
|
+
const query = (0, smithy_client_1.map)({
|
|
256
|
+
skipResourceInUseCheck: [
|
|
257
|
+
() => input.skipResourceInUseCheck !== void 0,
|
|
258
|
+
() => input.skipResourceInUseCheck.toString(),
|
|
259
|
+
],
|
|
260
|
+
});
|
|
261
|
+
let body;
|
|
262
|
+
return new protocol_http_1.HttpRequest({
|
|
263
|
+
protocol,
|
|
264
|
+
hostname,
|
|
265
|
+
port,
|
|
266
|
+
method: "DELETE",
|
|
267
|
+
headers,
|
|
268
|
+
path: resolvedPath,
|
|
269
|
+
query,
|
|
270
|
+
body,
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
exports.se_DeleteAgentVersionCommand = se_DeleteAgentVersionCommand;
|
|
274
|
+
const se_DeleteDataSourceCommand = async (input, context) => {
|
|
275
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
276
|
+
const headers = {};
|
|
277
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
278
|
+
"/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}";
|
|
279
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
280
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
281
|
+
let body;
|
|
282
|
+
return new protocol_http_1.HttpRequest({
|
|
283
|
+
protocol,
|
|
284
|
+
hostname,
|
|
285
|
+
port,
|
|
286
|
+
method: "DELETE",
|
|
287
|
+
headers,
|
|
288
|
+
path: resolvedPath,
|
|
289
|
+
body,
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
exports.se_DeleteDataSourceCommand = se_DeleteDataSourceCommand;
|
|
293
|
+
const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
294
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
295
|
+
const headers = {};
|
|
296
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases/{knowledgeBaseId}";
|
|
297
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
298
|
+
let body;
|
|
299
|
+
return new protocol_http_1.HttpRequest({
|
|
300
|
+
protocol,
|
|
301
|
+
hostname,
|
|
302
|
+
port,
|
|
303
|
+
method: "DELETE",
|
|
304
|
+
headers,
|
|
305
|
+
path: resolvedPath,
|
|
306
|
+
body,
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
exports.se_DeleteKnowledgeBaseCommand = se_DeleteKnowledgeBaseCommand;
|
|
310
|
+
const se_DisassociateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
311
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
312
|
+
const headers = {};
|
|
313
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
314
|
+
"/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}";
|
|
315
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
316
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
317
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
318
|
+
let body;
|
|
319
|
+
return new protocol_http_1.HttpRequest({
|
|
320
|
+
protocol,
|
|
321
|
+
hostname,
|
|
322
|
+
port,
|
|
323
|
+
method: "DELETE",
|
|
324
|
+
headers,
|
|
325
|
+
path: resolvedPath,
|
|
326
|
+
body,
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
exports.se_DisassociateAgentKnowledgeBaseCommand = se_DisassociateAgentKnowledgeBaseCommand;
|
|
330
|
+
const se_GetAgentCommand = async (input, context) => {
|
|
331
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
332
|
+
const headers = {};
|
|
333
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
|
|
334
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
335
|
+
let body;
|
|
336
|
+
return new protocol_http_1.HttpRequest({
|
|
337
|
+
protocol,
|
|
338
|
+
hostname,
|
|
339
|
+
port,
|
|
340
|
+
method: "GET",
|
|
341
|
+
headers,
|
|
342
|
+
path: resolvedPath,
|
|
343
|
+
body,
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
exports.se_GetAgentCommand = se_GetAgentCommand;
|
|
347
|
+
const se_GetAgentActionGroupCommand = async (input, context) => {
|
|
348
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
349
|
+
const headers = {};
|
|
350
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
351
|
+
"/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}";
|
|
352
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
353
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
354
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
|
|
355
|
+
let body;
|
|
356
|
+
return new protocol_http_1.HttpRequest({
|
|
357
|
+
protocol,
|
|
358
|
+
hostname,
|
|
359
|
+
port,
|
|
360
|
+
method: "GET",
|
|
361
|
+
headers,
|
|
362
|
+
path: resolvedPath,
|
|
363
|
+
body,
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
exports.se_GetAgentActionGroupCommand = se_GetAgentActionGroupCommand;
|
|
367
|
+
const se_GetAgentAliasCommand = async (input, context) => {
|
|
368
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
369
|
+
const headers = {};
|
|
370
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
371
|
+
"/agents/{agentId}/agentaliases/{agentAliasId}";
|
|
372
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
373
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
|
|
374
|
+
let body;
|
|
375
|
+
return new protocol_http_1.HttpRequest({
|
|
376
|
+
protocol,
|
|
377
|
+
hostname,
|
|
378
|
+
port,
|
|
379
|
+
method: "GET",
|
|
380
|
+
headers,
|
|
381
|
+
path: resolvedPath,
|
|
382
|
+
body,
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
exports.se_GetAgentAliasCommand = se_GetAgentAliasCommand;
|
|
386
|
+
const se_GetAgentKnowledgeBaseCommand = async (input, context) => {
|
|
387
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
388
|
+
const headers = {};
|
|
389
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
390
|
+
"/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}";
|
|
391
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
392
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
393
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
394
|
+
let body;
|
|
395
|
+
return new protocol_http_1.HttpRequest({
|
|
396
|
+
protocol,
|
|
397
|
+
hostname,
|
|
398
|
+
port,
|
|
399
|
+
method: "GET",
|
|
400
|
+
headers,
|
|
401
|
+
path: resolvedPath,
|
|
402
|
+
body,
|
|
403
|
+
});
|
|
404
|
+
};
|
|
405
|
+
exports.se_GetAgentKnowledgeBaseCommand = se_GetAgentKnowledgeBaseCommand;
|
|
406
|
+
const se_GetAgentVersionCommand = async (input, context) => {
|
|
407
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
408
|
+
const headers = {};
|
|
409
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
410
|
+
"/agents/{agentId}/agentversions/{agentVersion}";
|
|
411
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
412
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
413
|
+
let body;
|
|
414
|
+
return new protocol_http_1.HttpRequest({
|
|
415
|
+
protocol,
|
|
416
|
+
hostname,
|
|
417
|
+
port,
|
|
418
|
+
method: "GET",
|
|
419
|
+
headers,
|
|
420
|
+
path: resolvedPath,
|
|
421
|
+
body,
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
exports.se_GetAgentVersionCommand = se_GetAgentVersionCommand;
|
|
425
|
+
const se_GetDataSourceCommand = async (input, context) => {
|
|
426
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
427
|
+
const headers = {};
|
|
428
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
429
|
+
"/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}";
|
|
430
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
431
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
432
|
+
let body;
|
|
433
|
+
return new protocol_http_1.HttpRequest({
|
|
434
|
+
protocol,
|
|
435
|
+
hostname,
|
|
436
|
+
port,
|
|
437
|
+
method: "GET",
|
|
438
|
+
headers,
|
|
439
|
+
path: resolvedPath,
|
|
440
|
+
body,
|
|
441
|
+
});
|
|
442
|
+
};
|
|
443
|
+
exports.se_GetDataSourceCommand = se_GetDataSourceCommand;
|
|
444
|
+
const se_GetIngestionJobCommand = async (input, context) => {
|
|
445
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
446
|
+
const headers = {};
|
|
447
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
448
|
+
"/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs/{ingestionJobId}";
|
|
449
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
450
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
451
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ingestionJobId", () => input.ingestionJobId, "{ingestionJobId}", false);
|
|
452
|
+
let body;
|
|
453
|
+
return new protocol_http_1.HttpRequest({
|
|
454
|
+
protocol,
|
|
455
|
+
hostname,
|
|
456
|
+
port,
|
|
457
|
+
method: "GET",
|
|
458
|
+
headers,
|
|
459
|
+
path: resolvedPath,
|
|
460
|
+
body,
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
exports.se_GetIngestionJobCommand = se_GetIngestionJobCommand;
|
|
464
|
+
const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
465
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
466
|
+
const headers = {};
|
|
467
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases/{knowledgeBaseId}";
|
|
468
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
469
|
+
let body;
|
|
470
|
+
return new protocol_http_1.HttpRequest({
|
|
471
|
+
protocol,
|
|
472
|
+
hostname,
|
|
473
|
+
port,
|
|
474
|
+
method: "GET",
|
|
475
|
+
headers,
|
|
476
|
+
path: resolvedPath,
|
|
477
|
+
body,
|
|
478
|
+
});
|
|
479
|
+
};
|
|
480
|
+
exports.se_GetKnowledgeBaseCommand = se_GetKnowledgeBaseCommand;
|
|
481
|
+
const se_ListAgentActionGroupsCommand = async (input, context) => {
|
|
482
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
483
|
+
const headers = {
|
|
484
|
+
"content-type": "application/json",
|
|
485
|
+
};
|
|
486
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
487
|
+
"/agents/{agentId}/agentversions/{agentVersion}/actiongroups";
|
|
488
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
489
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
490
|
+
let body;
|
|
491
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
492
|
+
maxResults: [],
|
|
493
|
+
nextToken: [],
|
|
494
|
+
}));
|
|
495
|
+
return new protocol_http_1.HttpRequest({
|
|
496
|
+
protocol,
|
|
497
|
+
hostname,
|
|
498
|
+
port,
|
|
499
|
+
method: "POST",
|
|
500
|
+
headers,
|
|
501
|
+
path: resolvedPath,
|
|
502
|
+
body,
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
exports.se_ListAgentActionGroupsCommand = se_ListAgentActionGroupsCommand;
|
|
506
|
+
const se_ListAgentAliasesCommand = async (input, context) => {
|
|
507
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
508
|
+
const headers = {
|
|
509
|
+
"content-type": "application/json",
|
|
510
|
+
};
|
|
511
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}/agentaliases";
|
|
512
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
513
|
+
let body;
|
|
514
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
515
|
+
maxResults: [],
|
|
516
|
+
nextToken: [],
|
|
517
|
+
}));
|
|
518
|
+
return new protocol_http_1.HttpRequest({
|
|
519
|
+
protocol,
|
|
520
|
+
hostname,
|
|
521
|
+
port,
|
|
522
|
+
method: "POST",
|
|
523
|
+
headers,
|
|
524
|
+
path: resolvedPath,
|
|
525
|
+
body,
|
|
526
|
+
});
|
|
527
|
+
};
|
|
528
|
+
exports.se_ListAgentAliasesCommand = se_ListAgentAliasesCommand;
|
|
529
|
+
const se_ListAgentKnowledgeBasesCommand = async (input, context) => {
|
|
530
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
531
|
+
const headers = {
|
|
532
|
+
"content-type": "application/json",
|
|
533
|
+
};
|
|
534
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
535
|
+
"/agents/{agentId}/agentversions/{agentVersion}/knowledgebases";
|
|
536
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
537
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
538
|
+
let body;
|
|
539
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
540
|
+
maxResults: [],
|
|
541
|
+
nextToken: [],
|
|
542
|
+
}));
|
|
543
|
+
return new protocol_http_1.HttpRequest({
|
|
544
|
+
protocol,
|
|
545
|
+
hostname,
|
|
546
|
+
port,
|
|
547
|
+
method: "POST",
|
|
548
|
+
headers,
|
|
549
|
+
path: resolvedPath,
|
|
550
|
+
body,
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
exports.se_ListAgentKnowledgeBasesCommand = se_ListAgentKnowledgeBasesCommand;
|
|
554
|
+
const se_ListAgentsCommand = async (input, context) => {
|
|
555
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
556
|
+
const headers = {
|
|
557
|
+
"content-type": "application/json",
|
|
558
|
+
};
|
|
559
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents";
|
|
560
|
+
let body;
|
|
561
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
562
|
+
maxResults: [],
|
|
563
|
+
nextToken: [],
|
|
564
|
+
}));
|
|
565
|
+
return new protocol_http_1.HttpRequest({
|
|
566
|
+
protocol,
|
|
567
|
+
hostname,
|
|
568
|
+
port,
|
|
569
|
+
method: "POST",
|
|
570
|
+
headers,
|
|
571
|
+
path: resolvedPath,
|
|
572
|
+
body,
|
|
573
|
+
});
|
|
574
|
+
};
|
|
575
|
+
exports.se_ListAgentsCommand = se_ListAgentsCommand;
|
|
576
|
+
const se_ListAgentVersionsCommand = async (input, context) => {
|
|
577
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
578
|
+
const headers = {
|
|
579
|
+
"content-type": "application/json",
|
|
580
|
+
};
|
|
581
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}/agentversions";
|
|
582
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
583
|
+
let body;
|
|
584
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
585
|
+
maxResults: [],
|
|
586
|
+
nextToken: [],
|
|
587
|
+
}));
|
|
588
|
+
return new protocol_http_1.HttpRequest({
|
|
589
|
+
protocol,
|
|
590
|
+
hostname,
|
|
591
|
+
port,
|
|
592
|
+
method: "POST",
|
|
593
|
+
headers,
|
|
594
|
+
path: resolvedPath,
|
|
595
|
+
body,
|
|
596
|
+
});
|
|
597
|
+
};
|
|
598
|
+
exports.se_ListAgentVersionsCommand = se_ListAgentVersionsCommand;
|
|
599
|
+
const se_ListDataSourcesCommand = async (input, context) => {
|
|
600
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
601
|
+
const headers = {
|
|
602
|
+
"content-type": "application/json",
|
|
603
|
+
};
|
|
604
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
605
|
+
"/knowledgebases/{knowledgeBaseId}/datasources";
|
|
606
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
607
|
+
let body;
|
|
608
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
609
|
+
maxResults: [],
|
|
610
|
+
nextToken: [],
|
|
611
|
+
}));
|
|
612
|
+
return new protocol_http_1.HttpRequest({
|
|
613
|
+
protocol,
|
|
614
|
+
hostname,
|
|
615
|
+
port,
|
|
616
|
+
method: "POST",
|
|
617
|
+
headers,
|
|
618
|
+
path: resolvedPath,
|
|
619
|
+
body,
|
|
620
|
+
});
|
|
621
|
+
};
|
|
622
|
+
exports.se_ListDataSourcesCommand = se_ListDataSourcesCommand;
|
|
623
|
+
const se_ListIngestionJobsCommand = async (input, context) => {
|
|
624
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
625
|
+
const headers = {
|
|
626
|
+
"content-type": "application/json",
|
|
627
|
+
};
|
|
628
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
629
|
+
"/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs";
|
|
630
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
631
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
632
|
+
let body;
|
|
633
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
634
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
635
|
+
maxResults: [],
|
|
636
|
+
nextToken: [],
|
|
637
|
+
sortBy: (_) => (0, smithy_client_1._json)(_),
|
|
638
|
+
}));
|
|
639
|
+
return new protocol_http_1.HttpRequest({
|
|
640
|
+
protocol,
|
|
641
|
+
hostname,
|
|
642
|
+
port,
|
|
643
|
+
method: "POST",
|
|
644
|
+
headers,
|
|
645
|
+
path: resolvedPath,
|
|
646
|
+
body,
|
|
647
|
+
});
|
|
648
|
+
};
|
|
649
|
+
exports.se_ListIngestionJobsCommand = se_ListIngestionJobsCommand;
|
|
650
|
+
const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
651
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
652
|
+
const headers = {
|
|
653
|
+
"content-type": "application/json",
|
|
654
|
+
};
|
|
655
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases";
|
|
656
|
+
let body;
|
|
657
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
658
|
+
maxResults: [],
|
|
659
|
+
nextToken: [],
|
|
660
|
+
}));
|
|
661
|
+
return new protocol_http_1.HttpRequest({
|
|
662
|
+
protocol,
|
|
663
|
+
hostname,
|
|
664
|
+
port,
|
|
665
|
+
method: "POST",
|
|
666
|
+
headers,
|
|
667
|
+
path: resolvedPath,
|
|
668
|
+
body,
|
|
669
|
+
});
|
|
670
|
+
};
|
|
671
|
+
exports.se_ListKnowledgeBasesCommand = se_ListKnowledgeBasesCommand;
|
|
672
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
673
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
674
|
+
const headers = {};
|
|
675
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
676
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
677
|
+
let body;
|
|
678
|
+
return new protocol_http_1.HttpRequest({
|
|
679
|
+
protocol,
|
|
680
|
+
hostname,
|
|
681
|
+
port,
|
|
682
|
+
method: "GET",
|
|
683
|
+
headers,
|
|
684
|
+
path: resolvedPath,
|
|
685
|
+
body,
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
689
|
+
const se_PrepareAgentCommand = async (input, context) => {
|
|
690
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
691
|
+
const headers = {};
|
|
692
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
|
|
693
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
694
|
+
let body;
|
|
695
|
+
return new protocol_http_1.HttpRequest({
|
|
696
|
+
protocol,
|
|
697
|
+
hostname,
|
|
698
|
+
port,
|
|
699
|
+
method: "POST",
|
|
700
|
+
headers,
|
|
701
|
+
path: resolvedPath,
|
|
702
|
+
body,
|
|
703
|
+
});
|
|
704
|
+
};
|
|
705
|
+
exports.se_PrepareAgentCommand = se_PrepareAgentCommand;
|
|
706
|
+
const se_StartIngestionJobCommand = async (input, context) => {
|
|
707
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
708
|
+
const headers = {
|
|
709
|
+
"content-type": "application/json",
|
|
710
|
+
};
|
|
711
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
712
|
+
"/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs";
|
|
713
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
714
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
715
|
+
let body;
|
|
716
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
717
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
718
|
+
description: [],
|
|
719
|
+
}));
|
|
720
|
+
return new protocol_http_1.HttpRequest({
|
|
721
|
+
protocol,
|
|
722
|
+
hostname,
|
|
723
|
+
port,
|
|
724
|
+
method: "PUT",
|
|
725
|
+
headers,
|
|
726
|
+
path: resolvedPath,
|
|
727
|
+
body,
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
exports.se_StartIngestionJobCommand = se_StartIngestionJobCommand;
|
|
731
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
732
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
733
|
+
const headers = {
|
|
734
|
+
"content-type": "application/json",
|
|
735
|
+
};
|
|
736
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
737
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
738
|
+
let body;
|
|
739
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
740
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
741
|
+
}));
|
|
742
|
+
return new protocol_http_1.HttpRequest({
|
|
743
|
+
protocol,
|
|
744
|
+
hostname,
|
|
745
|
+
port,
|
|
746
|
+
method: "POST",
|
|
747
|
+
headers,
|
|
748
|
+
path: resolvedPath,
|
|
749
|
+
body,
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
753
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
754
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
755
|
+
const headers = {};
|
|
756
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
757
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
758
|
+
const query = (0, smithy_client_1.map)({
|
|
759
|
+
tagKeys: [
|
|
760
|
+
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
761
|
+
() => (input.tagKeys || []).map((_entry) => _entry),
|
|
762
|
+
],
|
|
763
|
+
});
|
|
764
|
+
let body;
|
|
765
|
+
return new protocol_http_1.HttpRequest({
|
|
766
|
+
protocol,
|
|
767
|
+
hostname,
|
|
768
|
+
port,
|
|
769
|
+
method: "DELETE",
|
|
770
|
+
headers,
|
|
771
|
+
path: resolvedPath,
|
|
772
|
+
query,
|
|
773
|
+
body,
|
|
774
|
+
});
|
|
775
|
+
};
|
|
776
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
777
|
+
const se_UpdateAgentCommand = async (input, context) => {
|
|
778
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
779
|
+
const headers = {
|
|
780
|
+
"content-type": "application/json",
|
|
781
|
+
};
|
|
782
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
|
|
783
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
784
|
+
let body;
|
|
785
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
786
|
+
agentName: [],
|
|
787
|
+
agentResourceRoleArn: [],
|
|
788
|
+
customerEncryptionKeyArn: [],
|
|
789
|
+
description: [],
|
|
790
|
+
foundationModel: [],
|
|
791
|
+
idleSessionTTLInSeconds: [],
|
|
792
|
+
instruction: [],
|
|
793
|
+
promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
|
|
794
|
+
}));
|
|
795
|
+
return new protocol_http_1.HttpRequest({
|
|
796
|
+
protocol,
|
|
797
|
+
hostname,
|
|
798
|
+
port,
|
|
799
|
+
method: "PUT",
|
|
800
|
+
headers,
|
|
801
|
+
path: resolvedPath,
|
|
802
|
+
body,
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
exports.se_UpdateAgentCommand = se_UpdateAgentCommand;
|
|
806
|
+
const se_UpdateAgentActionGroupCommand = async (input, context) => {
|
|
807
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
808
|
+
const headers = {
|
|
809
|
+
"content-type": "application/json",
|
|
810
|
+
};
|
|
811
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
812
|
+
"/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}";
|
|
813
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
814
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
815
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
|
|
816
|
+
let body;
|
|
817
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
818
|
+
actionGroupExecutor: (_) => (0, smithy_client_1._json)(_),
|
|
819
|
+
actionGroupName: [],
|
|
820
|
+
actionGroupState: [],
|
|
821
|
+
apiSchema: (_) => (0, smithy_client_1._json)(_),
|
|
822
|
+
description: [],
|
|
823
|
+
parentActionGroupSignature: [],
|
|
824
|
+
}));
|
|
825
|
+
return new protocol_http_1.HttpRequest({
|
|
826
|
+
protocol,
|
|
827
|
+
hostname,
|
|
828
|
+
port,
|
|
829
|
+
method: "PUT",
|
|
830
|
+
headers,
|
|
831
|
+
path: resolvedPath,
|
|
832
|
+
body,
|
|
833
|
+
});
|
|
834
|
+
};
|
|
835
|
+
exports.se_UpdateAgentActionGroupCommand = se_UpdateAgentActionGroupCommand;
|
|
836
|
+
const se_UpdateAgentAliasCommand = async (input, context) => {
|
|
837
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
838
|
+
const headers = {
|
|
839
|
+
"content-type": "application/json",
|
|
840
|
+
};
|
|
841
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
842
|
+
"/agents/{agentId}/agentaliases/{agentAliasId}";
|
|
843
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
844
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
|
|
845
|
+
let body;
|
|
846
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
847
|
+
agentAliasName: [],
|
|
848
|
+
description: [],
|
|
849
|
+
routingConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
850
|
+
}));
|
|
851
|
+
return new protocol_http_1.HttpRequest({
|
|
852
|
+
protocol,
|
|
853
|
+
hostname,
|
|
854
|
+
port,
|
|
855
|
+
method: "PUT",
|
|
856
|
+
headers,
|
|
857
|
+
path: resolvedPath,
|
|
858
|
+
body,
|
|
859
|
+
});
|
|
860
|
+
};
|
|
861
|
+
exports.se_UpdateAgentAliasCommand = se_UpdateAgentAliasCommand;
|
|
862
|
+
const se_UpdateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
863
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
864
|
+
const headers = {
|
|
865
|
+
"content-type": "application/json",
|
|
866
|
+
};
|
|
867
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
868
|
+
"/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}";
|
|
869
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
|
|
870
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
871
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
872
|
+
let body;
|
|
873
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
874
|
+
description: [],
|
|
875
|
+
knowledgeBaseState: [],
|
|
876
|
+
}));
|
|
877
|
+
return new protocol_http_1.HttpRequest({
|
|
878
|
+
protocol,
|
|
879
|
+
hostname,
|
|
880
|
+
port,
|
|
881
|
+
method: "PUT",
|
|
882
|
+
headers,
|
|
883
|
+
path: resolvedPath,
|
|
884
|
+
body,
|
|
885
|
+
});
|
|
886
|
+
};
|
|
887
|
+
exports.se_UpdateAgentKnowledgeBaseCommand = se_UpdateAgentKnowledgeBaseCommand;
|
|
888
|
+
const se_UpdateDataSourceCommand = async (input, context) => {
|
|
889
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
890
|
+
const headers = {
|
|
891
|
+
"content-type": "application/json",
|
|
892
|
+
};
|
|
893
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
894
|
+
"/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}";
|
|
895
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
896
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
897
|
+
let body;
|
|
898
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
899
|
+
dataSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
900
|
+
description: [],
|
|
901
|
+
name: [],
|
|
902
|
+
serverSideEncryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
903
|
+
vectorIngestionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
904
|
+
}));
|
|
905
|
+
return new protocol_http_1.HttpRequest({
|
|
906
|
+
protocol,
|
|
907
|
+
hostname,
|
|
908
|
+
port,
|
|
909
|
+
method: "PUT",
|
|
910
|
+
headers,
|
|
911
|
+
path: resolvedPath,
|
|
912
|
+
body,
|
|
913
|
+
});
|
|
914
|
+
};
|
|
915
|
+
exports.se_UpdateDataSourceCommand = se_UpdateDataSourceCommand;
|
|
916
|
+
const se_UpdateKnowledgeBaseCommand = async (input, context) => {
|
|
917
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
918
|
+
const headers = {
|
|
919
|
+
"content-type": "application/json",
|
|
920
|
+
};
|
|
921
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases/{knowledgeBaseId}";
|
|
922
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
923
|
+
let body;
|
|
924
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
925
|
+
description: [],
|
|
926
|
+
knowledgeBaseConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
927
|
+
name: [],
|
|
928
|
+
roleArn: [],
|
|
929
|
+
storageConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
930
|
+
}));
|
|
931
|
+
return new protocol_http_1.HttpRequest({
|
|
932
|
+
protocol,
|
|
933
|
+
hostname,
|
|
934
|
+
port,
|
|
935
|
+
method: "PUT",
|
|
936
|
+
headers,
|
|
937
|
+
path: resolvedPath,
|
|
938
|
+
body,
|
|
939
|
+
});
|
|
940
|
+
};
|
|
941
|
+
exports.se_UpdateKnowledgeBaseCommand = se_UpdateKnowledgeBaseCommand;
|
|
942
|
+
const de_AssociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
943
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
944
|
+
return de_AssociateAgentKnowledgeBaseCommandError(output, context);
|
|
945
|
+
}
|
|
946
|
+
const contents = (0, smithy_client_1.map)({
|
|
947
|
+
$metadata: deserializeMetadata(output),
|
|
948
|
+
});
|
|
949
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
950
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
951
|
+
agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context),
|
|
952
|
+
});
|
|
953
|
+
Object.assign(contents, doc);
|
|
954
|
+
return contents;
|
|
955
|
+
};
|
|
956
|
+
exports.de_AssociateAgentKnowledgeBaseCommand = de_AssociateAgentKnowledgeBaseCommand;
|
|
957
|
+
const de_AssociateAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
958
|
+
const parsedOutput = {
|
|
959
|
+
...output,
|
|
960
|
+
body: await parseErrorBody(output.body, context),
|
|
961
|
+
};
|
|
962
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
963
|
+
switch (errorCode) {
|
|
964
|
+
case "AccessDeniedException":
|
|
965
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
966
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
967
|
+
case "ConflictException":
|
|
968
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
969
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
970
|
+
case "InternalServerException":
|
|
971
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
972
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
973
|
+
case "ResourceNotFoundException":
|
|
974
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
975
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
976
|
+
case "ServiceQuotaExceededException":
|
|
977
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
978
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
979
|
+
case "ThrottlingException":
|
|
980
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
981
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
982
|
+
case "ValidationException":
|
|
983
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
984
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
985
|
+
default:
|
|
986
|
+
const parsedBody = parsedOutput.body;
|
|
987
|
+
return throwDefaultError({
|
|
988
|
+
output,
|
|
989
|
+
parsedBody,
|
|
990
|
+
errorCode,
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
const de_CreateAgentCommand = async (output, context) => {
|
|
995
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
996
|
+
return de_CreateAgentCommandError(output, context);
|
|
997
|
+
}
|
|
998
|
+
const contents = (0, smithy_client_1.map)({
|
|
999
|
+
$metadata: deserializeMetadata(output),
|
|
1000
|
+
});
|
|
1001
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1002
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1003
|
+
agent: (_) => de_Agent(_, context),
|
|
1004
|
+
});
|
|
1005
|
+
Object.assign(contents, doc);
|
|
1006
|
+
return contents;
|
|
1007
|
+
};
|
|
1008
|
+
exports.de_CreateAgentCommand = de_CreateAgentCommand;
|
|
1009
|
+
const de_CreateAgentCommandError = async (output, context) => {
|
|
1010
|
+
const parsedOutput = {
|
|
1011
|
+
...output,
|
|
1012
|
+
body: await parseErrorBody(output.body, context),
|
|
1013
|
+
};
|
|
1014
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1015
|
+
switch (errorCode) {
|
|
1016
|
+
case "AccessDeniedException":
|
|
1017
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1018
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1019
|
+
case "ConflictException":
|
|
1020
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1021
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1022
|
+
case "InternalServerException":
|
|
1023
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1024
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1025
|
+
case "ServiceQuotaExceededException":
|
|
1026
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
1027
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1028
|
+
case "ThrottlingException":
|
|
1029
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1030
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1031
|
+
case "ValidationException":
|
|
1032
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1033
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1034
|
+
default:
|
|
1035
|
+
const parsedBody = parsedOutput.body;
|
|
1036
|
+
return throwDefaultError({
|
|
1037
|
+
output,
|
|
1038
|
+
parsedBody,
|
|
1039
|
+
errorCode,
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
const de_CreateAgentActionGroupCommand = async (output, context) => {
|
|
1044
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1045
|
+
return de_CreateAgentActionGroupCommandError(output, context);
|
|
1046
|
+
}
|
|
1047
|
+
const contents = (0, smithy_client_1.map)({
|
|
1048
|
+
$metadata: deserializeMetadata(output),
|
|
1049
|
+
});
|
|
1050
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1051
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1052
|
+
agentActionGroup: (_) => de_AgentActionGroup(_, context),
|
|
1053
|
+
});
|
|
1054
|
+
Object.assign(contents, doc);
|
|
1055
|
+
return contents;
|
|
1056
|
+
};
|
|
1057
|
+
exports.de_CreateAgentActionGroupCommand = de_CreateAgentActionGroupCommand;
|
|
1058
|
+
const de_CreateAgentActionGroupCommandError = async (output, context) => {
|
|
1059
|
+
const parsedOutput = {
|
|
1060
|
+
...output,
|
|
1061
|
+
body: await parseErrorBody(output.body, context),
|
|
1062
|
+
};
|
|
1063
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1064
|
+
switch (errorCode) {
|
|
1065
|
+
case "AccessDeniedException":
|
|
1066
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1067
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1068
|
+
case "ConflictException":
|
|
1069
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1070
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1071
|
+
case "InternalServerException":
|
|
1072
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1073
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1074
|
+
case "ResourceNotFoundException":
|
|
1075
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1076
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1077
|
+
case "ServiceQuotaExceededException":
|
|
1078
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
1079
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1080
|
+
case "ThrottlingException":
|
|
1081
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1082
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1083
|
+
case "ValidationException":
|
|
1084
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1085
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1086
|
+
default:
|
|
1087
|
+
const parsedBody = parsedOutput.body;
|
|
1088
|
+
return throwDefaultError({
|
|
1089
|
+
output,
|
|
1090
|
+
parsedBody,
|
|
1091
|
+
errorCode,
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
const de_CreateAgentAliasCommand = async (output, context) => {
|
|
1096
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1097
|
+
return de_CreateAgentAliasCommandError(output, context);
|
|
1098
|
+
}
|
|
1099
|
+
const contents = (0, smithy_client_1.map)({
|
|
1100
|
+
$metadata: deserializeMetadata(output),
|
|
1101
|
+
});
|
|
1102
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1103
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1104
|
+
agentAlias: (_) => de_AgentAlias(_, context),
|
|
1105
|
+
});
|
|
1106
|
+
Object.assign(contents, doc);
|
|
1107
|
+
return contents;
|
|
1108
|
+
};
|
|
1109
|
+
exports.de_CreateAgentAliasCommand = de_CreateAgentAliasCommand;
|
|
1110
|
+
const de_CreateAgentAliasCommandError = async (output, context) => {
|
|
1111
|
+
const parsedOutput = {
|
|
1112
|
+
...output,
|
|
1113
|
+
body: await parseErrorBody(output.body, context),
|
|
1114
|
+
};
|
|
1115
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1116
|
+
switch (errorCode) {
|
|
1117
|
+
case "AccessDeniedException":
|
|
1118
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1119
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1120
|
+
case "ConflictException":
|
|
1121
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1122
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1123
|
+
case "InternalServerException":
|
|
1124
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1125
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1126
|
+
case "ResourceNotFoundException":
|
|
1127
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1128
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1129
|
+
case "ServiceQuotaExceededException":
|
|
1130
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
1131
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1132
|
+
case "ThrottlingException":
|
|
1133
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1134
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1135
|
+
case "ValidationException":
|
|
1136
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1137
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1138
|
+
default:
|
|
1139
|
+
const parsedBody = parsedOutput.body;
|
|
1140
|
+
return throwDefaultError({
|
|
1141
|
+
output,
|
|
1142
|
+
parsedBody,
|
|
1143
|
+
errorCode,
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
const de_CreateDataSourceCommand = async (output, context) => {
|
|
1148
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1149
|
+
return de_CreateDataSourceCommandError(output, context);
|
|
1150
|
+
}
|
|
1151
|
+
const contents = (0, smithy_client_1.map)({
|
|
1152
|
+
$metadata: deserializeMetadata(output),
|
|
1153
|
+
});
|
|
1154
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1155
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1156
|
+
dataSource: (_) => de_DataSource(_, context),
|
|
1157
|
+
});
|
|
1158
|
+
Object.assign(contents, doc);
|
|
1159
|
+
return contents;
|
|
1160
|
+
};
|
|
1161
|
+
exports.de_CreateDataSourceCommand = de_CreateDataSourceCommand;
|
|
1162
|
+
const de_CreateDataSourceCommandError = async (output, context) => {
|
|
1163
|
+
const parsedOutput = {
|
|
1164
|
+
...output,
|
|
1165
|
+
body: await parseErrorBody(output.body, context),
|
|
1166
|
+
};
|
|
1167
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1168
|
+
switch (errorCode) {
|
|
1169
|
+
case "AccessDeniedException":
|
|
1170
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1171
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1172
|
+
case "ConflictException":
|
|
1173
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1174
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1175
|
+
case "InternalServerException":
|
|
1176
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1177
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1178
|
+
case "ResourceNotFoundException":
|
|
1179
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1180
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1181
|
+
case "ServiceQuotaExceededException":
|
|
1182
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
1183
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1184
|
+
case "ThrottlingException":
|
|
1185
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1186
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1187
|
+
case "ValidationException":
|
|
1188
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1189
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1190
|
+
default:
|
|
1191
|
+
const parsedBody = parsedOutput.body;
|
|
1192
|
+
return throwDefaultError({
|
|
1193
|
+
output,
|
|
1194
|
+
parsedBody,
|
|
1195
|
+
errorCode,
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
1200
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1201
|
+
return de_CreateKnowledgeBaseCommandError(output, context);
|
|
1202
|
+
}
|
|
1203
|
+
const contents = (0, smithy_client_1.map)({
|
|
1204
|
+
$metadata: deserializeMetadata(output),
|
|
1205
|
+
});
|
|
1206
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1207
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1208
|
+
knowledgeBase: (_) => de_KnowledgeBase(_, context),
|
|
1209
|
+
});
|
|
1210
|
+
Object.assign(contents, doc);
|
|
1211
|
+
return contents;
|
|
1212
|
+
};
|
|
1213
|
+
exports.de_CreateKnowledgeBaseCommand = de_CreateKnowledgeBaseCommand;
|
|
1214
|
+
const de_CreateKnowledgeBaseCommandError = async (output, context) => {
|
|
1215
|
+
const parsedOutput = {
|
|
1216
|
+
...output,
|
|
1217
|
+
body: await parseErrorBody(output.body, context),
|
|
1218
|
+
};
|
|
1219
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1220
|
+
switch (errorCode) {
|
|
1221
|
+
case "AccessDeniedException":
|
|
1222
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1223
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1224
|
+
case "ConflictException":
|
|
1225
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1226
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1227
|
+
case "InternalServerException":
|
|
1228
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1229
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1230
|
+
case "ServiceQuotaExceededException":
|
|
1231
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
1232
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1233
|
+
case "ThrottlingException":
|
|
1234
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1235
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1236
|
+
case "ValidationException":
|
|
1237
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1238
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1239
|
+
default:
|
|
1240
|
+
const parsedBody = parsedOutput.body;
|
|
1241
|
+
return throwDefaultError({
|
|
1242
|
+
output,
|
|
1243
|
+
parsedBody,
|
|
1244
|
+
errorCode,
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
const de_DeleteAgentCommand = async (output, context) => {
|
|
1249
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1250
|
+
return de_DeleteAgentCommandError(output, context);
|
|
1251
|
+
}
|
|
1252
|
+
const contents = (0, smithy_client_1.map)({
|
|
1253
|
+
$metadata: deserializeMetadata(output),
|
|
1254
|
+
});
|
|
1255
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1256
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1257
|
+
agentId: smithy_client_1.expectString,
|
|
1258
|
+
agentStatus: smithy_client_1.expectString,
|
|
1259
|
+
});
|
|
1260
|
+
Object.assign(contents, doc);
|
|
1261
|
+
return contents;
|
|
1262
|
+
};
|
|
1263
|
+
exports.de_DeleteAgentCommand = de_DeleteAgentCommand;
|
|
1264
|
+
const de_DeleteAgentCommandError = async (output, context) => {
|
|
1265
|
+
const parsedOutput = {
|
|
1266
|
+
...output,
|
|
1267
|
+
body: await parseErrorBody(output.body, context),
|
|
1268
|
+
};
|
|
1269
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1270
|
+
switch (errorCode) {
|
|
1271
|
+
case "AccessDeniedException":
|
|
1272
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1273
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1274
|
+
case "ConflictException":
|
|
1275
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1276
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1277
|
+
case "InternalServerException":
|
|
1278
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1279
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1280
|
+
case "ResourceNotFoundException":
|
|
1281
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1282
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1283
|
+
case "ThrottlingException":
|
|
1284
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1285
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1286
|
+
case "ValidationException":
|
|
1287
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1288
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1289
|
+
default:
|
|
1290
|
+
const parsedBody = parsedOutput.body;
|
|
1291
|
+
return throwDefaultError({
|
|
1292
|
+
output,
|
|
1293
|
+
parsedBody,
|
|
1294
|
+
errorCode,
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
const de_DeleteAgentActionGroupCommand = async (output, context) => {
|
|
1299
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1300
|
+
return de_DeleteAgentActionGroupCommandError(output, context);
|
|
1301
|
+
}
|
|
1302
|
+
const contents = (0, smithy_client_1.map)({
|
|
1303
|
+
$metadata: deserializeMetadata(output),
|
|
1304
|
+
});
|
|
1305
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1306
|
+
return contents;
|
|
1307
|
+
};
|
|
1308
|
+
exports.de_DeleteAgentActionGroupCommand = de_DeleteAgentActionGroupCommand;
|
|
1309
|
+
const de_DeleteAgentActionGroupCommandError = async (output, context) => {
|
|
1310
|
+
const parsedOutput = {
|
|
1311
|
+
...output,
|
|
1312
|
+
body: await parseErrorBody(output.body, context),
|
|
1313
|
+
};
|
|
1314
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1315
|
+
switch (errorCode) {
|
|
1316
|
+
case "AccessDeniedException":
|
|
1317
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1318
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1319
|
+
case "ConflictException":
|
|
1320
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1321
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1322
|
+
case "InternalServerException":
|
|
1323
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1324
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1325
|
+
case "ResourceNotFoundException":
|
|
1326
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1327
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1328
|
+
case "ThrottlingException":
|
|
1329
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1330
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1331
|
+
case "ValidationException":
|
|
1332
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1333
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1334
|
+
default:
|
|
1335
|
+
const parsedBody = parsedOutput.body;
|
|
1336
|
+
return throwDefaultError({
|
|
1337
|
+
output,
|
|
1338
|
+
parsedBody,
|
|
1339
|
+
errorCode,
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
const de_DeleteAgentAliasCommand = async (output, context) => {
|
|
1344
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1345
|
+
return de_DeleteAgentAliasCommandError(output, context);
|
|
1346
|
+
}
|
|
1347
|
+
const contents = (0, smithy_client_1.map)({
|
|
1348
|
+
$metadata: deserializeMetadata(output),
|
|
1349
|
+
});
|
|
1350
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1351
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1352
|
+
agentAliasId: smithy_client_1.expectString,
|
|
1353
|
+
agentAliasStatus: smithy_client_1.expectString,
|
|
1354
|
+
agentId: smithy_client_1.expectString,
|
|
1355
|
+
});
|
|
1356
|
+
Object.assign(contents, doc);
|
|
1357
|
+
return contents;
|
|
1358
|
+
};
|
|
1359
|
+
exports.de_DeleteAgentAliasCommand = de_DeleteAgentAliasCommand;
|
|
1360
|
+
const de_DeleteAgentAliasCommandError = async (output, context) => {
|
|
1361
|
+
const parsedOutput = {
|
|
1362
|
+
...output,
|
|
1363
|
+
body: await parseErrorBody(output.body, context),
|
|
1364
|
+
};
|
|
1365
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1366
|
+
switch (errorCode) {
|
|
1367
|
+
case "AccessDeniedException":
|
|
1368
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1369
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1370
|
+
case "InternalServerException":
|
|
1371
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1372
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1373
|
+
case "ResourceNotFoundException":
|
|
1374
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1375
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1376
|
+
case "ThrottlingException":
|
|
1377
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1378
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1379
|
+
case "ValidationException":
|
|
1380
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1381
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1382
|
+
default:
|
|
1383
|
+
const parsedBody = parsedOutput.body;
|
|
1384
|
+
return throwDefaultError({
|
|
1385
|
+
output,
|
|
1386
|
+
parsedBody,
|
|
1387
|
+
errorCode,
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
const de_DeleteAgentVersionCommand = async (output, context) => {
|
|
1392
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1393
|
+
return de_DeleteAgentVersionCommandError(output, context);
|
|
1394
|
+
}
|
|
1395
|
+
const contents = (0, smithy_client_1.map)({
|
|
1396
|
+
$metadata: deserializeMetadata(output),
|
|
1397
|
+
});
|
|
1398
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1399
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1400
|
+
agentId: smithy_client_1.expectString,
|
|
1401
|
+
agentStatus: smithy_client_1.expectString,
|
|
1402
|
+
agentVersion: smithy_client_1.expectString,
|
|
1403
|
+
});
|
|
1404
|
+
Object.assign(contents, doc);
|
|
1405
|
+
return contents;
|
|
1406
|
+
};
|
|
1407
|
+
exports.de_DeleteAgentVersionCommand = de_DeleteAgentVersionCommand;
|
|
1408
|
+
const de_DeleteAgentVersionCommandError = async (output, context) => {
|
|
1409
|
+
const parsedOutput = {
|
|
1410
|
+
...output,
|
|
1411
|
+
body: await parseErrorBody(output.body, context),
|
|
1412
|
+
};
|
|
1413
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1414
|
+
switch (errorCode) {
|
|
1415
|
+
case "AccessDeniedException":
|
|
1416
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1417
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1418
|
+
case "ConflictException":
|
|
1419
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1420
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1421
|
+
case "InternalServerException":
|
|
1422
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1423
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1424
|
+
case "ResourceNotFoundException":
|
|
1425
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1426
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1427
|
+
case "ThrottlingException":
|
|
1428
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1429
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1430
|
+
case "ValidationException":
|
|
1431
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1432
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1433
|
+
default:
|
|
1434
|
+
const parsedBody = parsedOutput.body;
|
|
1435
|
+
return throwDefaultError({
|
|
1436
|
+
output,
|
|
1437
|
+
parsedBody,
|
|
1438
|
+
errorCode,
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
const de_DeleteDataSourceCommand = async (output, context) => {
|
|
1443
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1444
|
+
return de_DeleteDataSourceCommandError(output, context);
|
|
1445
|
+
}
|
|
1446
|
+
const contents = (0, smithy_client_1.map)({
|
|
1447
|
+
$metadata: deserializeMetadata(output),
|
|
1448
|
+
});
|
|
1449
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1450
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1451
|
+
dataSourceId: smithy_client_1.expectString,
|
|
1452
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
1453
|
+
status: smithy_client_1.expectString,
|
|
1454
|
+
});
|
|
1455
|
+
Object.assign(contents, doc);
|
|
1456
|
+
return contents;
|
|
1457
|
+
};
|
|
1458
|
+
exports.de_DeleteDataSourceCommand = de_DeleteDataSourceCommand;
|
|
1459
|
+
const de_DeleteDataSourceCommandError = async (output, context) => {
|
|
1460
|
+
const parsedOutput = {
|
|
1461
|
+
...output,
|
|
1462
|
+
body: await parseErrorBody(output.body, context),
|
|
1463
|
+
};
|
|
1464
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1465
|
+
switch (errorCode) {
|
|
1466
|
+
case "AccessDeniedException":
|
|
1467
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1468
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1469
|
+
case "ConflictException":
|
|
1470
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1471
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1472
|
+
case "InternalServerException":
|
|
1473
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1474
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1475
|
+
case "ResourceNotFoundException":
|
|
1476
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1477
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1478
|
+
case "ThrottlingException":
|
|
1479
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1480
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1481
|
+
case "ValidationException":
|
|
1482
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1483
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1484
|
+
default:
|
|
1485
|
+
const parsedBody = parsedOutput.body;
|
|
1486
|
+
return throwDefaultError({
|
|
1487
|
+
output,
|
|
1488
|
+
parsedBody,
|
|
1489
|
+
errorCode,
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
1494
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1495
|
+
return de_DeleteKnowledgeBaseCommandError(output, context);
|
|
1496
|
+
}
|
|
1497
|
+
const contents = (0, smithy_client_1.map)({
|
|
1498
|
+
$metadata: deserializeMetadata(output),
|
|
1499
|
+
});
|
|
1500
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1501
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1502
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
1503
|
+
status: smithy_client_1.expectString,
|
|
1504
|
+
});
|
|
1505
|
+
Object.assign(contents, doc);
|
|
1506
|
+
return contents;
|
|
1507
|
+
};
|
|
1508
|
+
exports.de_DeleteKnowledgeBaseCommand = de_DeleteKnowledgeBaseCommand;
|
|
1509
|
+
const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
|
|
1510
|
+
const parsedOutput = {
|
|
1511
|
+
...output,
|
|
1512
|
+
body: await parseErrorBody(output.body, context),
|
|
1513
|
+
};
|
|
1514
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1515
|
+
switch (errorCode) {
|
|
1516
|
+
case "AccessDeniedException":
|
|
1517
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1518
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1519
|
+
case "ConflictException":
|
|
1520
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1521
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1522
|
+
case "InternalServerException":
|
|
1523
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1524
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1525
|
+
case "ResourceNotFoundException":
|
|
1526
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1527
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1528
|
+
case "ThrottlingException":
|
|
1529
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1530
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1531
|
+
case "ValidationException":
|
|
1532
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1533
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1534
|
+
default:
|
|
1535
|
+
const parsedBody = parsedOutput.body;
|
|
1536
|
+
return throwDefaultError({
|
|
1537
|
+
output,
|
|
1538
|
+
parsedBody,
|
|
1539
|
+
errorCode,
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
};
|
|
1543
|
+
const de_DisassociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1544
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1545
|
+
return de_DisassociateAgentKnowledgeBaseCommandError(output, context);
|
|
1546
|
+
}
|
|
1547
|
+
const contents = (0, smithy_client_1.map)({
|
|
1548
|
+
$metadata: deserializeMetadata(output),
|
|
1549
|
+
});
|
|
1550
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1551
|
+
return contents;
|
|
1552
|
+
};
|
|
1553
|
+
exports.de_DisassociateAgentKnowledgeBaseCommand = de_DisassociateAgentKnowledgeBaseCommand;
|
|
1554
|
+
const de_DisassociateAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
1555
|
+
const parsedOutput = {
|
|
1556
|
+
...output,
|
|
1557
|
+
body: await parseErrorBody(output.body, context),
|
|
1558
|
+
};
|
|
1559
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1560
|
+
switch (errorCode) {
|
|
1561
|
+
case "AccessDeniedException":
|
|
1562
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1563
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1564
|
+
case "ConflictException":
|
|
1565
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1566
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1567
|
+
case "InternalServerException":
|
|
1568
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1569
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1570
|
+
case "ResourceNotFoundException":
|
|
1571
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1572
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1573
|
+
case "ThrottlingException":
|
|
1574
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1575
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1576
|
+
case "ValidationException":
|
|
1577
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1578
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1579
|
+
default:
|
|
1580
|
+
const parsedBody = parsedOutput.body;
|
|
1581
|
+
return throwDefaultError({
|
|
1582
|
+
output,
|
|
1583
|
+
parsedBody,
|
|
1584
|
+
errorCode,
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
const de_GetAgentCommand = async (output, context) => {
|
|
1589
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1590
|
+
return de_GetAgentCommandError(output, context);
|
|
1591
|
+
}
|
|
1592
|
+
const contents = (0, smithy_client_1.map)({
|
|
1593
|
+
$metadata: deserializeMetadata(output),
|
|
1594
|
+
});
|
|
1595
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1596
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1597
|
+
agent: (_) => de_Agent(_, context),
|
|
1598
|
+
});
|
|
1599
|
+
Object.assign(contents, doc);
|
|
1600
|
+
return contents;
|
|
1601
|
+
};
|
|
1602
|
+
exports.de_GetAgentCommand = de_GetAgentCommand;
|
|
1603
|
+
const de_GetAgentCommandError = async (output, context) => {
|
|
1604
|
+
const parsedOutput = {
|
|
1605
|
+
...output,
|
|
1606
|
+
body: await parseErrorBody(output.body, context),
|
|
1607
|
+
};
|
|
1608
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1609
|
+
switch (errorCode) {
|
|
1610
|
+
case "AccessDeniedException":
|
|
1611
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1612
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1613
|
+
case "InternalServerException":
|
|
1614
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1615
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1616
|
+
case "ResourceNotFoundException":
|
|
1617
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1618
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1619
|
+
case "ThrottlingException":
|
|
1620
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1621
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1622
|
+
case "ValidationException":
|
|
1623
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1624
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1625
|
+
default:
|
|
1626
|
+
const parsedBody = parsedOutput.body;
|
|
1627
|
+
return throwDefaultError({
|
|
1628
|
+
output,
|
|
1629
|
+
parsedBody,
|
|
1630
|
+
errorCode,
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
};
|
|
1634
|
+
const de_GetAgentActionGroupCommand = async (output, context) => {
|
|
1635
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1636
|
+
return de_GetAgentActionGroupCommandError(output, context);
|
|
1637
|
+
}
|
|
1638
|
+
const contents = (0, smithy_client_1.map)({
|
|
1639
|
+
$metadata: deserializeMetadata(output),
|
|
1640
|
+
});
|
|
1641
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1642
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1643
|
+
agentActionGroup: (_) => de_AgentActionGroup(_, context),
|
|
1644
|
+
});
|
|
1645
|
+
Object.assign(contents, doc);
|
|
1646
|
+
return contents;
|
|
1647
|
+
};
|
|
1648
|
+
exports.de_GetAgentActionGroupCommand = de_GetAgentActionGroupCommand;
|
|
1649
|
+
const de_GetAgentActionGroupCommandError = async (output, context) => {
|
|
1650
|
+
const parsedOutput = {
|
|
1651
|
+
...output,
|
|
1652
|
+
body: await parseErrorBody(output.body, context),
|
|
1653
|
+
};
|
|
1654
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1655
|
+
switch (errorCode) {
|
|
1656
|
+
case "AccessDeniedException":
|
|
1657
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1658
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1659
|
+
case "InternalServerException":
|
|
1660
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1661
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1662
|
+
case "ResourceNotFoundException":
|
|
1663
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1664
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1665
|
+
case "ThrottlingException":
|
|
1666
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1667
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1668
|
+
case "ValidationException":
|
|
1669
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1670
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1671
|
+
default:
|
|
1672
|
+
const parsedBody = parsedOutput.body;
|
|
1673
|
+
return throwDefaultError({
|
|
1674
|
+
output,
|
|
1675
|
+
parsedBody,
|
|
1676
|
+
errorCode,
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
};
|
|
1680
|
+
const de_GetAgentAliasCommand = async (output, context) => {
|
|
1681
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1682
|
+
return de_GetAgentAliasCommandError(output, context);
|
|
1683
|
+
}
|
|
1684
|
+
const contents = (0, smithy_client_1.map)({
|
|
1685
|
+
$metadata: deserializeMetadata(output),
|
|
1686
|
+
});
|
|
1687
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1688
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1689
|
+
agentAlias: (_) => de_AgentAlias(_, context),
|
|
1690
|
+
});
|
|
1691
|
+
Object.assign(contents, doc);
|
|
1692
|
+
return contents;
|
|
1693
|
+
};
|
|
1694
|
+
exports.de_GetAgentAliasCommand = de_GetAgentAliasCommand;
|
|
1695
|
+
const de_GetAgentAliasCommandError = async (output, context) => {
|
|
1696
|
+
const parsedOutput = {
|
|
1697
|
+
...output,
|
|
1698
|
+
body: await parseErrorBody(output.body, context),
|
|
1699
|
+
};
|
|
1700
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1701
|
+
switch (errorCode) {
|
|
1702
|
+
case "AccessDeniedException":
|
|
1703
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1704
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1705
|
+
case "InternalServerException":
|
|
1706
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1707
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1708
|
+
case "ResourceNotFoundException":
|
|
1709
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1710
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1711
|
+
case "ThrottlingException":
|
|
1712
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1713
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1714
|
+
case "ValidationException":
|
|
1715
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1716
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1717
|
+
default:
|
|
1718
|
+
const parsedBody = parsedOutput.body;
|
|
1719
|
+
return throwDefaultError({
|
|
1720
|
+
output,
|
|
1721
|
+
parsedBody,
|
|
1722
|
+
errorCode,
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
const de_GetAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1727
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1728
|
+
return de_GetAgentKnowledgeBaseCommandError(output, context);
|
|
1729
|
+
}
|
|
1730
|
+
const contents = (0, smithy_client_1.map)({
|
|
1731
|
+
$metadata: deserializeMetadata(output),
|
|
1732
|
+
});
|
|
1733
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1734
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1735
|
+
agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context),
|
|
1736
|
+
});
|
|
1737
|
+
Object.assign(contents, doc);
|
|
1738
|
+
return contents;
|
|
1739
|
+
};
|
|
1740
|
+
exports.de_GetAgentKnowledgeBaseCommand = de_GetAgentKnowledgeBaseCommand;
|
|
1741
|
+
const de_GetAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
1742
|
+
const parsedOutput = {
|
|
1743
|
+
...output,
|
|
1744
|
+
body: await parseErrorBody(output.body, context),
|
|
1745
|
+
};
|
|
1746
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1747
|
+
switch (errorCode) {
|
|
1748
|
+
case "AccessDeniedException":
|
|
1749
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1750
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1751
|
+
case "InternalServerException":
|
|
1752
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1753
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1754
|
+
case "ResourceNotFoundException":
|
|
1755
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1756
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1757
|
+
case "ThrottlingException":
|
|
1758
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1759
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1760
|
+
case "ValidationException":
|
|
1761
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1762
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1763
|
+
default:
|
|
1764
|
+
const parsedBody = parsedOutput.body;
|
|
1765
|
+
return throwDefaultError({
|
|
1766
|
+
output,
|
|
1767
|
+
parsedBody,
|
|
1768
|
+
errorCode,
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
const de_GetAgentVersionCommand = async (output, context) => {
|
|
1773
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1774
|
+
return de_GetAgentVersionCommandError(output, context);
|
|
1775
|
+
}
|
|
1776
|
+
const contents = (0, smithy_client_1.map)({
|
|
1777
|
+
$metadata: deserializeMetadata(output),
|
|
1778
|
+
});
|
|
1779
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1780
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1781
|
+
agentVersion: (_) => de_AgentVersion(_, context),
|
|
1782
|
+
});
|
|
1783
|
+
Object.assign(contents, doc);
|
|
1784
|
+
return contents;
|
|
1785
|
+
};
|
|
1786
|
+
exports.de_GetAgentVersionCommand = de_GetAgentVersionCommand;
|
|
1787
|
+
const de_GetAgentVersionCommandError = async (output, context) => {
|
|
1788
|
+
const parsedOutput = {
|
|
1789
|
+
...output,
|
|
1790
|
+
body: await parseErrorBody(output.body, context),
|
|
1791
|
+
};
|
|
1792
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1793
|
+
switch (errorCode) {
|
|
1794
|
+
case "AccessDeniedException":
|
|
1795
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1796
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1797
|
+
case "InternalServerException":
|
|
1798
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1799
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1800
|
+
case "ResourceNotFoundException":
|
|
1801
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1802
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1803
|
+
case "ThrottlingException":
|
|
1804
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1805
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1806
|
+
case "ValidationException":
|
|
1807
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1808
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1809
|
+
default:
|
|
1810
|
+
const parsedBody = parsedOutput.body;
|
|
1811
|
+
return throwDefaultError({
|
|
1812
|
+
output,
|
|
1813
|
+
parsedBody,
|
|
1814
|
+
errorCode,
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
};
|
|
1818
|
+
const de_GetDataSourceCommand = async (output, context) => {
|
|
1819
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1820
|
+
return de_GetDataSourceCommandError(output, context);
|
|
1821
|
+
}
|
|
1822
|
+
const contents = (0, smithy_client_1.map)({
|
|
1823
|
+
$metadata: deserializeMetadata(output),
|
|
1824
|
+
});
|
|
1825
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1826
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1827
|
+
dataSource: (_) => de_DataSource(_, context),
|
|
1828
|
+
});
|
|
1829
|
+
Object.assign(contents, doc);
|
|
1830
|
+
return contents;
|
|
1831
|
+
};
|
|
1832
|
+
exports.de_GetDataSourceCommand = de_GetDataSourceCommand;
|
|
1833
|
+
const de_GetDataSourceCommandError = async (output, context) => {
|
|
1834
|
+
const parsedOutput = {
|
|
1835
|
+
...output,
|
|
1836
|
+
body: await parseErrorBody(output.body, context),
|
|
1837
|
+
};
|
|
1838
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1839
|
+
switch (errorCode) {
|
|
1840
|
+
case "AccessDeniedException":
|
|
1841
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1842
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1843
|
+
case "InternalServerException":
|
|
1844
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1845
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1846
|
+
case "ResourceNotFoundException":
|
|
1847
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1848
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1849
|
+
case "ThrottlingException":
|
|
1850
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1851
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1852
|
+
case "ValidationException":
|
|
1853
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1854
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1855
|
+
default:
|
|
1856
|
+
const parsedBody = parsedOutput.body;
|
|
1857
|
+
return throwDefaultError({
|
|
1858
|
+
output,
|
|
1859
|
+
parsedBody,
|
|
1860
|
+
errorCode,
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
};
|
|
1864
|
+
const de_GetIngestionJobCommand = async (output, context) => {
|
|
1865
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1866
|
+
return de_GetIngestionJobCommandError(output, context);
|
|
1867
|
+
}
|
|
1868
|
+
const contents = (0, smithy_client_1.map)({
|
|
1869
|
+
$metadata: deserializeMetadata(output),
|
|
1870
|
+
});
|
|
1871
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1872
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1873
|
+
ingestionJob: (_) => de_IngestionJob(_, context),
|
|
1874
|
+
});
|
|
1875
|
+
Object.assign(contents, doc);
|
|
1876
|
+
return contents;
|
|
1877
|
+
};
|
|
1878
|
+
exports.de_GetIngestionJobCommand = de_GetIngestionJobCommand;
|
|
1879
|
+
const de_GetIngestionJobCommandError = async (output, context) => {
|
|
1880
|
+
const parsedOutput = {
|
|
1881
|
+
...output,
|
|
1882
|
+
body: await parseErrorBody(output.body, context),
|
|
1883
|
+
};
|
|
1884
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1885
|
+
switch (errorCode) {
|
|
1886
|
+
case "AccessDeniedException":
|
|
1887
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1888
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1889
|
+
case "InternalServerException":
|
|
1890
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1891
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1892
|
+
case "ResourceNotFoundException":
|
|
1893
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1894
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1895
|
+
case "ThrottlingException":
|
|
1896
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1897
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1898
|
+
case "ValidationException":
|
|
1899
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1900
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1901
|
+
default:
|
|
1902
|
+
const parsedBody = parsedOutput.body;
|
|
1903
|
+
return throwDefaultError({
|
|
1904
|
+
output,
|
|
1905
|
+
parsedBody,
|
|
1906
|
+
errorCode,
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
|
+
const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
1911
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1912
|
+
return de_GetKnowledgeBaseCommandError(output, context);
|
|
1913
|
+
}
|
|
1914
|
+
const contents = (0, smithy_client_1.map)({
|
|
1915
|
+
$metadata: deserializeMetadata(output),
|
|
1916
|
+
});
|
|
1917
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1918
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1919
|
+
knowledgeBase: (_) => de_KnowledgeBase(_, context),
|
|
1920
|
+
});
|
|
1921
|
+
Object.assign(contents, doc);
|
|
1922
|
+
return contents;
|
|
1923
|
+
};
|
|
1924
|
+
exports.de_GetKnowledgeBaseCommand = de_GetKnowledgeBaseCommand;
|
|
1925
|
+
const de_GetKnowledgeBaseCommandError = async (output, context) => {
|
|
1926
|
+
const parsedOutput = {
|
|
1927
|
+
...output,
|
|
1928
|
+
body: await parseErrorBody(output.body, context),
|
|
1929
|
+
};
|
|
1930
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1931
|
+
switch (errorCode) {
|
|
1932
|
+
case "AccessDeniedException":
|
|
1933
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1934
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1935
|
+
case "InternalServerException":
|
|
1936
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1937
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1938
|
+
case "ResourceNotFoundException":
|
|
1939
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1940
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1941
|
+
case "ThrottlingException":
|
|
1942
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1943
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1944
|
+
case "ValidationException":
|
|
1945
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1946
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1947
|
+
default:
|
|
1948
|
+
const parsedBody = parsedOutput.body;
|
|
1949
|
+
return throwDefaultError({
|
|
1950
|
+
output,
|
|
1951
|
+
parsedBody,
|
|
1952
|
+
errorCode,
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
};
|
|
1956
|
+
const de_ListAgentActionGroupsCommand = async (output, context) => {
|
|
1957
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1958
|
+
return de_ListAgentActionGroupsCommandError(output, context);
|
|
1959
|
+
}
|
|
1960
|
+
const contents = (0, smithy_client_1.map)({
|
|
1961
|
+
$metadata: deserializeMetadata(output),
|
|
1962
|
+
});
|
|
1963
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1964
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1965
|
+
actionGroupSummaries: (_) => de_ActionGroupSummaries(_, context),
|
|
1966
|
+
nextToken: smithy_client_1.expectString,
|
|
1967
|
+
});
|
|
1968
|
+
Object.assign(contents, doc);
|
|
1969
|
+
return contents;
|
|
1970
|
+
};
|
|
1971
|
+
exports.de_ListAgentActionGroupsCommand = de_ListAgentActionGroupsCommand;
|
|
1972
|
+
const de_ListAgentActionGroupsCommandError = async (output, context) => {
|
|
1973
|
+
const parsedOutput = {
|
|
1974
|
+
...output,
|
|
1975
|
+
body: await parseErrorBody(output.body, context),
|
|
1976
|
+
};
|
|
1977
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1978
|
+
switch (errorCode) {
|
|
1979
|
+
case "AccessDeniedException":
|
|
1980
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1981
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1982
|
+
case "InternalServerException":
|
|
1983
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1984
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1985
|
+
case "ResourceNotFoundException":
|
|
1986
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1987
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1988
|
+
case "ThrottlingException":
|
|
1989
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1990
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1991
|
+
case "ValidationException":
|
|
1992
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1993
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1994
|
+
default:
|
|
1995
|
+
const parsedBody = parsedOutput.body;
|
|
1996
|
+
return throwDefaultError({
|
|
1997
|
+
output,
|
|
1998
|
+
parsedBody,
|
|
1999
|
+
errorCode,
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
};
|
|
2003
|
+
const de_ListAgentAliasesCommand = async (output, context) => {
|
|
2004
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2005
|
+
return de_ListAgentAliasesCommandError(output, context);
|
|
2006
|
+
}
|
|
2007
|
+
const contents = (0, smithy_client_1.map)({
|
|
2008
|
+
$metadata: deserializeMetadata(output),
|
|
2009
|
+
});
|
|
2010
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2011
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2012
|
+
agentAliasSummaries: (_) => de_AgentAliasSummaries(_, context),
|
|
2013
|
+
nextToken: smithy_client_1.expectString,
|
|
2014
|
+
});
|
|
2015
|
+
Object.assign(contents, doc);
|
|
2016
|
+
return contents;
|
|
2017
|
+
};
|
|
2018
|
+
exports.de_ListAgentAliasesCommand = de_ListAgentAliasesCommand;
|
|
2019
|
+
const de_ListAgentAliasesCommandError = async (output, context) => {
|
|
2020
|
+
const parsedOutput = {
|
|
2021
|
+
...output,
|
|
2022
|
+
body: await parseErrorBody(output.body, context),
|
|
2023
|
+
};
|
|
2024
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2025
|
+
switch (errorCode) {
|
|
2026
|
+
case "AccessDeniedException":
|
|
2027
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2028
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2029
|
+
case "InternalServerException":
|
|
2030
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2031
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2032
|
+
case "ResourceNotFoundException":
|
|
2033
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2034
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2035
|
+
case "ThrottlingException":
|
|
2036
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2037
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2038
|
+
case "ValidationException":
|
|
2039
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2040
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2041
|
+
default:
|
|
2042
|
+
const parsedBody = parsedOutput.body;
|
|
2043
|
+
return throwDefaultError({
|
|
2044
|
+
output,
|
|
2045
|
+
parsedBody,
|
|
2046
|
+
errorCode,
|
|
2047
|
+
});
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
2050
|
+
const de_ListAgentKnowledgeBasesCommand = async (output, context) => {
|
|
2051
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2052
|
+
return de_ListAgentKnowledgeBasesCommandError(output, context);
|
|
2053
|
+
}
|
|
2054
|
+
const contents = (0, smithy_client_1.map)({
|
|
2055
|
+
$metadata: deserializeMetadata(output),
|
|
2056
|
+
});
|
|
2057
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2058
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2059
|
+
agentKnowledgeBaseSummaries: (_) => de_AgentKnowledgeBaseSummaries(_, context),
|
|
2060
|
+
nextToken: smithy_client_1.expectString,
|
|
2061
|
+
});
|
|
2062
|
+
Object.assign(contents, doc);
|
|
2063
|
+
return contents;
|
|
2064
|
+
};
|
|
2065
|
+
exports.de_ListAgentKnowledgeBasesCommand = de_ListAgentKnowledgeBasesCommand;
|
|
2066
|
+
const de_ListAgentKnowledgeBasesCommandError = async (output, context) => {
|
|
2067
|
+
const parsedOutput = {
|
|
2068
|
+
...output,
|
|
2069
|
+
body: await parseErrorBody(output.body, context),
|
|
2070
|
+
};
|
|
2071
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2072
|
+
switch (errorCode) {
|
|
2073
|
+
case "AccessDeniedException":
|
|
2074
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2075
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2076
|
+
case "InternalServerException":
|
|
2077
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2078
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2079
|
+
case "ResourceNotFoundException":
|
|
2080
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2081
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2082
|
+
case "ThrottlingException":
|
|
2083
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2084
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2085
|
+
case "ValidationException":
|
|
2086
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2087
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2088
|
+
default:
|
|
2089
|
+
const parsedBody = parsedOutput.body;
|
|
2090
|
+
return throwDefaultError({
|
|
2091
|
+
output,
|
|
2092
|
+
parsedBody,
|
|
2093
|
+
errorCode,
|
|
2094
|
+
});
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
const de_ListAgentsCommand = async (output, context) => {
|
|
2098
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2099
|
+
return de_ListAgentsCommandError(output, context);
|
|
2100
|
+
}
|
|
2101
|
+
const contents = (0, smithy_client_1.map)({
|
|
2102
|
+
$metadata: deserializeMetadata(output),
|
|
2103
|
+
});
|
|
2104
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2105
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2106
|
+
agentSummaries: (_) => de_AgentSummaries(_, context),
|
|
2107
|
+
nextToken: smithy_client_1.expectString,
|
|
2108
|
+
});
|
|
2109
|
+
Object.assign(contents, doc);
|
|
2110
|
+
return contents;
|
|
2111
|
+
};
|
|
2112
|
+
exports.de_ListAgentsCommand = de_ListAgentsCommand;
|
|
2113
|
+
const de_ListAgentsCommandError = async (output, context) => {
|
|
2114
|
+
const parsedOutput = {
|
|
2115
|
+
...output,
|
|
2116
|
+
body: await parseErrorBody(output.body, context),
|
|
2117
|
+
};
|
|
2118
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2119
|
+
switch (errorCode) {
|
|
2120
|
+
case "AccessDeniedException":
|
|
2121
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2122
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2123
|
+
case "InternalServerException":
|
|
2124
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2125
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2126
|
+
case "ThrottlingException":
|
|
2127
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2128
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2129
|
+
case "ValidationException":
|
|
2130
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2131
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2132
|
+
default:
|
|
2133
|
+
const parsedBody = parsedOutput.body;
|
|
2134
|
+
return throwDefaultError({
|
|
2135
|
+
output,
|
|
2136
|
+
parsedBody,
|
|
2137
|
+
errorCode,
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
};
|
|
2141
|
+
const de_ListAgentVersionsCommand = async (output, context) => {
|
|
2142
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2143
|
+
return de_ListAgentVersionsCommandError(output, context);
|
|
2144
|
+
}
|
|
2145
|
+
const contents = (0, smithy_client_1.map)({
|
|
2146
|
+
$metadata: deserializeMetadata(output),
|
|
2147
|
+
});
|
|
2148
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2149
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2150
|
+
agentVersionSummaries: (_) => de_AgentVersionSummaries(_, context),
|
|
2151
|
+
nextToken: smithy_client_1.expectString,
|
|
2152
|
+
});
|
|
2153
|
+
Object.assign(contents, doc);
|
|
2154
|
+
return contents;
|
|
2155
|
+
};
|
|
2156
|
+
exports.de_ListAgentVersionsCommand = de_ListAgentVersionsCommand;
|
|
2157
|
+
const de_ListAgentVersionsCommandError = async (output, context) => {
|
|
2158
|
+
const parsedOutput = {
|
|
2159
|
+
...output,
|
|
2160
|
+
body: await parseErrorBody(output.body, context),
|
|
2161
|
+
};
|
|
2162
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2163
|
+
switch (errorCode) {
|
|
2164
|
+
case "AccessDeniedException":
|
|
2165
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2166
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2167
|
+
case "InternalServerException":
|
|
2168
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2169
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2170
|
+
case "ResourceNotFoundException":
|
|
2171
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2172
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2173
|
+
case "ThrottlingException":
|
|
2174
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2175
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2176
|
+
case "ValidationException":
|
|
2177
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2178
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2179
|
+
default:
|
|
2180
|
+
const parsedBody = parsedOutput.body;
|
|
2181
|
+
return throwDefaultError({
|
|
2182
|
+
output,
|
|
2183
|
+
parsedBody,
|
|
2184
|
+
errorCode,
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
};
|
|
2188
|
+
const de_ListDataSourcesCommand = async (output, context) => {
|
|
2189
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2190
|
+
return de_ListDataSourcesCommandError(output, context);
|
|
2191
|
+
}
|
|
2192
|
+
const contents = (0, smithy_client_1.map)({
|
|
2193
|
+
$metadata: deserializeMetadata(output),
|
|
2194
|
+
});
|
|
2195
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2196
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2197
|
+
dataSourceSummaries: (_) => de_DataSourceSummaries(_, context),
|
|
2198
|
+
nextToken: smithy_client_1.expectString,
|
|
2199
|
+
});
|
|
2200
|
+
Object.assign(contents, doc);
|
|
2201
|
+
return contents;
|
|
2202
|
+
};
|
|
2203
|
+
exports.de_ListDataSourcesCommand = de_ListDataSourcesCommand;
|
|
2204
|
+
const de_ListDataSourcesCommandError = async (output, context) => {
|
|
2205
|
+
const parsedOutput = {
|
|
2206
|
+
...output,
|
|
2207
|
+
body: await parseErrorBody(output.body, context),
|
|
2208
|
+
};
|
|
2209
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2210
|
+
switch (errorCode) {
|
|
2211
|
+
case "AccessDeniedException":
|
|
2212
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2213
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2214
|
+
case "InternalServerException":
|
|
2215
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2216
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2217
|
+
case "ResourceNotFoundException":
|
|
2218
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2219
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2220
|
+
case "ThrottlingException":
|
|
2221
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2222
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2223
|
+
case "ValidationException":
|
|
2224
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2225
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2226
|
+
default:
|
|
2227
|
+
const parsedBody = parsedOutput.body;
|
|
2228
|
+
return throwDefaultError({
|
|
2229
|
+
output,
|
|
2230
|
+
parsedBody,
|
|
2231
|
+
errorCode,
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
const de_ListIngestionJobsCommand = async (output, context) => {
|
|
2236
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2237
|
+
return de_ListIngestionJobsCommandError(output, context);
|
|
2238
|
+
}
|
|
2239
|
+
const contents = (0, smithy_client_1.map)({
|
|
2240
|
+
$metadata: deserializeMetadata(output),
|
|
2241
|
+
});
|
|
2242
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2243
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2244
|
+
ingestionJobSummaries: (_) => de_IngestionJobSummaries(_, context),
|
|
2245
|
+
nextToken: smithy_client_1.expectString,
|
|
2246
|
+
});
|
|
2247
|
+
Object.assign(contents, doc);
|
|
2248
|
+
return contents;
|
|
2249
|
+
};
|
|
2250
|
+
exports.de_ListIngestionJobsCommand = de_ListIngestionJobsCommand;
|
|
2251
|
+
const de_ListIngestionJobsCommandError = async (output, context) => {
|
|
2252
|
+
const parsedOutput = {
|
|
2253
|
+
...output,
|
|
2254
|
+
body: await parseErrorBody(output.body, context),
|
|
2255
|
+
};
|
|
2256
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2257
|
+
switch (errorCode) {
|
|
2258
|
+
case "AccessDeniedException":
|
|
2259
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2260
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2261
|
+
case "InternalServerException":
|
|
2262
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2263
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2264
|
+
case "ResourceNotFoundException":
|
|
2265
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2266
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2267
|
+
case "ThrottlingException":
|
|
2268
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2269
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2270
|
+
case "ValidationException":
|
|
2271
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2272
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2273
|
+
default:
|
|
2274
|
+
const parsedBody = parsedOutput.body;
|
|
2275
|
+
return throwDefaultError({
|
|
2276
|
+
output,
|
|
2277
|
+
parsedBody,
|
|
2278
|
+
errorCode,
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
2283
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2284
|
+
return de_ListKnowledgeBasesCommandError(output, context);
|
|
2285
|
+
}
|
|
2286
|
+
const contents = (0, smithy_client_1.map)({
|
|
2287
|
+
$metadata: deserializeMetadata(output),
|
|
2288
|
+
});
|
|
2289
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2290
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2291
|
+
knowledgeBaseSummaries: (_) => de_KnowledgeBaseSummaries(_, context),
|
|
2292
|
+
nextToken: smithy_client_1.expectString,
|
|
2293
|
+
});
|
|
2294
|
+
Object.assign(contents, doc);
|
|
2295
|
+
return contents;
|
|
2296
|
+
};
|
|
2297
|
+
exports.de_ListKnowledgeBasesCommand = de_ListKnowledgeBasesCommand;
|
|
2298
|
+
const de_ListKnowledgeBasesCommandError = async (output, context) => {
|
|
2299
|
+
const parsedOutput = {
|
|
2300
|
+
...output,
|
|
2301
|
+
body: await parseErrorBody(output.body, context),
|
|
2302
|
+
};
|
|
2303
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2304
|
+
switch (errorCode) {
|
|
2305
|
+
case "AccessDeniedException":
|
|
2306
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2307
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2308
|
+
case "InternalServerException":
|
|
2309
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2310
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2311
|
+
case "ThrottlingException":
|
|
2312
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2313
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2314
|
+
case "ValidationException":
|
|
2315
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2316
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2317
|
+
default:
|
|
2318
|
+
const parsedBody = parsedOutput.body;
|
|
2319
|
+
return throwDefaultError({
|
|
2320
|
+
output,
|
|
2321
|
+
parsedBody,
|
|
2322
|
+
errorCode,
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
};
|
|
2326
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
2327
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2328
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
2329
|
+
}
|
|
2330
|
+
const contents = (0, smithy_client_1.map)({
|
|
2331
|
+
$metadata: deserializeMetadata(output),
|
|
2332
|
+
});
|
|
2333
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2334
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2335
|
+
tags: smithy_client_1._json,
|
|
2336
|
+
});
|
|
2337
|
+
Object.assign(contents, doc);
|
|
2338
|
+
return contents;
|
|
2339
|
+
};
|
|
2340
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
2341
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
2342
|
+
const parsedOutput = {
|
|
2343
|
+
...output,
|
|
2344
|
+
body: await parseErrorBody(output.body, context),
|
|
2345
|
+
};
|
|
2346
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2347
|
+
switch (errorCode) {
|
|
2348
|
+
case "AccessDeniedException":
|
|
2349
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2350
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2351
|
+
case "InternalServerException":
|
|
2352
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2353
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2354
|
+
case "ResourceNotFoundException":
|
|
2355
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2356
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2357
|
+
case "ThrottlingException":
|
|
2358
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2359
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2360
|
+
case "ValidationException":
|
|
2361
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2362
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2363
|
+
default:
|
|
2364
|
+
const parsedBody = parsedOutput.body;
|
|
2365
|
+
return throwDefaultError({
|
|
2366
|
+
output,
|
|
2367
|
+
parsedBody,
|
|
2368
|
+
errorCode,
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
};
|
|
2372
|
+
const de_PrepareAgentCommand = async (output, context) => {
|
|
2373
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2374
|
+
return de_PrepareAgentCommandError(output, context);
|
|
2375
|
+
}
|
|
2376
|
+
const contents = (0, smithy_client_1.map)({
|
|
2377
|
+
$metadata: deserializeMetadata(output),
|
|
2378
|
+
});
|
|
2379
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2380
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2381
|
+
agentId: smithy_client_1.expectString,
|
|
2382
|
+
agentStatus: smithy_client_1.expectString,
|
|
2383
|
+
agentVersion: smithy_client_1.expectString,
|
|
2384
|
+
preparedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2385
|
+
});
|
|
2386
|
+
Object.assign(contents, doc);
|
|
2387
|
+
return contents;
|
|
2388
|
+
};
|
|
2389
|
+
exports.de_PrepareAgentCommand = de_PrepareAgentCommand;
|
|
2390
|
+
const de_PrepareAgentCommandError = async (output, context) => {
|
|
2391
|
+
const parsedOutput = {
|
|
2392
|
+
...output,
|
|
2393
|
+
body: await parseErrorBody(output.body, context),
|
|
2394
|
+
};
|
|
2395
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2396
|
+
switch (errorCode) {
|
|
2397
|
+
case "AccessDeniedException":
|
|
2398
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2399
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2400
|
+
case "ConflictException":
|
|
2401
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2402
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2403
|
+
case "InternalServerException":
|
|
2404
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2405
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2406
|
+
case "ResourceNotFoundException":
|
|
2407
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2408
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2409
|
+
case "ServiceQuotaExceededException":
|
|
2410
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2411
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2412
|
+
case "ThrottlingException":
|
|
2413
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2414
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2415
|
+
case "ValidationException":
|
|
2416
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2417
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2418
|
+
default:
|
|
2419
|
+
const parsedBody = parsedOutput.body;
|
|
2420
|
+
return throwDefaultError({
|
|
2421
|
+
output,
|
|
2422
|
+
parsedBody,
|
|
2423
|
+
errorCode,
|
|
2424
|
+
});
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
const de_StartIngestionJobCommand = async (output, context) => {
|
|
2428
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2429
|
+
return de_StartIngestionJobCommandError(output, context);
|
|
2430
|
+
}
|
|
2431
|
+
const contents = (0, smithy_client_1.map)({
|
|
2432
|
+
$metadata: deserializeMetadata(output),
|
|
2433
|
+
});
|
|
2434
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2435
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2436
|
+
ingestionJob: (_) => de_IngestionJob(_, context),
|
|
2437
|
+
});
|
|
2438
|
+
Object.assign(contents, doc);
|
|
2439
|
+
return contents;
|
|
2440
|
+
};
|
|
2441
|
+
exports.de_StartIngestionJobCommand = de_StartIngestionJobCommand;
|
|
2442
|
+
const de_StartIngestionJobCommandError = async (output, context) => {
|
|
2443
|
+
const parsedOutput = {
|
|
2444
|
+
...output,
|
|
2445
|
+
body: await parseErrorBody(output.body, context),
|
|
2446
|
+
};
|
|
2447
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2448
|
+
switch (errorCode) {
|
|
2449
|
+
case "AccessDeniedException":
|
|
2450
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2451
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2452
|
+
case "ConflictException":
|
|
2453
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2454
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2455
|
+
case "InternalServerException":
|
|
2456
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2457
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2458
|
+
case "ResourceNotFoundException":
|
|
2459
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2460
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2461
|
+
case "ServiceQuotaExceededException":
|
|
2462
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2463
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2464
|
+
case "ThrottlingException":
|
|
2465
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2466
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2467
|
+
case "ValidationException":
|
|
2468
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2469
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2470
|
+
default:
|
|
2471
|
+
const parsedBody = parsedOutput.body;
|
|
2472
|
+
return throwDefaultError({
|
|
2473
|
+
output,
|
|
2474
|
+
parsedBody,
|
|
2475
|
+
errorCode,
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
};
|
|
2479
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
2480
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2481
|
+
return de_TagResourceCommandError(output, context);
|
|
2482
|
+
}
|
|
2483
|
+
const contents = (0, smithy_client_1.map)({
|
|
2484
|
+
$metadata: deserializeMetadata(output),
|
|
2485
|
+
});
|
|
2486
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2487
|
+
return contents;
|
|
2488
|
+
};
|
|
2489
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
2490
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
2491
|
+
const parsedOutput = {
|
|
2492
|
+
...output,
|
|
2493
|
+
body: await parseErrorBody(output.body, context),
|
|
2494
|
+
};
|
|
2495
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2496
|
+
switch (errorCode) {
|
|
2497
|
+
case "AccessDeniedException":
|
|
2498
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2499
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2500
|
+
case "InternalServerException":
|
|
2501
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2502
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2503
|
+
case "ResourceNotFoundException":
|
|
2504
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2505
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2506
|
+
case "ServiceQuotaExceededException":
|
|
2507
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2508
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2509
|
+
case "ThrottlingException":
|
|
2510
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2511
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2512
|
+
case "ValidationException":
|
|
2513
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2514
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2515
|
+
default:
|
|
2516
|
+
const parsedBody = parsedOutput.body;
|
|
2517
|
+
return throwDefaultError({
|
|
2518
|
+
output,
|
|
2519
|
+
parsedBody,
|
|
2520
|
+
errorCode,
|
|
2521
|
+
});
|
|
2522
|
+
}
|
|
2523
|
+
};
|
|
2524
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
2525
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2526
|
+
return de_UntagResourceCommandError(output, context);
|
|
2527
|
+
}
|
|
2528
|
+
const contents = (0, smithy_client_1.map)({
|
|
2529
|
+
$metadata: deserializeMetadata(output),
|
|
2530
|
+
});
|
|
2531
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2532
|
+
return contents;
|
|
2533
|
+
};
|
|
2534
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
2535
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
2536
|
+
const parsedOutput = {
|
|
2537
|
+
...output,
|
|
2538
|
+
body: await parseErrorBody(output.body, context),
|
|
2539
|
+
};
|
|
2540
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2541
|
+
switch (errorCode) {
|
|
2542
|
+
case "AccessDeniedException":
|
|
2543
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2544
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2545
|
+
case "InternalServerException":
|
|
2546
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2547
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2548
|
+
case "ResourceNotFoundException":
|
|
2549
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2550
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2551
|
+
case "ThrottlingException":
|
|
2552
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2553
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2554
|
+
case "ValidationException":
|
|
2555
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2556
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2557
|
+
default:
|
|
2558
|
+
const parsedBody = parsedOutput.body;
|
|
2559
|
+
return throwDefaultError({
|
|
2560
|
+
output,
|
|
2561
|
+
parsedBody,
|
|
2562
|
+
errorCode,
|
|
2563
|
+
});
|
|
2564
|
+
}
|
|
2565
|
+
};
|
|
2566
|
+
const de_UpdateAgentCommand = async (output, context) => {
|
|
2567
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2568
|
+
return de_UpdateAgentCommandError(output, context);
|
|
2569
|
+
}
|
|
2570
|
+
const contents = (0, smithy_client_1.map)({
|
|
2571
|
+
$metadata: deserializeMetadata(output),
|
|
2572
|
+
});
|
|
2573
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2574
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2575
|
+
agent: (_) => de_Agent(_, context),
|
|
2576
|
+
});
|
|
2577
|
+
Object.assign(contents, doc);
|
|
2578
|
+
return contents;
|
|
2579
|
+
};
|
|
2580
|
+
exports.de_UpdateAgentCommand = de_UpdateAgentCommand;
|
|
2581
|
+
const de_UpdateAgentCommandError = async (output, context) => {
|
|
2582
|
+
const parsedOutput = {
|
|
2583
|
+
...output,
|
|
2584
|
+
body: await parseErrorBody(output.body, context),
|
|
2585
|
+
};
|
|
2586
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2587
|
+
switch (errorCode) {
|
|
2588
|
+
case "AccessDeniedException":
|
|
2589
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2590
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2591
|
+
case "ConflictException":
|
|
2592
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2593
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2594
|
+
case "InternalServerException":
|
|
2595
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2596
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2597
|
+
case "ResourceNotFoundException":
|
|
2598
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2599
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2600
|
+
case "ServiceQuotaExceededException":
|
|
2601
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2602
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2603
|
+
case "ThrottlingException":
|
|
2604
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2605
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2606
|
+
case "ValidationException":
|
|
2607
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2608
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2609
|
+
default:
|
|
2610
|
+
const parsedBody = parsedOutput.body;
|
|
2611
|
+
return throwDefaultError({
|
|
2612
|
+
output,
|
|
2613
|
+
parsedBody,
|
|
2614
|
+
errorCode,
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
};
|
|
2618
|
+
const de_UpdateAgentActionGroupCommand = async (output, context) => {
|
|
2619
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2620
|
+
return de_UpdateAgentActionGroupCommandError(output, context);
|
|
2621
|
+
}
|
|
2622
|
+
const contents = (0, smithy_client_1.map)({
|
|
2623
|
+
$metadata: deserializeMetadata(output),
|
|
2624
|
+
});
|
|
2625
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2626
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2627
|
+
agentActionGroup: (_) => de_AgentActionGroup(_, context),
|
|
2628
|
+
});
|
|
2629
|
+
Object.assign(contents, doc);
|
|
2630
|
+
return contents;
|
|
2631
|
+
};
|
|
2632
|
+
exports.de_UpdateAgentActionGroupCommand = de_UpdateAgentActionGroupCommand;
|
|
2633
|
+
const de_UpdateAgentActionGroupCommandError = async (output, context) => {
|
|
2634
|
+
const parsedOutput = {
|
|
2635
|
+
...output,
|
|
2636
|
+
body: await parseErrorBody(output.body, context),
|
|
2637
|
+
};
|
|
2638
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2639
|
+
switch (errorCode) {
|
|
2640
|
+
case "AccessDeniedException":
|
|
2641
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2642
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2643
|
+
case "ConflictException":
|
|
2644
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2645
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2646
|
+
case "InternalServerException":
|
|
2647
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2648
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2649
|
+
case "ResourceNotFoundException":
|
|
2650
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2651
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2652
|
+
case "ServiceQuotaExceededException":
|
|
2653
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2654
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2655
|
+
case "ThrottlingException":
|
|
2656
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2657
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2658
|
+
case "ValidationException":
|
|
2659
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2660
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2661
|
+
default:
|
|
2662
|
+
const parsedBody = parsedOutput.body;
|
|
2663
|
+
return throwDefaultError({
|
|
2664
|
+
output,
|
|
2665
|
+
parsedBody,
|
|
2666
|
+
errorCode,
|
|
2667
|
+
});
|
|
2668
|
+
}
|
|
2669
|
+
};
|
|
2670
|
+
const de_UpdateAgentAliasCommand = async (output, context) => {
|
|
2671
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2672
|
+
return de_UpdateAgentAliasCommandError(output, context);
|
|
2673
|
+
}
|
|
2674
|
+
const contents = (0, smithy_client_1.map)({
|
|
2675
|
+
$metadata: deserializeMetadata(output),
|
|
2676
|
+
});
|
|
2677
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2678
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2679
|
+
agentAlias: (_) => de_AgentAlias(_, context),
|
|
2680
|
+
});
|
|
2681
|
+
Object.assign(contents, doc);
|
|
2682
|
+
return contents;
|
|
2683
|
+
};
|
|
2684
|
+
exports.de_UpdateAgentAliasCommand = de_UpdateAgentAliasCommand;
|
|
2685
|
+
const de_UpdateAgentAliasCommandError = async (output, context) => {
|
|
2686
|
+
const parsedOutput = {
|
|
2687
|
+
...output,
|
|
2688
|
+
body: await parseErrorBody(output.body, context),
|
|
2689
|
+
};
|
|
2690
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2691
|
+
switch (errorCode) {
|
|
2692
|
+
case "AccessDeniedException":
|
|
2693
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2694
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2695
|
+
case "ConflictException":
|
|
2696
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2697
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2698
|
+
case "InternalServerException":
|
|
2699
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2700
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2701
|
+
case "ResourceNotFoundException":
|
|
2702
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2703
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2704
|
+
case "ServiceQuotaExceededException":
|
|
2705
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2706
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2707
|
+
case "ThrottlingException":
|
|
2708
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2709
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2710
|
+
case "ValidationException":
|
|
2711
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2712
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2713
|
+
default:
|
|
2714
|
+
const parsedBody = parsedOutput.body;
|
|
2715
|
+
return throwDefaultError({
|
|
2716
|
+
output,
|
|
2717
|
+
parsedBody,
|
|
2718
|
+
errorCode,
|
|
2719
|
+
});
|
|
2720
|
+
}
|
|
2721
|
+
};
|
|
2722
|
+
const de_UpdateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
2723
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2724
|
+
return de_UpdateAgentKnowledgeBaseCommandError(output, context);
|
|
2725
|
+
}
|
|
2726
|
+
const contents = (0, smithy_client_1.map)({
|
|
2727
|
+
$metadata: deserializeMetadata(output),
|
|
2728
|
+
});
|
|
2729
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2730
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2731
|
+
agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context),
|
|
2732
|
+
});
|
|
2733
|
+
Object.assign(contents, doc);
|
|
2734
|
+
return contents;
|
|
2735
|
+
};
|
|
2736
|
+
exports.de_UpdateAgentKnowledgeBaseCommand = de_UpdateAgentKnowledgeBaseCommand;
|
|
2737
|
+
const de_UpdateAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
2738
|
+
const parsedOutput = {
|
|
2739
|
+
...output,
|
|
2740
|
+
body: await parseErrorBody(output.body, context),
|
|
2741
|
+
};
|
|
2742
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2743
|
+
switch (errorCode) {
|
|
2744
|
+
case "AccessDeniedException":
|
|
2745
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2746
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2747
|
+
case "ConflictException":
|
|
2748
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2749
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2750
|
+
case "InternalServerException":
|
|
2751
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2752
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2753
|
+
case "ResourceNotFoundException":
|
|
2754
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2755
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2756
|
+
case "ThrottlingException":
|
|
2757
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2758
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2759
|
+
case "ValidationException":
|
|
2760
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2761
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2762
|
+
default:
|
|
2763
|
+
const parsedBody = parsedOutput.body;
|
|
2764
|
+
return throwDefaultError({
|
|
2765
|
+
output,
|
|
2766
|
+
parsedBody,
|
|
2767
|
+
errorCode,
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2770
|
+
};
|
|
2771
|
+
const de_UpdateDataSourceCommand = async (output, context) => {
|
|
2772
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2773
|
+
return de_UpdateDataSourceCommandError(output, context);
|
|
2774
|
+
}
|
|
2775
|
+
const contents = (0, smithy_client_1.map)({
|
|
2776
|
+
$metadata: deserializeMetadata(output),
|
|
2777
|
+
});
|
|
2778
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2779
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2780
|
+
dataSource: (_) => de_DataSource(_, context),
|
|
2781
|
+
});
|
|
2782
|
+
Object.assign(contents, doc);
|
|
2783
|
+
return contents;
|
|
2784
|
+
};
|
|
2785
|
+
exports.de_UpdateDataSourceCommand = de_UpdateDataSourceCommand;
|
|
2786
|
+
const de_UpdateDataSourceCommandError = async (output, context) => {
|
|
2787
|
+
const parsedOutput = {
|
|
2788
|
+
...output,
|
|
2789
|
+
body: await parseErrorBody(output.body, context),
|
|
2790
|
+
};
|
|
2791
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2792
|
+
switch (errorCode) {
|
|
2793
|
+
case "AccessDeniedException":
|
|
2794
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2795
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2796
|
+
case "ConflictException":
|
|
2797
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2798
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2799
|
+
case "InternalServerException":
|
|
2800
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2801
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2802
|
+
case "ResourceNotFoundException":
|
|
2803
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2804
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2805
|
+
case "ThrottlingException":
|
|
2806
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2807
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2808
|
+
case "ValidationException":
|
|
2809
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2810
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2811
|
+
default:
|
|
2812
|
+
const parsedBody = parsedOutput.body;
|
|
2813
|
+
return throwDefaultError({
|
|
2814
|
+
output,
|
|
2815
|
+
parsedBody,
|
|
2816
|
+
errorCode,
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
2819
|
+
};
|
|
2820
|
+
const de_UpdateKnowledgeBaseCommand = async (output, context) => {
|
|
2821
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2822
|
+
return de_UpdateKnowledgeBaseCommandError(output, context);
|
|
2823
|
+
}
|
|
2824
|
+
const contents = (0, smithy_client_1.map)({
|
|
2825
|
+
$metadata: deserializeMetadata(output),
|
|
2826
|
+
});
|
|
2827
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2828
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2829
|
+
knowledgeBase: (_) => de_KnowledgeBase(_, context),
|
|
2830
|
+
});
|
|
2831
|
+
Object.assign(contents, doc);
|
|
2832
|
+
return contents;
|
|
2833
|
+
};
|
|
2834
|
+
exports.de_UpdateKnowledgeBaseCommand = de_UpdateKnowledgeBaseCommand;
|
|
2835
|
+
const de_UpdateKnowledgeBaseCommandError = async (output, context) => {
|
|
2836
|
+
const parsedOutput = {
|
|
2837
|
+
...output,
|
|
2838
|
+
body: await parseErrorBody(output.body, context),
|
|
2839
|
+
};
|
|
2840
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2841
|
+
switch (errorCode) {
|
|
2842
|
+
case "AccessDeniedException":
|
|
2843
|
+
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2844
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2845
|
+
case "ConflictException":
|
|
2846
|
+
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2847
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2848
|
+
case "InternalServerException":
|
|
2849
|
+
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2850
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2851
|
+
case "ResourceNotFoundException":
|
|
2852
|
+
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2853
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2854
|
+
case "ThrottlingException":
|
|
2855
|
+
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2856
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2857
|
+
case "ValidationException":
|
|
2858
|
+
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2859
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2860
|
+
default:
|
|
2861
|
+
const parsedBody = parsedOutput.body;
|
|
2862
|
+
return throwDefaultError({
|
|
2863
|
+
output,
|
|
2864
|
+
parsedBody,
|
|
2865
|
+
errorCode,
|
|
2866
|
+
});
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2869
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(BedrockAgentServiceException_1.BedrockAgentServiceException);
|
|
2870
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
2871
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2872
|
+
const data = parsedOutput.body;
|
|
2873
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2874
|
+
message: smithy_client_1.expectString,
|
|
2875
|
+
});
|
|
2876
|
+
Object.assign(contents, doc);
|
|
2877
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
2878
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2879
|
+
...contents,
|
|
2880
|
+
});
|
|
2881
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2882
|
+
};
|
|
2883
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
2884
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2885
|
+
const data = parsedOutput.body;
|
|
2886
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2887
|
+
message: smithy_client_1.expectString,
|
|
2888
|
+
});
|
|
2889
|
+
Object.assign(contents, doc);
|
|
2890
|
+
const exception = new models_0_1.ConflictException({
|
|
2891
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2892
|
+
...contents,
|
|
2893
|
+
});
|
|
2894
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2895
|
+
};
|
|
2896
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
2897
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2898
|
+
const data = parsedOutput.body;
|
|
2899
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2900
|
+
message: smithy_client_1.expectString,
|
|
2901
|
+
});
|
|
2902
|
+
Object.assign(contents, doc);
|
|
2903
|
+
const exception = new models_0_1.InternalServerException({
|
|
2904
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2905
|
+
...contents,
|
|
2906
|
+
});
|
|
2907
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2908
|
+
};
|
|
2909
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
2910
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2911
|
+
const data = parsedOutput.body;
|
|
2912
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2913
|
+
message: smithy_client_1.expectString,
|
|
2914
|
+
});
|
|
2915
|
+
Object.assign(contents, doc);
|
|
2916
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
2917
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2918
|
+
...contents,
|
|
2919
|
+
});
|
|
2920
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2921
|
+
};
|
|
2922
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
2923
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2924
|
+
const data = parsedOutput.body;
|
|
2925
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2926
|
+
message: smithy_client_1.expectString,
|
|
2927
|
+
});
|
|
2928
|
+
Object.assign(contents, doc);
|
|
2929
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
2930
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2931
|
+
...contents,
|
|
2932
|
+
});
|
|
2933
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2934
|
+
};
|
|
2935
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
2936
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2937
|
+
const data = parsedOutput.body;
|
|
2938
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2939
|
+
message: smithy_client_1.expectString,
|
|
2940
|
+
});
|
|
2941
|
+
Object.assign(contents, doc);
|
|
2942
|
+
const exception = new models_0_1.ThrottlingException({
|
|
2943
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2944
|
+
...contents,
|
|
2945
|
+
});
|
|
2946
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2947
|
+
};
|
|
2948
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
2949
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2950
|
+
const data = parsedOutput.body;
|
|
2951
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2952
|
+
fieldList: smithy_client_1._json,
|
|
2953
|
+
message: smithy_client_1.expectString,
|
|
2954
|
+
});
|
|
2955
|
+
Object.assign(contents, doc);
|
|
2956
|
+
const exception = new models_0_1.ValidationException({
|
|
2957
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2958
|
+
...contents,
|
|
2959
|
+
});
|
|
2960
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2961
|
+
};
|
|
2962
|
+
const se_InferenceConfiguration = (input, context) => {
|
|
2963
|
+
return (0, smithy_client_1.take)(input, {
|
|
2964
|
+
maximumLength: [],
|
|
2965
|
+
stopSequences: smithy_client_1._json,
|
|
2966
|
+
temperature: smithy_client_1.serializeFloat,
|
|
2967
|
+
topK: [],
|
|
2968
|
+
topP: smithy_client_1.serializeFloat,
|
|
2969
|
+
});
|
|
2970
|
+
};
|
|
2971
|
+
const se_PromptConfiguration = (input, context) => {
|
|
2972
|
+
return (0, smithy_client_1.take)(input, {
|
|
2973
|
+
basePromptTemplate: [],
|
|
2974
|
+
inferenceConfiguration: (_) => se_InferenceConfiguration(_, context),
|
|
2975
|
+
parserMode: [],
|
|
2976
|
+
promptCreationMode: [],
|
|
2977
|
+
promptState: [],
|
|
2978
|
+
promptType: [],
|
|
2979
|
+
});
|
|
2980
|
+
};
|
|
2981
|
+
const se_PromptConfigurations = (input, context) => {
|
|
2982
|
+
return input
|
|
2983
|
+
.filter((e) => e != null)
|
|
2984
|
+
.map((entry) => {
|
|
2985
|
+
return se_PromptConfiguration(entry, context);
|
|
2986
|
+
});
|
|
2987
|
+
};
|
|
2988
|
+
const se_PromptOverrideConfiguration = (input, context) => {
|
|
2989
|
+
return (0, smithy_client_1.take)(input, {
|
|
2990
|
+
overrideLambda: [],
|
|
2991
|
+
promptConfigurations: (_) => se_PromptConfigurations(_, context),
|
|
2992
|
+
});
|
|
2993
|
+
};
|
|
2994
|
+
const de_ActionGroupSummaries = (output, context) => {
|
|
2995
|
+
const retVal = (output || [])
|
|
2996
|
+
.filter((e) => e != null)
|
|
2997
|
+
.map((entry) => {
|
|
2998
|
+
return de_ActionGroupSummary(entry, context);
|
|
2999
|
+
});
|
|
3000
|
+
return retVal;
|
|
3001
|
+
};
|
|
3002
|
+
const de_ActionGroupSummary = (output, context) => {
|
|
3003
|
+
return (0, smithy_client_1.take)(output, {
|
|
3004
|
+
actionGroupId: smithy_client_1.expectString,
|
|
3005
|
+
actionGroupName: smithy_client_1.expectString,
|
|
3006
|
+
actionGroupState: smithy_client_1.expectString,
|
|
3007
|
+
description: smithy_client_1.expectString,
|
|
3008
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3009
|
+
});
|
|
3010
|
+
};
|
|
3011
|
+
const de_Agent = (output, context) => {
|
|
3012
|
+
return (0, smithy_client_1.take)(output, {
|
|
3013
|
+
agentArn: smithy_client_1.expectString,
|
|
3014
|
+
agentId: smithy_client_1.expectString,
|
|
3015
|
+
agentName: smithy_client_1.expectString,
|
|
3016
|
+
agentResourceRoleArn: smithy_client_1.expectString,
|
|
3017
|
+
agentStatus: smithy_client_1.expectString,
|
|
3018
|
+
agentVersion: smithy_client_1.expectString,
|
|
3019
|
+
clientToken: smithy_client_1.expectString,
|
|
3020
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3021
|
+
customerEncryptionKeyArn: smithy_client_1.expectString,
|
|
3022
|
+
description: smithy_client_1.expectString,
|
|
3023
|
+
failureReasons: smithy_client_1._json,
|
|
3024
|
+
foundationModel: smithy_client_1.expectString,
|
|
3025
|
+
idleSessionTTLInSeconds: smithy_client_1.expectInt32,
|
|
3026
|
+
instruction: smithy_client_1.expectString,
|
|
3027
|
+
preparedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3028
|
+
promptOverrideConfiguration: (_) => de_PromptOverrideConfiguration(_, context),
|
|
3029
|
+
recommendedActions: smithy_client_1._json,
|
|
3030
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3031
|
+
});
|
|
3032
|
+
};
|
|
3033
|
+
const de_AgentActionGroup = (output, context) => {
|
|
3034
|
+
return (0, smithy_client_1.take)(output, {
|
|
3035
|
+
actionGroupExecutor: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
3036
|
+
actionGroupId: smithy_client_1.expectString,
|
|
3037
|
+
actionGroupName: smithy_client_1.expectString,
|
|
3038
|
+
actionGroupState: smithy_client_1.expectString,
|
|
3039
|
+
agentId: smithy_client_1.expectString,
|
|
3040
|
+
agentVersion: smithy_client_1.expectString,
|
|
3041
|
+
apiSchema: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
3042
|
+
clientToken: smithy_client_1.expectString,
|
|
3043
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3044
|
+
description: smithy_client_1.expectString,
|
|
3045
|
+
parentActionSignature: smithy_client_1.expectString,
|
|
3046
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3047
|
+
});
|
|
3048
|
+
};
|
|
3049
|
+
const de_AgentAlias = (output, context) => {
|
|
3050
|
+
return (0, smithy_client_1.take)(output, {
|
|
3051
|
+
agentAliasArn: smithy_client_1.expectString,
|
|
3052
|
+
agentAliasHistoryEvents: (_) => de_AgentAliasHistoryEvents(_, context),
|
|
3053
|
+
agentAliasId: smithy_client_1.expectString,
|
|
3054
|
+
agentAliasName: smithy_client_1.expectString,
|
|
3055
|
+
agentAliasStatus: smithy_client_1.expectString,
|
|
3056
|
+
agentId: smithy_client_1.expectString,
|
|
3057
|
+
clientToken: smithy_client_1.expectString,
|
|
3058
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3059
|
+
description: smithy_client_1.expectString,
|
|
3060
|
+
routingConfiguration: smithy_client_1._json,
|
|
3061
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3062
|
+
});
|
|
3063
|
+
};
|
|
3064
|
+
const de_AgentAliasHistoryEvent = (output, context) => {
|
|
3065
|
+
return (0, smithy_client_1.take)(output, {
|
|
3066
|
+
endDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3067
|
+
routingConfiguration: smithy_client_1._json,
|
|
3068
|
+
startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3069
|
+
});
|
|
3070
|
+
};
|
|
3071
|
+
const de_AgentAliasHistoryEvents = (output, context) => {
|
|
3072
|
+
const retVal = (output || [])
|
|
3073
|
+
.filter((e) => e != null)
|
|
3074
|
+
.map((entry) => {
|
|
3075
|
+
return de_AgentAliasHistoryEvent(entry, context);
|
|
3076
|
+
});
|
|
3077
|
+
return retVal;
|
|
3078
|
+
};
|
|
3079
|
+
const de_AgentAliasSummaries = (output, context) => {
|
|
3080
|
+
const retVal = (output || [])
|
|
3081
|
+
.filter((e) => e != null)
|
|
3082
|
+
.map((entry) => {
|
|
3083
|
+
return de_AgentAliasSummary(entry, context);
|
|
3084
|
+
});
|
|
3085
|
+
return retVal;
|
|
3086
|
+
};
|
|
3087
|
+
const de_AgentAliasSummary = (output, context) => {
|
|
3088
|
+
return (0, smithy_client_1.take)(output, {
|
|
3089
|
+
agentAliasId: smithy_client_1.expectString,
|
|
3090
|
+
agentAliasName: smithy_client_1.expectString,
|
|
3091
|
+
agentAliasStatus: smithy_client_1.expectString,
|
|
3092
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3093
|
+
description: smithy_client_1.expectString,
|
|
3094
|
+
routingConfiguration: smithy_client_1._json,
|
|
3095
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3096
|
+
});
|
|
3097
|
+
};
|
|
3098
|
+
const de_AgentKnowledgeBase = (output, context) => {
|
|
3099
|
+
return (0, smithy_client_1.take)(output, {
|
|
3100
|
+
agentId: smithy_client_1.expectString,
|
|
3101
|
+
agentVersion: smithy_client_1.expectString,
|
|
3102
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3103
|
+
description: smithy_client_1.expectString,
|
|
3104
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3105
|
+
knowledgeBaseState: smithy_client_1.expectString,
|
|
3106
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3107
|
+
});
|
|
3108
|
+
};
|
|
3109
|
+
const de_AgentKnowledgeBaseSummaries = (output, context) => {
|
|
3110
|
+
const retVal = (output || [])
|
|
3111
|
+
.filter((e) => e != null)
|
|
3112
|
+
.map((entry) => {
|
|
3113
|
+
return de_AgentKnowledgeBaseSummary(entry, context);
|
|
3114
|
+
});
|
|
3115
|
+
return retVal;
|
|
3116
|
+
};
|
|
3117
|
+
const de_AgentKnowledgeBaseSummary = (output, context) => {
|
|
3118
|
+
return (0, smithy_client_1.take)(output, {
|
|
3119
|
+
description: smithy_client_1.expectString,
|
|
3120
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3121
|
+
knowledgeBaseState: smithy_client_1.expectString,
|
|
3122
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3123
|
+
});
|
|
3124
|
+
};
|
|
3125
|
+
const de_AgentSummaries = (output, context) => {
|
|
3126
|
+
const retVal = (output || [])
|
|
3127
|
+
.filter((e) => e != null)
|
|
3128
|
+
.map((entry) => {
|
|
3129
|
+
return de_AgentSummary(entry, context);
|
|
3130
|
+
});
|
|
3131
|
+
return retVal;
|
|
3132
|
+
};
|
|
3133
|
+
const de_AgentSummary = (output, context) => {
|
|
3134
|
+
return (0, smithy_client_1.take)(output, {
|
|
3135
|
+
agentId: smithy_client_1.expectString,
|
|
3136
|
+
agentName: smithy_client_1.expectString,
|
|
3137
|
+
agentStatus: smithy_client_1.expectString,
|
|
3138
|
+
description: smithy_client_1.expectString,
|
|
3139
|
+
latestAgentVersion: smithy_client_1.expectString,
|
|
3140
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3141
|
+
});
|
|
3142
|
+
};
|
|
3143
|
+
const de_AgentVersion = (output, context) => {
|
|
3144
|
+
return (0, smithy_client_1.take)(output, {
|
|
3145
|
+
agentArn: smithy_client_1.expectString,
|
|
3146
|
+
agentId: smithy_client_1.expectString,
|
|
3147
|
+
agentName: smithy_client_1.expectString,
|
|
3148
|
+
agentResourceRoleArn: smithy_client_1.expectString,
|
|
3149
|
+
agentStatus: smithy_client_1.expectString,
|
|
3150
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3151
|
+
customerEncryptionKeyArn: smithy_client_1.expectString,
|
|
3152
|
+
description: smithy_client_1.expectString,
|
|
3153
|
+
failureReasons: smithy_client_1._json,
|
|
3154
|
+
foundationModel: smithy_client_1.expectString,
|
|
3155
|
+
idleSessionTTLInSeconds: smithy_client_1.expectInt32,
|
|
3156
|
+
instruction: smithy_client_1.expectString,
|
|
3157
|
+
promptOverrideConfiguration: (_) => de_PromptOverrideConfiguration(_, context),
|
|
3158
|
+
recommendedActions: smithy_client_1._json,
|
|
3159
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3160
|
+
version: smithy_client_1.expectString,
|
|
3161
|
+
});
|
|
3162
|
+
};
|
|
3163
|
+
const de_AgentVersionSummaries = (output, context) => {
|
|
3164
|
+
const retVal = (output || [])
|
|
3165
|
+
.filter((e) => e != null)
|
|
3166
|
+
.map((entry) => {
|
|
3167
|
+
return de_AgentVersionSummary(entry, context);
|
|
3168
|
+
});
|
|
3169
|
+
return retVal;
|
|
3170
|
+
};
|
|
3171
|
+
const de_AgentVersionSummary = (output, context) => {
|
|
3172
|
+
return (0, smithy_client_1.take)(output, {
|
|
3173
|
+
agentName: smithy_client_1.expectString,
|
|
3174
|
+
agentStatus: smithy_client_1.expectString,
|
|
3175
|
+
agentVersion: smithy_client_1.expectString,
|
|
3176
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3177
|
+
description: smithy_client_1.expectString,
|
|
3178
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3179
|
+
});
|
|
3180
|
+
};
|
|
3181
|
+
const de_DataSource = (output, context) => {
|
|
3182
|
+
return (0, smithy_client_1.take)(output, {
|
|
3183
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3184
|
+
dataSourceConfiguration: smithy_client_1._json,
|
|
3185
|
+
dataSourceId: smithy_client_1.expectString,
|
|
3186
|
+
description: smithy_client_1.expectString,
|
|
3187
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3188
|
+
name: smithy_client_1.expectString,
|
|
3189
|
+
serverSideEncryptionConfiguration: smithy_client_1._json,
|
|
3190
|
+
status: smithy_client_1.expectString,
|
|
3191
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3192
|
+
vectorIngestionConfiguration: smithy_client_1._json,
|
|
3193
|
+
});
|
|
3194
|
+
};
|
|
3195
|
+
const de_DataSourceSummaries = (output, context) => {
|
|
3196
|
+
const retVal = (output || [])
|
|
3197
|
+
.filter((e) => e != null)
|
|
3198
|
+
.map((entry) => {
|
|
3199
|
+
return de_DataSourceSummary(entry, context);
|
|
3200
|
+
});
|
|
3201
|
+
return retVal;
|
|
3202
|
+
};
|
|
3203
|
+
const de_DataSourceSummary = (output, context) => {
|
|
3204
|
+
return (0, smithy_client_1.take)(output, {
|
|
3205
|
+
dataSourceId: smithy_client_1.expectString,
|
|
3206
|
+
description: smithy_client_1.expectString,
|
|
3207
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3208
|
+
name: smithy_client_1.expectString,
|
|
3209
|
+
status: smithy_client_1.expectString,
|
|
3210
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3211
|
+
});
|
|
3212
|
+
};
|
|
3213
|
+
const de_InferenceConfiguration = (output, context) => {
|
|
3214
|
+
return (0, smithy_client_1.take)(output, {
|
|
3215
|
+
maximumLength: smithy_client_1.expectInt32,
|
|
3216
|
+
stopSequences: smithy_client_1._json,
|
|
3217
|
+
temperature: smithy_client_1.limitedParseFloat32,
|
|
3218
|
+
topK: smithy_client_1.expectInt32,
|
|
3219
|
+
topP: smithy_client_1.limitedParseFloat32,
|
|
3220
|
+
});
|
|
3221
|
+
};
|
|
3222
|
+
const de_IngestionJob = (output, context) => {
|
|
3223
|
+
return (0, smithy_client_1.take)(output, {
|
|
3224
|
+
dataSourceId: smithy_client_1.expectString,
|
|
3225
|
+
description: smithy_client_1.expectString,
|
|
3226
|
+
failureReasons: smithy_client_1._json,
|
|
3227
|
+
ingestionJobId: smithy_client_1.expectString,
|
|
3228
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3229
|
+
startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3230
|
+
statistics: smithy_client_1._json,
|
|
3231
|
+
status: smithy_client_1.expectString,
|
|
3232
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3233
|
+
});
|
|
3234
|
+
};
|
|
3235
|
+
const de_IngestionJobSummaries = (output, context) => {
|
|
3236
|
+
const retVal = (output || [])
|
|
3237
|
+
.filter((e) => e != null)
|
|
3238
|
+
.map((entry) => {
|
|
3239
|
+
return de_IngestionJobSummary(entry, context);
|
|
3240
|
+
});
|
|
3241
|
+
return retVal;
|
|
3242
|
+
};
|
|
3243
|
+
const de_IngestionJobSummary = (output, context) => {
|
|
3244
|
+
return (0, smithy_client_1.take)(output, {
|
|
3245
|
+
dataSourceId: smithy_client_1.expectString,
|
|
3246
|
+
description: smithy_client_1.expectString,
|
|
3247
|
+
ingestionJobId: smithy_client_1.expectString,
|
|
3248
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3249
|
+
startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3250
|
+
statistics: smithy_client_1._json,
|
|
3251
|
+
status: smithy_client_1.expectString,
|
|
3252
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3253
|
+
});
|
|
3254
|
+
};
|
|
3255
|
+
const de_KnowledgeBase = (output, context) => {
|
|
3256
|
+
return (0, smithy_client_1.take)(output, {
|
|
3257
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3258
|
+
description: smithy_client_1.expectString,
|
|
3259
|
+
failureReasons: smithy_client_1._json,
|
|
3260
|
+
knowledgeBaseArn: smithy_client_1.expectString,
|
|
3261
|
+
knowledgeBaseConfiguration: smithy_client_1._json,
|
|
3262
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3263
|
+
name: smithy_client_1.expectString,
|
|
3264
|
+
roleArn: smithy_client_1.expectString,
|
|
3265
|
+
status: smithy_client_1.expectString,
|
|
3266
|
+
storageConfiguration: smithy_client_1._json,
|
|
3267
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3268
|
+
});
|
|
3269
|
+
};
|
|
3270
|
+
const de_KnowledgeBaseSummaries = (output, context) => {
|
|
3271
|
+
const retVal = (output || [])
|
|
3272
|
+
.filter((e) => e != null)
|
|
3273
|
+
.map((entry) => {
|
|
3274
|
+
return de_KnowledgeBaseSummary(entry, context);
|
|
3275
|
+
});
|
|
3276
|
+
return retVal;
|
|
3277
|
+
};
|
|
3278
|
+
const de_KnowledgeBaseSummary = (output, context) => {
|
|
3279
|
+
return (0, smithy_client_1.take)(output, {
|
|
3280
|
+
description: smithy_client_1.expectString,
|
|
3281
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
3282
|
+
name: smithy_client_1.expectString,
|
|
3283
|
+
status: smithy_client_1.expectString,
|
|
3284
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
3285
|
+
});
|
|
3286
|
+
};
|
|
3287
|
+
const de_PromptConfiguration = (output, context) => {
|
|
3288
|
+
return (0, smithy_client_1.take)(output, {
|
|
3289
|
+
basePromptTemplate: smithy_client_1.expectString,
|
|
3290
|
+
inferenceConfiguration: (_) => de_InferenceConfiguration(_, context),
|
|
3291
|
+
parserMode: smithy_client_1.expectString,
|
|
3292
|
+
promptCreationMode: smithy_client_1.expectString,
|
|
3293
|
+
promptState: smithy_client_1.expectString,
|
|
3294
|
+
promptType: smithy_client_1.expectString,
|
|
3295
|
+
});
|
|
3296
|
+
};
|
|
3297
|
+
const de_PromptConfigurations = (output, context) => {
|
|
3298
|
+
const retVal = (output || [])
|
|
3299
|
+
.filter((e) => e != null)
|
|
3300
|
+
.map((entry) => {
|
|
3301
|
+
return de_PromptConfiguration(entry, context);
|
|
3302
|
+
});
|
|
3303
|
+
return retVal;
|
|
3304
|
+
};
|
|
3305
|
+
const de_PromptOverrideConfiguration = (output, context) => {
|
|
3306
|
+
return (0, smithy_client_1.take)(output, {
|
|
3307
|
+
overrideLambda: smithy_client_1.expectString,
|
|
3308
|
+
promptConfigurations: (_) => de_PromptConfigurations(_, context),
|
|
3309
|
+
});
|
|
3310
|
+
};
|
|
3311
|
+
const deserializeMetadata = (output) => ({
|
|
3312
|
+
httpStatusCode: output.statusCode,
|
|
3313
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
3314
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3315
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
3316
|
+
});
|
|
3317
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3318
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
3319
|
+
value !== null &&
|
|
3320
|
+
value !== "" &&
|
|
3321
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
3322
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
3323
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
3324
|
+
if (encoded.length) {
|
|
3325
|
+
return JSON.parse(encoded);
|
|
3326
|
+
}
|
|
3327
|
+
return {};
|
|
3328
|
+
});
|
|
3329
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
3330
|
+
const value = await parseBody(errorBody, context);
|
|
3331
|
+
value.message = value.message ?? value.Message;
|
|
3332
|
+
return value;
|
|
3333
|
+
};
|
|
3334
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
3335
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3336
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
3337
|
+
let cleanValue = rawValue;
|
|
3338
|
+
if (typeof cleanValue === "number") {
|
|
3339
|
+
cleanValue = cleanValue.toString();
|
|
3340
|
+
}
|
|
3341
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
3342
|
+
cleanValue = cleanValue.split(",")[0];
|
|
3343
|
+
}
|
|
3344
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
3345
|
+
cleanValue = cleanValue.split(":")[0];
|
|
3346
|
+
}
|
|
3347
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
3348
|
+
cleanValue = cleanValue.split("#")[1];
|
|
3349
|
+
}
|
|
3350
|
+
return cleanValue;
|
|
3351
|
+
};
|
|
3352
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3353
|
+
if (headerKey !== undefined) {
|
|
3354
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3355
|
+
}
|
|
3356
|
+
if (data.code !== undefined) {
|
|
3357
|
+
return sanitizeErrorCode(data.code);
|
|
3358
|
+
}
|
|
3359
|
+
if (data["__type"] !== undefined) {
|
|
3360
|
+
return sanitizeErrorCode(data["__type"]);
|
|
3361
|
+
}
|
|
3362
|
+
};
|