@aws-sdk/client-lex-runtime-v2 3.303.0 → 3.309.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.
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1StartConversationCommand = exports.deserializeAws_restJson1RecognizeUtteranceCommand = exports.deserializeAws_restJson1RecognizeTextCommand = exports.deserializeAws_restJson1PutSessionCommand = exports.deserializeAws_restJson1GetSessionCommand = exports.deserializeAws_restJson1DeleteSessionCommand = exports.serializeAws_restJson1StartConversationCommand = exports.serializeAws_restJson1RecognizeUtteranceCommand = exports.serializeAws_restJson1RecognizeTextCommand = exports.serializeAws_restJson1PutSessionCommand = exports.serializeAws_restJson1GetSessionCommand = exports.serializeAws_restJson1DeleteSessionCommand = void 0;
3
+ exports.de_StartConversationCommand = exports.de_RecognizeUtteranceCommand = exports.de_RecognizeTextCommand = exports.de_PutSessionCommand = exports.de_GetSessionCommand = exports.de_DeleteSessionCommand = exports.se_StartConversationCommand = exports.se_RecognizeUtteranceCommand = exports.se_RecognizeTextCommand = exports.se_PutSessionCommand = 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 LexRuntimeV2ServiceException_1 = require("../models/LexRuntimeV2ServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
- const serializeAws_restJson1DeleteSessionCommand = async (input, context) => {
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 || ""}` +
@@ -25,8 +25,8 @@ const serializeAws_restJson1DeleteSessionCommand = async (input, context) => {
25
25
  body,
26
26
  });
27
27
  };
28
- exports.serializeAws_restJson1DeleteSessionCommand = serializeAws_restJson1DeleteSessionCommand;
29
- const serializeAws_restJson1GetSessionCommand = async (input, context) => {
28
+ exports.se_DeleteSessionCommand = se_DeleteSessionCommand;
29
+ const se_GetSessionCommand = async (input, context) => {
30
30
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
31
31
  const headers = {};
32
32
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
@@ -46,8 +46,8 @@ const serializeAws_restJson1GetSessionCommand = async (input, context) => {
46
46
  body,
47
47
  });
48
48
  };
49
- exports.serializeAws_restJson1GetSessionCommand = serializeAws_restJson1GetSessionCommand;
50
- const serializeAws_restJson1PutSessionCommand = async (input, context) => {
49
+ exports.se_GetSessionCommand = se_GetSessionCommand;
50
+ const se_PutSessionCommand = async (input, context) => {
51
51
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
52
  const headers = map({}, isSerializableHeaderValue, {
53
53
  "content-type": "application/json",
@@ -61,13 +61,9 @@ const serializeAws_restJson1PutSessionCommand = async (input, context) => {
61
61
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
62
62
  let body;
63
63
  body = JSON.stringify({
64
- ...(input.messages != null && { messages: serializeAws_restJson1Messages(input.messages, context) }),
65
- ...(input.requestAttributes != null && {
66
- requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
67
- }),
68
- ...(input.sessionState != null && {
69
- sessionState: serializeAws_restJson1SessionState(input.sessionState, context),
70
- }),
64
+ ...(input.messages != null && { messages: se_Messages(input.messages, context) }),
65
+ ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }),
66
+ ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }),
71
67
  });
72
68
  return new protocol_http_1.HttpRequest({
73
69
  protocol,
@@ -79,8 +75,8 @@ const serializeAws_restJson1PutSessionCommand = async (input, context) => {
79
75
  body,
80
76
  });
81
77
  };
82
- exports.serializeAws_restJson1PutSessionCommand = serializeAws_restJson1PutSessionCommand;
83
- const serializeAws_restJson1RecognizeTextCommand = async (input, context) => {
78
+ exports.se_PutSessionCommand = se_PutSessionCommand;
79
+ const se_RecognizeTextCommand = async (input, context) => {
84
80
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
81
  const headers = {
86
82
  "content-type": "application/json",
@@ -93,12 +89,8 @@ const serializeAws_restJson1RecognizeTextCommand = async (input, context) => {
93
89
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
94
90
  let body;
95
91
  body = JSON.stringify({
96
- ...(input.requestAttributes != null && {
97
- requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
98
- }),
99
- ...(input.sessionState != null && {
100
- sessionState: serializeAws_restJson1SessionState(input.sessionState, context),
101
- }),
92
+ ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }),
93
+ ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }),
102
94
  ...(input.text != null && { text: input.text }),
103
95
  });
104
96
  return new protocol_http_1.HttpRequest({
@@ -111,8 +103,8 @@ const serializeAws_restJson1RecognizeTextCommand = async (input, context) => {
111
103
  body,
112
104
  });
113
105
  };
114
- exports.serializeAws_restJson1RecognizeTextCommand = serializeAws_restJson1RecognizeTextCommand;
115
- const serializeAws_restJson1RecognizeUtteranceCommand = async (input, context) => {
106
+ exports.se_RecognizeTextCommand = se_RecognizeTextCommand;
107
+ const se_RecognizeUtteranceCommand = async (input, context) => {
116
108
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
117
109
  const headers = map({}, isSerializableHeaderValue, {
118
110
  "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
@@ -141,8 +133,8 @@ const serializeAws_restJson1RecognizeUtteranceCommand = async (input, context) =
141
133
  body,
142
134
  });
143
135
  };
144
- exports.serializeAws_restJson1RecognizeUtteranceCommand = serializeAws_restJson1RecognizeUtteranceCommand;
145
- const serializeAws_restJson1StartConversationCommand = async (input, context) => {
136
+ exports.se_RecognizeUtteranceCommand = se_RecognizeUtteranceCommand;
137
+ const se_StartConversationCommand = async (input, context) => {
146
138
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
139
  const headers = map({}, isSerializableHeaderValue, {
148
140
  "x-amz-lex-conversation-mode": input.conversationMode,
@@ -155,7 +147,7 @@ const serializeAws_restJson1StartConversationCommand = async (input, context) =>
155
147
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
156
148
  let body;
157
149
  if (input.requestEventStream !== undefined) {
158
- body = serializeAws_restJson1StartConversationRequestEventStream(input.requestEventStream, context);
150
+ body = se_StartConversationRequestEventStream(input.requestEventStream, context);
159
151
  }
160
152
  return new protocol_http_1.HttpRequest({
161
153
  protocol,
@@ -167,10 +159,10 @@ const serializeAws_restJson1StartConversationCommand = async (input, context) =>
167
159
  body,
168
160
  });
169
161
  };
170
- exports.serializeAws_restJson1StartConversationCommand = serializeAws_restJson1StartConversationCommand;
171
- const deserializeAws_restJson1DeleteSessionCommand = async (output, context) => {
162
+ exports.se_StartConversationCommand = se_StartConversationCommand;
163
+ const de_DeleteSessionCommand = async (output, context) => {
172
164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
173
- return deserializeAws_restJson1DeleteSessionCommandError(output, context);
165
+ return de_DeleteSessionCommandError(output, context);
174
166
  }
175
167
  const contents = map({
176
168
  $metadata: deserializeMetadata(output),
@@ -190,8 +182,8 @@ const deserializeAws_restJson1DeleteSessionCommand = async (output, context) =>
190
182
  }
191
183
  return contents;
192
184
  };
193
- exports.deserializeAws_restJson1DeleteSessionCommand = deserializeAws_restJson1DeleteSessionCommand;
194
- const deserializeAws_restJson1DeleteSessionCommandError = async (output, context) => {
185
+ exports.de_DeleteSessionCommand = de_DeleteSessionCommand;
186
+ const de_DeleteSessionCommandError = async (output, context) => {
195
187
  const parsedOutput = {
196
188
  ...output,
197
189
  body: await parseErrorBody(output.body, context),
@@ -200,22 +192,22 @@ const deserializeAws_restJson1DeleteSessionCommandError = async (output, context
200
192
  switch (errorCode) {
201
193
  case "AccessDeniedException":
202
194
  case "com.amazonaws.lexruntimev2#AccessDeniedException":
203
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
195
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
204
196
  case "ConflictException":
205
197
  case "com.amazonaws.lexruntimev2#ConflictException":
206
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
198
+ throw await de_ConflictExceptionRes(parsedOutput, context);
207
199
  case "InternalServerException":
208
200
  case "com.amazonaws.lexruntimev2#InternalServerException":
209
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
201
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
210
202
  case "ResourceNotFoundException":
211
203
  case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
212
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
204
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
213
205
  case "ThrottlingException":
214
206
  case "com.amazonaws.lexruntimev2#ThrottlingException":
215
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
207
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
216
208
  case "ValidationException":
217
209
  case "com.amazonaws.lexruntimev2#ValidationException":
218
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
210
+ throw await de_ValidationExceptionRes(parsedOutput, context);
219
211
  default:
220
212
  const parsedBody = parsedOutput.body;
221
213
  (0, smithy_client_1.throwDefaultError)({
@@ -226,30 +218,30 @@ const deserializeAws_restJson1DeleteSessionCommandError = async (output, context
226
218
  });
227
219
  }
228
220
  };
229
- const deserializeAws_restJson1GetSessionCommand = async (output, context) => {
221
+ const de_GetSessionCommand = async (output, context) => {
230
222
  if (output.statusCode !== 200 && output.statusCode >= 300) {
231
- return deserializeAws_restJson1GetSessionCommandError(output, context);
223
+ return de_GetSessionCommandError(output, context);
232
224
  }
233
225
  const contents = map({
234
226
  $metadata: deserializeMetadata(output),
235
227
  });
236
228
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
237
229
  if (data.interpretations != null) {
238
- contents.interpretations = deserializeAws_restJson1Interpretations(data.interpretations, context);
230
+ contents.interpretations = de_Interpretations(data.interpretations, context);
239
231
  }
240
232
  if (data.messages != null) {
241
- contents.messages = deserializeAws_restJson1Messages(data.messages, context);
233
+ contents.messages = de_Messages(data.messages, context);
242
234
  }
243
235
  if (data.sessionId != null) {
244
236
  contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
245
237
  }
246
238
  if (data.sessionState != null) {
247
- contents.sessionState = deserializeAws_restJson1SessionState(data.sessionState, context);
239
+ contents.sessionState = de_SessionState(data.sessionState, context);
248
240
  }
249
241
  return contents;
250
242
  };
251
- exports.deserializeAws_restJson1GetSessionCommand = deserializeAws_restJson1GetSessionCommand;
252
- const deserializeAws_restJson1GetSessionCommandError = async (output, context) => {
243
+ exports.de_GetSessionCommand = de_GetSessionCommand;
244
+ const de_GetSessionCommandError = async (output, context) => {
253
245
  const parsedOutput = {
254
246
  ...output,
255
247
  body: await parseErrorBody(output.body, context),
@@ -258,19 +250,19 @@ const deserializeAws_restJson1GetSessionCommandError = async (output, context) =
258
250
  switch (errorCode) {
259
251
  case "AccessDeniedException":
260
252
  case "com.amazonaws.lexruntimev2#AccessDeniedException":
261
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
253
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
262
254
  case "InternalServerException":
263
255
  case "com.amazonaws.lexruntimev2#InternalServerException":
264
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
256
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
265
257
  case "ResourceNotFoundException":
266
258
  case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
267
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
259
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
268
260
  case "ThrottlingException":
269
261
  case "com.amazonaws.lexruntimev2#ThrottlingException":
270
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
262
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
271
263
  case "ValidationException":
272
264
  case "com.amazonaws.lexruntimev2#ValidationException":
273
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
265
+ throw await de_ValidationExceptionRes(parsedOutput, context);
274
266
  default:
275
267
  const parsedBody = parsedOutput.body;
276
268
  (0, smithy_client_1.throwDefaultError)({
@@ -281,9 +273,9 @@ const deserializeAws_restJson1GetSessionCommandError = async (output, context) =
281
273
  });
282
274
  }
283
275
  };
284
- const deserializeAws_restJson1PutSessionCommand = async (output, context) => {
276
+ const de_PutSessionCommand = async (output, context) => {
285
277
  if (output.statusCode !== 200 && output.statusCode >= 300) {
286
- return deserializeAws_restJson1PutSessionCommandError(output, context);
278
+ return de_PutSessionCommandError(output, context);
287
279
  }
288
280
  const contents = map({
289
281
  $metadata: deserializeMetadata(output),
@@ -298,8 +290,8 @@ const deserializeAws_restJson1PutSessionCommand = async (output, context) => {
298
290
  contents.audioStream = data;
299
291
  return contents;
300
292
  };
301
- exports.deserializeAws_restJson1PutSessionCommand = deserializeAws_restJson1PutSessionCommand;
302
- const deserializeAws_restJson1PutSessionCommandError = async (output, context) => {
293
+ exports.de_PutSessionCommand = de_PutSessionCommand;
294
+ const de_PutSessionCommandError = async (output, context) => {
303
295
  const parsedOutput = {
304
296
  ...output,
305
297
  body: await parseErrorBody(output.body, context),
@@ -308,28 +300,28 @@ const deserializeAws_restJson1PutSessionCommandError = async (output, context) =
308
300
  switch (errorCode) {
309
301
  case "AccessDeniedException":
310
302
  case "com.amazonaws.lexruntimev2#AccessDeniedException":
311
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
303
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
312
304
  case "BadGatewayException":
313
305
  case "com.amazonaws.lexruntimev2#BadGatewayException":
314
- throw await deserializeAws_restJson1BadGatewayExceptionResponse(parsedOutput, context);
306
+ throw await de_BadGatewayExceptionRes(parsedOutput, context);
315
307
  case "ConflictException":
316
308
  case "com.amazonaws.lexruntimev2#ConflictException":
317
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
309
+ throw await de_ConflictExceptionRes(parsedOutput, context);
318
310
  case "DependencyFailedException":
319
311
  case "com.amazonaws.lexruntimev2#DependencyFailedException":
320
- throw await deserializeAws_restJson1DependencyFailedExceptionResponse(parsedOutput, context);
312
+ throw await de_DependencyFailedExceptionRes(parsedOutput, context);
321
313
  case "InternalServerException":
322
314
  case "com.amazonaws.lexruntimev2#InternalServerException":
323
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
315
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
324
316
  case "ResourceNotFoundException":
325
317
  case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
326
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
318
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
327
319
  case "ThrottlingException":
328
320
  case "com.amazonaws.lexruntimev2#ThrottlingException":
329
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
321
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
330
322
  case "ValidationException":
331
323
  case "com.amazonaws.lexruntimev2#ValidationException":
332
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
324
+ throw await de_ValidationExceptionRes(parsedOutput, context);
333
325
  default:
334
326
  const parsedBody = parsedOutput.body;
335
327
  (0, smithy_client_1.throwDefaultError)({
@@ -340,36 +332,36 @@ const deserializeAws_restJson1PutSessionCommandError = async (output, context) =
340
332
  });
341
333
  }
342
334
  };
343
- const deserializeAws_restJson1RecognizeTextCommand = async (output, context) => {
335
+ const de_RecognizeTextCommand = async (output, context) => {
344
336
  if (output.statusCode !== 200 && output.statusCode >= 300) {
345
- return deserializeAws_restJson1RecognizeTextCommandError(output, context);
337
+ return de_RecognizeTextCommandError(output, context);
346
338
  }
347
339
  const contents = map({
348
340
  $metadata: deserializeMetadata(output),
349
341
  });
350
342
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
351
343
  if (data.interpretations != null) {
352
- contents.interpretations = deserializeAws_restJson1Interpretations(data.interpretations, context);
344
+ contents.interpretations = de_Interpretations(data.interpretations, context);
353
345
  }
354
346
  if (data.messages != null) {
355
- contents.messages = deserializeAws_restJson1Messages(data.messages, context);
347
+ contents.messages = de_Messages(data.messages, context);
356
348
  }
357
349
  if (data.recognizedBotMember != null) {
358
- contents.recognizedBotMember = deserializeAws_restJson1RecognizedBotMember(data.recognizedBotMember, context);
350
+ contents.recognizedBotMember = de_RecognizedBotMember(data.recognizedBotMember, context);
359
351
  }
360
352
  if (data.requestAttributes != null) {
361
- contents.requestAttributes = deserializeAws_restJson1StringMap(data.requestAttributes, context);
353
+ contents.requestAttributes = de_StringMap(data.requestAttributes, context);
362
354
  }
363
355
  if (data.sessionId != null) {
364
356
  contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
365
357
  }
366
358
  if (data.sessionState != null) {
367
- contents.sessionState = deserializeAws_restJson1SessionState(data.sessionState, context);
359
+ contents.sessionState = de_SessionState(data.sessionState, context);
368
360
  }
369
361
  return contents;
370
362
  };
371
- exports.deserializeAws_restJson1RecognizeTextCommand = deserializeAws_restJson1RecognizeTextCommand;
372
- const deserializeAws_restJson1RecognizeTextCommandError = async (output, context) => {
363
+ exports.de_RecognizeTextCommand = de_RecognizeTextCommand;
364
+ const de_RecognizeTextCommandError = async (output, context) => {
373
365
  const parsedOutput = {
374
366
  ...output,
375
367
  body: await parseErrorBody(output.body, context),
@@ -378,28 +370,28 @@ const deserializeAws_restJson1RecognizeTextCommandError = async (output, context
378
370
  switch (errorCode) {
379
371
  case "AccessDeniedException":
380
372
  case "com.amazonaws.lexruntimev2#AccessDeniedException":
381
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
373
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
382
374
  case "BadGatewayException":
383
375
  case "com.amazonaws.lexruntimev2#BadGatewayException":
384
- throw await deserializeAws_restJson1BadGatewayExceptionResponse(parsedOutput, context);
376
+ throw await de_BadGatewayExceptionRes(parsedOutput, context);
385
377
  case "ConflictException":
386
378
  case "com.amazonaws.lexruntimev2#ConflictException":
387
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
379
+ throw await de_ConflictExceptionRes(parsedOutput, context);
388
380
  case "DependencyFailedException":
389
381
  case "com.amazonaws.lexruntimev2#DependencyFailedException":
390
- throw await deserializeAws_restJson1DependencyFailedExceptionResponse(parsedOutput, context);
382
+ throw await de_DependencyFailedExceptionRes(parsedOutput, context);
391
383
  case "InternalServerException":
392
384
  case "com.amazonaws.lexruntimev2#InternalServerException":
393
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
385
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
394
386
  case "ResourceNotFoundException":
395
387
  case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
396
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
388
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
397
389
  case "ThrottlingException":
398
390
  case "com.amazonaws.lexruntimev2#ThrottlingException":
399
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
391
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
400
392
  case "ValidationException":
401
393
  case "com.amazonaws.lexruntimev2#ValidationException":
402
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
394
+ throw await de_ValidationExceptionRes(parsedOutput, context);
403
395
  default:
404
396
  const parsedBody = parsedOutput.body;
405
397
  (0, smithy_client_1.throwDefaultError)({
@@ -410,9 +402,9 @@ const deserializeAws_restJson1RecognizeTextCommandError = async (output, context
410
402
  });
411
403
  }
412
404
  };
413
- const deserializeAws_restJson1RecognizeUtteranceCommand = async (output, context) => {
405
+ const de_RecognizeUtteranceCommand = async (output, context) => {
414
406
  if (output.statusCode !== 200 && output.statusCode >= 300) {
415
- return deserializeAws_restJson1RecognizeUtteranceCommandError(output, context);
407
+ return de_RecognizeUtteranceCommandError(output, context);
416
408
  }
417
409
  const contents = map({
418
410
  $metadata: deserializeMetadata(output),
@@ -431,8 +423,8 @@ const deserializeAws_restJson1RecognizeUtteranceCommand = async (output, context
431
423
  contents.audioStream = data;
432
424
  return contents;
433
425
  };
434
- exports.deserializeAws_restJson1RecognizeUtteranceCommand = deserializeAws_restJson1RecognizeUtteranceCommand;
435
- const deserializeAws_restJson1RecognizeUtteranceCommandError = async (output, context) => {
426
+ exports.de_RecognizeUtteranceCommand = de_RecognizeUtteranceCommand;
427
+ const de_RecognizeUtteranceCommandError = async (output, context) => {
436
428
  const parsedOutput = {
437
429
  ...output,
438
430
  body: await parseErrorBody(output.body, context),
@@ -441,28 +433,28 @@ const deserializeAws_restJson1RecognizeUtteranceCommandError = async (output, co
441
433
  switch (errorCode) {
442
434
  case "AccessDeniedException":
443
435
  case "com.amazonaws.lexruntimev2#AccessDeniedException":
444
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
436
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
445
437
  case "BadGatewayException":
446
438
  case "com.amazonaws.lexruntimev2#BadGatewayException":
447
- throw await deserializeAws_restJson1BadGatewayExceptionResponse(parsedOutput, context);
439
+ throw await de_BadGatewayExceptionRes(parsedOutput, context);
448
440
  case "ConflictException":
449
441
  case "com.amazonaws.lexruntimev2#ConflictException":
450
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
442
+ throw await de_ConflictExceptionRes(parsedOutput, context);
451
443
  case "DependencyFailedException":
452
444
  case "com.amazonaws.lexruntimev2#DependencyFailedException":
453
- throw await deserializeAws_restJson1DependencyFailedExceptionResponse(parsedOutput, context);
445
+ throw await de_DependencyFailedExceptionRes(parsedOutput, context);
454
446
  case "InternalServerException":
455
447
  case "com.amazonaws.lexruntimev2#InternalServerException":
456
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
448
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
457
449
  case "ResourceNotFoundException":
458
450
  case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
459
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
451
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
460
452
  case "ThrottlingException":
461
453
  case "com.amazonaws.lexruntimev2#ThrottlingException":
462
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
454
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
463
455
  case "ValidationException":
464
456
  case "com.amazonaws.lexruntimev2#ValidationException":
465
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
457
+ throw await de_ValidationExceptionRes(parsedOutput, context);
466
458
  default:
467
459
  const parsedBody = parsedOutput.body;
468
460
  (0, smithy_client_1.throwDefaultError)({
@@ -473,19 +465,19 @@ const deserializeAws_restJson1RecognizeUtteranceCommandError = async (output, co
473
465
  });
474
466
  }
475
467
  };
476
- const deserializeAws_restJson1StartConversationCommand = async (output, context) => {
468
+ const de_StartConversationCommand = async (output, context) => {
477
469
  if (output.statusCode !== 200 && output.statusCode >= 300) {
478
- return deserializeAws_restJson1StartConversationCommandError(output, context);
470
+ return de_StartConversationCommandError(output, context);
479
471
  }
480
472
  const contents = map({
481
473
  $metadata: deserializeMetadata(output),
482
474
  });
483
475
  const data = output.body;
484
- contents.responseEventStream = deserializeAws_restJson1StartConversationResponseEventStream(data, context);
476
+ contents.responseEventStream = de_StartConversationResponseEventStream(data, context);
485
477
  return contents;
486
478
  };
487
- exports.deserializeAws_restJson1StartConversationCommand = deserializeAws_restJson1StartConversationCommand;
488
- const deserializeAws_restJson1StartConversationCommandError = async (output, context) => {
479
+ exports.de_StartConversationCommand = de_StartConversationCommand;
480
+ const de_StartConversationCommandError = async (output, context) => {
489
481
  const parsedOutput = {
490
482
  ...output,
491
483
  body: await parseErrorBody(output.body, context),
@@ -494,16 +486,16 @@ const deserializeAws_restJson1StartConversationCommandError = async (output, con
494
486
  switch (errorCode) {
495
487
  case "AccessDeniedException":
496
488
  case "com.amazonaws.lexruntimev2#AccessDeniedException":
497
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
489
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
498
490
  case "InternalServerException":
499
491
  case "com.amazonaws.lexruntimev2#InternalServerException":
500
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
492
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
501
493
  case "ThrottlingException":
502
494
  case "com.amazonaws.lexruntimev2#ThrottlingException":
503
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
495
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
504
496
  case "ValidationException":
505
497
  case "com.amazonaws.lexruntimev2#ValidationException":
506
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
498
+ throw await de_ValidationExceptionRes(parsedOutput, context);
507
499
  default:
508
500
  const parsedBody = parsedOutput.body;
509
501
  (0, smithy_client_1.throwDefaultError)({
@@ -515,7 +507,7 @@ const deserializeAws_restJson1StartConversationCommandError = async (output, con
515
507
  }
516
508
  };
517
509
  const map = smithy_client_1.map;
518
- const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
510
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
519
511
  const contents = map({});
520
512
  const data = parsedOutput.body;
521
513
  if (data.message != null) {
@@ -527,7 +519,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
527
519
  });
528
520
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
529
521
  };
530
- const deserializeAws_restJson1BadGatewayExceptionResponse = async (parsedOutput, context) => {
522
+ const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
531
523
  const contents = map({});
532
524
  const data = parsedOutput.body;
533
525
  if (data.message != null) {
@@ -539,7 +531,7 @@ const deserializeAws_restJson1BadGatewayExceptionResponse = async (parsedOutput,
539
531
  });
540
532
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
541
533
  };
542
- const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
534
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
543
535
  const contents = map({});
544
536
  const data = parsedOutput.body;
545
537
  if (data.message != null) {
@@ -551,7 +543,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
551
543
  });
552
544
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
553
545
  };
554
- const deserializeAws_restJson1DependencyFailedExceptionResponse = async (parsedOutput, context) => {
546
+ const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
555
547
  const contents = map({});
556
548
  const data = parsedOutput.body;
557
549
  if (data.message != null) {
@@ -563,7 +555,7 @@ const deserializeAws_restJson1DependencyFailedExceptionResponse = async (parsedO
563
555
  });
564
556
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
565
557
  };
566
- const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
558
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
567
559
  const contents = map({});
568
560
  const data = parsedOutput.body;
569
561
  if (data.message != null) {
@@ -575,7 +567,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
575
567
  });
576
568
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
577
569
  };
578
- const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
570
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
579
571
  const contents = map({});
580
572
  const data = parsedOutput.body;
581
573
  if (data.message != null) {
@@ -587,7 +579,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
587
579
  });
588
580
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
589
581
  };
590
- const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
582
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
591
583
  const contents = map({});
592
584
  const data = parsedOutput.body;
593
585
  if (data.message != null) {
@@ -599,7 +591,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
599
591
  });
600
592
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
601
593
  };
602
- const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
594
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
603
595
  const contents = map({});
604
596
  const data = parsedOutput.body;
605
597
  if (data.message != null) {
@@ -611,263 +603,261 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
611
603
  });
612
604
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
613
605
  };
614
- const serializeAws_restJson1StartConversationRequestEventStream = (input, context) => {
606
+ const se_StartConversationRequestEventStream = (input, context) => {
615
607
  const eventMarshallingVisitor = (event) => models_0_1.StartConversationRequestEventStream.visit(event, {
616
- ConfigurationEvent: (value) => serializeAws_restJson1ConfigurationEvent_event(value, context),
617
- AudioInputEvent: (value) => serializeAws_restJson1AudioInputEvent_event(value, context),
618
- DTMFInputEvent: (value) => serializeAws_restJson1DTMFInputEvent_event(value, context),
619
- TextInputEvent: (value) => serializeAws_restJson1TextInputEvent_event(value, context),
620
- PlaybackCompletionEvent: (value) => serializeAws_restJson1PlaybackCompletionEvent_event(value, context),
621
- DisconnectionEvent: (value) => serializeAws_restJson1DisconnectionEvent_event(value, context),
608
+ ConfigurationEvent: (value) => se_ConfigurationEvent_event(value, context),
609
+ AudioInputEvent: (value) => se_AudioInputEvent_event(value, context),
610
+ DTMFInputEvent: (value) => se_DTMFInputEvent_event(value, context),
611
+ TextInputEvent: (value) => se_TextInputEvent_event(value, context),
612
+ PlaybackCompletionEvent: (value) => se_PlaybackCompletionEvent_event(value, context),
613
+ DisconnectionEvent: (value) => se_DisconnectionEvent_event(value, context),
622
614
  _: (value) => value,
623
615
  });
624
616
  return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
625
617
  };
626
- const serializeAws_restJson1AudioInputEvent_event = (input, context) => {
618
+ const se_AudioInputEvent_event = (input, context) => {
627
619
  const headers = {
628
620
  ":event-type": { type: "string", value: "AudioInputEvent" },
629
621
  ":message-type": { type: "string", value: "event" },
630
622
  ":content-type": { type: "string", value: "application/json" },
631
623
  };
632
624
  let body = new Uint8Array();
633
- body = serializeAws_restJson1AudioInputEvent(input, context);
625
+ body = se_AudioInputEvent(input, context);
634
626
  body = context.utf8Decoder(JSON.stringify(body));
635
627
  return { headers, body };
636
628
  };
637
- const serializeAws_restJson1ConfigurationEvent_event = (input, context) => {
629
+ const se_ConfigurationEvent_event = (input, context) => {
638
630
  const headers = {
639
631
  ":event-type": { type: "string", value: "ConfigurationEvent" },
640
632
  ":message-type": { type: "string", value: "event" },
641
633
  ":content-type": { type: "string", value: "application/json" },
642
634
  };
643
635
  let body = new Uint8Array();
644
- body = serializeAws_restJson1ConfigurationEvent(input, context);
636
+ body = se_ConfigurationEvent(input, context);
645
637
  body = context.utf8Decoder(JSON.stringify(body));
646
638
  return { headers, body };
647
639
  };
648
- const serializeAws_restJson1DisconnectionEvent_event = (input, context) => {
640
+ const se_DisconnectionEvent_event = (input, context) => {
649
641
  const headers = {
650
642
  ":event-type": { type: "string", value: "DisconnectionEvent" },
651
643
  ":message-type": { type: "string", value: "event" },
652
644
  ":content-type": { type: "string", value: "application/json" },
653
645
  };
654
646
  let body = new Uint8Array();
655
- body = serializeAws_restJson1DisconnectionEvent(input, context);
647
+ body = se_DisconnectionEvent(input, context);
656
648
  body = context.utf8Decoder(JSON.stringify(body));
657
649
  return { headers, body };
658
650
  };
659
- const serializeAws_restJson1DTMFInputEvent_event = (input, context) => {
651
+ const se_DTMFInputEvent_event = (input, context) => {
660
652
  const headers = {
661
653
  ":event-type": { type: "string", value: "DTMFInputEvent" },
662
654
  ":message-type": { type: "string", value: "event" },
663
655
  ":content-type": { type: "string", value: "application/json" },
664
656
  };
665
657
  let body = new Uint8Array();
666
- body = serializeAws_restJson1DTMFInputEvent(input, context);
658
+ body = se_DTMFInputEvent(input, context);
667
659
  body = context.utf8Decoder(JSON.stringify(body));
668
660
  return { headers, body };
669
661
  };
670
- const serializeAws_restJson1PlaybackCompletionEvent_event = (input, context) => {
662
+ const se_PlaybackCompletionEvent_event = (input, context) => {
671
663
  const headers = {
672
664
  ":event-type": { type: "string", value: "PlaybackCompletionEvent" },
673
665
  ":message-type": { type: "string", value: "event" },
674
666
  ":content-type": { type: "string", value: "application/json" },
675
667
  };
676
668
  let body = new Uint8Array();
677
- body = serializeAws_restJson1PlaybackCompletionEvent(input, context);
669
+ body = se_PlaybackCompletionEvent(input, context);
678
670
  body = context.utf8Decoder(JSON.stringify(body));
679
671
  return { headers, body };
680
672
  };
681
- const serializeAws_restJson1TextInputEvent_event = (input, context) => {
673
+ const se_TextInputEvent_event = (input, context) => {
682
674
  const headers = {
683
675
  ":event-type": { type: "string", value: "TextInputEvent" },
684
676
  ":message-type": { type: "string", value: "event" },
685
677
  ":content-type": { type: "string", value: "application/json" },
686
678
  };
687
679
  let body = new Uint8Array();
688
- body = serializeAws_restJson1TextInputEvent(input, context);
680
+ body = se_TextInputEvent(input, context);
689
681
  body = context.utf8Decoder(JSON.stringify(body));
690
682
  return { headers, body };
691
683
  };
692
- const deserializeAws_restJson1StartConversationResponseEventStream = (output, context) => {
684
+ const de_StartConversationResponseEventStream = (output, context) => {
693
685
  return context.eventStreamMarshaller.deserialize(output, async (event) => {
694
686
  if (event["PlaybackInterruptionEvent"] != null) {
695
687
  return {
696
- PlaybackInterruptionEvent: await deserializeAws_restJson1PlaybackInterruptionEvent_event(event["PlaybackInterruptionEvent"], context),
688
+ PlaybackInterruptionEvent: await de_PlaybackInterruptionEvent_event(event["PlaybackInterruptionEvent"], context),
697
689
  };
698
690
  }
699
691
  if (event["TranscriptEvent"] != null) {
700
692
  return {
701
- TranscriptEvent: await deserializeAws_restJson1TranscriptEvent_event(event["TranscriptEvent"], context),
693
+ TranscriptEvent: await de_TranscriptEvent_event(event["TranscriptEvent"], context),
702
694
  };
703
695
  }
704
696
  if (event["IntentResultEvent"] != null) {
705
697
  return {
706
- IntentResultEvent: await deserializeAws_restJson1IntentResultEvent_event(event["IntentResultEvent"], context),
698
+ IntentResultEvent: await de_IntentResultEvent_event(event["IntentResultEvent"], context),
707
699
  };
708
700
  }
709
701
  if (event["TextResponseEvent"] != null) {
710
702
  return {
711
- TextResponseEvent: await deserializeAws_restJson1TextResponseEvent_event(event["TextResponseEvent"], context),
703
+ TextResponseEvent: await de_TextResponseEvent_event(event["TextResponseEvent"], context),
712
704
  };
713
705
  }
714
706
  if (event["AudioResponseEvent"] != null) {
715
707
  return {
716
- AudioResponseEvent: await deserializeAws_restJson1AudioResponseEvent_event(event["AudioResponseEvent"], context),
708
+ AudioResponseEvent: await de_AudioResponseEvent_event(event["AudioResponseEvent"], context),
717
709
  };
718
710
  }
719
711
  if (event["HeartbeatEvent"] != null) {
720
712
  return {
721
- HeartbeatEvent: await deserializeAws_restJson1HeartbeatEvent_event(event["HeartbeatEvent"], context),
713
+ HeartbeatEvent: await de_HeartbeatEvent_event(event["HeartbeatEvent"], context),
722
714
  };
723
715
  }
724
716
  if (event["AccessDeniedException"] != null) {
725
717
  return {
726
- AccessDeniedException: await deserializeAws_restJson1AccessDeniedException_event(event["AccessDeniedException"], context),
718
+ AccessDeniedException: await de_AccessDeniedException_event(event["AccessDeniedException"], context),
727
719
  };
728
720
  }
729
721
  if (event["ResourceNotFoundException"] != null) {
730
722
  return {
731
- ResourceNotFoundException: await deserializeAws_restJson1ResourceNotFoundException_event(event["ResourceNotFoundException"], context),
723
+ ResourceNotFoundException: await de_ResourceNotFoundException_event(event["ResourceNotFoundException"], context),
732
724
  };
733
725
  }
734
726
  if (event["ValidationException"] != null) {
735
727
  return {
736
- ValidationException: await deserializeAws_restJson1ValidationException_event(event["ValidationException"], context),
728
+ ValidationException: await de_ValidationException_event(event["ValidationException"], context),
737
729
  };
738
730
  }
739
731
  if (event["ThrottlingException"] != null) {
740
732
  return {
741
- ThrottlingException: await deserializeAws_restJson1ThrottlingException_event(event["ThrottlingException"], context),
733
+ ThrottlingException: await de_ThrottlingException_event(event["ThrottlingException"], context),
742
734
  };
743
735
  }
744
736
  if (event["InternalServerException"] != null) {
745
737
  return {
746
- InternalServerException: await deserializeAws_restJson1InternalServerException_event(event["InternalServerException"], context),
738
+ InternalServerException: await de_InternalServerException_event(event["InternalServerException"], context),
747
739
  };
748
740
  }
749
741
  if (event["ConflictException"] != null) {
750
742
  return {
751
- ConflictException: await deserializeAws_restJson1ConflictException_event(event["ConflictException"], context),
743
+ ConflictException: await de_ConflictException_event(event["ConflictException"], context),
752
744
  };
753
745
  }
754
746
  if (event["DependencyFailedException"] != null) {
755
747
  return {
756
- DependencyFailedException: await deserializeAws_restJson1DependencyFailedException_event(event["DependencyFailedException"], context),
748
+ DependencyFailedException: await de_DependencyFailedException_event(event["DependencyFailedException"], context),
757
749
  };
758
750
  }
759
751
  if (event["BadGatewayException"] != null) {
760
752
  return {
761
- BadGatewayException: await deserializeAws_restJson1BadGatewayException_event(event["BadGatewayException"], context),
753
+ BadGatewayException: await de_BadGatewayException_event(event["BadGatewayException"], context),
762
754
  };
763
755
  }
764
756
  return { $unknown: output };
765
757
  });
766
758
  };
767
- const deserializeAws_restJson1AccessDeniedException_event = async (output, context) => {
759
+ const de_AccessDeniedException_event = async (output, context) => {
768
760
  const parsedOutput = {
769
761
  ...output,
770
762
  body: await parseBody(output.body, context),
771
763
  };
772
- return deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
764
+ return de_AccessDeniedExceptionRes(parsedOutput, context);
773
765
  };
774
- const deserializeAws_restJson1AudioResponseEvent_event = async (output, context) => {
766
+ const de_AudioResponseEvent_event = async (output, context) => {
775
767
  const contents = {};
776
768
  const data = await parseBody(output.body, context);
777
- Object.assign(contents, deserializeAws_restJson1AudioResponseEvent(data, context));
769
+ Object.assign(contents, de_AudioResponseEvent(data, context));
778
770
  return contents;
779
771
  };
780
- const deserializeAws_restJson1BadGatewayException_event = async (output, context) => {
772
+ const de_BadGatewayException_event = async (output, context) => {
781
773
  const parsedOutput = {
782
774
  ...output,
783
775
  body: await parseBody(output.body, context),
784
776
  };
785
- return deserializeAws_restJson1BadGatewayExceptionResponse(parsedOutput, context);
777
+ return de_BadGatewayExceptionRes(parsedOutput, context);
786
778
  };
787
- const deserializeAws_restJson1ConflictException_event = async (output, context) => {
779
+ const de_ConflictException_event = async (output, context) => {
788
780
  const parsedOutput = {
789
781
  ...output,
790
782
  body: await parseBody(output.body, context),
791
783
  };
792
- return deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
784
+ return de_ConflictExceptionRes(parsedOutput, context);
793
785
  };
794
- const deserializeAws_restJson1DependencyFailedException_event = async (output, context) => {
786
+ const de_DependencyFailedException_event = async (output, context) => {
795
787
  const parsedOutput = {
796
788
  ...output,
797
789
  body: await parseBody(output.body, context),
798
790
  };
799
- return deserializeAws_restJson1DependencyFailedExceptionResponse(parsedOutput, context);
791
+ return de_DependencyFailedExceptionRes(parsedOutput, context);
800
792
  };
801
- const deserializeAws_restJson1HeartbeatEvent_event = async (output, context) => {
793
+ const de_HeartbeatEvent_event = async (output, context) => {
802
794
  const contents = {};
803
795
  const data = await parseBody(output.body, context);
804
- Object.assign(contents, deserializeAws_restJson1HeartbeatEvent(data, context));
796
+ Object.assign(contents, de_HeartbeatEvent(data, context));
805
797
  return contents;
806
798
  };
807
- const deserializeAws_restJson1IntentResultEvent_event = async (output, context) => {
799
+ const de_IntentResultEvent_event = async (output, context) => {
808
800
  const contents = {};
809
801
  const data = await parseBody(output.body, context);
810
- Object.assign(contents, deserializeAws_restJson1IntentResultEvent(data, context));
802
+ Object.assign(contents, de_IntentResultEvent(data, context));
811
803
  return contents;
812
804
  };
813
- const deserializeAws_restJson1InternalServerException_event = async (output, context) => {
805
+ const de_InternalServerException_event = async (output, context) => {
814
806
  const parsedOutput = {
815
807
  ...output,
816
808
  body: await parseBody(output.body, context),
817
809
  };
818
- return deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
810
+ return de_InternalServerExceptionRes(parsedOutput, context);
819
811
  };
820
- const deserializeAws_restJson1PlaybackInterruptionEvent_event = async (output, context) => {
812
+ const de_PlaybackInterruptionEvent_event = async (output, context) => {
821
813
  const contents = {};
822
814
  const data = await parseBody(output.body, context);
823
- Object.assign(contents, deserializeAws_restJson1PlaybackInterruptionEvent(data, context));
815
+ Object.assign(contents, de_PlaybackInterruptionEvent(data, context));
824
816
  return contents;
825
817
  };
826
- const deserializeAws_restJson1ResourceNotFoundException_event = async (output, context) => {
818
+ const de_ResourceNotFoundException_event = async (output, context) => {
827
819
  const parsedOutput = {
828
820
  ...output,
829
821
  body: await parseBody(output.body, context),
830
822
  };
831
- return deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
823
+ return de_ResourceNotFoundExceptionRes(parsedOutput, context);
832
824
  };
833
- const deserializeAws_restJson1TextResponseEvent_event = async (output, context) => {
825
+ const de_TextResponseEvent_event = async (output, context) => {
834
826
  const contents = {};
835
827
  const data = await parseBody(output.body, context);
836
- Object.assign(contents, deserializeAws_restJson1TextResponseEvent(data, context));
828
+ Object.assign(contents, de_TextResponseEvent(data, context));
837
829
  return contents;
838
830
  };
839
- const deserializeAws_restJson1ThrottlingException_event = async (output, context) => {
831
+ const de_ThrottlingException_event = async (output, context) => {
840
832
  const parsedOutput = {
841
833
  ...output,
842
834
  body: await parseBody(output.body, context),
843
835
  };
844
- return deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
836
+ return de_ThrottlingExceptionRes(parsedOutput, context);
845
837
  };
846
- const deserializeAws_restJson1TranscriptEvent_event = async (output, context) => {
838
+ const de_TranscriptEvent_event = async (output, context) => {
847
839
  const contents = {};
848
840
  const data = await parseBody(output.body, context);
849
- Object.assign(contents, deserializeAws_restJson1TranscriptEvent(data, context));
841
+ Object.assign(contents, de_TranscriptEvent(data, context));
850
842
  return contents;
851
843
  };
852
- const deserializeAws_restJson1ValidationException_event = async (output, context) => {
844
+ const de_ValidationException_event = async (output, context) => {
853
845
  const parsedOutput = {
854
846
  ...output,
855
847
  body: await parseBody(output.body, context),
856
848
  };
857
- return deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
849
+ return de_ValidationExceptionRes(parsedOutput, context);
858
850
  };
859
- const serializeAws_restJson1ActiveContext = (input, context) => {
851
+ const se_ActiveContext = (input, context) => {
860
852
  return {
861
853
  ...(input.contextAttributes != null && {
862
- contextAttributes: serializeAws_restJson1ActiveContextParametersMap(input.contextAttributes, context),
854
+ contextAttributes: se_ActiveContextParametersMap(input.contextAttributes, context),
863
855
  }),
864
856
  ...(input.name != null && { name: input.name }),
865
- ...(input.timeToLive != null && {
866
- timeToLive: serializeAws_restJson1ActiveContextTimeToLive(input.timeToLive, context),
867
- }),
857
+ ...(input.timeToLive != null && { timeToLive: se_ActiveContextTimeToLive(input.timeToLive, context) }),
868
858
  };
869
859
  };
870
- const serializeAws_restJson1ActiveContextParametersMap = (input, context) => {
860
+ const se_ActiveContextParametersMap = (input, context) => {
871
861
  return Object.entries(input).reduce((acc, [key, value]) => {
872
862
  if (value === null) {
873
863
  return acc;
@@ -876,20 +866,20 @@ const serializeAws_restJson1ActiveContextParametersMap = (input, context) => {
876
866
  return acc;
877
867
  }, {});
878
868
  };
879
- const serializeAws_restJson1ActiveContextsList = (input, context) => {
869
+ const se_ActiveContextsList = (input, context) => {
880
870
  return input
881
871
  .filter((e) => e != null)
882
872
  .map((entry) => {
883
- return serializeAws_restJson1ActiveContext(entry, context);
873
+ return se_ActiveContext(entry, context);
884
874
  });
885
875
  };
886
- const serializeAws_restJson1ActiveContextTimeToLive = (input, context) => {
876
+ const se_ActiveContextTimeToLive = (input, context) => {
887
877
  return {
888
878
  ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }),
889
879
  ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }),
890
880
  };
891
881
  };
892
- const serializeAws_restJson1AudioInputEvent = (input, context) => {
882
+ const se_AudioInputEvent = (input, context) => {
893
883
  return {
894
884
  ...(input.audioChunk != null && { audioChunk: context.base64Encoder(input.audioChunk) }),
895
885
  ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
@@ -897,193 +887,173 @@ const serializeAws_restJson1AudioInputEvent = (input, context) => {
897
887
  ...(input.eventId != null && { eventId: input.eventId }),
898
888
  };
899
889
  };
900
- const serializeAws_restJson1Button = (input, context) => {
890
+ const se_Button = (input, context) => {
901
891
  return {
902
892
  ...(input.text != null && { text: input.text }),
903
893
  ...(input.value != null && { value: input.value }),
904
894
  };
905
895
  };
906
- const serializeAws_restJson1ButtonsList = (input, context) => {
896
+ const se_ButtonsList = (input, context) => {
907
897
  return input
908
898
  .filter((e) => e != null)
909
899
  .map((entry) => {
910
- return serializeAws_restJson1Button(entry, context);
900
+ return se_Button(entry, context);
911
901
  });
912
902
  };
913
- const serializeAws_restJson1ConfigurationEvent = (input, context) => {
903
+ const se_ConfigurationEvent = (input, context) => {
914
904
  return {
915
905
  ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
916
906
  ...(input.disablePlayback != null && { disablePlayback: input.disablePlayback }),
917
907
  ...(input.eventId != null && { eventId: input.eventId }),
918
- ...(input.requestAttributes != null && {
919
- requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
920
- }),
908
+ ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }),
921
909
  ...(input.responseContentType != null && { responseContentType: input.responseContentType }),
922
- ...(input.sessionState != null && {
923
- sessionState: serializeAws_restJson1SessionState(input.sessionState, context),
924
- }),
925
- ...(input.welcomeMessages != null && {
926
- welcomeMessages: serializeAws_restJson1Messages(input.welcomeMessages, context),
927
- }),
910
+ ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }),
911
+ ...(input.welcomeMessages != null && { welcomeMessages: se_Messages(input.welcomeMessages, context) }),
928
912
  };
929
913
  };
930
- const serializeAws_restJson1DialogAction = (input, context) => {
914
+ const se_DialogAction = (input, context) => {
931
915
  return {
932
916
  ...(input.slotElicitationStyle != null && { slotElicitationStyle: input.slotElicitationStyle }),
933
917
  ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
934
- ...(input.subSlotToElicit != null && {
935
- subSlotToElicit: serializeAws_restJson1ElicitSubSlot(input.subSlotToElicit, context),
936
- }),
918
+ ...(input.subSlotToElicit != null && { subSlotToElicit: se_ElicitSubSlot(input.subSlotToElicit, context) }),
937
919
  ...(input.type != null && { type: input.type }),
938
920
  };
939
921
  };
940
- const serializeAws_restJson1DisconnectionEvent = (input, context) => {
922
+ const se_DisconnectionEvent = (input, context) => {
941
923
  return {
942
924
  ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
943
925
  ...(input.eventId != null && { eventId: input.eventId }),
944
926
  };
945
927
  };
946
- const serializeAws_restJson1DTMFInputEvent = (input, context) => {
928
+ const se_DTMFInputEvent = (input, context) => {
947
929
  return {
948
930
  ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
949
931
  ...(input.eventId != null && { eventId: input.eventId }),
950
932
  ...(input.inputCharacter != null && { inputCharacter: input.inputCharacter }),
951
933
  };
952
934
  };
953
- const serializeAws_restJson1ElicitSubSlot = (input, context) => {
935
+ const se_ElicitSubSlot = (input, context) => {
954
936
  return {
955
937
  ...(input.name != null && { name: input.name }),
956
- ...(input.subSlotToElicit != null && {
957
- subSlotToElicit: serializeAws_restJson1ElicitSubSlot(input.subSlotToElicit, context),
958
- }),
938
+ ...(input.subSlotToElicit != null && { subSlotToElicit: se_ElicitSubSlot(input.subSlotToElicit, context) }),
959
939
  };
960
940
  };
961
- const serializeAws_restJson1ImageResponseCard = (input, context) => {
941
+ const se_ImageResponseCard = (input, context) => {
962
942
  return {
963
- ...(input.buttons != null && { buttons: serializeAws_restJson1ButtonsList(input.buttons, context) }),
943
+ ...(input.buttons != null && { buttons: se_ButtonsList(input.buttons, context) }),
964
944
  ...(input.imageUrl != null && { imageUrl: input.imageUrl }),
965
945
  ...(input.subtitle != null && { subtitle: input.subtitle }),
966
946
  ...(input.title != null && { title: input.title }),
967
947
  };
968
948
  };
969
- const serializeAws_restJson1Intent = (input, context) => {
949
+ const se_Intent = (input, context) => {
970
950
  return {
971
951
  ...(input.confirmationState != null && { confirmationState: input.confirmationState }),
972
952
  ...(input.name != null && { name: input.name }),
973
- ...(input.slots != null && { slots: serializeAws_restJson1Slots(input.slots, context) }),
953
+ ...(input.slots != null && { slots: se_Slots(input.slots, context) }),
974
954
  ...(input.state != null && { state: input.state }),
975
955
  };
976
956
  };
977
- const serializeAws_restJson1Message = (input, context) => {
957
+ const se_Message = (input, context) => {
978
958
  return {
979
959
  ...(input.content != null && { content: input.content }),
980
960
  ...(input.contentType != null && { contentType: input.contentType }),
981
961
  ...(input.imageResponseCard != null && {
982
- imageResponseCard: serializeAws_restJson1ImageResponseCard(input.imageResponseCard, context),
962
+ imageResponseCard: se_ImageResponseCard(input.imageResponseCard, context),
983
963
  }),
984
964
  };
985
965
  };
986
- const serializeAws_restJson1Messages = (input, context) => {
966
+ const se_Messages = (input, context) => {
987
967
  return input
988
968
  .filter((e) => e != null)
989
969
  .map((entry) => {
990
- return serializeAws_restJson1Message(entry, context);
970
+ return se_Message(entry, context);
991
971
  });
992
972
  };
993
- const serializeAws_restJson1PlaybackCompletionEvent = (input, context) => {
973
+ const se_PlaybackCompletionEvent = (input, context) => {
994
974
  return {
995
975
  ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
996
976
  ...(input.eventId != null && { eventId: input.eventId }),
997
977
  };
998
978
  };
999
- const serializeAws_restJson1RuntimeHintDetails = (input, context) => {
979
+ const se_RuntimeHintDetails = (input, context) => {
1000
980
  return {
1001
981
  ...(input.runtimeHintValues != null && {
1002
- runtimeHintValues: serializeAws_restJson1RuntimeHintValuesList(input.runtimeHintValues, context),
1003
- }),
1004
- ...(input.subSlotHints != null && {
1005
- subSlotHints: serializeAws_restJson1SlotHintsSlotMap(input.subSlotHints, context),
982
+ runtimeHintValues: se_RuntimeHintValuesList(input.runtimeHintValues, context),
1006
983
  }),
984
+ ...(input.subSlotHints != null && { subSlotHints: se_SlotHintsSlotMap(input.subSlotHints, context) }),
1007
985
  };
1008
986
  };
1009
- const serializeAws_restJson1RuntimeHints = (input, context) => {
987
+ const se_RuntimeHints = (input, context) => {
1010
988
  return {
1011
- ...(input.slotHints != null && { slotHints: serializeAws_restJson1SlotHintsIntentMap(input.slotHints, context) }),
989
+ ...(input.slotHints != null && { slotHints: se_SlotHintsIntentMap(input.slotHints, context) }),
1012
990
  };
1013
991
  };
1014
- const serializeAws_restJson1RuntimeHintValue = (input, context) => {
992
+ const se_RuntimeHintValue = (input, context) => {
1015
993
  return {
1016
994
  ...(input.phrase != null && { phrase: input.phrase }),
1017
995
  };
1018
996
  };
1019
- const serializeAws_restJson1RuntimeHintValuesList = (input, context) => {
997
+ const se_RuntimeHintValuesList = (input, context) => {
1020
998
  return input
1021
999
  .filter((e) => e != null)
1022
1000
  .map((entry) => {
1023
- return serializeAws_restJson1RuntimeHintValue(entry, context);
1001
+ return se_RuntimeHintValue(entry, context);
1024
1002
  });
1025
1003
  };
1026
- const serializeAws_restJson1SessionState = (input, context) => {
1004
+ const se_SessionState = (input, context) => {
1027
1005
  return {
1028
- ...(input.activeContexts != null && {
1029
- activeContexts: serializeAws_restJson1ActiveContextsList(input.activeContexts, context),
1030
- }),
1031
- ...(input.dialogAction != null && {
1032
- dialogAction: serializeAws_restJson1DialogAction(input.dialogAction, context),
1033
- }),
1034
- ...(input.intent != null && { intent: serializeAws_restJson1Intent(input.intent, context) }),
1006
+ ...(input.activeContexts != null && { activeContexts: se_ActiveContextsList(input.activeContexts, context) }),
1007
+ ...(input.dialogAction != null && { dialogAction: se_DialogAction(input.dialogAction, context) }),
1008
+ ...(input.intent != null && { intent: se_Intent(input.intent, context) }),
1035
1009
  ...(input.originatingRequestId != null && { originatingRequestId: input.originatingRequestId }),
1036
- ...(input.runtimeHints != null && {
1037
- runtimeHints: serializeAws_restJson1RuntimeHints(input.runtimeHints, context),
1038
- }),
1039
- ...(input.sessionAttributes != null && {
1040
- sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
1041
- }),
1010
+ ...(input.runtimeHints != null && { runtimeHints: se_RuntimeHints(input.runtimeHints, context) }),
1011
+ ...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }),
1042
1012
  };
1043
1013
  };
1044
- const serializeAws_restJson1Slot = (input, context) => {
1014
+ const se_Slot = (input, context) => {
1045
1015
  return {
1046
1016
  ...(input.shape != null && { shape: input.shape }),
1047
- ...(input.subSlots != null && { subSlots: serializeAws_restJson1Slots(input.subSlots, context) }),
1048
- ...(input.value != null && { value: serializeAws_restJson1Value(input.value, context) }),
1049
- ...(input.values != null && { values: serializeAws_restJson1Values(input.values, context) }),
1017
+ ...(input.subSlots != null && { subSlots: se_Slots(input.subSlots, context) }),
1018
+ ...(input.value != null && { value: se_Value(input.value, context) }),
1019
+ ...(input.values != null && { values: se_Values(input.values, context) }),
1050
1020
  };
1051
1021
  };
1052
- const serializeAws_restJson1SlotHintsIntentMap = (input, context) => {
1022
+ const se_SlotHintsIntentMap = (input, context) => {
1053
1023
  return Object.entries(input).reduce((acc, [key, value]) => {
1054
1024
  if (value === null) {
1055
1025
  return acc;
1056
1026
  }
1057
- acc[key] = serializeAws_restJson1SlotHintsSlotMap(value, context);
1027
+ acc[key] = se_SlotHintsSlotMap(value, context);
1058
1028
  return acc;
1059
1029
  }, {});
1060
1030
  };
1061
- const serializeAws_restJson1SlotHintsSlotMap = (input, context) => {
1031
+ const se_SlotHintsSlotMap = (input, context) => {
1062
1032
  return Object.entries(input).reduce((acc, [key, value]) => {
1063
1033
  if (value === null) {
1064
1034
  return acc;
1065
1035
  }
1066
- acc[key] = serializeAws_restJson1RuntimeHintDetails(value, context);
1036
+ acc[key] = se_RuntimeHintDetails(value, context);
1067
1037
  return acc;
1068
1038
  }, {});
1069
1039
  };
1070
- const serializeAws_restJson1Slots = (input, context) => {
1040
+ const se_Slots = (input, context) => {
1071
1041
  return Object.entries(input).reduce((acc, [key, value]) => {
1072
1042
  if (value === null) {
1073
1043
  return acc;
1074
1044
  }
1075
- acc[key] = serializeAws_restJson1Slot(value, context);
1045
+ acc[key] = se_Slot(value, context);
1076
1046
  return acc;
1077
1047
  }, {});
1078
1048
  };
1079
- const serializeAws_restJson1StringList = (input, context) => {
1049
+ const se_StringList = (input, context) => {
1080
1050
  return input
1081
1051
  .filter((e) => e != null)
1082
1052
  .map((entry) => {
1083
1053
  return entry;
1084
1054
  });
1085
1055
  };
1086
- const serializeAws_restJson1StringMap = (input, context) => {
1056
+ const se_StringMap = (input, context) => {
1087
1057
  return Object.entries(input).reduce((acc, [key, value]) => {
1088
1058
  if (value === null) {
1089
1059
  return acc;
@@ -1092,41 +1062,35 @@ const serializeAws_restJson1StringMap = (input, context) => {
1092
1062
  return acc;
1093
1063
  }, {});
1094
1064
  };
1095
- const serializeAws_restJson1TextInputEvent = (input, context) => {
1065
+ const se_TextInputEvent = (input, context) => {
1096
1066
  return {
1097
1067
  ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
1098
1068
  ...(input.eventId != null && { eventId: input.eventId }),
1099
1069
  ...(input.text != null && { text: input.text }),
1100
1070
  };
1101
1071
  };
1102
- const serializeAws_restJson1Value = (input, context) => {
1072
+ const se_Value = (input, context) => {
1103
1073
  return {
1104
1074
  ...(input.interpretedValue != null && { interpretedValue: input.interpretedValue }),
1105
1075
  ...(input.originalValue != null && { originalValue: input.originalValue }),
1106
- ...(input.resolvedValues != null && {
1107
- resolvedValues: serializeAws_restJson1StringList(input.resolvedValues, context),
1108
- }),
1076
+ ...(input.resolvedValues != null && { resolvedValues: se_StringList(input.resolvedValues, context) }),
1109
1077
  };
1110
1078
  };
1111
- const serializeAws_restJson1Values = (input, context) => {
1079
+ const se_Values = (input, context) => {
1112
1080
  return input
1113
1081
  .filter((e) => e != null)
1114
1082
  .map((entry) => {
1115
- return serializeAws_restJson1Slot(entry, context);
1083
+ return se_Slot(entry, context);
1116
1084
  });
1117
1085
  };
1118
- const deserializeAws_restJson1ActiveContext = (output, context) => {
1086
+ const de_ActiveContext = (output, context) => {
1119
1087
  return {
1120
- contextAttributes: output.contextAttributes != null
1121
- ? deserializeAws_restJson1ActiveContextParametersMap(output.contextAttributes, context)
1122
- : undefined,
1088
+ contextAttributes: output.contextAttributes != null ? de_ActiveContextParametersMap(output.contextAttributes, context) : undefined,
1123
1089
  name: (0, smithy_client_1.expectString)(output.name),
1124
- timeToLive: output.timeToLive != null
1125
- ? deserializeAws_restJson1ActiveContextTimeToLive(output.timeToLive, context)
1126
- : undefined,
1090
+ timeToLive: output.timeToLive != null ? de_ActiveContextTimeToLive(output.timeToLive, context) : undefined,
1127
1091
  };
1128
1092
  };
1129
- const deserializeAws_restJson1ActiveContextParametersMap = (output, context) => {
1093
+ const de_ActiveContextParametersMap = (output, context) => {
1130
1094
  return Object.entries(output).reduce((acc, [key, value]) => {
1131
1095
  if (value === null) {
1132
1096
  return acc;
@@ -1135,199 +1099,181 @@ const deserializeAws_restJson1ActiveContextParametersMap = (output, context) =>
1135
1099
  return acc;
1136
1100
  }, {});
1137
1101
  };
1138
- const deserializeAws_restJson1ActiveContextsList = (output, context) => {
1102
+ const de_ActiveContextsList = (output, context) => {
1139
1103
  const retVal = (output || [])
1140
1104
  .filter((e) => e != null)
1141
1105
  .map((entry) => {
1142
1106
  if (entry === null) {
1143
1107
  return null;
1144
1108
  }
1145
- return deserializeAws_restJson1ActiveContext(entry, context);
1109
+ return de_ActiveContext(entry, context);
1146
1110
  });
1147
1111
  return retVal;
1148
1112
  };
1149
- const deserializeAws_restJson1ActiveContextTimeToLive = (output, context) => {
1113
+ const de_ActiveContextTimeToLive = (output, context) => {
1150
1114
  return {
1151
1115
  timeToLiveInSeconds: (0, smithy_client_1.expectInt32)(output.timeToLiveInSeconds),
1152
1116
  turnsToLive: (0, smithy_client_1.expectInt32)(output.turnsToLive),
1153
1117
  };
1154
1118
  };
1155
- const deserializeAws_restJson1AudioResponseEvent = (output, context) => {
1119
+ const de_AudioResponseEvent = (output, context) => {
1156
1120
  return {
1157
1121
  audioChunk: output.audioChunk != null ? context.base64Decoder(output.audioChunk) : undefined,
1158
1122
  contentType: (0, smithy_client_1.expectString)(output.contentType),
1159
1123
  eventId: (0, smithy_client_1.expectString)(output.eventId),
1160
1124
  };
1161
1125
  };
1162
- const deserializeAws_restJson1Button = (output, context) => {
1126
+ const de_Button = (output, context) => {
1163
1127
  return {
1164
1128
  text: (0, smithy_client_1.expectString)(output.text),
1165
1129
  value: (0, smithy_client_1.expectString)(output.value),
1166
1130
  };
1167
1131
  };
1168
- const deserializeAws_restJson1ButtonsList = (output, context) => {
1132
+ const de_ButtonsList = (output, context) => {
1169
1133
  const retVal = (output || [])
1170
1134
  .filter((e) => e != null)
1171
1135
  .map((entry) => {
1172
1136
  if (entry === null) {
1173
1137
  return null;
1174
1138
  }
1175
- return deserializeAws_restJson1Button(entry, context);
1139
+ return de_Button(entry, context);
1176
1140
  });
1177
1141
  return retVal;
1178
1142
  };
1179
- const deserializeAws_restJson1ConfidenceScore = (output, context) => {
1143
+ const de_ConfidenceScore = (output, context) => {
1180
1144
  return {
1181
1145
  score: (0, smithy_client_1.limitedParseDouble)(output.score),
1182
1146
  };
1183
1147
  };
1184
- const deserializeAws_restJson1DialogAction = (output, context) => {
1148
+ const de_DialogAction = (output, context) => {
1185
1149
  return {
1186
1150
  slotElicitationStyle: (0, smithy_client_1.expectString)(output.slotElicitationStyle),
1187
1151
  slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
1188
- subSlotToElicit: output.subSlotToElicit != null
1189
- ? deserializeAws_restJson1ElicitSubSlot(output.subSlotToElicit, context)
1190
- : undefined,
1152
+ subSlotToElicit: output.subSlotToElicit != null ? de_ElicitSubSlot(output.subSlotToElicit, context) : undefined,
1191
1153
  type: (0, smithy_client_1.expectString)(output.type),
1192
1154
  };
1193
1155
  };
1194
- const deserializeAws_restJson1ElicitSubSlot = (output, context) => {
1156
+ const de_ElicitSubSlot = (output, context) => {
1195
1157
  return {
1196
1158
  name: (0, smithy_client_1.expectString)(output.name),
1197
- subSlotToElicit: output.subSlotToElicit != null
1198
- ? deserializeAws_restJson1ElicitSubSlot(output.subSlotToElicit, context)
1199
- : undefined,
1159
+ subSlotToElicit: output.subSlotToElicit != null ? de_ElicitSubSlot(output.subSlotToElicit, context) : undefined,
1200
1160
  };
1201
1161
  };
1202
- const deserializeAws_restJson1HeartbeatEvent = (output, context) => {
1162
+ const de_HeartbeatEvent = (output, context) => {
1203
1163
  return {
1204
1164
  eventId: (0, smithy_client_1.expectString)(output.eventId),
1205
1165
  };
1206
1166
  };
1207
- const deserializeAws_restJson1ImageResponseCard = (output, context) => {
1167
+ const de_ImageResponseCard = (output, context) => {
1208
1168
  return {
1209
- buttons: output.buttons != null ? deserializeAws_restJson1ButtonsList(output.buttons, context) : undefined,
1169
+ buttons: output.buttons != null ? de_ButtonsList(output.buttons, context) : undefined,
1210
1170
  imageUrl: (0, smithy_client_1.expectString)(output.imageUrl),
1211
1171
  subtitle: (0, smithy_client_1.expectString)(output.subtitle),
1212
1172
  title: (0, smithy_client_1.expectString)(output.title),
1213
1173
  };
1214
1174
  };
1215
- const deserializeAws_restJson1Intent = (output, context) => {
1175
+ const de_Intent = (output, context) => {
1216
1176
  return {
1217
1177
  confirmationState: (0, smithy_client_1.expectString)(output.confirmationState),
1218
1178
  name: (0, smithy_client_1.expectString)(output.name),
1219
- slots: output.slots != null ? deserializeAws_restJson1Slots(output.slots, context) : undefined,
1179
+ slots: output.slots != null ? de_Slots(output.slots, context) : undefined,
1220
1180
  state: (0, smithy_client_1.expectString)(output.state),
1221
1181
  };
1222
1182
  };
1223
- const deserializeAws_restJson1IntentResultEvent = (output, context) => {
1183
+ const de_IntentResultEvent = (output, context) => {
1224
1184
  return {
1225
1185
  eventId: (0, smithy_client_1.expectString)(output.eventId),
1226
1186
  inputMode: (0, smithy_client_1.expectString)(output.inputMode),
1227
- interpretations: output.interpretations != null
1228
- ? deserializeAws_restJson1Interpretations(output.interpretations, context)
1229
- : undefined,
1230
- recognizedBotMember: output.recognizedBotMember != null
1231
- ? deserializeAws_restJson1RecognizedBotMember(output.recognizedBotMember, context)
1232
- : undefined,
1233
- requestAttributes: output.requestAttributes != null
1234
- ? deserializeAws_restJson1StringMap(output.requestAttributes, context)
1235
- : undefined,
1187
+ interpretations: output.interpretations != null ? de_Interpretations(output.interpretations, context) : undefined,
1188
+ recognizedBotMember: output.recognizedBotMember != null ? de_RecognizedBotMember(output.recognizedBotMember, context) : undefined,
1189
+ requestAttributes: output.requestAttributes != null ? de_StringMap(output.requestAttributes, context) : undefined,
1236
1190
  sessionId: (0, smithy_client_1.expectString)(output.sessionId),
1237
- sessionState: output.sessionState != null ? deserializeAws_restJson1SessionState(output.sessionState, context) : undefined,
1191
+ sessionState: output.sessionState != null ? de_SessionState(output.sessionState, context) : undefined,
1238
1192
  };
1239
1193
  };
1240
- const deserializeAws_restJson1Interpretation = (output, context) => {
1194
+ const de_Interpretation = (output, context) => {
1241
1195
  return {
1242
- intent: output.intent != null ? deserializeAws_restJson1Intent(output.intent, context) : undefined,
1243
- nluConfidence: output.nluConfidence != null ? deserializeAws_restJson1ConfidenceScore(output.nluConfidence, context) : undefined,
1244
- sentimentResponse: output.sentimentResponse != null
1245
- ? deserializeAws_restJson1SentimentResponse(output.sentimentResponse, context)
1246
- : undefined,
1196
+ intent: output.intent != null ? de_Intent(output.intent, context) : undefined,
1197
+ nluConfidence: output.nluConfidence != null ? de_ConfidenceScore(output.nluConfidence, context) : undefined,
1198
+ sentimentResponse: output.sentimentResponse != null ? de_SentimentResponse(output.sentimentResponse, context) : undefined,
1247
1199
  };
1248
1200
  };
1249
- const deserializeAws_restJson1Interpretations = (output, context) => {
1201
+ const de_Interpretations = (output, context) => {
1250
1202
  const retVal = (output || [])
1251
1203
  .filter((e) => e != null)
1252
1204
  .map((entry) => {
1253
1205
  if (entry === null) {
1254
1206
  return null;
1255
1207
  }
1256
- return deserializeAws_restJson1Interpretation(entry, context);
1208
+ return de_Interpretation(entry, context);
1257
1209
  });
1258
1210
  return retVal;
1259
1211
  };
1260
- const deserializeAws_restJson1Message = (output, context) => {
1212
+ const de_Message = (output, context) => {
1261
1213
  return {
1262
1214
  content: (0, smithy_client_1.expectString)(output.content),
1263
1215
  contentType: (0, smithy_client_1.expectString)(output.contentType),
1264
- imageResponseCard: output.imageResponseCard != null
1265
- ? deserializeAws_restJson1ImageResponseCard(output.imageResponseCard, context)
1266
- : undefined,
1216
+ imageResponseCard: output.imageResponseCard != null ? de_ImageResponseCard(output.imageResponseCard, context) : undefined,
1267
1217
  };
1268
1218
  };
1269
- const deserializeAws_restJson1Messages = (output, context) => {
1219
+ const de_Messages = (output, context) => {
1270
1220
  const retVal = (output || [])
1271
1221
  .filter((e) => e != null)
1272
1222
  .map((entry) => {
1273
1223
  if (entry === null) {
1274
1224
  return null;
1275
1225
  }
1276
- return deserializeAws_restJson1Message(entry, context);
1226
+ return de_Message(entry, context);
1277
1227
  });
1278
1228
  return retVal;
1279
1229
  };
1280
- const deserializeAws_restJson1PlaybackInterruptionEvent = (output, context) => {
1230
+ const de_PlaybackInterruptionEvent = (output, context) => {
1281
1231
  return {
1282
1232
  causedByEventId: (0, smithy_client_1.expectString)(output.causedByEventId),
1283
1233
  eventId: (0, smithy_client_1.expectString)(output.eventId),
1284
1234
  eventReason: (0, smithy_client_1.expectString)(output.eventReason),
1285
1235
  };
1286
1236
  };
1287
- const deserializeAws_restJson1RecognizedBotMember = (output, context) => {
1237
+ const de_RecognizedBotMember = (output, context) => {
1288
1238
  return {
1289
1239
  botId: (0, smithy_client_1.expectString)(output.botId),
1290
1240
  botName: (0, smithy_client_1.expectString)(output.botName),
1291
1241
  };
1292
1242
  };
1293
- const deserializeAws_restJson1RuntimeHintDetails = (output, context) => {
1243
+ const de_RuntimeHintDetails = (output, context) => {
1294
1244
  return {
1295
- runtimeHintValues: output.runtimeHintValues != null
1296
- ? deserializeAws_restJson1RuntimeHintValuesList(output.runtimeHintValues, context)
1297
- : undefined,
1298
- subSlotHints: output.subSlotHints != null ? deserializeAws_restJson1SlotHintsSlotMap(output.subSlotHints, context) : undefined,
1245
+ runtimeHintValues: output.runtimeHintValues != null ? de_RuntimeHintValuesList(output.runtimeHintValues, context) : undefined,
1246
+ subSlotHints: output.subSlotHints != null ? de_SlotHintsSlotMap(output.subSlotHints, context) : undefined,
1299
1247
  };
1300
1248
  };
1301
- const deserializeAws_restJson1RuntimeHints = (output, context) => {
1249
+ const de_RuntimeHints = (output, context) => {
1302
1250
  return {
1303
- slotHints: output.slotHints != null ? deserializeAws_restJson1SlotHintsIntentMap(output.slotHints, context) : undefined,
1251
+ slotHints: output.slotHints != null ? de_SlotHintsIntentMap(output.slotHints, context) : undefined,
1304
1252
  };
1305
1253
  };
1306
- const deserializeAws_restJson1RuntimeHintValue = (output, context) => {
1254
+ const de_RuntimeHintValue = (output, context) => {
1307
1255
  return {
1308
1256
  phrase: (0, smithy_client_1.expectString)(output.phrase),
1309
1257
  };
1310
1258
  };
1311
- const deserializeAws_restJson1RuntimeHintValuesList = (output, context) => {
1259
+ const de_RuntimeHintValuesList = (output, context) => {
1312
1260
  const retVal = (output || [])
1313
1261
  .filter((e) => e != null)
1314
1262
  .map((entry) => {
1315
1263
  if (entry === null) {
1316
1264
  return null;
1317
1265
  }
1318
- return deserializeAws_restJson1RuntimeHintValue(entry, context);
1266
+ return de_RuntimeHintValue(entry, context);
1319
1267
  });
1320
1268
  return retVal;
1321
1269
  };
1322
- const deserializeAws_restJson1SentimentResponse = (output, context) => {
1270
+ const de_SentimentResponse = (output, context) => {
1323
1271
  return {
1324
1272
  sentiment: (0, smithy_client_1.expectString)(output.sentiment),
1325
- sentimentScore: output.sentimentScore != null
1326
- ? deserializeAws_restJson1SentimentScore(output.sentimentScore, context)
1327
- : undefined,
1273
+ sentimentScore: output.sentimentScore != null ? de_SentimentScore(output.sentimentScore, context) : undefined,
1328
1274
  };
1329
1275
  };
1330
- const deserializeAws_restJson1SentimentScore = (output, context) => {
1276
+ const de_SentimentScore = (output, context) => {
1331
1277
  return {
1332
1278
  mixed: (0, smithy_client_1.limitedParseDouble)(output.mixed),
1333
1279
  negative: (0, smithy_client_1.limitedParseDouble)(output.negative),
@@ -1335,56 +1281,52 @@ const deserializeAws_restJson1SentimentScore = (output, context) => {
1335
1281
  positive: (0, smithy_client_1.limitedParseDouble)(output.positive),
1336
1282
  };
1337
1283
  };
1338
- const deserializeAws_restJson1SessionState = (output, context) => {
1284
+ const de_SessionState = (output, context) => {
1339
1285
  return {
1340
- activeContexts: output.activeContexts != null
1341
- ? deserializeAws_restJson1ActiveContextsList(output.activeContexts, context)
1342
- : undefined,
1343
- dialogAction: output.dialogAction != null ? deserializeAws_restJson1DialogAction(output.dialogAction, context) : undefined,
1344
- intent: output.intent != null ? deserializeAws_restJson1Intent(output.intent, context) : undefined,
1286
+ activeContexts: output.activeContexts != null ? de_ActiveContextsList(output.activeContexts, context) : undefined,
1287
+ dialogAction: output.dialogAction != null ? de_DialogAction(output.dialogAction, context) : undefined,
1288
+ intent: output.intent != null ? de_Intent(output.intent, context) : undefined,
1345
1289
  originatingRequestId: (0, smithy_client_1.expectString)(output.originatingRequestId),
1346
- runtimeHints: output.runtimeHints != null ? deserializeAws_restJson1RuntimeHints(output.runtimeHints, context) : undefined,
1347
- sessionAttributes: output.sessionAttributes != null
1348
- ? deserializeAws_restJson1StringMap(output.sessionAttributes, context)
1349
- : undefined,
1290
+ runtimeHints: output.runtimeHints != null ? de_RuntimeHints(output.runtimeHints, context) : undefined,
1291
+ sessionAttributes: output.sessionAttributes != null ? de_StringMap(output.sessionAttributes, context) : undefined,
1350
1292
  };
1351
1293
  };
1352
- const deserializeAws_restJson1Slot = (output, context) => {
1294
+ const de_Slot = (output, context) => {
1353
1295
  return {
1354
1296
  shape: (0, smithy_client_1.expectString)(output.shape),
1355
- subSlots: output.subSlots != null ? deserializeAws_restJson1Slots(output.subSlots, context) : undefined,
1356
- value: output.value != null ? deserializeAws_restJson1Value(output.value, context) : undefined,
1357
- values: output.values != null ? deserializeAws_restJson1Values(output.values, context) : undefined,
1297
+ subSlots: output.subSlots != null ? de_Slots(output.subSlots, context) : undefined,
1298
+ value: output.value != null ? de_Value(output.value, context) : undefined,
1299
+ values: output.values != null ? de_Values(output.values, context) : undefined,
1358
1300
  };
1359
1301
  };
1360
- const deserializeAws_restJson1SlotHintsIntentMap = (output, context) => {
1302
+ const de_SlotHintsIntentMap = (output, context) => {
1361
1303
  return Object.entries(output).reduce((acc, [key, value]) => {
1362
1304
  if (value === null) {
1363
1305
  return acc;
1364
1306
  }
1365
- acc[key] = deserializeAws_restJson1SlotHintsSlotMap(value, context);
1307
+ acc[key] = de_SlotHintsSlotMap(value, context);
1366
1308
  return acc;
1367
1309
  }, {});
1368
1310
  };
1369
- const deserializeAws_restJson1SlotHintsSlotMap = (output, context) => {
1311
+ const de_SlotHintsSlotMap = (output, context) => {
1370
1312
  return Object.entries(output).reduce((acc, [key, value]) => {
1371
1313
  if (value === null) {
1372
1314
  return acc;
1373
1315
  }
1374
- acc[key] = deserializeAws_restJson1RuntimeHintDetails(value, context);
1316
+ acc[key] = de_RuntimeHintDetails(value, context);
1375
1317
  return acc;
1376
1318
  }, {});
1377
1319
  };
1378
- const deserializeAws_restJson1Slots = (output, context) => {
1320
+ const de_Slots = (output, context) => {
1379
1321
  return Object.entries(output).reduce((acc, [key, value]) => {
1380
1322
  if (value === null) {
1381
1323
  return acc;
1382
1324
  }
1383
- acc[key] = deserializeAws_restJson1Slot(value, context);
1325
+ acc[key] = de_Slot(value, context);
1384
1326
  return acc;
1385
1327
  }, {});
1386
1328
  };
1387
- const deserializeAws_restJson1StringList = (output, context) => {
1329
+ const de_StringList = (output, context) => {
1388
1330
  const retVal = (output || [])
1389
1331
  .filter((e) => e != null)
1390
1332
  .map((entry) => {
@@ -1395,7 +1337,7 @@ const deserializeAws_restJson1StringList = (output, context) => {
1395
1337
  });
1396
1338
  return retVal;
1397
1339
  };
1398
- const deserializeAws_restJson1StringMap = (output, context) => {
1340
+ const de_StringMap = (output, context) => {
1399
1341
  return Object.entries(output).reduce((acc, [key, value]) => {
1400
1342
  if (value === null) {
1401
1343
  return acc;
@@ -1404,33 +1346,33 @@ const deserializeAws_restJson1StringMap = (output, context) => {
1404
1346
  return acc;
1405
1347
  }, {});
1406
1348
  };
1407
- const deserializeAws_restJson1TextResponseEvent = (output, context) => {
1349
+ const de_TextResponseEvent = (output, context) => {
1408
1350
  return {
1409
1351
  eventId: (0, smithy_client_1.expectString)(output.eventId),
1410
- messages: output.messages != null ? deserializeAws_restJson1Messages(output.messages, context) : undefined,
1352
+ messages: output.messages != null ? de_Messages(output.messages, context) : undefined,
1411
1353
  };
1412
1354
  };
1413
- const deserializeAws_restJson1TranscriptEvent = (output, context) => {
1355
+ const de_TranscriptEvent = (output, context) => {
1414
1356
  return {
1415
1357
  eventId: (0, smithy_client_1.expectString)(output.eventId),
1416
1358
  transcript: (0, smithy_client_1.expectString)(output.transcript),
1417
1359
  };
1418
1360
  };
1419
- const deserializeAws_restJson1Value = (output, context) => {
1361
+ const de_Value = (output, context) => {
1420
1362
  return {
1421
1363
  interpretedValue: (0, smithy_client_1.expectString)(output.interpretedValue),
1422
1364
  originalValue: (0, smithy_client_1.expectString)(output.originalValue),
1423
- resolvedValues: output.resolvedValues != null ? deserializeAws_restJson1StringList(output.resolvedValues, context) : undefined,
1365
+ resolvedValues: output.resolvedValues != null ? de_StringList(output.resolvedValues, context) : undefined,
1424
1366
  };
1425
1367
  };
1426
- const deserializeAws_restJson1Values = (output, context) => {
1368
+ const de_Values = (output, context) => {
1427
1369
  const retVal = (output || [])
1428
1370
  .filter((e) => e != null)
1429
1371
  .map((entry) => {
1430
1372
  if (entry === null) {
1431
1373
  return null;
1432
1374
  }
1433
- return deserializeAws_restJson1Slot(entry, context);
1375
+ return de_Slot(entry, context);
1434
1376
  });
1435
1377
  return retVal;
1436
1378
  };