@aws-sdk/client-wisdom 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/Wisdom.js +1 -93
- package/dist-cjs/WisdomClient.js +1 -43
- package/dist-cjs/commands/CreateAssistantAssociationCommand.js +1 -28
- package/dist-cjs/commands/CreateAssistantCommand.js +1 -28
- package/dist-cjs/commands/CreateContentCommand.js +1 -29
- package/dist-cjs/commands/CreateKnowledgeBaseCommand.js +1 -28
- package/dist-cjs/commands/CreateQuickResponseCommand.js +1 -29
- package/dist-cjs/commands/CreateSessionCommand.js +1 -28
- package/dist-cjs/commands/DeleteAssistantAssociationCommand.js +1 -28
- package/dist-cjs/commands/DeleteAssistantCommand.js +1 -28
- package/dist-cjs/commands/DeleteContentCommand.js +1 -28
- package/dist-cjs/commands/DeleteImportJobCommand.js +1 -28
- package/dist-cjs/commands/DeleteKnowledgeBaseCommand.js +1 -28
- package/dist-cjs/commands/DeleteQuickResponseCommand.js +1 -28
- package/dist-cjs/commands/GetAssistantAssociationCommand.js +1 -28
- package/dist-cjs/commands/GetAssistantCommand.js +1 -28
- package/dist-cjs/commands/GetContentCommand.js +1 -29
- package/dist-cjs/commands/GetContentSummaryCommand.js +1 -28
- package/dist-cjs/commands/GetImportJobCommand.js +1 -29
- package/dist-cjs/commands/GetKnowledgeBaseCommand.js +1 -28
- package/dist-cjs/commands/GetQuickResponseCommand.js +1 -29
- package/dist-cjs/commands/GetRecommendationsCommand.js +1 -29
- package/dist-cjs/commands/GetSessionCommand.js +1 -28
- package/dist-cjs/commands/ListAssistantAssociationsCommand.js +1 -28
- package/dist-cjs/commands/ListAssistantsCommand.js +1 -28
- package/dist-cjs/commands/ListContentsCommand.js +1 -28
- package/dist-cjs/commands/ListImportJobsCommand.js +1 -28
- package/dist-cjs/commands/ListKnowledgeBasesCommand.js +1 -28
- package/dist-cjs/commands/ListQuickResponsesCommand.js +1 -29
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/NotifyRecommendationsReceivedCommand.js +1 -28
- package/dist-cjs/commands/QueryAssistantCommand.js +1 -29
- package/dist-cjs/commands/RemoveKnowledgeBaseTemplateUriCommand.js +1 -28
- package/dist-cjs/commands/SearchContentCommand.js +1 -28
- package/dist-cjs/commands/SearchQuickResponsesCommand.js +1 -29
- package/dist-cjs/commands/SearchSessionsCommand.js +1 -28
- package/dist-cjs/commands/StartContentUploadCommand.js +1 -29
- package/dist-cjs/commands/StartImportJobCommand.js +1 -29
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateContentCommand.js +1 -29
- package/dist-cjs/commands/UpdateKnowledgeBaseTemplateUriCommand.js +1 -28
- package/dist-cjs/commands/UpdateQuickResponseCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -44
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +4179 -11
- package/dist-cjs/models/WisdomServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -467
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAssistantAssociationsPaginator.js +1 -7
- package/dist-cjs/pagination/ListAssistantsPaginator.js +1 -7
- package/dist-cjs/pagination/ListContentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListImportJobsPaginator.js +1 -7
- package/dist-cjs/pagination/ListKnowledgeBasesPaginator.js +1 -7
- package/dist-cjs/pagination/ListQuickResponsesPaginator.js +1 -7
- package/dist-cjs/pagination/QueryAssistantPaginator.js +1 -7
- package/dist-cjs/pagination/SearchContentPaginator.js +1 -7
- package/dist-cjs/pagination/SearchQuickResponsesPaginator.js +1 -7
- package/dist-cjs/pagination/SearchSessionsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -14
- package/dist-cjs/protocols/Aws_restJson1.js +1 -2612
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,2612 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_DeleteContentCommand = exports.de_DeleteAssistantAssociationCommand = exports.de_DeleteAssistantCommand = exports.de_CreateSessionCommand = exports.de_CreateQuickResponseCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateContentCommand = exports.de_CreateAssistantAssociationCommand = exports.de_CreateAssistantCommand = exports.se_UpdateQuickResponseCommand = exports.se_UpdateKnowledgeBaseTemplateUriCommand = exports.se_UpdateContentCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartImportJobCommand = exports.se_StartContentUploadCommand = exports.se_SearchSessionsCommand = exports.se_SearchQuickResponsesCommand = exports.se_SearchContentCommand = exports.se_RemoveKnowledgeBaseTemplateUriCommand = exports.se_QueryAssistantCommand = exports.se_NotifyRecommendationsReceivedCommand = exports.se_ListTagsForResourceCommand = exports.se_ListQuickResponsesCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListImportJobsCommand = exports.se_ListContentsCommand = exports.se_ListAssistantsCommand = exports.se_ListAssistantAssociationsCommand = exports.se_GetSessionCommand = exports.se_GetRecommendationsCommand = exports.se_GetQuickResponseCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetImportJobCommand = exports.se_GetContentSummaryCommand = exports.se_GetContentCommand = exports.se_GetAssistantAssociationCommand = exports.se_GetAssistantCommand = exports.se_DeleteQuickResponseCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteImportJobCommand = exports.se_DeleteContentCommand = exports.se_DeleteAssistantAssociationCommand = exports.se_DeleteAssistantCommand = exports.se_CreateSessionCommand = exports.se_CreateQuickResponseCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateContentCommand = exports.se_CreateAssistantAssociationCommand = exports.se_CreateAssistantCommand = void 0;
|
|
4
|
-
exports.de_UpdateQuickResponseCommand = exports.de_UpdateKnowledgeBaseTemplateUriCommand = exports.de_UpdateContentCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartImportJobCommand = exports.de_StartContentUploadCommand = exports.de_SearchSessionsCommand = exports.de_SearchQuickResponsesCommand = exports.de_SearchContentCommand = exports.de_RemoveKnowledgeBaseTemplateUriCommand = exports.de_QueryAssistantCommand = exports.de_NotifyRecommendationsReceivedCommand = exports.de_ListTagsForResourceCommand = exports.de_ListQuickResponsesCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListImportJobsCommand = exports.de_ListContentsCommand = exports.de_ListAssistantsCommand = exports.de_ListAssistantAssociationsCommand = exports.de_GetSessionCommand = exports.de_GetRecommendationsCommand = exports.de_GetQuickResponseCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetImportJobCommand = exports.de_GetContentSummaryCommand = exports.de_GetContentCommand = exports.de_GetAssistantAssociationCommand = exports.de_GetAssistantCommand = exports.de_DeleteQuickResponseCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteImportJobCommand = 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 models_0_1 = require("../models/models_0");
|
|
10
|
-
const WisdomServiceException_1 = require("../models/WisdomServiceException");
|
|
11
|
-
const se_CreateAssistantCommand = async (input, context) => {
|
|
12
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
13
|
-
const headers = {
|
|
14
|
-
"content-type": "application/json",
|
|
15
|
-
};
|
|
16
|
-
b.bp("/assistants");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
19
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
20
|
-
description: [],
|
|
21
|
-
name: [],
|
|
22
|
-
serverSideEncryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
23
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
24
|
-
type: [],
|
|
25
|
-
}));
|
|
26
|
-
b.m("POST").h(headers).b(body);
|
|
27
|
-
return b.build();
|
|
28
|
-
};
|
|
29
|
-
exports.se_CreateAssistantCommand = se_CreateAssistantCommand;
|
|
30
|
-
const se_CreateAssistantAssociationCommand = async (input, context) => {
|
|
31
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
32
|
-
const headers = {
|
|
33
|
-
"content-type": "application/json",
|
|
34
|
-
};
|
|
35
|
-
b.bp("/assistants/{assistantId}/associations");
|
|
36
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
37
|
-
let body;
|
|
38
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
39
|
-
association: (_) => (0, smithy_client_1._json)(_),
|
|
40
|
-
associationType: [],
|
|
41
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
42
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
43
|
-
}));
|
|
44
|
-
b.m("POST").h(headers).b(body);
|
|
45
|
-
return b.build();
|
|
46
|
-
};
|
|
47
|
-
exports.se_CreateAssistantAssociationCommand = se_CreateAssistantAssociationCommand;
|
|
48
|
-
const se_CreateContentCommand = async (input, context) => {
|
|
49
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
50
|
-
const headers = {
|
|
51
|
-
"content-type": "application/json",
|
|
52
|
-
};
|
|
53
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/contents");
|
|
54
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
55
|
-
let body;
|
|
56
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
57
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
58
|
-
metadata: (_) => (0, smithy_client_1._json)(_),
|
|
59
|
-
name: [],
|
|
60
|
-
overrideLinkOutUri: [],
|
|
61
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
62
|
-
title: [],
|
|
63
|
-
uploadId: [],
|
|
64
|
-
}));
|
|
65
|
-
b.m("POST").h(headers).b(body);
|
|
66
|
-
return b.build();
|
|
67
|
-
};
|
|
68
|
-
exports.se_CreateContentCommand = se_CreateContentCommand;
|
|
69
|
-
const se_CreateKnowledgeBaseCommand = async (input, context) => {
|
|
70
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
71
|
-
const headers = {
|
|
72
|
-
"content-type": "application/json",
|
|
73
|
-
};
|
|
74
|
-
b.bp("/knowledgeBases");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
77
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
78
|
-
description: [],
|
|
79
|
-
knowledgeBaseType: [],
|
|
80
|
-
name: [],
|
|
81
|
-
renderingConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
82
|
-
serverSideEncryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
83
|
-
sourceConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
84
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
85
|
-
}));
|
|
86
|
-
b.m("POST").h(headers).b(body);
|
|
87
|
-
return b.build();
|
|
88
|
-
};
|
|
89
|
-
exports.se_CreateKnowledgeBaseCommand = se_CreateKnowledgeBaseCommand;
|
|
90
|
-
const se_CreateQuickResponseCommand = async (input, context) => {
|
|
91
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
92
|
-
const headers = {
|
|
93
|
-
"content-type": "application/json",
|
|
94
|
-
};
|
|
95
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses");
|
|
96
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
97
|
-
let body;
|
|
98
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
99
|
-
channels: (_) => (0, smithy_client_1._json)(_),
|
|
100
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
101
|
-
content: (_) => (0, smithy_client_1._json)(_),
|
|
102
|
-
contentType: [],
|
|
103
|
-
description: [],
|
|
104
|
-
groupingConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
105
|
-
isActive: [],
|
|
106
|
-
language: [],
|
|
107
|
-
name: [],
|
|
108
|
-
shortcutKey: [],
|
|
109
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
110
|
-
}));
|
|
111
|
-
b.m("POST").h(headers).b(body);
|
|
112
|
-
return b.build();
|
|
113
|
-
};
|
|
114
|
-
exports.se_CreateQuickResponseCommand = se_CreateQuickResponseCommand;
|
|
115
|
-
const se_CreateSessionCommand = async (input, context) => {
|
|
116
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
117
|
-
const headers = {
|
|
118
|
-
"content-type": "application/json",
|
|
119
|
-
};
|
|
120
|
-
b.bp("/assistants/{assistantId}/sessions");
|
|
121
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
124
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
125
|
-
description: [],
|
|
126
|
-
name: [],
|
|
127
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
128
|
-
}));
|
|
129
|
-
b.m("POST").h(headers).b(body);
|
|
130
|
-
return b.build();
|
|
131
|
-
};
|
|
132
|
-
exports.se_CreateSessionCommand = se_CreateSessionCommand;
|
|
133
|
-
const se_DeleteAssistantCommand = async (input, context) => {
|
|
134
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
135
|
-
const headers = {};
|
|
136
|
-
b.bp("/assistants/{assistantId}");
|
|
137
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
138
|
-
let body;
|
|
139
|
-
b.m("DELETE").h(headers).b(body);
|
|
140
|
-
return b.build();
|
|
141
|
-
};
|
|
142
|
-
exports.se_DeleteAssistantCommand = se_DeleteAssistantCommand;
|
|
143
|
-
const se_DeleteAssistantAssociationCommand = async (input, context) => {
|
|
144
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
145
|
-
const headers = {};
|
|
146
|
-
b.bp("/assistants/{assistantId}/associations/{assistantAssociationId}");
|
|
147
|
-
b.p("assistantAssociationId", () => input.assistantAssociationId, "{assistantAssociationId}", false);
|
|
148
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
149
|
-
let body;
|
|
150
|
-
b.m("DELETE").h(headers).b(body);
|
|
151
|
-
return b.build();
|
|
152
|
-
};
|
|
153
|
-
exports.se_DeleteAssistantAssociationCommand = se_DeleteAssistantAssociationCommand;
|
|
154
|
-
const se_DeleteContentCommand = async (input, context) => {
|
|
155
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
156
|
-
const headers = {};
|
|
157
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
|
|
158
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
159
|
-
b.p("contentId", () => input.contentId, "{contentId}", false);
|
|
160
|
-
let body;
|
|
161
|
-
b.m("DELETE").h(headers).b(body);
|
|
162
|
-
return b.build();
|
|
163
|
-
};
|
|
164
|
-
exports.se_DeleteContentCommand = se_DeleteContentCommand;
|
|
165
|
-
const se_DeleteImportJobCommand = async (input, context) => {
|
|
166
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
167
|
-
const headers = {};
|
|
168
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}");
|
|
169
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
170
|
-
b.p("importJobId", () => input.importJobId, "{importJobId}", false);
|
|
171
|
-
let body;
|
|
172
|
-
b.m("DELETE").h(headers).b(body);
|
|
173
|
-
return b.build();
|
|
174
|
-
};
|
|
175
|
-
exports.se_DeleteImportJobCommand = se_DeleteImportJobCommand;
|
|
176
|
-
const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
177
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
178
|
-
const headers = {};
|
|
179
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}");
|
|
180
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
181
|
-
let body;
|
|
182
|
-
b.m("DELETE").h(headers).b(body);
|
|
183
|
-
return b.build();
|
|
184
|
-
};
|
|
185
|
-
exports.se_DeleteKnowledgeBaseCommand = se_DeleteKnowledgeBaseCommand;
|
|
186
|
-
const se_DeleteQuickResponseCommand = async (input, context) => {
|
|
187
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
188
|
-
const headers = {};
|
|
189
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
|
|
190
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
191
|
-
b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
|
|
192
|
-
let body;
|
|
193
|
-
b.m("DELETE").h(headers).b(body);
|
|
194
|
-
return b.build();
|
|
195
|
-
};
|
|
196
|
-
exports.se_DeleteQuickResponseCommand = se_DeleteQuickResponseCommand;
|
|
197
|
-
const se_GetAssistantCommand = async (input, context) => {
|
|
198
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
199
|
-
const headers = {};
|
|
200
|
-
b.bp("/assistants/{assistantId}");
|
|
201
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
202
|
-
let body;
|
|
203
|
-
b.m("GET").h(headers).b(body);
|
|
204
|
-
return b.build();
|
|
205
|
-
};
|
|
206
|
-
exports.se_GetAssistantCommand = se_GetAssistantCommand;
|
|
207
|
-
const se_GetAssistantAssociationCommand = async (input, context) => {
|
|
208
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
209
|
-
const headers = {};
|
|
210
|
-
b.bp("/assistants/{assistantId}/associations/{assistantAssociationId}");
|
|
211
|
-
b.p("assistantAssociationId", () => input.assistantAssociationId, "{assistantAssociationId}", false);
|
|
212
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
213
|
-
let body;
|
|
214
|
-
b.m("GET").h(headers).b(body);
|
|
215
|
-
return b.build();
|
|
216
|
-
};
|
|
217
|
-
exports.se_GetAssistantAssociationCommand = se_GetAssistantAssociationCommand;
|
|
218
|
-
const se_GetContentCommand = async (input, context) => {
|
|
219
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
220
|
-
const headers = {};
|
|
221
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
|
|
222
|
-
b.p("contentId", () => input.contentId, "{contentId}", false);
|
|
223
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
224
|
-
let body;
|
|
225
|
-
b.m("GET").h(headers).b(body);
|
|
226
|
-
return b.build();
|
|
227
|
-
};
|
|
228
|
-
exports.se_GetContentCommand = se_GetContentCommand;
|
|
229
|
-
const se_GetContentSummaryCommand = async (input, context) => {
|
|
230
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
231
|
-
const headers = {};
|
|
232
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary");
|
|
233
|
-
b.p("contentId", () => input.contentId, "{contentId}", false);
|
|
234
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
235
|
-
let body;
|
|
236
|
-
b.m("GET").h(headers).b(body);
|
|
237
|
-
return b.build();
|
|
238
|
-
};
|
|
239
|
-
exports.se_GetContentSummaryCommand = se_GetContentSummaryCommand;
|
|
240
|
-
const se_GetImportJobCommand = async (input, context) => {
|
|
241
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
242
|
-
const headers = {};
|
|
243
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}");
|
|
244
|
-
b.p("importJobId", () => input.importJobId, "{importJobId}", false);
|
|
245
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
246
|
-
let body;
|
|
247
|
-
b.m("GET").h(headers).b(body);
|
|
248
|
-
return b.build();
|
|
249
|
-
};
|
|
250
|
-
exports.se_GetImportJobCommand = se_GetImportJobCommand;
|
|
251
|
-
const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
252
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
253
|
-
const headers = {};
|
|
254
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}");
|
|
255
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
256
|
-
let body;
|
|
257
|
-
b.m("GET").h(headers).b(body);
|
|
258
|
-
return b.build();
|
|
259
|
-
};
|
|
260
|
-
exports.se_GetKnowledgeBaseCommand = se_GetKnowledgeBaseCommand;
|
|
261
|
-
const se_GetQuickResponseCommand = async (input, context) => {
|
|
262
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
263
|
-
const headers = {};
|
|
264
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
|
|
265
|
-
b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
|
|
266
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
267
|
-
let body;
|
|
268
|
-
b.m("GET").h(headers).b(body);
|
|
269
|
-
return b.build();
|
|
270
|
-
};
|
|
271
|
-
exports.se_GetQuickResponseCommand = se_GetQuickResponseCommand;
|
|
272
|
-
const se_GetRecommendationsCommand = async (input, context) => {
|
|
273
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
274
|
-
const headers = {};
|
|
275
|
-
b.bp("/assistants/{assistantId}/sessions/{sessionId}/recommendations");
|
|
276
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
277
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
278
|
-
const query = (0, smithy_client_1.map)({
|
|
279
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
280
|
-
[_wTS]: [() => input.waitTimeSeconds !== void 0, () => input[_wTS].toString()],
|
|
281
|
-
});
|
|
282
|
-
let body;
|
|
283
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
284
|
-
return b.build();
|
|
285
|
-
};
|
|
286
|
-
exports.se_GetRecommendationsCommand = se_GetRecommendationsCommand;
|
|
287
|
-
const se_GetSessionCommand = async (input, context) => {
|
|
288
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
289
|
-
const headers = {};
|
|
290
|
-
b.bp("/assistants/{assistantId}/sessions/{sessionId}");
|
|
291
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
292
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
293
|
-
let body;
|
|
294
|
-
b.m("GET").h(headers).b(body);
|
|
295
|
-
return b.build();
|
|
296
|
-
};
|
|
297
|
-
exports.se_GetSessionCommand = se_GetSessionCommand;
|
|
298
|
-
const se_ListAssistantAssociationsCommand = async (input, context) => {
|
|
299
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
300
|
-
const headers = {};
|
|
301
|
-
b.bp("/assistants/{assistantId}/associations");
|
|
302
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
303
|
-
const query = (0, smithy_client_1.map)({
|
|
304
|
-
[_nT]: [, input[_nT]],
|
|
305
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
306
|
-
});
|
|
307
|
-
let body;
|
|
308
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
309
|
-
return b.build();
|
|
310
|
-
};
|
|
311
|
-
exports.se_ListAssistantAssociationsCommand = se_ListAssistantAssociationsCommand;
|
|
312
|
-
const se_ListAssistantsCommand = async (input, context) => {
|
|
313
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
314
|
-
const headers = {};
|
|
315
|
-
b.bp("/assistants");
|
|
316
|
-
const query = (0, smithy_client_1.map)({
|
|
317
|
-
[_nT]: [, input[_nT]],
|
|
318
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
319
|
-
});
|
|
320
|
-
let body;
|
|
321
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
322
|
-
return b.build();
|
|
323
|
-
};
|
|
324
|
-
exports.se_ListAssistantsCommand = se_ListAssistantsCommand;
|
|
325
|
-
const se_ListContentsCommand = async (input, context) => {
|
|
326
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
327
|
-
const headers = {};
|
|
328
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/contents");
|
|
329
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
330
|
-
const query = (0, smithy_client_1.map)({
|
|
331
|
-
[_nT]: [, input[_nT]],
|
|
332
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
333
|
-
});
|
|
334
|
-
let body;
|
|
335
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
336
|
-
return b.build();
|
|
337
|
-
};
|
|
338
|
-
exports.se_ListContentsCommand = se_ListContentsCommand;
|
|
339
|
-
const se_ListImportJobsCommand = async (input, context) => {
|
|
340
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
341
|
-
const headers = {};
|
|
342
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs");
|
|
343
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
344
|
-
const query = (0, smithy_client_1.map)({
|
|
345
|
-
[_nT]: [, input[_nT]],
|
|
346
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
347
|
-
});
|
|
348
|
-
let body;
|
|
349
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
350
|
-
return b.build();
|
|
351
|
-
};
|
|
352
|
-
exports.se_ListImportJobsCommand = se_ListImportJobsCommand;
|
|
353
|
-
const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
354
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
355
|
-
const headers = {};
|
|
356
|
-
b.bp("/knowledgeBases");
|
|
357
|
-
const query = (0, smithy_client_1.map)({
|
|
358
|
-
[_nT]: [, input[_nT]],
|
|
359
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
360
|
-
});
|
|
361
|
-
let body;
|
|
362
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
363
|
-
return b.build();
|
|
364
|
-
};
|
|
365
|
-
exports.se_ListKnowledgeBasesCommand = se_ListKnowledgeBasesCommand;
|
|
366
|
-
const se_ListQuickResponsesCommand = async (input, context) => {
|
|
367
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
368
|
-
const headers = {};
|
|
369
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses");
|
|
370
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
371
|
-
const query = (0, smithy_client_1.map)({
|
|
372
|
-
[_nT]: [, input[_nT]],
|
|
373
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
374
|
-
});
|
|
375
|
-
let body;
|
|
376
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
377
|
-
return b.build();
|
|
378
|
-
};
|
|
379
|
-
exports.se_ListQuickResponsesCommand = se_ListQuickResponsesCommand;
|
|
380
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
381
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
382
|
-
const headers = {};
|
|
383
|
-
b.bp("/tags/{resourceArn}");
|
|
384
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
385
|
-
let body;
|
|
386
|
-
b.m("GET").h(headers).b(body);
|
|
387
|
-
return b.build();
|
|
388
|
-
};
|
|
389
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
390
|
-
const se_NotifyRecommendationsReceivedCommand = async (input, context) => {
|
|
391
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
392
|
-
const headers = {
|
|
393
|
-
"content-type": "application/json",
|
|
394
|
-
};
|
|
395
|
-
b.bp("/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify");
|
|
396
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
397
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
398
|
-
let body;
|
|
399
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
400
|
-
recommendationIds: (_) => (0, smithy_client_1._json)(_),
|
|
401
|
-
}));
|
|
402
|
-
b.m("POST").h(headers).b(body);
|
|
403
|
-
return b.build();
|
|
404
|
-
};
|
|
405
|
-
exports.se_NotifyRecommendationsReceivedCommand = se_NotifyRecommendationsReceivedCommand;
|
|
406
|
-
const se_QueryAssistantCommand = async (input, context) => {
|
|
407
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
408
|
-
const headers = {
|
|
409
|
-
"content-type": "application/json",
|
|
410
|
-
};
|
|
411
|
-
b.bp("/assistants/{assistantId}/query");
|
|
412
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
413
|
-
let body;
|
|
414
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
415
|
-
maxResults: [],
|
|
416
|
-
nextToken: [],
|
|
417
|
-
queryText: [],
|
|
418
|
-
}));
|
|
419
|
-
b.m("POST").h(headers).b(body);
|
|
420
|
-
return b.build();
|
|
421
|
-
};
|
|
422
|
-
exports.se_QueryAssistantCommand = se_QueryAssistantCommand;
|
|
423
|
-
const se_RemoveKnowledgeBaseTemplateUriCommand = async (input, context) => {
|
|
424
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
425
|
-
const headers = {};
|
|
426
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/templateUri");
|
|
427
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
428
|
-
let body;
|
|
429
|
-
b.m("DELETE").h(headers).b(body);
|
|
430
|
-
return b.build();
|
|
431
|
-
};
|
|
432
|
-
exports.se_RemoveKnowledgeBaseTemplateUriCommand = se_RemoveKnowledgeBaseTemplateUriCommand;
|
|
433
|
-
const se_SearchContentCommand = async (input, context) => {
|
|
434
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
435
|
-
const headers = {
|
|
436
|
-
"content-type": "application/json",
|
|
437
|
-
};
|
|
438
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/search");
|
|
439
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
440
|
-
const query = (0, smithy_client_1.map)({
|
|
441
|
-
[_nT]: [, input[_nT]],
|
|
442
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
443
|
-
});
|
|
444
|
-
let body;
|
|
445
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
446
|
-
searchExpression: (_) => (0, smithy_client_1._json)(_),
|
|
447
|
-
}));
|
|
448
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
449
|
-
return b.build();
|
|
450
|
-
};
|
|
451
|
-
exports.se_SearchContentCommand = se_SearchContentCommand;
|
|
452
|
-
const se_SearchQuickResponsesCommand = async (input, context) => {
|
|
453
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
454
|
-
const headers = {
|
|
455
|
-
"content-type": "application/json",
|
|
456
|
-
};
|
|
457
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/search/quickResponses");
|
|
458
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
459
|
-
const query = (0, smithy_client_1.map)({
|
|
460
|
-
[_nT]: [, input[_nT]],
|
|
461
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
462
|
-
});
|
|
463
|
-
let body;
|
|
464
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
465
|
-
attributes: (_) => (0, smithy_client_1._json)(_),
|
|
466
|
-
searchExpression: (_) => (0, smithy_client_1._json)(_),
|
|
467
|
-
}));
|
|
468
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
469
|
-
return b.build();
|
|
470
|
-
};
|
|
471
|
-
exports.se_SearchQuickResponsesCommand = se_SearchQuickResponsesCommand;
|
|
472
|
-
const se_SearchSessionsCommand = async (input, context) => {
|
|
473
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
474
|
-
const headers = {
|
|
475
|
-
"content-type": "application/json",
|
|
476
|
-
};
|
|
477
|
-
b.bp("/assistants/{assistantId}/searchSessions");
|
|
478
|
-
b.p("assistantId", () => input.assistantId, "{assistantId}", false);
|
|
479
|
-
const query = (0, smithy_client_1.map)({
|
|
480
|
-
[_nT]: [, input[_nT]],
|
|
481
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
482
|
-
});
|
|
483
|
-
let body;
|
|
484
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
485
|
-
searchExpression: (_) => (0, smithy_client_1._json)(_),
|
|
486
|
-
}));
|
|
487
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
488
|
-
return b.build();
|
|
489
|
-
};
|
|
490
|
-
exports.se_SearchSessionsCommand = se_SearchSessionsCommand;
|
|
491
|
-
const se_StartContentUploadCommand = async (input, context) => {
|
|
492
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
493
|
-
const headers = {
|
|
494
|
-
"content-type": "application/json",
|
|
495
|
-
};
|
|
496
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/upload");
|
|
497
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
498
|
-
let body;
|
|
499
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
500
|
-
contentType: [],
|
|
501
|
-
presignedUrlTimeToLive: [],
|
|
502
|
-
}));
|
|
503
|
-
b.m("POST").h(headers).b(body);
|
|
504
|
-
return b.build();
|
|
505
|
-
};
|
|
506
|
-
exports.se_StartContentUploadCommand = se_StartContentUploadCommand;
|
|
507
|
-
const se_StartImportJobCommand = async (input, context) => {
|
|
508
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
509
|
-
const headers = {
|
|
510
|
-
"content-type": "application/json",
|
|
511
|
-
};
|
|
512
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs");
|
|
513
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
514
|
-
let body;
|
|
515
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
516
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
517
|
-
externalSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
518
|
-
importJobType: [],
|
|
519
|
-
metadata: (_) => (0, smithy_client_1._json)(_),
|
|
520
|
-
uploadId: [],
|
|
521
|
-
}));
|
|
522
|
-
b.m("POST").h(headers).b(body);
|
|
523
|
-
return b.build();
|
|
524
|
-
};
|
|
525
|
-
exports.se_StartImportJobCommand = se_StartImportJobCommand;
|
|
526
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
527
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
528
|
-
const headers = {
|
|
529
|
-
"content-type": "application/json",
|
|
530
|
-
};
|
|
531
|
-
b.bp("/tags/{resourceArn}");
|
|
532
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
533
|
-
let body;
|
|
534
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
535
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
536
|
-
}));
|
|
537
|
-
b.m("POST").h(headers).b(body);
|
|
538
|
-
return b.build();
|
|
539
|
-
};
|
|
540
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
541
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
542
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
543
|
-
const headers = {};
|
|
544
|
-
b.bp("/tags/{resourceArn}");
|
|
545
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
546
|
-
const query = (0, smithy_client_1.map)({
|
|
547
|
-
[_tK]: [
|
|
548
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
549
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
550
|
-
],
|
|
551
|
-
});
|
|
552
|
-
let body;
|
|
553
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
554
|
-
return b.build();
|
|
555
|
-
};
|
|
556
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
557
|
-
const se_UpdateContentCommand = async (input, context) => {
|
|
558
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
559
|
-
const headers = {
|
|
560
|
-
"content-type": "application/json",
|
|
561
|
-
};
|
|
562
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
|
|
563
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
564
|
-
b.p("contentId", () => input.contentId, "{contentId}", false);
|
|
565
|
-
let body;
|
|
566
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
567
|
-
metadata: (_) => (0, smithy_client_1._json)(_),
|
|
568
|
-
overrideLinkOutUri: [],
|
|
569
|
-
removeOverrideLinkOutUri: [],
|
|
570
|
-
revisionId: [],
|
|
571
|
-
title: [],
|
|
572
|
-
uploadId: [],
|
|
573
|
-
}));
|
|
574
|
-
b.m("POST").h(headers).b(body);
|
|
575
|
-
return b.build();
|
|
576
|
-
};
|
|
577
|
-
exports.se_UpdateContentCommand = se_UpdateContentCommand;
|
|
578
|
-
const se_UpdateKnowledgeBaseTemplateUriCommand = async (input, context) => {
|
|
579
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
580
|
-
const headers = {
|
|
581
|
-
"content-type": "application/json",
|
|
582
|
-
};
|
|
583
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/templateUri");
|
|
584
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
585
|
-
let body;
|
|
586
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
587
|
-
templateUri: [],
|
|
588
|
-
}));
|
|
589
|
-
b.m("POST").h(headers).b(body);
|
|
590
|
-
return b.build();
|
|
591
|
-
};
|
|
592
|
-
exports.se_UpdateKnowledgeBaseTemplateUriCommand = se_UpdateKnowledgeBaseTemplateUriCommand;
|
|
593
|
-
const se_UpdateQuickResponseCommand = async (input, context) => {
|
|
594
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
595
|
-
const headers = {
|
|
596
|
-
"content-type": "application/json",
|
|
597
|
-
};
|
|
598
|
-
b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
|
|
599
|
-
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
600
|
-
b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
|
|
601
|
-
let body;
|
|
602
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
603
|
-
channels: (_) => (0, smithy_client_1._json)(_),
|
|
604
|
-
content: (_) => (0, smithy_client_1._json)(_),
|
|
605
|
-
contentType: [],
|
|
606
|
-
description: [],
|
|
607
|
-
groupingConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
608
|
-
isActive: [],
|
|
609
|
-
language: [],
|
|
610
|
-
name: [],
|
|
611
|
-
removeDescription: [],
|
|
612
|
-
removeGroupingConfiguration: [],
|
|
613
|
-
removeShortcutKey: [],
|
|
614
|
-
shortcutKey: [],
|
|
615
|
-
}));
|
|
616
|
-
b.m("POST").h(headers).b(body);
|
|
617
|
-
return b.build();
|
|
618
|
-
};
|
|
619
|
-
exports.se_UpdateQuickResponseCommand = se_UpdateQuickResponseCommand;
|
|
620
|
-
const de_CreateAssistantCommand = async (output, context) => {
|
|
621
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
622
|
-
return de_CreateAssistantCommandError(output, context);
|
|
623
|
-
}
|
|
624
|
-
const contents = (0, smithy_client_1.map)({
|
|
625
|
-
$metadata: deserializeMetadata(output),
|
|
626
|
-
});
|
|
627
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
628
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
629
|
-
assistant: smithy_client_1._json,
|
|
630
|
-
});
|
|
631
|
-
Object.assign(contents, doc);
|
|
632
|
-
return contents;
|
|
633
|
-
};
|
|
634
|
-
exports.de_CreateAssistantCommand = de_CreateAssistantCommand;
|
|
635
|
-
const de_CreateAssistantCommandError = async (output, context) => {
|
|
636
|
-
const parsedOutput = {
|
|
637
|
-
...output,
|
|
638
|
-
body: await parseErrorBody(output.body, context),
|
|
639
|
-
};
|
|
640
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
641
|
-
switch (errorCode) {
|
|
642
|
-
case "AccessDeniedException":
|
|
643
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
644
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
645
|
-
case "ConflictException":
|
|
646
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
647
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
648
|
-
case "ServiceQuotaExceededException":
|
|
649
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
650
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
651
|
-
case "ValidationException":
|
|
652
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
653
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
654
|
-
default:
|
|
655
|
-
const parsedBody = parsedOutput.body;
|
|
656
|
-
return throwDefaultError({
|
|
657
|
-
output,
|
|
658
|
-
parsedBody,
|
|
659
|
-
errorCode,
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
|
-
const de_CreateAssistantAssociationCommand = async (output, context) => {
|
|
664
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
665
|
-
return de_CreateAssistantAssociationCommandError(output, context);
|
|
666
|
-
}
|
|
667
|
-
const contents = (0, smithy_client_1.map)({
|
|
668
|
-
$metadata: deserializeMetadata(output),
|
|
669
|
-
});
|
|
670
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
671
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
672
|
-
assistantAssociation: smithy_client_1._json,
|
|
673
|
-
});
|
|
674
|
-
Object.assign(contents, doc);
|
|
675
|
-
return contents;
|
|
676
|
-
};
|
|
677
|
-
exports.de_CreateAssistantAssociationCommand = de_CreateAssistantAssociationCommand;
|
|
678
|
-
const de_CreateAssistantAssociationCommandError = async (output, context) => {
|
|
679
|
-
const parsedOutput = {
|
|
680
|
-
...output,
|
|
681
|
-
body: await parseErrorBody(output.body, context),
|
|
682
|
-
};
|
|
683
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
684
|
-
switch (errorCode) {
|
|
685
|
-
case "AccessDeniedException":
|
|
686
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
687
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
688
|
-
case "ConflictException":
|
|
689
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
690
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
691
|
-
case "ResourceNotFoundException":
|
|
692
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
693
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
694
|
-
case "ServiceQuotaExceededException":
|
|
695
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
696
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
697
|
-
case "ValidationException":
|
|
698
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
699
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
700
|
-
default:
|
|
701
|
-
const parsedBody = parsedOutput.body;
|
|
702
|
-
return throwDefaultError({
|
|
703
|
-
output,
|
|
704
|
-
parsedBody,
|
|
705
|
-
errorCode,
|
|
706
|
-
});
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
const de_CreateContentCommand = async (output, context) => {
|
|
710
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
711
|
-
return de_CreateContentCommandError(output, context);
|
|
712
|
-
}
|
|
713
|
-
const contents = (0, smithy_client_1.map)({
|
|
714
|
-
$metadata: deserializeMetadata(output),
|
|
715
|
-
});
|
|
716
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
717
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
718
|
-
content: (_) => de_ContentData(_, context),
|
|
719
|
-
});
|
|
720
|
-
Object.assign(contents, doc);
|
|
721
|
-
return contents;
|
|
722
|
-
};
|
|
723
|
-
exports.de_CreateContentCommand = de_CreateContentCommand;
|
|
724
|
-
const de_CreateContentCommandError = async (output, context) => {
|
|
725
|
-
const parsedOutput = {
|
|
726
|
-
...output,
|
|
727
|
-
body: await parseErrorBody(output.body, context),
|
|
728
|
-
};
|
|
729
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
730
|
-
switch (errorCode) {
|
|
731
|
-
case "AccessDeniedException":
|
|
732
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
733
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
734
|
-
case "ConflictException":
|
|
735
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
736
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
737
|
-
case "ResourceNotFoundException":
|
|
738
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
739
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
740
|
-
case "ServiceQuotaExceededException":
|
|
741
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
742
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
743
|
-
case "ValidationException":
|
|
744
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
745
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
746
|
-
default:
|
|
747
|
-
const parsedBody = parsedOutput.body;
|
|
748
|
-
return throwDefaultError({
|
|
749
|
-
output,
|
|
750
|
-
parsedBody,
|
|
751
|
-
errorCode,
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
};
|
|
755
|
-
const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
756
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
757
|
-
return de_CreateKnowledgeBaseCommandError(output, context);
|
|
758
|
-
}
|
|
759
|
-
const contents = (0, smithy_client_1.map)({
|
|
760
|
-
$metadata: deserializeMetadata(output),
|
|
761
|
-
});
|
|
762
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
763
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
764
|
-
knowledgeBase: (_) => de_KnowledgeBaseData(_, context),
|
|
765
|
-
});
|
|
766
|
-
Object.assign(contents, doc);
|
|
767
|
-
return contents;
|
|
768
|
-
};
|
|
769
|
-
exports.de_CreateKnowledgeBaseCommand = de_CreateKnowledgeBaseCommand;
|
|
770
|
-
const de_CreateKnowledgeBaseCommandError = async (output, context) => {
|
|
771
|
-
const parsedOutput = {
|
|
772
|
-
...output,
|
|
773
|
-
body: await parseErrorBody(output.body, context),
|
|
774
|
-
};
|
|
775
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
776
|
-
switch (errorCode) {
|
|
777
|
-
case "AccessDeniedException":
|
|
778
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
779
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
780
|
-
case "ConflictException":
|
|
781
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
782
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
783
|
-
case "ServiceQuotaExceededException":
|
|
784
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
785
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
786
|
-
case "ValidationException":
|
|
787
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
788
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
789
|
-
default:
|
|
790
|
-
const parsedBody = parsedOutput.body;
|
|
791
|
-
return throwDefaultError({
|
|
792
|
-
output,
|
|
793
|
-
parsedBody,
|
|
794
|
-
errorCode,
|
|
795
|
-
});
|
|
796
|
-
}
|
|
797
|
-
};
|
|
798
|
-
const de_CreateQuickResponseCommand = async (output, context) => {
|
|
799
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
800
|
-
return de_CreateQuickResponseCommandError(output, context);
|
|
801
|
-
}
|
|
802
|
-
const contents = (0, smithy_client_1.map)({
|
|
803
|
-
$metadata: deserializeMetadata(output),
|
|
804
|
-
});
|
|
805
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
806
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
807
|
-
quickResponse: (_) => de_QuickResponseData(_, context),
|
|
808
|
-
});
|
|
809
|
-
Object.assign(contents, doc);
|
|
810
|
-
return contents;
|
|
811
|
-
};
|
|
812
|
-
exports.de_CreateQuickResponseCommand = de_CreateQuickResponseCommand;
|
|
813
|
-
const de_CreateQuickResponseCommandError = async (output, context) => {
|
|
814
|
-
const parsedOutput = {
|
|
815
|
-
...output,
|
|
816
|
-
body: await parseErrorBody(output.body, context),
|
|
817
|
-
};
|
|
818
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
819
|
-
switch (errorCode) {
|
|
820
|
-
case "AccessDeniedException":
|
|
821
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
822
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
823
|
-
case "ConflictException":
|
|
824
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
825
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
826
|
-
case "ResourceNotFoundException":
|
|
827
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
828
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
829
|
-
case "ServiceQuotaExceededException":
|
|
830
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
831
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
832
|
-
case "ValidationException":
|
|
833
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
834
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
835
|
-
default:
|
|
836
|
-
const parsedBody = parsedOutput.body;
|
|
837
|
-
return throwDefaultError({
|
|
838
|
-
output,
|
|
839
|
-
parsedBody,
|
|
840
|
-
errorCode,
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
const de_CreateSessionCommand = async (output, context) => {
|
|
845
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
846
|
-
return de_CreateSessionCommandError(output, context);
|
|
847
|
-
}
|
|
848
|
-
const contents = (0, smithy_client_1.map)({
|
|
849
|
-
$metadata: deserializeMetadata(output),
|
|
850
|
-
});
|
|
851
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
852
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
853
|
-
session: smithy_client_1._json,
|
|
854
|
-
});
|
|
855
|
-
Object.assign(contents, doc);
|
|
856
|
-
return contents;
|
|
857
|
-
};
|
|
858
|
-
exports.de_CreateSessionCommand = de_CreateSessionCommand;
|
|
859
|
-
const de_CreateSessionCommandError = async (output, context) => {
|
|
860
|
-
const parsedOutput = {
|
|
861
|
-
...output,
|
|
862
|
-
body: await parseErrorBody(output.body, context),
|
|
863
|
-
};
|
|
864
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
865
|
-
switch (errorCode) {
|
|
866
|
-
case "ConflictException":
|
|
867
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
868
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
869
|
-
case "ResourceNotFoundException":
|
|
870
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
871
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
872
|
-
case "ValidationException":
|
|
873
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
874
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
875
|
-
default:
|
|
876
|
-
const parsedBody = parsedOutput.body;
|
|
877
|
-
return throwDefaultError({
|
|
878
|
-
output,
|
|
879
|
-
parsedBody,
|
|
880
|
-
errorCode,
|
|
881
|
-
});
|
|
882
|
-
}
|
|
883
|
-
};
|
|
884
|
-
const de_DeleteAssistantCommand = async (output, context) => {
|
|
885
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
886
|
-
return de_DeleteAssistantCommandError(output, context);
|
|
887
|
-
}
|
|
888
|
-
const contents = (0, smithy_client_1.map)({
|
|
889
|
-
$metadata: deserializeMetadata(output),
|
|
890
|
-
});
|
|
891
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
892
|
-
return contents;
|
|
893
|
-
};
|
|
894
|
-
exports.de_DeleteAssistantCommand = de_DeleteAssistantCommand;
|
|
895
|
-
const de_DeleteAssistantCommandError = async (output, context) => {
|
|
896
|
-
const parsedOutput = {
|
|
897
|
-
...output,
|
|
898
|
-
body: await parseErrorBody(output.body, context),
|
|
899
|
-
};
|
|
900
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
901
|
-
switch (errorCode) {
|
|
902
|
-
case "AccessDeniedException":
|
|
903
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
904
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
905
|
-
case "ResourceNotFoundException":
|
|
906
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
907
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
908
|
-
case "ValidationException":
|
|
909
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
910
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
911
|
-
default:
|
|
912
|
-
const parsedBody = parsedOutput.body;
|
|
913
|
-
return throwDefaultError({
|
|
914
|
-
output,
|
|
915
|
-
parsedBody,
|
|
916
|
-
errorCode,
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
};
|
|
920
|
-
const de_DeleteAssistantAssociationCommand = async (output, context) => {
|
|
921
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
922
|
-
return de_DeleteAssistantAssociationCommandError(output, context);
|
|
923
|
-
}
|
|
924
|
-
const contents = (0, smithy_client_1.map)({
|
|
925
|
-
$metadata: deserializeMetadata(output),
|
|
926
|
-
});
|
|
927
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
928
|
-
return contents;
|
|
929
|
-
};
|
|
930
|
-
exports.de_DeleteAssistantAssociationCommand = de_DeleteAssistantAssociationCommand;
|
|
931
|
-
const de_DeleteAssistantAssociationCommandError = async (output, context) => {
|
|
932
|
-
const parsedOutput = {
|
|
933
|
-
...output,
|
|
934
|
-
body: await parseErrorBody(output.body, context),
|
|
935
|
-
};
|
|
936
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
937
|
-
switch (errorCode) {
|
|
938
|
-
case "AccessDeniedException":
|
|
939
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
940
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
941
|
-
case "ResourceNotFoundException":
|
|
942
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
943
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
944
|
-
case "ValidationException":
|
|
945
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
946
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
947
|
-
default:
|
|
948
|
-
const parsedBody = parsedOutput.body;
|
|
949
|
-
return throwDefaultError({
|
|
950
|
-
output,
|
|
951
|
-
parsedBody,
|
|
952
|
-
errorCode,
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
};
|
|
956
|
-
const de_DeleteContentCommand = async (output, context) => {
|
|
957
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
958
|
-
return de_DeleteContentCommandError(output, context);
|
|
959
|
-
}
|
|
960
|
-
const contents = (0, smithy_client_1.map)({
|
|
961
|
-
$metadata: deserializeMetadata(output),
|
|
962
|
-
});
|
|
963
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
964
|
-
return contents;
|
|
965
|
-
};
|
|
966
|
-
exports.de_DeleteContentCommand = de_DeleteContentCommand;
|
|
967
|
-
const de_DeleteContentCommandError = async (output, context) => {
|
|
968
|
-
const parsedOutput = {
|
|
969
|
-
...output,
|
|
970
|
-
body: await parseErrorBody(output.body, context),
|
|
971
|
-
};
|
|
972
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
973
|
-
switch (errorCode) {
|
|
974
|
-
case "AccessDeniedException":
|
|
975
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
976
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
977
|
-
case "ResourceNotFoundException":
|
|
978
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
979
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
980
|
-
case "ValidationException":
|
|
981
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
982
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
983
|
-
default:
|
|
984
|
-
const parsedBody = parsedOutput.body;
|
|
985
|
-
return throwDefaultError({
|
|
986
|
-
output,
|
|
987
|
-
parsedBody,
|
|
988
|
-
errorCode,
|
|
989
|
-
});
|
|
990
|
-
}
|
|
991
|
-
};
|
|
992
|
-
const de_DeleteImportJobCommand = async (output, context) => {
|
|
993
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
994
|
-
return de_DeleteImportJobCommandError(output, context);
|
|
995
|
-
}
|
|
996
|
-
const contents = (0, smithy_client_1.map)({
|
|
997
|
-
$metadata: deserializeMetadata(output),
|
|
998
|
-
});
|
|
999
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1000
|
-
return contents;
|
|
1001
|
-
};
|
|
1002
|
-
exports.de_DeleteImportJobCommand = de_DeleteImportJobCommand;
|
|
1003
|
-
const de_DeleteImportJobCommandError = async (output, context) => {
|
|
1004
|
-
const parsedOutput = {
|
|
1005
|
-
...output,
|
|
1006
|
-
body: await parseErrorBody(output.body, context),
|
|
1007
|
-
};
|
|
1008
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1009
|
-
switch (errorCode) {
|
|
1010
|
-
case "AccessDeniedException":
|
|
1011
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1012
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1013
|
-
case "ConflictException":
|
|
1014
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
1015
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1016
|
-
case "ResourceNotFoundException":
|
|
1017
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1018
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1019
|
-
case "ValidationException":
|
|
1020
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1021
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1022
|
-
default:
|
|
1023
|
-
const parsedBody = parsedOutput.body;
|
|
1024
|
-
return throwDefaultError({
|
|
1025
|
-
output,
|
|
1026
|
-
parsedBody,
|
|
1027
|
-
errorCode,
|
|
1028
|
-
});
|
|
1029
|
-
}
|
|
1030
|
-
};
|
|
1031
|
-
const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
1032
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1033
|
-
return de_DeleteKnowledgeBaseCommandError(output, context);
|
|
1034
|
-
}
|
|
1035
|
-
const contents = (0, smithy_client_1.map)({
|
|
1036
|
-
$metadata: deserializeMetadata(output),
|
|
1037
|
-
});
|
|
1038
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1039
|
-
return contents;
|
|
1040
|
-
};
|
|
1041
|
-
exports.de_DeleteKnowledgeBaseCommand = de_DeleteKnowledgeBaseCommand;
|
|
1042
|
-
const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
|
|
1043
|
-
const parsedOutput = {
|
|
1044
|
-
...output,
|
|
1045
|
-
body: await parseErrorBody(output.body, context),
|
|
1046
|
-
};
|
|
1047
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1048
|
-
switch (errorCode) {
|
|
1049
|
-
case "AccessDeniedException":
|
|
1050
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1051
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1052
|
-
case "ConflictException":
|
|
1053
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
1054
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1055
|
-
case "ResourceNotFoundException":
|
|
1056
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1057
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1058
|
-
case "ValidationException":
|
|
1059
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1060
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1061
|
-
default:
|
|
1062
|
-
const parsedBody = parsedOutput.body;
|
|
1063
|
-
return throwDefaultError({
|
|
1064
|
-
output,
|
|
1065
|
-
parsedBody,
|
|
1066
|
-
errorCode,
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
const de_DeleteQuickResponseCommand = async (output, context) => {
|
|
1071
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1072
|
-
return de_DeleteQuickResponseCommandError(output, context);
|
|
1073
|
-
}
|
|
1074
|
-
const contents = (0, smithy_client_1.map)({
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
});
|
|
1077
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1078
|
-
return contents;
|
|
1079
|
-
};
|
|
1080
|
-
exports.de_DeleteQuickResponseCommand = de_DeleteQuickResponseCommand;
|
|
1081
|
-
const de_DeleteQuickResponseCommandError = async (output, context) => {
|
|
1082
|
-
const parsedOutput = {
|
|
1083
|
-
...output,
|
|
1084
|
-
body: await parseErrorBody(output.body, context),
|
|
1085
|
-
};
|
|
1086
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1087
|
-
switch (errorCode) {
|
|
1088
|
-
case "AccessDeniedException":
|
|
1089
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1090
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1091
|
-
case "ResourceNotFoundException":
|
|
1092
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1093
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1094
|
-
case "ValidationException":
|
|
1095
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1096
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1097
|
-
default:
|
|
1098
|
-
const parsedBody = parsedOutput.body;
|
|
1099
|
-
return throwDefaultError({
|
|
1100
|
-
output,
|
|
1101
|
-
parsedBody,
|
|
1102
|
-
errorCode,
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
};
|
|
1106
|
-
const de_GetAssistantCommand = async (output, context) => {
|
|
1107
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1108
|
-
return de_GetAssistantCommandError(output, context);
|
|
1109
|
-
}
|
|
1110
|
-
const contents = (0, smithy_client_1.map)({
|
|
1111
|
-
$metadata: deserializeMetadata(output),
|
|
1112
|
-
});
|
|
1113
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1114
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1115
|
-
assistant: smithy_client_1._json,
|
|
1116
|
-
});
|
|
1117
|
-
Object.assign(contents, doc);
|
|
1118
|
-
return contents;
|
|
1119
|
-
};
|
|
1120
|
-
exports.de_GetAssistantCommand = de_GetAssistantCommand;
|
|
1121
|
-
const de_GetAssistantCommandError = async (output, context) => {
|
|
1122
|
-
const parsedOutput = {
|
|
1123
|
-
...output,
|
|
1124
|
-
body: await parseErrorBody(output.body, context),
|
|
1125
|
-
};
|
|
1126
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1127
|
-
switch (errorCode) {
|
|
1128
|
-
case "AccessDeniedException":
|
|
1129
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1130
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1131
|
-
case "ResourceNotFoundException":
|
|
1132
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1133
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1134
|
-
case "ValidationException":
|
|
1135
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1136
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1137
|
-
default:
|
|
1138
|
-
const parsedBody = parsedOutput.body;
|
|
1139
|
-
return throwDefaultError({
|
|
1140
|
-
output,
|
|
1141
|
-
parsedBody,
|
|
1142
|
-
errorCode,
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
};
|
|
1146
|
-
const de_GetAssistantAssociationCommand = async (output, context) => {
|
|
1147
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1148
|
-
return de_GetAssistantAssociationCommandError(output, context);
|
|
1149
|
-
}
|
|
1150
|
-
const contents = (0, smithy_client_1.map)({
|
|
1151
|
-
$metadata: deserializeMetadata(output),
|
|
1152
|
-
});
|
|
1153
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1154
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1155
|
-
assistantAssociation: smithy_client_1._json,
|
|
1156
|
-
});
|
|
1157
|
-
Object.assign(contents, doc);
|
|
1158
|
-
return contents;
|
|
1159
|
-
};
|
|
1160
|
-
exports.de_GetAssistantAssociationCommand = de_GetAssistantAssociationCommand;
|
|
1161
|
-
const de_GetAssistantAssociationCommandError = async (output, context) => {
|
|
1162
|
-
const parsedOutput = {
|
|
1163
|
-
...output,
|
|
1164
|
-
body: await parseErrorBody(output.body, context),
|
|
1165
|
-
};
|
|
1166
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1167
|
-
switch (errorCode) {
|
|
1168
|
-
case "AccessDeniedException":
|
|
1169
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1170
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1171
|
-
case "ResourceNotFoundException":
|
|
1172
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1173
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1174
|
-
case "ValidationException":
|
|
1175
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1176
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1177
|
-
default:
|
|
1178
|
-
const parsedBody = parsedOutput.body;
|
|
1179
|
-
return throwDefaultError({
|
|
1180
|
-
output,
|
|
1181
|
-
parsedBody,
|
|
1182
|
-
errorCode,
|
|
1183
|
-
});
|
|
1184
|
-
}
|
|
1185
|
-
};
|
|
1186
|
-
const de_GetContentCommand = async (output, context) => {
|
|
1187
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1188
|
-
return de_GetContentCommandError(output, context);
|
|
1189
|
-
}
|
|
1190
|
-
const contents = (0, smithy_client_1.map)({
|
|
1191
|
-
$metadata: deserializeMetadata(output),
|
|
1192
|
-
});
|
|
1193
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1194
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1195
|
-
content: (_) => de_ContentData(_, context),
|
|
1196
|
-
});
|
|
1197
|
-
Object.assign(contents, doc);
|
|
1198
|
-
return contents;
|
|
1199
|
-
};
|
|
1200
|
-
exports.de_GetContentCommand = de_GetContentCommand;
|
|
1201
|
-
const de_GetContentCommandError = async (output, context) => {
|
|
1202
|
-
const parsedOutput = {
|
|
1203
|
-
...output,
|
|
1204
|
-
body: await parseErrorBody(output.body, context),
|
|
1205
|
-
};
|
|
1206
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1207
|
-
switch (errorCode) {
|
|
1208
|
-
case "AccessDeniedException":
|
|
1209
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1210
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1211
|
-
case "ResourceNotFoundException":
|
|
1212
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1213
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1214
|
-
case "ValidationException":
|
|
1215
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1216
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1217
|
-
default:
|
|
1218
|
-
const parsedBody = parsedOutput.body;
|
|
1219
|
-
return throwDefaultError({
|
|
1220
|
-
output,
|
|
1221
|
-
parsedBody,
|
|
1222
|
-
errorCode,
|
|
1223
|
-
});
|
|
1224
|
-
}
|
|
1225
|
-
};
|
|
1226
|
-
const de_GetContentSummaryCommand = async (output, context) => {
|
|
1227
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1228
|
-
return de_GetContentSummaryCommandError(output, context);
|
|
1229
|
-
}
|
|
1230
|
-
const contents = (0, smithy_client_1.map)({
|
|
1231
|
-
$metadata: deserializeMetadata(output),
|
|
1232
|
-
});
|
|
1233
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1234
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1235
|
-
contentSummary: smithy_client_1._json,
|
|
1236
|
-
});
|
|
1237
|
-
Object.assign(contents, doc);
|
|
1238
|
-
return contents;
|
|
1239
|
-
};
|
|
1240
|
-
exports.de_GetContentSummaryCommand = de_GetContentSummaryCommand;
|
|
1241
|
-
const de_GetContentSummaryCommandError = async (output, context) => {
|
|
1242
|
-
const parsedOutput = {
|
|
1243
|
-
...output,
|
|
1244
|
-
body: await parseErrorBody(output.body, context),
|
|
1245
|
-
};
|
|
1246
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1247
|
-
switch (errorCode) {
|
|
1248
|
-
case "AccessDeniedException":
|
|
1249
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1250
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1251
|
-
case "ResourceNotFoundException":
|
|
1252
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1253
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1254
|
-
case "ValidationException":
|
|
1255
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1256
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1257
|
-
default:
|
|
1258
|
-
const parsedBody = parsedOutput.body;
|
|
1259
|
-
return throwDefaultError({
|
|
1260
|
-
output,
|
|
1261
|
-
parsedBody,
|
|
1262
|
-
errorCode,
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
};
|
|
1266
|
-
const de_GetImportJobCommand = async (output, context) => {
|
|
1267
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1268
|
-
return de_GetImportJobCommandError(output, context);
|
|
1269
|
-
}
|
|
1270
|
-
const contents = (0, smithy_client_1.map)({
|
|
1271
|
-
$metadata: deserializeMetadata(output),
|
|
1272
|
-
});
|
|
1273
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1274
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1275
|
-
importJob: (_) => de_ImportJobData(_, context),
|
|
1276
|
-
});
|
|
1277
|
-
Object.assign(contents, doc);
|
|
1278
|
-
return contents;
|
|
1279
|
-
};
|
|
1280
|
-
exports.de_GetImportJobCommand = de_GetImportJobCommand;
|
|
1281
|
-
const de_GetImportJobCommandError = async (output, context) => {
|
|
1282
|
-
const parsedOutput = {
|
|
1283
|
-
...output,
|
|
1284
|
-
body: await parseErrorBody(output.body, context),
|
|
1285
|
-
};
|
|
1286
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1287
|
-
switch (errorCode) {
|
|
1288
|
-
case "AccessDeniedException":
|
|
1289
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1290
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1291
|
-
case "ResourceNotFoundException":
|
|
1292
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1293
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1294
|
-
case "ValidationException":
|
|
1295
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1296
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1297
|
-
default:
|
|
1298
|
-
const parsedBody = parsedOutput.body;
|
|
1299
|
-
return throwDefaultError({
|
|
1300
|
-
output,
|
|
1301
|
-
parsedBody,
|
|
1302
|
-
errorCode,
|
|
1303
|
-
});
|
|
1304
|
-
}
|
|
1305
|
-
};
|
|
1306
|
-
const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
1307
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1308
|
-
return de_GetKnowledgeBaseCommandError(output, context);
|
|
1309
|
-
}
|
|
1310
|
-
const contents = (0, smithy_client_1.map)({
|
|
1311
|
-
$metadata: deserializeMetadata(output),
|
|
1312
|
-
});
|
|
1313
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1314
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1315
|
-
knowledgeBase: (_) => de_KnowledgeBaseData(_, context),
|
|
1316
|
-
});
|
|
1317
|
-
Object.assign(contents, doc);
|
|
1318
|
-
return contents;
|
|
1319
|
-
};
|
|
1320
|
-
exports.de_GetKnowledgeBaseCommand = de_GetKnowledgeBaseCommand;
|
|
1321
|
-
const de_GetKnowledgeBaseCommandError = async (output, context) => {
|
|
1322
|
-
const parsedOutput = {
|
|
1323
|
-
...output,
|
|
1324
|
-
body: await parseErrorBody(output.body, context),
|
|
1325
|
-
};
|
|
1326
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1327
|
-
switch (errorCode) {
|
|
1328
|
-
case "AccessDeniedException":
|
|
1329
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1330
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1331
|
-
case "ResourceNotFoundException":
|
|
1332
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1333
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1334
|
-
case "ValidationException":
|
|
1335
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1336
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1337
|
-
default:
|
|
1338
|
-
const parsedBody = parsedOutput.body;
|
|
1339
|
-
return throwDefaultError({
|
|
1340
|
-
output,
|
|
1341
|
-
parsedBody,
|
|
1342
|
-
errorCode,
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
};
|
|
1346
|
-
const de_GetQuickResponseCommand = async (output, context) => {
|
|
1347
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1348
|
-
return de_GetQuickResponseCommandError(output, context);
|
|
1349
|
-
}
|
|
1350
|
-
const contents = (0, smithy_client_1.map)({
|
|
1351
|
-
$metadata: deserializeMetadata(output),
|
|
1352
|
-
});
|
|
1353
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1354
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1355
|
-
quickResponse: (_) => de_QuickResponseData(_, context),
|
|
1356
|
-
});
|
|
1357
|
-
Object.assign(contents, doc);
|
|
1358
|
-
return contents;
|
|
1359
|
-
};
|
|
1360
|
-
exports.de_GetQuickResponseCommand = de_GetQuickResponseCommand;
|
|
1361
|
-
const de_GetQuickResponseCommandError = async (output, context) => {
|
|
1362
|
-
const parsedOutput = {
|
|
1363
|
-
...output,
|
|
1364
|
-
body: await parseErrorBody(output.body, context),
|
|
1365
|
-
};
|
|
1366
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1367
|
-
switch (errorCode) {
|
|
1368
|
-
case "AccessDeniedException":
|
|
1369
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1370
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1371
|
-
case "ResourceNotFoundException":
|
|
1372
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1373
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1374
|
-
case "ValidationException":
|
|
1375
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1376
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1377
|
-
default:
|
|
1378
|
-
const parsedBody = parsedOutput.body;
|
|
1379
|
-
return throwDefaultError({
|
|
1380
|
-
output,
|
|
1381
|
-
parsedBody,
|
|
1382
|
-
errorCode,
|
|
1383
|
-
});
|
|
1384
|
-
}
|
|
1385
|
-
};
|
|
1386
|
-
const de_GetRecommendationsCommand = async (output, context) => {
|
|
1387
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1388
|
-
return de_GetRecommendationsCommandError(output, context);
|
|
1389
|
-
}
|
|
1390
|
-
const contents = (0, smithy_client_1.map)({
|
|
1391
|
-
$metadata: deserializeMetadata(output),
|
|
1392
|
-
});
|
|
1393
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1394
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1395
|
-
recommendations: (_) => de_RecommendationList(_, context),
|
|
1396
|
-
triggers: smithy_client_1._json,
|
|
1397
|
-
});
|
|
1398
|
-
Object.assign(contents, doc);
|
|
1399
|
-
return contents;
|
|
1400
|
-
};
|
|
1401
|
-
exports.de_GetRecommendationsCommand = de_GetRecommendationsCommand;
|
|
1402
|
-
const de_GetRecommendationsCommandError = async (output, context) => {
|
|
1403
|
-
const parsedOutput = {
|
|
1404
|
-
...output,
|
|
1405
|
-
body: await parseErrorBody(output.body, context),
|
|
1406
|
-
};
|
|
1407
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1408
|
-
switch (errorCode) {
|
|
1409
|
-
case "AccessDeniedException":
|
|
1410
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1411
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1412
|
-
case "ResourceNotFoundException":
|
|
1413
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1414
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1415
|
-
case "ValidationException":
|
|
1416
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1417
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1418
|
-
default:
|
|
1419
|
-
const parsedBody = parsedOutput.body;
|
|
1420
|
-
return throwDefaultError({
|
|
1421
|
-
output,
|
|
1422
|
-
parsedBody,
|
|
1423
|
-
errorCode,
|
|
1424
|
-
});
|
|
1425
|
-
}
|
|
1426
|
-
};
|
|
1427
|
-
const de_GetSessionCommand = async (output, context) => {
|
|
1428
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1429
|
-
return de_GetSessionCommandError(output, context);
|
|
1430
|
-
}
|
|
1431
|
-
const contents = (0, smithy_client_1.map)({
|
|
1432
|
-
$metadata: deserializeMetadata(output),
|
|
1433
|
-
});
|
|
1434
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1435
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1436
|
-
session: smithy_client_1._json,
|
|
1437
|
-
});
|
|
1438
|
-
Object.assign(contents, doc);
|
|
1439
|
-
return contents;
|
|
1440
|
-
};
|
|
1441
|
-
exports.de_GetSessionCommand = de_GetSessionCommand;
|
|
1442
|
-
const de_GetSessionCommandError = async (output, context) => {
|
|
1443
|
-
const parsedOutput = {
|
|
1444
|
-
...output,
|
|
1445
|
-
body: await parseErrorBody(output.body, context),
|
|
1446
|
-
};
|
|
1447
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1448
|
-
switch (errorCode) {
|
|
1449
|
-
case "AccessDeniedException":
|
|
1450
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1451
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1452
|
-
case "ResourceNotFoundException":
|
|
1453
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1454
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1455
|
-
case "ValidationException":
|
|
1456
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1457
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1458
|
-
default:
|
|
1459
|
-
const parsedBody = parsedOutput.body;
|
|
1460
|
-
return throwDefaultError({
|
|
1461
|
-
output,
|
|
1462
|
-
parsedBody,
|
|
1463
|
-
errorCode,
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
};
|
|
1467
|
-
const de_ListAssistantAssociationsCommand = async (output, context) => {
|
|
1468
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1469
|
-
return de_ListAssistantAssociationsCommandError(output, context);
|
|
1470
|
-
}
|
|
1471
|
-
const contents = (0, smithy_client_1.map)({
|
|
1472
|
-
$metadata: deserializeMetadata(output),
|
|
1473
|
-
});
|
|
1474
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1475
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1476
|
-
assistantAssociationSummaries: smithy_client_1._json,
|
|
1477
|
-
nextToken: smithy_client_1.expectString,
|
|
1478
|
-
});
|
|
1479
|
-
Object.assign(contents, doc);
|
|
1480
|
-
return contents;
|
|
1481
|
-
};
|
|
1482
|
-
exports.de_ListAssistantAssociationsCommand = de_ListAssistantAssociationsCommand;
|
|
1483
|
-
const de_ListAssistantAssociationsCommandError = async (output, context) => {
|
|
1484
|
-
const parsedOutput = {
|
|
1485
|
-
...output,
|
|
1486
|
-
body: await parseErrorBody(output.body, context),
|
|
1487
|
-
};
|
|
1488
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1489
|
-
switch (errorCode) {
|
|
1490
|
-
case "AccessDeniedException":
|
|
1491
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1492
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1493
|
-
case "ResourceNotFoundException":
|
|
1494
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1495
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1496
|
-
case "ValidationException":
|
|
1497
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1498
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1499
|
-
default:
|
|
1500
|
-
const parsedBody = parsedOutput.body;
|
|
1501
|
-
return throwDefaultError({
|
|
1502
|
-
output,
|
|
1503
|
-
parsedBody,
|
|
1504
|
-
errorCode,
|
|
1505
|
-
});
|
|
1506
|
-
}
|
|
1507
|
-
};
|
|
1508
|
-
const de_ListAssistantsCommand = async (output, context) => {
|
|
1509
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1510
|
-
return de_ListAssistantsCommandError(output, context);
|
|
1511
|
-
}
|
|
1512
|
-
const contents = (0, smithy_client_1.map)({
|
|
1513
|
-
$metadata: deserializeMetadata(output),
|
|
1514
|
-
});
|
|
1515
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1516
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1517
|
-
assistantSummaries: smithy_client_1._json,
|
|
1518
|
-
nextToken: smithy_client_1.expectString,
|
|
1519
|
-
});
|
|
1520
|
-
Object.assign(contents, doc);
|
|
1521
|
-
return contents;
|
|
1522
|
-
};
|
|
1523
|
-
exports.de_ListAssistantsCommand = de_ListAssistantsCommand;
|
|
1524
|
-
const de_ListAssistantsCommandError = async (output, context) => {
|
|
1525
|
-
const parsedOutput = {
|
|
1526
|
-
...output,
|
|
1527
|
-
body: await parseErrorBody(output.body, context),
|
|
1528
|
-
};
|
|
1529
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1530
|
-
switch (errorCode) {
|
|
1531
|
-
case "AccessDeniedException":
|
|
1532
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1533
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1534
|
-
case "ValidationException":
|
|
1535
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1536
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1537
|
-
default:
|
|
1538
|
-
const parsedBody = parsedOutput.body;
|
|
1539
|
-
return throwDefaultError({
|
|
1540
|
-
output,
|
|
1541
|
-
parsedBody,
|
|
1542
|
-
errorCode,
|
|
1543
|
-
});
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1546
|
-
const de_ListContentsCommand = async (output, context) => {
|
|
1547
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1548
|
-
return de_ListContentsCommandError(output, context);
|
|
1549
|
-
}
|
|
1550
|
-
const contents = (0, smithy_client_1.map)({
|
|
1551
|
-
$metadata: deserializeMetadata(output),
|
|
1552
|
-
});
|
|
1553
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1554
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1555
|
-
contentSummaries: smithy_client_1._json,
|
|
1556
|
-
nextToken: smithy_client_1.expectString,
|
|
1557
|
-
});
|
|
1558
|
-
Object.assign(contents, doc);
|
|
1559
|
-
return contents;
|
|
1560
|
-
};
|
|
1561
|
-
exports.de_ListContentsCommand = de_ListContentsCommand;
|
|
1562
|
-
const de_ListContentsCommandError = async (output, context) => {
|
|
1563
|
-
const parsedOutput = {
|
|
1564
|
-
...output,
|
|
1565
|
-
body: await parseErrorBody(output.body, context),
|
|
1566
|
-
};
|
|
1567
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1568
|
-
switch (errorCode) {
|
|
1569
|
-
case "AccessDeniedException":
|
|
1570
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1571
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1572
|
-
case "ResourceNotFoundException":
|
|
1573
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1574
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1575
|
-
case "ValidationException":
|
|
1576
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1577
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1578
|
-
default:
|
|
1579
|
-
const parsedBody = parsedOutput.body;
|
|
1580
|
-
return throwDefaultError({
|
|
1581
|
-
output,
|
|
1582
|
-
parsedBody,
|
|
1583
|
-
errorCode,
|
|
1584
|
-
});
|
|
1585
|
-
}
|
|
1586
|
-
};
|
|
1587
|
-
const de_ListImportJobsCommand = async (output, context) => {
|
|
1588
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1589
|
-
return de_ListImportJobsCommandError(output, context);
|
|
1590
|
-
}
|
|
1591
|
-
const contents = (0, smithy_client_1.map)({
|
|
1592
|
-
$metadata: deserializeMetadata(output),
|
|
1593
|
-
});
|
|
1594
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1595
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1596
|
-
importJobSummaries: (_) => de_ImportJobList(_, context),
|
|
1597
|
-
nextToken: smithy_client_1.expectString,
|
|
1598
|
-
});
|
|
1599
|
-
Object.assign(contents, doc);
|
|
1600
|
-
return contents;
|
|
1601
|
-
};
|
|
1602
|
-
exports.de_ListImportJobsCommand = de_ListImportJobsCommand;
|
|
1603
|
-
const de_ListImportJobsCommandError = async (output, context) => {
|
|
1604
|
-
const parsedOutput = {
|
|
1605
|
-
...output,
|
|
1606
|
-
body: await parseErrorBody(output.body, context),
|
|
1607
|
-
};
|
|
1608
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1609
|
-
switch (errorCode) {
|
|
1610
|
-
case "AccessDeniedException":
|
|
1611
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1612
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1613
|
-
case "ValidationException":
|
|
1614
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1615
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1616
|
-
default:
|
|
1617
|
-
const parsedBody = parsedOutput.body;
|
|
1618
|
-
return throwDefaultError({
|
|
1619
|
-
output,
|
|
1620
|
-
parsedBody,
|
|
1621
|
-
errorCode,
|
|
1622
|
-
});
|
|
1623
|
-
}
|
|
1624
|
-
};
|
|
1625
|
-
const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
1626
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1627
|
-
return de_ListKnowledgeBasesCommandError(output, context);
|
|
1628
|
-
}
|
|
1629
|
-
const contents = (0, smithy_client_1.map)({
|
|
1630
|
-
$metadata: deserializeMetadata(output),
|
|
1631
|
-
});
|
|
1632
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1633
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1634
|
-
knowledgeBaseSummaries: smithy_client_1._json,
|
|
1635
|
-
nextToken: smithy_client_1.expectString,
|
|
1636
|
-
});
|
|
1637
|
-
Object.assign(contents, doc);
|
|
1638
|
-
return contents;
|
|
1639
|
-
};
|
|
1640
|
-
exports.de_ListKnowledgeBasesCommand = de_ListKnowledgeBasesCommand;
|
|
1641
|
-
const de_ListKnowledgeBasesCommandError = async (output, context) => {
|
|
1642
|
-
const parsedOutput = {
|
|
1643
|
-
...output,
|
|
1644
|
-
body: await parseErrorBody(output.body, context),
|
|
1645
|
-
};
|
|
1646
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1647
|
-
switch (errorCode) {
|
|
1648
|
-
case "AccessDeniedException":
|
|
1649
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1650
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1651
|
-
case "ValidationException":
|
|
1652
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1653
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1654
|
-
default:
|
|
1655
|
-
const parsedBody = parsedOutput.body;
|
|
1656
|
-
return throwDefaultError({
|
|
1657
|
-
output,
|
|
1658
|
-
parsedBody,
|
|
1659
|
-
errorCode,
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
};
|
|
1663
|
-
const de_ListQuickResponsesCommand = async (output, context) => {
|
|
1664
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1665
|
-
return de_ListQuickResponsesCommandError(output, context);
|
|
1666
|
-
}
|
|
1667
|
-
const contents = (0, smithy_client_1.map)({
|
|
1668
|
-
$metadata: deserializeMetadata(output),
|
|
1669
|
-
});
|
|
1670
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1671
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1672
|
-
nextToken: smithy_client_1.expectString,
|
|
1673
|
-
quickResponseSummaries: (_) => de_QuickResponseSummaryList(_, context),
|
|
1674
|
-
});
|
|
1675
|
-
Object.assign(contents, doc);
|
|
1676
|
-
return contents;
|
|
1677
|
-
};
|
|
1678
|
-
exports.de_ListQuickResponsesCommand = de_ListQuickResponsesCommand;
|
|
1679
|
-
const de_ListQuickResponsesCommandError = async (output, context) => {
|
|
1680
|
-
const parsedOutput = {
|
|
1681
|
-
...output,
|
|
1682
|
-
body: await parseErrorBody(output.body, context),
|
|
1683
|
-
};
|
|
1684
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1685
|
-
switch (errorCode) {
|
|
1686
|
-
case "AccessDeniedException":
|
|
1687
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1688
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1689
|
-
case "ResourceNotFoundException":
|
|
1690
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1691
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1692
|
-
case "ValidationException":
|
|
1693
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1694
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1695
|
-
default:
|
|
1696
|
-
const parsedBody = parsedOutput.body;
|
|
1697
|
-
return throwDefaultError({
|
|
1698
|
-
output,
|
|
1699
|
-
parsedBody,
|
|
1700
|
-
errorCode,
|
|
1701
|
-
});
|
|
1702
|
-
}
|
|
1703
|
-
};
|
|
1704
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1705
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1706
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1707
|
-
}
|
|
1708
|
-
const contents = (0, smithy_client_1.map)({
|
|
1709
|
-
$metadata: deserializeMetadata(output),
|
|
1710
|
-
});
|
|
1711
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1712
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1713
|
-
tags: smithy_client_1._json,
|
|
1714
|
-
});
|
|
1715
|
-
Object.assign(contents, doc);
|
|
1716
|
-
return contents;
|
|
1717
|
-
};
|
|
1718
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1719
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1720
|
-
const parsedOutput = {
|
|
1721
|
-
...output,
|
|
1722
|
-
body: await parseErrorBody(output.body, context),
|
|
1723
|
-
};
|
|
1724
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1725
|
-
switch (errorCode) {
|
|
1726
|
-
case "ResourceNotFoundException":
|
|
1727
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1728
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1729
|
-
default:
|
|
1730
|
-
const parsedBody = parsedOutput.body;
|
|
1731
|
-
return throwDefaultError({
|
|
1732
|
-
output,
|
|
1733
|
-
parsedBody,
|
|
1734
|
-
errorCode,
|
|
1735
|
-
});
|
|
1736
|
-
}
|
|
1737
|
-
};
|
|
1738
|
-
const de_NotifyRecommendationsReceivedCommand = async (output, context) => {
|
|
1739
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1740
|
-
return de_NotifyRecommendationsReceivedCommandError(output, context);
|
|
1741
|
-
}
|
|
1742
|
-
const contents = (0, smithy_client_1.map)({
|
|
1743
|
-
$metadata: deserializeMetadata(output),
|
|
1744
|
-
});
|
|
1745
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1746
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1747
|
-
errors: smithy_client_1._json,
|
|
1748
|
-
recommendationIds: smithy_client_1._json,
|
|
1749
|
-
});
|
|
1750
|
-
Object.assign(contents, doc);
|
|
1751
|
-
return contents;
|
|
1752
|
-
};
|
|
1753
|
-
exports.de_NotifyRecommendationsReceivedCommand = de_NotifyRecommendationsReceivedCommand;
|
|
1754
|
-
const de_NotifyRecommendationsReceivedCommandError = async (output, context) => {
|
|
1755
|
-
const parsedOutput = {
|
|
1756
|
-
...output,
|
|
1757
|
-
body: await parseErrorBody(output.body, context),
|
|
1758
|
-
};
|
|
1759
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1760
|
-
switch (errorCode) {
|
|
1761
|
-
case "AccessDeniedException":
|
|
1762
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1763
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1764
|
-
case "ResourceNotFoundException":
|
|
1765
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1766
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1767
|
-
case "ValidationException":
|
|
1768
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1769
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1770
|
-
default:
|
|
1771
|
-
const parsedBody = parsedOutput.body;
|
|
1772
|
-
return throwDefaultError({
|
|
1773
|
-
output,
|
|
1774
|
-
parsedBody,
|
|
1775
|
-
errorCode,
|
|
1776
|
-
});
|
|
1777
|
-
}
|
|
1778
|
-
};
|
|
1779
|
-
const de_QueryAssistantCommand = async (output, context) => {
|
|
1780
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1781
|
-
return de_QueryAssistantCommandError(output, context);
|
|
1782
|
-
}
|
|
1783
|
-
const contents = (0, smithy_client_1.map)({
|
|
1784
|
-
$metadata: deserializeMetadata(output),
|
|
1785
|
-
});
|
|
1786
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1787
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1788
|
-
nextToken: smithy_client_1.expectString,
|
|
1789
|
-
results: (_) => de_QueryResultsList(_, context),
|
|
1790
|
-
});
|
|
1791
|
-
Object.assign(contents, doc);
|
|
1792
|
-
return contents;
|
|
1793
|
-
};
|
|
1794
|
-
exports.de_QueryAssistantCommand = de_QueryAssistantCommand;
|
|
1795
|
-
const de_QueryAssistantCommandError = async (output, context) => {
|
|
1796
|
-
const parsedOutput = {
|
|
1797
|
-
...output,
|
|
1798
|
-
body: await parseErrorBody(output.body, context),
|
|
1799
|
-
};
|
|
1800
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1801
|
-
switch (errorCode) {
|
|
1802
|
-
case "AccessDeniedException":
|
|
1803
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1804
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1805
|
-
case "RequestTimeoutException":
|
|
1806
|
-
case "com.amazonaws.wisdom#RequestTimeoutException":
|
|
1807
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1808
|
-
case "ResourceNotFoundException":
|
|
1809
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1810
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1811
|
-
case "ValidationException":
|
|
1812
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1813
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1814
|
-
default:
|
|
1815
|
-
const parsedBody = parsedOutput.body;
|
|
1816
|
-
return throwDefaultError({
|
|
1817
|
-
output,
|
|
1818
|
-
parsedBody,
|
|
1819
|
-
errorCode,
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
};
|
|
1823
|
-
const de_RemoveKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
1824
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1825
|
-
return de_RemoveKnowledgeBaseTemplateUriCommandError(output, context);
|
|
1826
|
-
}
|
|
1827
|
-
const contents = (0, smithy_client_1.map)({
|
|
1828
|
-
$metadata: deserializeMetadata(output),
|
|
1829
|
-
});
|
|
1830
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1831
|
-
return contents;
|
|
1832
|
-
};
|
|
1833
|
-
exports.de_RemoveKnowledgeBaseTemplateUriCommand = de_RemoveKnowledgeBaseTemplateUriCommand;
|
|
1834
|
-
const de_RemoveKnowledgeBaseTemplateUriCommandError = async (output, context) => {
|
|
1835
|
-
const parsedOutput = {
|
|
1836
|
-
...output,
|
|
1837
|
-
body: await parseErrorBody(output.body, context),
|
|
1838
|
-
};
|
|
1839
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1840
|
-
switch (errorCode) {
|
|
1841
|
-
case "AccessDeniedException":
|
|
1842
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1843
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1844
|
-
case "ResourceNotFoundException":
|
|
1845
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1846
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1847
|
-
case "ValidationException":
|
|
1848
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1849
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1850
|
-
default:
|
|
1851
|
-
const parsedBody = parsedOutput.body;
|
|
1852
|
-
return throwDefaultError({
|
|
1853
|
-
output,
|
|
1854
|
-
parsedBody,
|
|
1855
|
-
errorCode,
|
|
1856
|
-
});
|
|
1857
|
-
}
|
|
1858
|
-
};
|
|
1859
|
-
const de_SearchContentCommand = async (output, context) => {
|
|
1860
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1861
|
-
return de_SearchContentCommandError(output, context);
|
|
1862
|
-
}
|
|
1863
|
-
const contents = (0, smithy_client_1.map)({
|
|
1864
|
-
$metadata: deserializeMetadata(output),
|
|
1865
|
-
});
|
|
1866
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1867
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1868
|
-
contentSummaries: smithy_client_1._json,
|
|
1869
|
-
nextToken: smithy_client_1.expectString,
|
|
1870
|
-
});
|
|
1871
|
-
Object.assign(contents, doc);
|
|
1872
|
-
return contents;
|
|
1873
|
-
};
|
|
1874
|
-
exports.de_SearchContentCommand = de_SearchContentCommand;
|
|
1875
|
-
const de_SearchContentCommandError = async (output, context) => {
|
|
1876
|
-
const parsedOutput = {
|
|
1877
|
-
...output,
|
|
1878
|
-
body: await parseErrorBody(output.body, context),
|
|
1879
|
-
};
|
|
1880
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1881
|
-
switch (errorCode) {
|
|
1882
|
-
case "AccessDeniedException":
|
|
1883
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1884
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1885
|
-
case "ResourceNotFoundException":
|
|
1886
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1887
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1888
|
-
case "ValidationException":
|
|
1889
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1890
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1891
|
-
default:
|
|
1892
|
-
const parsedBody = parsedOutput.body;
|
|
1893
|
-
return throwDefaultError({
|
|
1894
|
-
output,
|
|
1895
|
-
parsedBody,
|
|
1896
|
-
errorCode,
|
|
1897
|
-
});
|
|
1898
|
-
}
|
|
1899
|
-
};
|
|
1900
|
-
const de_SearchQuickResponsesCommand = async (output, context) => {
|
|
1901
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1902
|
-
return de_SearchQuickResponsesCommandError(output, context);
|
|
1903
|
-
}
|
|
1904
|
-
const contents = (0, smithy_client_1.map)({
|
|
1905
|
-
$metadata: deserializeMetadata(output),
|
|
1906
|
-
});
|
|
1907
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1908
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1909
|
-
nextToken: smithy_client_1.expectString,
|
|
1910
|
-
results: (_) => de_QuickResponseSearchResultsList(_, context),
|
|
1911
|
-
});
|
|
1912
|
-
Object.assign(contents, doc);
|
|
1913
|
-
return contents;
|
|
1914
|
-
};
|
|
1915
|
-
exports.de_SearchQuickResponsesCommand = de_SearchQuickResponsesCommand;
|
|
1916
|
-
const de_SearchQuickResponsesCommandError = async (output, context) => {
|
|
1917
|
-
const parsedOutput = {
|
|
1918
|
-
...output,
|
|
1919
|
-
body: await parseErrorBody(output.body, context),
|
|
1920
|
-
};
|
|
1921
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1922
|
-
switch (errorCode) {
|
|
1923
|
-
case "AccessDeniedException":
|
|
1924
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1925
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1926
|
-
case "RequestTimeoutException":
|
|
1927
|
-
case "com.amazonaws.wisdom#RequestTimeoutException":
|
|
1928
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1929
|
-
case "ResourceNotFoundException":
|
|
1930
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1931
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1932
|
-
case "ValidationException":
|
|
1933
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1934
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1935
|
-
default:
|
|
1936
|
-
const parsedBody = parsedOutput.body;
|
|
1937
|
-
return throwDefaultError({
|
|
1938
|
-
output,
|
|
1939
|
-
parsedBody,
|
|
1940
|
-
errorCode,
|
|
1941
|
-
});
|
|
1942
|
-
}
|
|
1943
|
-
};
|
|
1944
|
-
const de_SearchSessionsCommand = async (output, context) => {
|
|
1945
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1946
|
-
return de_SearchSessionsCommandError(output, context);
|
|
1947
|
-
}
|
|
1948
|
-
const contents = (0, smithy_client_1.map)({
|
|
1949
|
-
$metadata: deserializeMetadata(output),
|
|
1950
|
-
});
|
|
1951
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1952
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1953
|
-
nextToken: smithy_client_1.expectString,
|
|
1954
|
-
sessionSummaries: smithy_client_1._json,
|
|
1955
|
-
});
|
|
1956
|
-
Object.assign(contents, doc);
|
|
1957
|
-
return contents;
|
|
1958
|
-
};
|
|
1959
|
-
exports.de_SearchSessionsCommand = de_SearchSessionsCommand;
|
|
1960
|
-
const de_SearchSessionsCommandError = async (output, context) => {
|
|
1961
|
-
const parsedOutput = {
|
|
1962
|
-
...output,
|
|
1963
|
-
body: await parseErrorBody(output.body, context),
|
|
1964
|
-
};
|
|
1965
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1966
|
-
switch (errorCode) {
|
|
1967
|
-
case "AccessDeniedException":
|
|
1968
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1969
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1970
|
-
case "ResourceNotFoundException":
|
|
1971
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1972
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1973
|
-
case "ValidationException":
|
|
1974
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1975
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1976
|
-
default:
|
|
1977
|
-
const parsedBody = parsedOutput.body;
|
|
1978
|
-
return throwDefaultError({
|
|
1979
|
-
output,
|
|
1980
|
-
parsedBody,
|
|
1981
|
-
errorCode,
|
|
1982
|
-
});
|
|
1983
|
-
}
|
|
1984
|
-
};
|
|
1985
|
-
const de_StartContentUploadCommand = async (output, context) => {
|
|
1986
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1987
|
-
return de_StartContentUploadCommandError(output, context);
|
|
1988
|
-
}
|
|
1989
|
-
const contents = (0, smithy_client_1.map)({
|
|
1990
|
-
$metadata: deserializeMetadata(output),
|
|
1991
|
-
});
|
|
1992
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1993
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1994
|
-
headersToInclude: smithy_client_1._json,
|
|
1995
|
-
uploadId: smithy_client_1.expectString,
|
|
1996
|
-
url: smithy_client_1.expectString,
|
|
1997
|
-
urlExpiry: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1998
|
-
});
|
|
1999
|
-
Object.assign(contents, doc);
|
|
2000
|
-
return contents;
|
|
2001
|
-
};
|
|
2002
|
-
exports.de_StartContentUploadCommand = de_StartContentUploadCommand;
|
|
2003
|
-
const de_StartContentUploadCommandError = async (output, context) => {
|
|
2004
|
-
const parsedOutput = {
|
|
2005
|
-
...output,
|
|
2006
|
-
body: await parseErrorBody(output.body, context),
|
|
2007
|
-
};
|
|
2008
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2009
|
-
switch (errorCode) {
|
|
2010
|
-
case "AccessDeniedException":
|
|
2011
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2012
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2013
|
-
case "ResourceNotFoundException":
|
|
2014
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2015
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2016
|
-
case "ValidationException":
|
|
2017
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2018
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2019
|
-
default:
|
|
2020
|
-
const parsedBody = parsedOutput.body;
|
|
2021
|
-
return throwDefaultError({
|
|
2022
|
-
output,
|
|
2023
|
-
parsedBody,
|
|
2024
|
-
errorCode,
|
|
2025
|
-
});
|
|
2026
|
-
}
|
|
2027
|
-
};
|
|
2028
|
-
const de_StartImportJobCommand = async (output, context) => {
|
|
2029
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2030
|
-
return de_StartImportJobCommandError(output, context);
|
|
2031
|
-
}
|
|
2032
|
-
const contents = (0, smithy_client_1.map)({
|
|
2033
|
-
$metadata: deserializeMetadata(output),
|
|
2034
|
-
});
|
|
2035
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2036
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2037
|
-
importJob: (_) => de_ImportJobData(_, context),
|
|
2038
|
-
});
|
|
2039
|
-
Object.assign(contents, doc);
|
|
2040
|
-
return contents;
|
|
2041
|
-
};
|
|
2042
|
-
exports.de_StartImportJobCommand = de_StartImportJobCommand;
|
|
2043
|
-
const de_StartImportJobCommandError = async (output, context) => {
|
|
2044
|
-
const parsedOutput = {
|
|
2045
|
-
...output,
|
|
2046
|
-
body: await parseErrorBody(output.body, context),
|
|
2047
|
-
};
|
|
2048
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2049
|
-
switch (errorCode) {
|
|
2050
|
-
case "AccessDeniedException":
|
|
2051
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2052
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2053
|
-
case "ConflictException":
|
|
2054
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
2055
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2056
|
-
case "ResourceNotFoundException":
|
|
2057
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2058
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2059
|
-
case "ServiceQuotaExceededException":
|
|
2060
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
2061
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2062
|
-
case "ValidationException":
|
|
2063
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2064
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2065
|
-
default:
|
|
2066
|
-
const parsedBody = parsedOutput.body;
|
|
2067
|
-
return throwDefaultError({
|
|
2068
|
-
output,
|
|
2069
|
-
parsedBody,
|
|
2070
|
-
errorCode,
|
|
2071
|
-
});
|
|
2072
|
-
}
|
|
2073
|
-
};
|
|
2074
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
2075
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2076
|
-
return de_TagResourceCommandError(output, context);
|
|
2077
|
-
}
|
|
2078
|
-
const contents = (0, smithy_client_1.map)({
|
|
2079
|
-
$metadata: deserializeMetadata(output),
|
|
2080
|
-
});
|
|
2081
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2082
|
-
return contents;
|
|
2083
|
-
};
|
|
2084
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
2085
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
2086
|
-
const parsedOutput = {
|
|
2087
|
-
...output,
|
|
2088
|
-
body: await parseErrorBody(output.body, context),
|
|
2089
|
-
};
|
|
2090
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2091
|
-
switch (errorCode) {
|
|
2092
|
-
case "ResourceNotFoundException":
|
|
2093
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2094
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2095
|
-
case "TooManyTagsException":
|
|
2096
|
-
case "com.amazonaws.wisdom#TooManyTagsException":
|
|
2097
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
2098
|
-
default:
|
|
2099
|
-
const parsedBody = parsedOutput.body;
|
|
2100
|
-
return throwDefaultError({
|
|
2101
|
-
output,
|
|
2102
|
-
parsedBody,
|
|
2103
|
-
errorCode,
|
|
2104
|
-
});
|
|
2105
|
-
}
|
|
2106
|
-
};
|
|
2107
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
2108
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2109
|
-
return de_UntagResourceCommandError(output, context);
|
|
2110
|
-
}
|
|
2111
|
-
const contents = (0, smithy_client_1.map)({
|
|
2112
|
-
$metadata: deserializeMetadata(output),
|
|
2113
|
-
});
|
|
2114
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2115
|
-
return contents;
|
|
2116
|
-
};
|
|
2117
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
2118
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
2119
|
-
const parsedOutput = {
|
|
2120
|
-
...output,
|
|
2121
|
-
body: await parseErrorBody(output.body, context),
|
|
2122
|
-
};
|
|
2123
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2124
|
-
switch (errorCode) {
|
|
2125
|
-
case "ResourceNotFoundException":
|
|
2126
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2127
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2128
|
-
default:
|
|
2129
|
-
const parsedBody = parsedOutput.body;
|
|
2130
|
-
return throwDefaultError({
|
|
2131
|
-
output,
|
|
2132
|
-
parsedBody,
|
|
2133
|
-
errorCode,
|
|
2134
|
-
});
|
|
2135
|
-
}
|
|
2136
|
-
};
|
|
2137
|
-
const de_UpdateContentCommand = async (output, context) => {
|
|
2138
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2139
|
-
return de_UpdateContentCommandError(output, context);
|
|
2140
|
-
}
|
|
2141
|
-
const contents = (0, smithy_client_1.map)({
|
|
2142
|
-
$metadata: deserializeMetadata(output),
|
|
2143
|
-
});
|
|
2144
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2145
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2146
|
-
content: (_) => de_ContentData(_, context),
|
|
2147
|
-
});
|
|
2148
|
-
Object.assign(contents, doc);
|
|
2149
|
-
return contents;
|
|
2150
|
-
};
|
|
2151
|
-
exports.de_UpdateContentCommand = de_UpdateContentCommand;
|
|
2152
|
-
const de_UpdateContentCommandError = async (output, context) => {
|
|
2153
|
-
const parsedOutput = {
|
|
2154
|
-
...output,
|
|
2155
|
-
body: await parseErrorBody(output.body, context),
|
|
2156
|
-
};
|
|
2157
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2158
|
-
switch (errorCode) {
|
|
2159
|
-
case "AccessDeniedException":
|
|
2160
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2161
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2162
|
-
case "PreconditionFailedException":
|
|
2163
|
-
case "com.amazonaws.wisdom#PreconditionFailedException":
|
|
2164
|
-
throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
|
|
2165
|
-
case "ResourceNotFoundException":
|
|
2166
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2167
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2168
|
-
case "ValidationException":
|
|
2169
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2170
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2171
|
-
default:
|
|
2172
|
-
const parsedBody = parsedOutput.body;
|
|
2173
|
-
return throwDefaultError({
|
|
2174
|
-
output,
|
|
2175
|
-
parsedBody,
|
|
2176
|
-
errorCode,
|
|
2177
|
-
});
|
|
2178
|
-
}
|
|
2179
|
-
};
|
|
2180
|
-
const de_UpdateKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
2181
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2182
|
-
return de_UpdateKnowledgeBaseTemplateUriCommandError(output, context);
|
|
2183
|
-
}
|
|
2184
|
-
const contents = (0, smithy_client_1.map)({
|
|
2185
|
-
$metadata: deserializeMetadata(output),
|
|
2186
|
-
});
|
|
2187
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2188
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2189
|
-
knowledgeBase: (_) => de_KnowledgeBaseData(_, context),
|
|
2190
|
-
});
|
|
2191
|
-
Object.assign(contents, doc);
|
|
2192
|
-
return contents;
|
|
2193
|
-
};
|
|
2194
|
-
exports.de_UpdateKnowledgeBaseTemplateUriCommand = de_UpdateKnowledgeBaseTemplateUriCommand;
|
|
2195
|
-
const de_UpdateKnowledgeBaseTemplateUriCommandError = async (output, context) => {
|
|
2196
|
-
const parsedOutput = {
|
|
2197
|
-
...output,
|
|
2198
|
-
body: await parseErrorBody(output.body, context),
|
|
2199
|
-
};
|
|
2200
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2201
|
-
switch (errorCode) {
|
|
2202
|
-
case "AccessDeniedException":
|
|
2203
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2204
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2205
|
-
case "ResourceNotFoundException":
|
|
2206
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2207
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2208
|
-
case "ValidationException":
|
|
2209
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2210
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2211
|
-
default:
|
|
2212
|
-
const parsedBody = parsedOutput.body;
|
|
2213
|
-
return throwDefaultError({
|
|
2214
|
-
output,
|
|
2215
|
-
parsedBody,
|
|
2216
|
-
errorCode,
|
|
2217
|
-
});
|
|
2218
|
-
}
|
|
2219
|
-
};
|
|
2220
|
-
const de_UpdateQuickResponseCommand = async (output, context) => {
|
|
2221
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2222
|
-
return de_UpdateQuickResponseCommandError(output, context);
|
|
2223
|
-
}
|
|
2224
|
-
const contents = (0, smithy_client_1.map)({
|
|
2225
|
-
$metadata: deserializeMetadata(output),
|
|
2226
|
-
});
|
|
2227
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2228
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2229
|
-
quickResponse: (_) => de_QuickResponseData(_, context),
|
|
2230
|
-
});
|
|
2231
|
-
Object.assign(contents, doc);
|
|
2232
|
-
return contents;
|
|
2233
|
-
};
|
|
2234
|
-
exports.de_UpdateQuickResponseCommand = de_UpdateQuickResponseCommand;
|
|
2235
|
-
const de_UpdateQuickResponseCommandError = async (output, context) => {
|
|
2236
|
-
const parsedOutput = {
|
|
2237
|
-
...output,
|
|
2238
|
-
body: await parseErrorBody(output.body, context),
|
|
2239
|
-
};
|
|
2240
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2241
|
-
switch (errorCode) {
|
|
2242
|
-
case "AccessDeniedException":
|
|
2243
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2244
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2245
|
-
case "ConflictException":
|
|
2246
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
2247
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2248
|
-
case "PreconditionFailedException":
|
|
2249
|
-
case "com.amazonaws.wisdom#PreconditionFailedException":
|
|
2250
|
-
throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
|
|
2251
|
-
case "ResourceNotFoundException":
|
|
2252
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2253
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2254
|
-
case "ValidationException":
|
|
2255
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2256
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2257
|
-
default:
|
|
2258
|
-
const parsedBody = parsedOutput.body;
|
|
2259
|
-
return throwDefaultError({
|
|
2260
|
-
output,
|
|
2261
|
-
parsedBody,
|
|
2262
|
-
errorCode,
|
|
2263
|
-
});
|
|
2264
|
-
}
|
|
2265
|
-
};
|
|
2266
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(WisdomServiceException_1.WisdomServiceException);
|
|
2267
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
2268
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2269
|
-
const data = parsedOutput.body;
|
|
2270
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2271
|
-
message: smithy_client_1.expectString,
|
|
2272
|
-
});
|
|
2273
|
-
Object.assign(contents, doc);
|
|
2274
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
2275
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2276
|
-
...contents,
|
|
2277
|
-
});
|
|
2278
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2279
|
-
};
|
|
2280
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
2281
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2282
|
-
const data = parsedOutput.body;
|
|
2283
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2284
|
-
message: smithy_client_1.expectString,
|
|
2285
|
-
});
|
|
2286
|
-
Object.assign(contents, doc);
|
|
2287
|
-
const exception = new models_0_1.ConflictException({
|
|
2288
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2289
|
-
...contents,
|
|
2290
|
-
});
|
|
2291
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2292
|
-
};
|
|
2293
|
-
const de_PreconditionFailedExceptionRes = async (parsedOutput, context) => {
|
|
2294
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2295
|
-
const data = parsedOutput.body;
|
|
2296
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2297
|
-
message: smithy_client_1.expectString,
|
|
2298
|
-
});
|
|
2299
|
-
Object.assign(contents, doc);
|
|
2300
|
-
const exception = new models_0_1.PreconditionFailedException({
|
|
2301
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2302
|
-
...contents,
|
|
2303
|
-
});
|
|
2304
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2305
|
-
};
|
|
2306
|
-
const de_RequestTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
2307
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2308
|
-
const data = parsedOutput.body;
|
|
2309
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2310
|
-
message: smithy_client_1.expectString,
|
|
2311
|
-
});
|
|
2312
|
-
Object.assign(contents, doc);
|
|
2313
|
-
const exception = new models_0_1.RequestTimeoutException({
|
|
2314
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2315
|
-
...contents,
|
|
2316
|
-
});
|
|
2317
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2318
|
-
};
|
|
2319
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
2320
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2321
|
-
const data = parsedOutput.body;
|
|
2322
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2323
|
-
message: smithy_client_1.expectString,
|
|
2324
|
-
resourceName: smithy_client_1.expectString,
|
|
2325
|
-
});
|
|
2326
|
-
Object.assign(contents, doc);
|
|
2327
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
2328
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2329
|
-
...contents,
|
|
2330
|
-
});
|
|
2331
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2332
|
-
};
|
|
2333
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
2334
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2335
|
-
const data = parsedOutput.body;
|
|
2336
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2337
|
-
message: smithy_client_1.expectString,
|
|
2338
|
-
});
|
|
2339
|
-
Object.assign(contents, doc);
|
|
2340
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
2341
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2342
|
-
...contents,
|
|
2343
|
-
});
|
|
2344
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2345
|
-
};
|
|
2346
|
-
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
2347
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2348
|
-
const data = parsedOutput.body;
|
|
2349
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2350
|
-
message: smithy_client_1.expectString,
|
|
2351
|
-
resourceName: smithy_client_1.expectString,
|
|
2352
|
-
});
|
|
2353
|
-
Object.assign(contents, doc);
|
|
2354
|
-
const exception = new models_0_1.TooManyTagsException({
|
|
2355
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2356
|
-
...contents,
|
|
2357
|
-
});
|
|
2358
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2359
|
-
};
|
|
2360
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
2361
|
-
const contents = (0, smithy_client_1.map)({});
|
|
2362
|
-
const data = parsedOutput.body;
|
|
2363
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
2364
|
-
message: smithy_client_1.expectString,
|
|
2365
|
-
});
|
|
2366
|
-
Object.assign(contents, doc);
|
|
2367
|
-
const exception = new models_0_1.ValidationException({
|
|
2368
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2369
|
-
...contents,
|
|
2370
|
-
});
|
|
2371
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2372
|
-
};
|
|
2373
|
-
const de_ContentData = (output, context) => {
|
|
2374
|
-
return (0, smithy_client_1.take)(output, {
|
|
2375
|
-
contentArn: smithy_client_1.expectString,
|
|
2376
|
-
contentId: smithy_client_1.expectString,
|
|
2377
|
-
contentType: smithy_client_1.expectString,
|
|
2378
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2379
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2380
|
-
linkOutUri: smithy_client_1.expectString,
|
|
2381
|
-
metadata: smithy_client_1._json,
|
|
2382
|
-
name: smithy_client_1.expectString,
|
|
2383
|
-
revisionId: smithy_client_1.expectString,
|
|
2384
|
-
status: smithy_client_1.expectString,
|
|
2385
|
-
tags: smithy_client_1._json,
|
|
2386
|
-
title: smithy_client_1.expectString,
|
|
2387
|
-
url: smithy_client_1.expectString,
|
|
2388
|
-
urlExpiry: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2389
|
-
});
|
|
2390
|
-
};
|
|
2391
|
-
const de_ImportJobData = (output, context) => {
|
|
2392
|
-
return (0, smithy_client_1.take)(output, {
|
|
2393
|
-
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2394
|
-
externalSourceConfiguration: smithy_client_1._json,
|
|
2395
|
-
failedRecordReport: smithy_client_1.expectString,
|
|
2396
|
-
importJobId: smithy_client_1.expectString,
|
|
2397
|
-
importJobType: smithy_client_1.expectString,
|
|
2398
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2399
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2400
|
-
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2401
|
-
metadata: smithy_client_1._json,
|
|
2402
|
-
status: smithy_client_1.expectString,
|
|
2403
|
-
uploadId: smithy_client_1.expectString,
|
|
2404
|
-
url: smithy_client_1.expectString,
|
|
2405
|
-
urlExpiry: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2406
|
-
});
|
|
2407
|
-
};
|
|
2408
|
-
const de_ImportJobList = (output, context) => {
|
|
2409
|
-
const retVal = (output || [])
|
|
2410
|
-
.filter((e) => e != null)
|
|
2411
|
-
.map((entry) => {
|
|
2412
|
-
return de_ImportJobSummary(entry, context);
|
|
2413
|
-
});
|
|
2414
|
-
return retVal;
|
|
2415
|
-
};
|
|
2416
|
-
const de_ImportJobSummary = (output, context) => {
|
|
2417
|
-
return (0, smithy_client_1.take)(output, {
|
|
2418
|
-
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2419
|
-
externalSourceConfiguration: smithy_client_1._json,
|
|
2420
|
-
importJobId: smithy_client_1.expectString,
|
|
2421
|
-
importJobType: smithy_client_1.expectString,
|
|
2422
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2423
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2424
|
-
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2425
|
-
metadata: smithy_client_1._json,
|
|
2426
|
-
status: smithy_client_1.expectString,
|
|
2427
|
-
uploadId: smithy_client_1.expectString,
|
|
2428
|
-
});
|
|
2429
|
-
};
|
|
2430
|
-
const de_KnowledgeBaseData = (output, context) => {
|
|
2431
|
-
return (0, smithy_client_1.take)(output, {
|
|
2432
|
-
description: smithy_client_1.expectString,
|
|
2433
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2434
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2435
|
-
knowledgeBaseType: smithy_client_1.expectString,
|
|
2436
|
-
lastContentModificationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2437
|
-
name: smithy_client_1.expectString,
|
|
2438
|
-
renderingConfiguration: smithy_client_1._json,
|
|
2439
|
-
serverSideEncryptionConfiguration: smithy_client_1._json,
|
|
2440
|
-
sourceConfiguration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
2441
|
-
status: smithy_client_1.expectString,
|
|
2442
|
-
tags: smithy_client_1._json,
|
|
2443
|
-
});
|
|
2444
|
-
};
|
|
2445
|
-
const de_QueryResultsList = (output, context) => {
|
|
2446
|
-
const retVal = (output || [])
|
|
2447
|
-
.filter((e) => e != null)
|
|
2448
|
-
.map((entry) => {
|
|
2449
|
-
return de_ResultData(entry, context);
|
|
2450
|
-
});
|
|
2451
|
-
return retVal;
|
|
2452
|
-
};
|
|
2453
|
-
const de_QuickResponseData = (output, context) => {
|
|
2454
|
-
return (0, smithy_client_1.take)(output, {
|
|
2455
|
-
channels: smithy_client_1._json,
|
|
2456
|
-
contentType: smithy_client_1.expectString,
|
|
2457
|
-
contents: smithy_client_1._json,
|
|
2458
|
-
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2459
|
-
description: smithy_client_1.expectString,
|
|
2460
|
-
groupingConfiguration: smithy_client_1._json,
|
|
2461
|
-
isActive: smithy_client_1.expectBoolean,
|
|
2462
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2463
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2464
|
-
language: smithy_client_1.expectString,
|
|
2465
|
-
lastModifiedBy: smithy_client_1.expectString,
|
|
2466
|
-
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2467
|
-
name: smithy_client_1.expectString,
|
|
2468
|
-
quickResponseArn: smithy_client_1.expectString,
|
|
2469
|
-
quickResponseId: smithy_client_1.expectString,
|
|
2470
|
-
shortcutKey: smithy_client_1.expectString,
|
|
2471
|
-
status: smithy_client_1.expectString,
|
|
2472
|
-
tags: smithy_client_1._json,
|
|
2473
|
-
});
|
|
2474
|
-
};
|
|
2475
|
-
const de_QuickResponseSearchResultData = (output, context) => {
|
|
2476
|
-
return (0, smithy_client_1.take)(output, {
|
|
2477
|
-
attributesInterpolated: smithy_client_1._json,
|
|
2478
|
-
attributesNotInterpolated: smithy_client_1._json,
|
|
2479
|
-
channels: smithy_client_1._json,
|
|
2480
|
-
contentType: smithy_client_1.expectString,
|
|
2481
|
-
contents: smithy_client_1._json,
|
|
2482
|
-
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2483
|
-
description: smithy_client_1.expectString,
|
|
2484
|
-
groupingConfiguration: smithy_client_1._json,
|
|
2485
|
-
isActive: smithy_client_1.expectBoolean,
|
|
2486
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2487
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2488
|
-
language: smithy_client_1.expectString,
|
|
2489
|
-
lastModifiedBy: smithy_client_1.expectString,
|
|
2490
|
-
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2491
|
-
name: smithy_client_1.expectString,
|
|
2492
|
-
quickResponseArn: smithy_client_1.expectString,
|
|
2493
|
-
quickResponseId: smithy_client_1.expectString,
|
|
2494
|
-
shortcutKey: smithy_client_1.expectString,
|
|
2495
|
-
status: smithy_client_1.expectString,
|
|
2496
|
-
tags: smithy_client_1._json,
|
|
2497
|
-
});
|
|
2498
|
-
};
|
|
2499
|
-
const de_QuickResponseSearchResultsList = (output, context) => {
|
|
2500
|
-
const retVal = (output || [])
|
|
2501
|
-
.filter((e) => e != null)
|
|
2502
|
-
.map((entry) => {
|
|
2503
|
-
return de_QuickResponseSearchResultData(entry, context);
|
|
2504
|
-
});
|
|
2505
|
-
return retVal;
|
|
2506
|
-
};
|
|
2507
|
-
const de_QuickResponseSummary = (output, context) => {
|
|
2508
|
-
return (0, smithy_client_1.take)(output, {
|
|
2509
|
-
channels: smithy_client_1._json,
|
|
2510
|
-
contentType: smithy_client_1.expectString,
|
|
2511
|
-
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2512
|
-
description: smithy_client_1.expectString,
|
|
2513
|
-
isActive: smithy_client_1.expectBoolean,
|
|
2514
|
-
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2515
|
-
knowledgeBaseId: smithy_client_1.expectString,
|
|
2516
|
-
lastModifiedBy: smithy_client_1.expectString,
|
|
2517
|
-
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2518
|
-
name: smithy_client_1.expectString,
|
|
2519
|
-
quickResponseArn: smithy_client_1.expectString,
|
|
2520
|
-
quickResponseId: smithy_client_1.expectString,
|
|
2521
|
-
status: smithy_client_1.expectString,
|
|
2522
|
-
tags: smithy_client_1._json,
|
|
2523
|
-
});
|
|
2524
|
-
};
|
|
2525
|
-
const de_QuickResponseSummaryList = (output, context) => {
|
|
2526
|
-
const retVal = (output || [])
|
|
2527
|
-
.filter((e) => e != null)
|
|
2528
|
-
.map((entry) => {
|
|
2529
|
-
return de_QuickResponseSummary(entry, context);
|
|
2530
|
-
});
|
|
2531
|
-
return retVal;
|
|
2532
|
-
};
|
|
2533
|
-
const de_RecommendationData = (output, context) => {
|
|
2534
|
-
return (0, smithy_client_1.take)(output, {
|
|
2535
|
-
document: smithy_client_1._json,
|
|
2536
|
-
recommendationId: smithy_client_1.expectString,
|
|
2537
|
-
relevanceLevel: smithy_client_1.expectString,
|
|
2538
|
-
relevanceScore: smithy_client_1.limitedParseDouble,
|
|
2539
|
-
type: smithy_client_1.expectString,
|
|
2540
|
-
});
|
|
2541
|
-
};
|
|
2542
|
-
const de_RecommendationList = (output, context) => {
|
|
2543
|
-
const retVal = (output || [])
|
|
2544
|
-
.filter((e) => e != null)
|
|
2545
|
-
.map((entry) => {
|
|
2546
|
-
return de_RecommendationData(entry, context);
|
|
2547
|
-
});
|
|
2548
|
-
return retVal;
|
|
2549
|
-
};
|
|
2550
|
-
const de_ResultData = (output, context) => {
|
|
2551
|
-
return (0, smithy_client_1.take)(output, {
|
|
2552
|
-
document: smithy_client_1._json,
|
|
2553
|
-
relevanceScore: smithy_client_1.limitedParseDouble,
|
|
2554
|
-
resultId: smithy_client_1.expectString,
|
|
2555
|
-
});
|
|
2556
|
-
};
|
|
2557
|
-
const deserializeMetadata = (output) => ({
|
|
2558
|
-
httpStatusCode: output.statusCode,
|
|
2559
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2560
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2561
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2562
|
-
});
|
|
2563
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2564
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
2565
|
-
value !== null &&
|
|
2566
|
-
value !== "" &&
|
|
2567
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2568
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2569
|
-
const _mR = "maxResults";
|
|
2570
|
-
const _nT = "nextToken";
|
|
2571
|
-
const _tK = "tagKeys";
|
|
2572
|
-
const _wTS = "waitTimeSeconds";
|
|
2573
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2574
|
-
if (encoded.length) {
|
|
2575
|
-
return JSON.parse(encoded);
|
|
2576
|
-
}
|
|
2577
|
-
return {};
|
|
2578
|
-
});
|
|
2579
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2580
|
-
const value = await parseBody(errorBody, context);
|
|
2581
|
-
value.message = value.message ?? value.Message;
|
|
2582
|
-
return value;
|
|
2583
|
-
};
|
|
2584
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2585
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2586
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2587
|
-
let cleanValue = rawValue;
|
|
2588
|
-
if (typeof cleanValue === "number") {
|
|
2589
|
-
cleanValue = cleanValue.toString();
|
|
2590
|
-
}
|
|
2591
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2592
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2593
|
-
}
|
|
2594
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2595
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2596
|
-
}
|
|
2597
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2598
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2599
|
-
}
|
|
2600
|
-
return cleanValue;
|
|
2601
|
-
};
|
|
2602
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2603
|
-
if (headerKey !== undefined) {
|
|
2604
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2605
|
-
}
|
|
2606
|
-
if (data.code !== undefined) {
|
|
2607
|
-
return sanitizeErrorCode(data.code);
|
|
2608
|
-
}
|
|
2609
|
-
if (data["__type"] !== undefined) {
|
|
2610
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2611
|
-
}
|
|
2612
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|