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