@aws-sdk/client-lex-runtime-service 3.306.0 → 3.310.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/commands/DeleteSessionCommand.js +2 -2
- package/dist-cjs/commands/GetSessionCommand.js +2 -2
- package/dist-cjs/commands/PostContentCommand.js +2 -2
- package/dist-cjs/commands/PostTextCommand.js +2 -2
- package/dist-cjs/commands/PutSessionCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +140 -164
- package/dist-es/commands/DeleteSessionCommand.js +3 -3
- package/dist-es/commands/GetSessionCommand.js +3 -3
- package/dist-es/commands/PostContentCommand.js +3 -3
- package/dist-es/commands/PostTextCommand.js +3 -3
- package/dist-es/commands/PutSessionCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +129 -153
- package/dist-types/protocols/Aws_restJson1.d.ts +40 -10
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +10 -10
- package/package.json +37 -37
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_PutSessionCommand = exports.de_PostTextCommand = exports.de_PostContentCommand = exports.de_GetSessionCommand = exports.de_DeleteSessionCommand = exports.se_PutSessionCommand = exports.se_PostTextCommand = exports.se_PostContentCommand = exports.se_GetSessionCommand = exports.se_DeleteSessionCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const LexRuntimeServiceServiceException_1 = require("../models/LexRuntimeServiceServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const
|
|
8
|
+
const se_DeleteSessionCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -24,8 +24,8 @@ const serializeAws_restJson1DeleteSessionCommand = async (input, context) => {
|
|
|
24
24
|
body,
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
exports.
|
|
28
|
-
const
|
|
27
|
+
exports.se_DeleteSessionCommand = se_DeleteSessionCommand;
|
|
28
|
+
const se_GetSessionCommand = async (input, context) => {
|
|
29
29
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
30
30
|
const headers = {};
|
|
31
31
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -48,8 +48,8 @@ const serializeAws_restJson1GetSessionCommand = async (input, context) => {
|
|
|
48
48
|
body,
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
exports.
|
|
52
|
-
const
|
|
51
|
+
exports.se_GetSessionCommand = se_GetSessionCommand;
|
|
52
|
+
const se_PostContentCommand = async (input, context) => {
|
|
53
53
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
54
|
const headers = map({}, isSerializableHeaderValue, {
|
|
55
55
|
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
@@ -87,8 +87,8 @@ const serializeAws_restJson1PostContentCommand = async (input, context) => {
|
|
|
87
87
|
body,
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
exports.
|
|
91
|
-
const
|
|
90
|
+
exports.se_PostContentCommand = se_PostContentCommand;
|
|
91
|
+
const se_PostTextCommand = async (input, context) => {
|
|
92
92
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
93
93
|
const headers = {
|
|
94
94
|
"content-type": "application/json",
|
|
@@ -100,16 +100,10 @@ const serializeAws_restJson1PostTextCommand = async (input, context) => {
|
|
|
100
100
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "userId", () => input.userId, "{userId}", false);
|
|
101
101
|
let body;
|
|
102
102
|
body = JSON.stringify({
|
|
103
|
-
...(input.activeContexts != null && {
|
|
104
|
-
activeContexts: serializeAws_restJson1ActiveContextsList(input.activeContexts, context),
|
|
105
|
-
}),
|
|
103
|
+
...(input.activeContexts != null && { activeContexts: se_ActiveContextsList(input.activeContexts, context) }),
|
|
106
104
|
...(input.inputText != null && { inputText: input.inputText }),
|
|
107
|
-
...(input.requestAttributes != null && {
|
|
108
|
-
|
|
109
|
-
}),
|
|
110
|
-
...(input.sessionAttributes != null && {
|
|
111
|
-
sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
|
|
112
|
-
}),
|
|
105
|
+
...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }),
|
|
106
|
+
...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }),
|
|
113
107
|
});
|
|
114
108
|
return new protocol_http_1.HttpRequest({
|
|
115
109
|
protocol,
|
|
@@ -121,8 +115,8 @@ const serializeAws_restJson1PostTextCommand = async (input, context) => {
|
|
|
121
115
|
body,
|
|
122
116
|
});
|
|
123
117
|
};
|
|
124
|
-
exports.
|
|
125
|
-
const
|
|
118
|
+
exports.se_PostTextCommand = se_PostTextCommand;
|
|
119
|
+
const se_PutSessionCommand = async (input, context) => {
|
|
126
120
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
127
121
|
const headers = map({}, isSerializableHeaderValue, {
|
|
128
122
|
"content-type": "application/json",
|
|
@@ -135,18 +129,12 @@ const serializeAws_restJson1PutSessionCommand = async (input, context) => {
|
|
|
135
129
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "userId", () => input.userId, "{userId}", false);
|
|
136
130
|
let body;
|
|
137
131
|
body = JSON.stringify({
|
|
138
|
-
...(input.activeContexts != null && {
|
|
139
|
-
|
|
140
|
-
}),
|
|
141
|
-
...(input.dialogAction != null && {
|
|
142
|
-
dialogAction: serializeAws_restJson1DialogAction(input.dialogAction, context),
|
|
143
|
-
}),
|
|
132
|
+
...(input.activeContexts != null && { activeContexts: se_ActiveContextsList(input.activeContexts, context) }),
|
|
133
|
+
...(input.dialogAction != null && { dialogAction: se_DialogAction(input.dialogAction, context) }),
|
|
144
134
|
...(input.recentIntentSummaryView != null && {
|
|
145
|
-
recentIntentSummaryView:
|
|
146
|
-
}),
|
|
147
|
-
...(input.sessionAttributes != null && {
|
|
148
|
-
sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
|
|
135
|
+
recentIntentSummaryView: se_IntentSummaryList(input.recentIntentSummaryView, context),
|
|
149
136
|
}),
|
|
137
|
+
...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }),
|
|
150
138
|
});
|
|
151
139
|
return new protocol_http_1.HttpRequest({
|
|
152
140
|
protocol,
|
|
@@ -158,10 +146,10 @@ const serializeAws_restJson1PutSessionCommand = async (input, context) => {
|
|
|
158
146
|
body,
|
|
159
147
|
});
|
|
160
148
|
};
|
|
161
|
-
exports.
|
|
162
|
-
const
|
|
149
|
+
exports.se_PutSessionCommand = se_PutSessionCommand;
|
|
150
|
+
const de_DeleteSessionCommand = async (output, context) => {
|
|
163
151
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
164
|
-
return
|
|
152
|
+
return de_DeleteSessionCommandError(output, context);
|
|
165
153
|
}
|
|
166
154
|
const contents = map({
|
|
167
155
|
$metadata: deserializeMetadata(output),
|
|
@@ -181,8 +169,8 @@ const deserializeAws_restJson1DeleteSessionCommand = async (output, context) =>
|
|
|
181
169
|
}
|
|
182
170
|
return contents;
|
|
183
171
|
};
|
|
184
|
-
exports.
|
|
185
|
-
const
|
|
172
|
+
exports.de_DeleteSessionCommand = de_DeleteSessionCommand;
|
|
173
|
+
const de_DeleteSessionCommandError = async (output, context) => {
|
|
186
174
|
const parsedOutput = {
|
|
187
175
|
...output,
|
|
188
176
|
body: await parseErrorBody(output.body, context),
|
|
@@ -191,19 +179,19 @@ const deserializeAws_restJson1DeleteSessionCommandError = async (output, context
|
|
|
191
179
|
switch (errorCode) {
|
|
192
180
|
case "BadRequestException":
|
|
193
181
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
194
|
-
throw await
|
|
182
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
195
183
|
case "ConflictException":
|
|
196
184
|
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
197
|
-
throw await
|
|
185
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
198
186
|
case "InternalFailureException":
|
|
199
187
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
200
|
-
throw await
|
|
188
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
201
189
|
case "LimitExceededException":
|
|
202
190
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
203
|
-
throw await
|
|
191
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
204
192
|
case "NotFoundException":
|
|
205
193
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
206
|
-
throw await
|
|
194
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
207
195
|
default:
|
|
208
196
|
const parsedBody = parsedOutput.body;
|
|
209
197
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -214,33 +202,33 @@ const deserializeAws_restJson1DeleteSessionCommandError = async (output, context
|
|
|
214
202
|
});
|
|
215
203
|
}
|
|
216
204
|
};
|
|
217
|
-
const
|
|
205
|
+
const de_GetSessionCommand = async (output, context) => {
|
|
218
206
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
219
|
-
return
|
|
207
|
+
return de_GetSessionCommandError(output, context);
|
|
220
208
|
}
|
|
221
209
|
const contents = map({
|
|
222
210
|
$metadata: deserializeMetadata(output),
|
|
223
211
|
});
|
|
224
212
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
225
213
|
if (data.activeContexts != null) {
|
|
226
|
-
contents.activeContexts =
|
|
214
|
+
contents.activeContexts = de_ActiveContextsList(data.activeContexts, context);
|
|
227
215
|
}
|
|
228
216
|
if (data.dialogAction != null) {
|
|
229
|
-
contents.dialogAction =
|
|
217
|
+
contents.dialogAction = de_DialogAction(data.dialogAction, context);
|
|
230
218
|
}
|
|
231
219
|
if (data.recentIntentSummaryView != null) {
|
|
232
|
-
contents.recentIntentSummaryView =
|
|
220
|
+
contents.recentIntentSummaryView = de_IntentSummaryList(data.recentIntentSummaryView, context);
|
|
233
221
|
}
|
|
234
222
|
if (data.sessionAttributes != null) {
|
|
235
|
-
contents.sessionAttributes =
|
|
223
|
+
contents.sessionAttributes = de_StringMap(data.sessionAttributes, context);
|
|
236
224
|
}
|
|
237
225
|
if (data.sessionId != null) {
|
|
238
226
|
contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
|
|
239
227
|
}
|
|
240
228
|
return contents;
|
|
241
229
|
};
|
|
242
|
-
exports.
|
|
243
|
-
const
|
|
230
|
+
exports.de_GetSessionCommand = de_GetSessionCommand;
|
|
231
|
+
const de_GetSessionCommandError = async (output, context) => {
|
|
244
232
|
const parsedOutput = {
|
|
245
233
|
...output,
|
|
246
234
|
body: await parseErrorBody(output.body, context),
|
|
@@ -249,16 +237,16 @@ const deserializeAws_restJson1GetSessionCommandError = async (output, context) =
|
|
|
249
237
|
switch (errorCode) {
|
|
250
238
|
case "BadRequestException":
|
|
251
239
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
252
|
-
throw await
|
|
240
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
253
241
|
case "InternalFailureException":
|
|
254
242
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
255
|
-
throw await
|
|
243
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
256
244
|
case "LimitExceededException":
|
|
257
245
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
258
|
-
throw await
|
|
246
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
259
247
|
case "NotFoundException":
|
|
260
248
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
261
|
-
throw await
|
|
249
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
262
250
|
default:
|
|
263
251
|
const parsedBody = parsedOutput.body;
|
|
264
252
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -269,9 +257,9 @@ const deserializeAws_restJson1GetSessionCommandError = async (output, context) =
|
|
|
269
257
|
});
|
|
270
258
|
}
|
|
271
259
|
};
|
|
272
|
-
const
|
|
260
|
+
const de_PostContentCommand = async (output, context) => {
|
|
273
261
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
274
|
-
return
|
|
262
|
+
return de_PostContentCommandError(output, context);
|
|
275
263
|
}
|
|
276
264
|
const contents = map({
|
|
277
265
|
$metadata: deserializeMetadata(output),
|
|
@@ -313,8 +301,8 @@ const deserializeAws_restJson1PostContentCommand = async (output, context) => {
|
|
|
313
301
|
contents.audioStream = data;
|
|
314
302
|
return contents;
|
|
315
303
|
};
|
|
316
|
-
exports.
|
|
317
|
-
const
|
|
304
|
+
exports.de_PostContentCommand = de_PostContentCommand;
|
|
305
|
+
const de_PostContentCommandError = async (output, context) => {
|
|
318
306
|
const parsedOutput = {
|
|
319
307
|
...output,
|
|
320
308
|
body: await parseErrorBody(output.body, context),
|
|
@@ -323,37 +311,37 @@ const deserializeAws_restJson1PostContentCommandError = async (output, context)
|
|
|
323
311
|
switch (errorCode) {
|
|
324
312
|
case "BadGatewayException":
|
|
325
313
|
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
326
|
-
throw await
|
|
314
|
+
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
327
315
|
case "BadRequestException":
|
|
328
316
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
329
|
-
throw await
|
|
317
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
330
318
|
case "ConflictException":
|
|
331
319
|
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
332
|
-
throw await
|
|
320
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
333
321
|
case "DependencyFailedException":
|
|
334
322
|
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
335
|
-
throw await
|
|
323
|
+
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
336
324
|
case "InternalFailureException":
|
|
337
325
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
338
|
-
throw await
|
|
326
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
339
327
|
case "LimitExceededException":
|
|
340
328
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
341
|
-
throw await
|
|
329
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
342
330
|
case "LoopDetectedException":
|
|
343
331
|
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
344
|
-
throw await
|
|
332
|
+
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
345
333
|
case "NotAcceptableException":
|
|
346
334
|
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
347
|
-
throw await
|
|
335
|
+
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
348
336
|
case "NotFoundException":
|
|
349
337
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
350
|
-
throw await
|
|
338
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
351
339
|
case "RequestTimeoutException":
|
|
352
340
|
case "com.amazonaws.lexruntimeservice#RequestTimeoutException":
|
|
353
|
-
throw await
|
|
341
|
+
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
354
342
|
case "UnsupportedMediaTypeException":
|
|
355
343
|
case "com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":
|
|
356
|
-
throw await
|
|
344
|
+
throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context);
|
|
357
345
|
default:
|
|
358
346
|
const parsedBody = parsedOutput.body;
|
|
359
347
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -364,19 +352,19 @@ const deserializeAws_restJson1PostContentCommandError = async (output, context)
|
|
|
364
352
|
});
|
|
365
353
|
}
|
|
366
354
|
};
|
|
367
|
-
const
|
|
355
|
+
const de_PostTextCommand = async (output, context) => {
|
|
368
356
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
369
|
-
return
|
|
357
|
+
return de_PostTextCommandError(output, context);
|
|
370
358
|
}
|
|
371
359
|
const contents = map({
|
|
372
360
|
$metadata: deserializeMetadata(output),
|
|
373
361
|
});
|
|
374
362
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
375
363
|
if (data.activeContexts != null) {
|
|
376
|
-
contents.activeContexts =
|
|
364
|
+
contents.activeContexts = de_ActiveContextsList(data.activeContexts, context);
|
|
377
365
|
}
|
|
378
366
|
if (data.alternativeIntents != null) {
|
|
379
|
-
contents.alternativeIntents =
|
|
367
|
+
contents.alternativeIntents = de_IntentList(data.alternativeIntents, context);
|
|
380
368
|
}
|
|
381
369
|
if (data.botVersion != null) {
|
|
382
370
|
contents.botVersion = (0, smithy_client_1.expectString)(data.botVersion);
|
|
@@ -394,16 +382,16 @@ const deserializeAws_restJson1PostTextCommand = async (output, context) => {
|
|
|
394
382
|
contents.messageFormat = (0, smithy_client_1.expectString)(data.messageFormat);
|
|
395
383
|
}
|
|
396
384
|
if (data.nluIntentConfidence != null) {
|
|
397
|
-
contents.nluIntentConfidence =
|
|
385
|
+
contents.nluIntentConfidence = de_IntentConfidence(data.nluIntentConfidence, context);
|
|
398
386
|
}
|
|
399
387
|
if (data.responseCard != null) {
|
|
400
|
-
contents.responseCard =
|
|
388
|
+
contents.responseCard = de_ResponseCard(data.responseCard, context);
|
|
401
389
|
}
|
|
402
390
|
if (data.sentimentResponse != null) {
|
|
403
|
-
contents.sentimentResponse =
|
|
391
|
+
contents.sentimentResponse = de_SentimentResponse(data.sentimentResponse, context);
|
|
404
392
|
}
|
|
405
393
|
if (data.sessionAttributes != null) {
|
|
406
|
-
contents.sessionAttributes =
|
|
394
|
+
contents.sessionAttributes = de_StringMap(data.sessionAttributes, context);
|
|
407
395
|
}
|
|
408
396
|
if (data.sessionId != null) {
|
|
409
397
|
contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
|
|
@@ -412,12 +400,12 @@ const deserializeAws_restJson1PostTextCommand = async (output, context) => {
|
|
|
412
400
|
contents.slotToElicit = (0, smithy_client_1.expectString)(data.slotToElicit);
|
|
413
401
|
}
|
|
414
402
|
if (data.slots != null) {
|
|
415
|
-
contents.slots =
|
|
403
|
+
contents.slots = de_StringMap(data.slots, context);
|
|
416
404
|
}
|
|
417
405
|
return contents;
|
|
418
406
|
};
|
|
419
|
-
exports.
|
|
420
|
-
const
|
|
407
|
+
exports.de_PostTextCommand = de_PostTextCommand;
|
|
408
|
+
const de_PostTextCommandError = async (output, context) => {
|
|
421
409
|
const parsedOutput = {
|
|
422
410
|
...output,
|
|
423
411
|
body: await parseErrorBody(output.body, context),
|
|
@@ -426,28 +414,28 @@ const deserializeAws_restJson1PostTextCommandError = async (output, context) =>
|
|
|
426
414
|
switch (errorCode) {
|
|
427
415
|
case "BadGatewayException":
|
|
428
416
|
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
429
|
-
throw await
|
|
417
|
+
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
430
418
|
case "BadRequestException":
|
|
431
419
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
432
|
-
throw await
|
|
420
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
433
421
|
case "ConflictException":
|
|
434
422
|
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
435
|
-
throw await
|
|
423
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
436
424
|
case "DependencyFailedException":
|
|
437
425
|
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
438
|
-
throw await
|
|
426
|
+
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
439
427
|
case "InternalFailureException":
|
|
440
428
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
441
|
-
throw await
|
|
429
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
442
430
|
case "LimitExceededException":
|
|
443
431
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
444
|
-
throw await
|
|
432
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
445
433
|
case "LoopDetectedException":
|
|
446
434
|
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
447
|
-
throw await
|
|
435
|
+
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
448
436
|
case "NotFoundException":
|
|
449
437
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
450
|
-
throw await
|
|
438
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
451
439
|
default:
|
|
452
440
|
const parsedBody = parsedOutput.body;
|
|
453
441
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -458,9 +446,9 @@ const deserializeAws_restJson1PostTextCommandError = async (output, context) =>
|
|
|
458
446
|
});
|
|
459
447
|
}
|
|
460
448
|
};
|
|
461
|
-
const
|
|
449
|
+
const de_PutSessionCommand = async (output, context) => {
|
|
462
450
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
463
|
-
return
|
|
451
|
+
return de_PutSessionCommandError(output, context);
|
|
464
452
|
}
|
|
465
453
|
const contents = map({
|
|
466
454
|
$metadata: deserializeMetadata(output),
|
|
@@ -490,8 +478,8 @@ const deserializeAws_restJson1PutSessionCommand = async (output, context) => {
|
|
|
490
478
|
contents.audioStream = data;
|
|
491
479
|
return contents;
|
|
492
480
|
};
|
|
493
|
-
exports.
|
|
494
|
-
const
|
|
481
|
+
exports.de_PutSessionCommand = de_PutSessionCommand;
|
|
482
|
+
const de_PutSessionCommandError = async (output, context) => {
|
|
495
483
|
const parsedOutput = {
|
|
496
484
|
...output,
|
|
497
485
|
body: await parseErrorBody(output.body, context),
|
|
@@ -500,28 +488,28 @@ const deserializeAws_restJson1PutSessionCommandError = async (output, context) =
|
|
|
500
488
|
switch (errorCode) {
|
|
501
489
|
case "BadGatewayException":
|
|
502
490
|
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
503
|
-
throw await
|
|
491
|
+
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
504
492
|
case "BadRequestException":
|
|
505
493
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
506
|
-
throw await
|
|
494
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
507
495
|
case "ConflictException":
|
|
508
496
|
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
509
|
-
throw await
|
|
497
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
510
498
|
case "DependencyFailedException":
|
|
511
499
|
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
512
|
-
throw await
|
|
500
|
+
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
513
501
|
case "InternalFailureException":
|
|
514
502
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
515
|
-
throw await
|
|
503
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
516
504
|
case "LimitExceededException":
|
|
517
505
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
518
|
-
throw await
|
|
506
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
519
507
|
case "NotAcceptableException":
|
|
520
508
|
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
521
|
-
throw await
|
|
509
|
+
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
522
510
|
case "NotFoundException":
|
|
523
511
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
524
|
-
throw await
|
|
512
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
525
513
|
default:
|
|
526
514
|
const parsedBody = parsedOutput.body;
|
|
527
515
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -533,7 +521,7 @@ const deserializeAws_restJson1PutSessionCommandError = async (output, context) =
|
|
|
533
521
|
}
|
|
534
522
|
};
|
|
535
523
|
const map = smithy_client_1.map;
|
|
536
|
-
const
|
|
524
|
+
const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
|
|
537
525
|
const contents = map({});
|
|
538
526
|
const data = parsedOutput.body;
|
|
539
527
|
if (data.Message != null) {
|
|
@@ -545,7 +533,7 @@ const deserializeAws_restJson1BadGatewayExceptionResponse = async (parsedOutput,
|
|
|
545
533
|
});
|
|
546
534
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
547
535
|
};
|
|
548
|
-
const
|
|
536
|
+
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
549
537
|
const contents = map({});
|
|
550
538
|
const data = parsedOutput.body;
|
|
551
539
|
if (data.message != null) {
|
|
@@ -557,7 +545,7 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
557
545
|
});
|
|
558
546
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
559
547
|
};
|
|
560
|
-
const
|
|
548
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
561
549
|
const contents = map({});
|
|
562
550
|
const data = parsedOutput.body;
|
|
563
551
|
if (data.message != null) {
|
|
@@ -569,7 +557,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
569
557
|
});
|
|
570
558
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
571
559
|
};
|
|
572
|
-
const
|
|
560
|
+
const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
|
|
573
561
|
const contents = map({});
|
|
574
562
|
const data = parsedOutput.body;
|
|
575
563
|
if (data.Message != null) {
|
|
@@ -581,7 +569,7 @@ const deserializeAws_restJson1DependencyFailedExceptionResponse = async (parsedO
|
|
|
581
569
|
});
|
|
582
570
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
583
571
|
};
|
|
584
|
-
const
|
|
572
|
+
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
585
573
|
const contents = map({});
|
|
586
574
|
const data = parsedOutput.body;
|
|
587
575
|
if (data.message != null) {
|
|
@@ -593,7 +581,7 @@ const deserializeAws_restJson1InternalFailureExceptionResponse = async (parsedOu
|
|
|
593
581
|
});
|
|
594
582
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
595
583
|
};
|
|
596
|
-
const
|
|
584
|
+
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
597
585
|
const contents = map({
|
|
598
586
|
retryAfterSeconds: [, parsedOutput.headers["retry-after"]],
|
|
599
587
|
});
|
|
@@ -607,7 +595,7 @@ const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutp
|
|
|
607
595
|
});
|
|
608
596
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
609
597
|
};
|
|
610
|
-
const
|
|
598
|
+
const de_LoopDetectedExceptionRes = async (parsedOutput, context) => {
|
|
611
599
|
const contents = map({});
|
|
612
600
|
const data = parsedOutput.body;
|
|
613
601
|
if (data.Message != null) {
|
|
@@ -619,7 +607,7 @@ const deserializeAws_restJson1LoopDetectedExceptionResponse = async (parsedOutpu
|
|
|
619
607
|
});
|
|
620
608
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
621
609
|
};
|
|
622
|
-
const
|
|
610
|
+
const de_NotAcceptableExceptionRes = async (parsedOutput, context) => {
|
|
623
611
|
const contents = map({});
|
|
624
612
|
const data = parsedOutput.body;
|
|
625
613
|
if (data.message != null) {
|
|
@@ -631,7 +619,7 @@ const deserializeAws_restJson1NotAcceptableExceptionResponse = async (parsedOutp
|
|
|
631
619
|
});
|
|
632
620
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
633
621
|
};
|
|
634
|
-
const
|
|
622
|
+
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
635
623
|
const contents = map({});
|
|
636
624
|
const data = parsedOutput.body;
|
|
637
625
|
if (data.message != null) {
|
|
@@ -643,7 +631,7 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
643
631
|
});
|
|
644
632
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
645
633
|
};
|
|
646
|
-
const
|
|
634
|
+
const de_RequestTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
647
635
|
const contents = map({});
|
|
648
636
|
const data = parsedOutput.body;
|
|
649
637
|
if (data.message != null) {
|
|
@@ -655,7 +643,7 @@ const deserializeAws_restJson1RequestTimeoutExceptionResponse = async (parsedOut
|
|
|
655
643
|
});
|
|
656
644
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
657
645
|
};
|
|
658
|
-
const
|
|
646
|
+
const de_UnsupportedMediaTypeExceptionRes = async (parsedOutput, context) => {
|
|
659
647
|
const contents = map({});
|
|
660
648
|
const data = parsedOutput.body;
|
|
661
649
|
if (data.message != null) {
|
|
@@ -667,18 +655,14 @@ const deserializeAws_restJson1UnsupportedMediaTypeExceptionResponse = async (par
|
|
|
667
655
|
});
|
|
668
656
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
669
657
|
};
|
|
670
|
-
const
|
|
658
|
+
const se_ActiveContext = (input, context) => {
|
|
671
659
|
return {
|
|
672
660
|
...(input.name != null && { name: input.name }),
|
|
673
|
-
...(input.parameters != null && {
|
|
674
|
-
|
|
675
|
-
}),
|
|
676
|
-
...(input.timeToLive != null && {
|
|
677
|
-
timeToLive: serializeAws_restJson1ActiveContextTimeToLive(input.timeToLive, context),
|
|
678
|
-
}),
|
|
661
|
+
...(input.parameters != null && { parameters: se_ActiveContextParametersMap(input.parameters, context) }),
|
|
662
|
+
...(input.timeToLive != null && { timeToLive: se_ActiveContextTimeToLive(input.timeToLive, context) }),
|
|
679
663
|
};
|
|
680
664
|
};
|
|
681
|
-
const
|
|
665
|
+
const se_ActiveContextParametersMap = (input, context) => {
|
|
682
666
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
683
667
|
if (value === null) {
|
|
684
668
|
return acc;
|
|
@@ -687,31 +671,31 @@ const serializeAws_restJson1ActiveContextParametersMap = (input, context) => {
|
|
|
687
671
|
return acc;
|
|
688
672
|
}, {});
|
|
689
673
|
};
|
|
690
|
-
const
|
|
674
|
+
const se_ActiveContextsList = (input, context) => {
|
|
691
675
|
return input
|
|
692
676
|
.filter((e) => e != null)
|
|
693
677
|
.map((entry) => {
|
|
694
|
-
return
|
|
678
|
+
return se_ActiveContext(entry, context);
|
|
695
679
|
});
|
|
696
680
|
};
|
|
697
|
-
const
|
|
681
|
+
const se_ActiveContextTimeToLive = (input, context) => {
|
|
698
682
|
return {
|
|
699
683
|
...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }),
|
|
700
684
|
...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }),
|
|
701
685
|
};
|
|
702
686
|
};
|
|
703
|
-
const
|
|
687
|
+
const se_DialogAction = (input, context) => {
|
|
704
688
|
return {
|
|
705
689
|
...(input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState }),
|
|
706
690
|
...(input.intentName != null && { intentName: input.intentName }),
|
|
707
691
|
...(input.message != null && { message: input.message }),
|
|
708
692
|
...(input.messageFormat != null && { messageFormat: input.messageFormat }),
|
|
709
693
|
...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
|
|
710
|
-
...(input.slots != null && { slots:
|
|
694
|
+
...(input.slots != null && { slots: se_StringMap(input.slots, context) }),
|
|
711
695
|
...(input.type != null && { type: input.type }),
|
|
712
696
|
};
|
|
713
697
|
};
|
|
714
|
-
const
|
|
698
|
+
const se_IntentSummary = (input, context) => {
|
|
715
699
|
return {
|
|
716
700
|
...(input.checkpointLabel != null && { checkpointLabel: input.checkpointLabel }),
|
|
717
701
|
...(input.confirmationStatus != null && { confirmationStatus: input.confirmationStatus }),
|
|
@@ -719,17 +703,17 @@ const serializeAws_restJson1IntentSummary = (input, context) => {
|
|
|
719
703
|
...(input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState }),
|
|
720
704
|
...(input.intentName != null && { intentName: input.intentName }),
|
|
721
705
|
...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
|
|
722
|
-
...(input.slots != null && { slots:
|
|
706
|
+
...(input.slots != null && { slots: se_StringMap(input.slots, context) }),
|
|
723
707
|
};
|
|
724
708
|
};
|
|
725
|
-
const
|
|
709
|
+
const se_IntentSummaryList = (input, context) => {
|
|
726
710
|
return input
|
|
727
711
|
.filter((e) => e != null)
|
|
728
712
|
.map((entry) => {
|
|
729
|
-
return
|
|
713
|
+
return se_IntentSummary(entry, context);
|
|
730
714
|
});
|
|
731
715
|
};
|
|
732
|
-
const
|
|
716
|
+
const se_StringMap = (input, context) => {
|
|
733
717
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
734
718
|
if (value === null) {
|
|
735
719
|
return acc;
|
|
@@ -738,18 +722,14 @@ const serializeAws_restJson1StringMap = (input, context) => {
|
|
|
738
722
|
return acc;
|
|
739
723
|
}, {});
|
|
740
724
|
};
|
|
741
|
-
const
|
|
725
|
+
const de_ActiveContext = (output, context) => {
|
|
742
726
|
return {
|
|
743
727
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
744
|
-
parameters: output.parameters != null
|
|
745
|
-
|
|
746
|
-
: undefined,
|
|
747
|
-
timeToLive: output.timeToLive != null
|
|
748
|
-
? deserializeAws_restJson1ActiveContextTimeToLive(output.timeToLive, context)
|
|
749
|
-
: undefined,
|
|
728
|
+
parameters: output.parameters != null ? de_ActiveContextParametersMap(output.parameters, context) : undefined,
|
|
729
|
+
timeToLive: output.timeToLive != null ? de_ActiveContextTimeToLive(output.timeToLive, context) : undefined,
|
|
750
730
|
};
|
|
751
731
|
};
|
|
752
|
-
const
|
|
732
|
+
const de_ActiveContextParametersMap = (output, context) => {
|
|
753
733
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
754
734
|
if (value === null) {
|
|
755
735
|
return acc;
|
|
@@ -758,77 +738,77 @@ const deserializeAws_restJson1ActiveContextParametersMap = (output, context) =>
|
|
|
758
738
|
return acc;
|
|
759
739
|
}, {});
|
|
760
740
|
};
|
|
761
|
-
const
|
|
741
|
+
const de_ActiveContextsList = (output, context) => {
|
|
762
742
|
const retVal = (output || [])
|
|
763
743
|
.filter((e) => e != null)
|
|
764
744
|
.map((entry) => {
|
|
765
745
|
if (entry === null) {
|
|
766
746
|
return null;
|
|
767
747
|
}
|
|
768
|
-
return
|
|
748
|
+
return de_ActiveContext(entry, context);
|
|
769
749
|
});
|
|
770
750
|
return retVal;
|
|
771
751
|
};
|
|
772
|
-
const
|
|
752
|
+
const de_ActiveContextTimeToLive = (output, context) => {
|
|
773
753
|
return {
|
|
774
754
|
timeToLiveInSeconds: (0, smithy_client_1.expectInt32)(output.timeToLiveInSeconds),
|
|
775
755
|
turnsToLive: (0, smithy_client_1.expectInt32)(output.turnsToLive),
|
|
776
756
|
};
|
|
777
757
|
};
|
|
778
|
-
const
|
|
758
|
+
const de_Button = (output, context) => {
|
|
779
759
|
return {
|
|
780
760
|
text: (0, smithy_client_1.expectString)(output.text),
|
|
781
761
|
value: (0, smithy_client_1.expectString)(output.value),
|
|
782
762
|
};
|
|
783
763
|
};
|
|
784
|
-
const
|
|
764
|
+
const de_DialogAction = (output, context) => {
|
|
785
765
|
return {
|
|
786
766
|
fulfillmentState: (0, smithy_client_1.expectString)(output.fulfillmentState),
|
|
787
767
|
intentName: (0, smithy_client_1.expectString)(output.intentName),
|
|
788
768
|
message: (0, smithy_client_1.expectString)(output.message),
|
|
789
769
|
messageFormat: (0, smithy_client_1.expectString)(output.messageFormat),
|
|
790
770
|
slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
|
|
791
|
-
slots: output.slots != null ?
|
|
771
|
+
slots: output.slots != null ? de_StringMap(output.slots, context) : undefined,
|
|
792
772
|
type: (0, smithy_client_1.expectString)(output.type),
|
|
793
773
|
};
|
|
794
774
|
};
|
|
795
|
-
const
|
|
775
|
+
const de_GenericAttachment = (output, context) => {
|
|
796
776
|
return {
|
|
797
777
|
attachmentLinkUrl: (0, smithy_client_1.expectString)(output.attachmentLinkUrl),
|
|
798
|
-
buttons: output.buttons != null ?
|
|
778
|
+
buttons: output.buttons != null ? de_listOfButtons(output.buttons, context) : undefined,
|
|
799
779
|
imageUrl: (0, smithy_client_1.expectString)(output.imageUrl),
|
|
800
780
|
subTitle: (0, smithy_client_1.expectString)(output.subTitle),
|
|
801
781
|
title: (0, smithy_client_1.expectString)(output.title),
|
|
802
782
|
};
|
|
803
783
|
};
|
|
804
|
-
const
|
|
784
|
+
const de_genericAttachmentList = (output, context) => {
|
|
805
785
|
const retVal = (output || [])
|
|
806
786
|
.filter((e) => e != null)
|
|
807
787
|
.map((entry) => {
|
|
808
788
|
if (entry === null) {
|
|
809
789
|
return null;
|
|
810
790
|
}
|
|
811
|
-
return
|
|
791
|
+
return de_GenericAttachment(entry, context);
|
|
812
792
|
});
|
|
813
793
|
return retVal;
|
|
814
794
|
};
|
|
815
|
-
const
|
|
795
|
+
const de_IntentConfidence = (output, context) => {
|
|
816
796
|
return {
|
|
817
797
|
score: (0, smithy_client_1.limitedParseDouble)(output.score),
|
|
818
798
|
};
|
|
819
799
|
};
|
|
820
|
-
const
|
|
800
|
+
const de_IntentList = (output, context) => {
|
|
821
801
|
const retVal = (output || [])
|
|
822
802
|
.filter((e) => e != null)
|
|
823
803
|
.map((entry) => {
|
|
824
804
|
if (entry === null) {
|
|
825
805
|
return null;
|
|
826
806
|
}
|
|
827
|
-
return
|
|
807
|
+
return de_PredictedIntent(entry, context);
|
|
828
808
|
});
|
|
829
809
|
return retVal;
|
|
830
810
|
};
|
|
831
|
-
const
|
|
811
|
+
const de_IntentSummary = (output, context) => {
|
|
832
812
|
return {
|
|
833
813
|
checkpointLabel: (0, smithy_client_1.expectString)(output.checkpointLabel),
|
|
834
814
|
confirmationStatus: (0, smithy_client_1.expectString)(output.confirmationStatus),
|
|
@@ -836,56 +816,52 @@ const deserializeAws_restJson1IntentSummary = (output, context) => {
|
|
|
836
816
|
fulfillmentState: (0, smithy_client_1.expectString)(output.fulfillmentState),
|
|
837
817
|
intentName: (0, smithy_client_1.expectString)(output.intentName),
|
|
838
818
|
slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
|
|
839
|
-
slots: output.slots != null ?
|
|
819
|
+
slots: output.slots != null ? de_StringMap(output.slots, context) : undefined,
|
|
840
820
|
};
|
|
841
821
|
};
|
|
842
|
-
const
|
|
822
|
+
const de_IntentSummaryList = (output, context) => {
|
|
843
823
|
const retVal = (output || [])
|
|
844
824
|
.filter((e) => e != null)
|
|
845
825
|
.map((entry) => {
|
|
846
826
|
if (entry === null) {
|
|
847
827
|
return null;
|
|
848
828
|
}
|
|
849
|
-
return
|
|
829
|
+
return de_IntentSummary(entry, context);
|
|
850
830
|
});
|
|
851
831
|
return retVal;
|
|
852
832
|
};
|
|
853
|
-
const
|
|
833
|
+
const de_listOfButtons = (output, context) => {
|
|
854
834
|
const retVal = (output || [])
|
|
855
835
|
.filter((e) => e != null)
|
|
856
836
|
.map((entry) => {
|
|
857
837
|
if (entry === null) {
|
|
858
838
|
return null;
|
|
859
839
|
}
|
|
860
|
-
return
|
|
840
|
+
return de_Button(entry, context);
|
|
861
841
|
});
|
|
862
842
|
return retVal;
|
|
863
843
|
};
|
|
864
|
-
const
|
|
844
|
+
const de_PredictedIntent = (output, context) => {
|
|
865
845
|
return {
|
|
866
846
|
intentName: (0, smithy_client_1.expectString)(output.intentName),
|
|
867
|
-
nluIntentConfidence: output.nluIntentConfidence != null
|
|
868
|
-
|
|
869
|
-
: undefined,
|
|
870
|
-
slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
|
|
847
|
+
nluIntentConfidence: output.nluIntentConfidence != null ? de_IntentConfidence(output.nluIntentConfidence, context) : undefined,
|
|
848
|
+
slots: output.slots != null ? de_StringMap(output.slots, context) : undefined,
|
|
871
849
|
};
|
|
872
850
|
};
|
|
873
|
-
const
|
|
851
|
+
const de_ResponseCard = (output, context) => {
|
|
874
852
|
return {
|
|
875
853
|
contentType: (0, smithy_client_1.expectString)(output.contentType),
|
|
876
|
-
genericAttachments: output.genericAttachments != null
|
|
877
|
-
? deserializeAws_restJson1genericAttachmentList(output.genericAttachments, context)
|
|
878
|
-
: undefined,
|
|
854
|
+
genericAttachments: output.genericAttachments != null ? de_genericAttachmentList(output.genericAttachments, context) : undefined,
|
|
879
855
|
version: (0, smithy_client_1.expectString)(output.version),
|
|
880
856
|
};
|
|
881
857
|
};
|
|
882
|
-
const
|
|
858
|
+
const de_SentimentResponse = (output, context) => {
|
|
883
859
|
return {
|
|
884
860
|
sentimentLabel: (0, smithy_client_1.expectString)(output.sentimentLabel),
|
|
885
861
|
sentimentScore: (0, smithy_client_1.expectString)(output.sentimentScore),
|
|
886
862
|
};
|
|
887
863
|
};
|
|
888
|
-
const
|
|
864
|
+
const de_StringMap = (output, context) => {
|
|
889
865
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
890
866
|
if (value === null) {
|
|
891
867
|
return acc;
|