@aws-sdk/client-lex-runtime-v2 3.312.0 → 3.315.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.
@@ -49,7 +49,7 @@ const se_GetSessionCommand = async (input, context) => {
49
49
  exports.se_GetSessionCommand = se_GetSessionCommand;
50
50
  const se_PutSessionCommand = async (input, context) => {
51
51
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
- const headers = map({}, isSerializableHeaderValue, {
52
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
53
53
  "content-type": "application/json",
54
54
  responsecontenttype: input.responseContentType,
55
55
  });
@@ -60,11 +60,11 @@ const se_PutSessionCommand = async (input, context) => {
60
60
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
61
61
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
62
62
  let body;
63
- body = JSON.stringify({
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) }),
67
- });
63
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
64
+ messages: (_) => (0, smithy_client_1._json)(_),
65
+ requestAttributes: (_) => (0, smithy_client_1._json)(_),
66
+ sessionState: (_) => se_SessionState(_, context),
67
+ }));
68
68
  return new protocol_http_1.HttpRequest({
69
69
  protocol,
70
70
  hostname,
@@ -88,11 +88,11 @@ const se_RecognizeTextCommand = async (input, context) => {
88
88
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
89
89
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
90
90
  let body;
91
- body = JSON.stringify({
92
- ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }),
93
- ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }),
94
- ...(input.text != null && { text: input.text }),
95
- });
91
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
92
+ requestAttributes: (_) => (0, smithy_client_1._json)(_),
93
+ sessionState: (_) => se_SessionState(_, context),
94
+ text: [],
95
+ }));
96
96
  return new protocol_http_1.HttpRequest({
97
97
  protocol,
98
98
  hostname,
@@ -106,7 +106,7 @@ const se_RecognizeTextCommand = async (input, context) => {
106
106
  exports.se_RecognizeTextCommand = se_RecognizeTextCommand;
107
107
  const se_RecognizeUtteranceCommand = async (input, context) => {
108
108
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
- const headers = map({}, isSerializableHeaderValue, {
109
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
110
110
  "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
111
111
  "content-type": input.requestContentType || "application/octet-stream",
112
112
  "x-amz-lex-session-state": input.sessionState,
@@ -136,7 +136,7 @@ const se_RecognizeUtteranceCommand = async (input, context) => {
136
136
  exports.se_RecognizeUtteranceCommand = se_RecognizeUtteranceCommand;
137
137
  const se_StartConversationCommand = async (input, context) => {
138
138
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
139
- const headers = map({}, isSerializableHeaderValue, {
139
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
140
140
  "x-amz-lex-conversation-mode": input.conversationMode,
141
141
  });
142
142
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
@@ -164,22 +164,17 @@ const de_DeleteSessionCommand = async (output, context) => {
164
164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
165
165
  return de_DeleteSessionCommandError(output, context);
166
166
  }
167
- const contents = map({
167
+ const contents = (0, smithy_client_1.map)({
168
168
  $metadata: deserializeMetadata(output),
169
169
  });
170
170
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
171
- if (data.botAliasId != null) {
172
- contents.botAliasId = (0, smithy_client_1.expectString)(data.botAliasId);
173
- }
174
- if (data.botId != null) {
175
- contents.botId = (0, smithy_client_1.expectString)(data.botId);
176
- }
177
- if (data.localeId != null) {
178
- contents.localeId = (0, smithy_client_1.expectString)(data.localeId);
179
- }
180
- if (data.sessionId != null) {
181
- contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
182
- }
171
+ const doc = (0, smithy_client_1.take)(data, {
172
+ botAliasId: smithy_client_1.expectString,
173
+ botId: smithy_client_1.expectString,
174
+ localeId: smithy_client_1.expectString,
175
+ sessionId: smithy_client_1.expectString,
176
+ });
177
+ Object.assign(contents, doc);
183
178
  return contents;
184
179
  };
185
180
  exports.de_DeleteSessionCommand = de_DeleteSessionCommand;
@@ -210,10 +205,9 @@ const de_DeleteSessionCommandError = async (output, context) => {
210
205
  throw await de_ValidationExceptionRes(parsedOutput, context);
211
206
  default:
212
207
  const parsedBody = parsedOutput.body;
213
- (0, smithy_client_1.throwDefaultError)({
208
+ return throwDefaultError({
214
209
  output,
215
210
  parsedBody,
216
- exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
217
211
  errorCode,
218
212
  });
219
213
  }
@@ -222,22 +216,17 @@ const de_GetSessionCommand = async (output, context) => {
222
216
  if (output.statusCode !== 200 && output.statusCode >= 300) {
223
217
  return de_GetSessionCommandError(output, context);
224
218
  }
225
- const contents = map({
219
+ const contents = (0, smithy_client_1.map)({
226
220
  $metadata: deserializeMetadata(output),
227
221
  });
228
222
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
229
- if (data.interpretations != null) {
230
- contents.interpretations = de_Interpretations(data.interpretations, context);
231
- }
232
- if (data.messages != null) {
233
- contents.messages = de_Messages(data.messages, context);
234
- }
235
- if (data.sessionId != null) {
236
- contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
237
- }
238
- if (data.sessionState != null) {
239
- contents.sessionState = de_SessionState(data.sessionState, context);
240
- }
223
+ const doc = (0, smithy_client_1.take)(data, {
224
+ interpretations: (_) => de_Interpretations(_, context),
225
+ messages: smithy_client_1._json,
226
+ sessionId: smithy_client_1.expectString,
227
+ sessionState: (_) => de_SessionState(_, context),
228
+ });
229
+ Object.assign(contents, doc);
241
230
  return contents;
242
231
  };
243
232
  exports.de_GetSessionCommand = de_GetSessionCommand;
@@ -265,10 +254,9 @@ const de_GetSessionCommandError = async (output, context) => {
265
254
  throw await de_ValidationExceptionRes(parsedOutput, context);
266
255
  default:
267
256
  const parsedBody = parsedOutput.body;
268
- (0, smithy_client_1.throwDefaultError)({
257
+ return throwDefaultError({
269
258
  output,
270
259
  parsedBody,
271
- exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
272
260
  errorCode,
273
261
  });
274
262
  }
@@ -277,7 +265,7 @@ const de_PutSessionCommand = async (output, context) => {
277
265
  if (output.statusCode !== 200 && output.statusCode >= 300) {
278
266
  return de_PutSessionCommandError(output, context);
279
267
  }
280
- const contents = map({
268
+ const contents = (0, smithy_client_1.map)({
281
269
  $metadata: deserializeMetadata(output),
282
270
  contentType: [, output.headers["content-type"]],
283
271
  messages: [, output.headers["x-amz-lex-messages"]],
@@ -324,10 +312,9 @@ const de_PutSessionCommandError = async (output, context) => {
324
312
  throw await de_ValidationExceptionRes(parsedOutput, context);
325
313
  default:
326
314
  const parsedBody = parsedOutput.body;
327
- (0, smithy_client_1.throwDefaultError)({
315
+ return throwDefaultError({
328
316
  output,
329
317
  parsedBody,
330
- exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
331
318
  errorCode,
332
319
  });
333
320
  }
@@ -336,28 +323,19 @@ const de_RecognizeTextCommand = async (output, context) => {
336
323
  if (output.statusCode !== 200 && output.statusCode >= 300) {
337
324
  return de_RecognizeTextCommandError(output, context);
338
325
  }
339
- const contents = map({
326
+ const contents = (0, smithy_client_1.map)({
340
327
  $metadata: deserializeMetadata(output),
341
328
  });
342
329
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
343
- if (data.interpretations != null) {
344
- contents.interpretations = de_Interpretations(data.interpretations, context);
345
- }
346
- if (data.messages != null) {
347
- contents.messages = de_Messages(data.messages, context);
348
- }
349
- if (data.recognizedBotMember != null) {
350
- contents.recognizedBotMember = de_RecognizedBotMember(data.recognizedBotMember, context);
351
- }
352
- if (data.requestAttributes != null) {
353
- contents.requestAttributes = de_StringMap(data.requestAttributes, context);
354
- }
355
- if (data.sessionId != null) {
356
- contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
357
- }
358
- if (data.sessionState != null) {
359
- contents.sessionState = de_SessionState(data.sessionState, context);
360
- }
330
+ const doc = (0, smithy_client_1.take)(data, {
331
+ interpretations: (_) => de_Interpretations(_, context),
332
+ messages: smithy_client_1._json,
333
+ recognizedBotMember: smithy_client_1._json,
334
+ requestAttributes: smithy_client_1._json,
335
+ sessionId: smithy_client_1.expectString,
336
+ sessionState: (_) => de_SessionState(_, context),
337
+ });
338
+ Object.assign(contents, doc);
361
339
  return contents;
362
340
  };
363
341
  exports.de_RecognizeTextCommand = de_RecognizeTextCommand;
@@ -394,10 +372,9 @@ const de_RecognizeTextCommandError = async (output, context) => {
394
372
  throw await de_ValidationExceptionRes(parsedOutput, context);
395
373
  default:
396
374
  const parsedBody = parsedOutput.body;
397
- (0, smithy_client_1.throwDefaultError)({
375
+ return throwDefaultError({
398
376
  output,
399
377
  parsedBody,
400
- exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
401
378
  errorCode,
402
379
  });
403
380
  }
@@ -406,7 +383,7 @@ const de_RecognizeUtteranceCommand = async (output, context) => {
406
383
  if (output.statusCode !== 200 && output.statusCode >= 300) {
407
384
  return de_RecognizeUtteranceCommandError(output, context);
408
385
  }
409
- const contents = map({
386
+ const contents = (0, smithy_client_1.map)({
410
387
  $metadata: deserializeMetadata(output),
411
388
  inputMode: [, output.headers["x-amz-lex-input-mode"]],
412
389
  contentType: [, output.headers["content-type"]],
@@ -457,10 +434,9 @@ const de_RecognizeUtteranceCommandError = async (output, context) => {
457
434
  throw await de_ValidationExceptionRes(parsedOutput, context);
458
435
  default:
459
436
  const parsedBody = parsedOutput.body;
460
- (0, smithy_client_1.throwDefaultError)({
437
+ return throwDefaultError({
461
438
  output,
462
439
  parsedBody,
463
- exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
464
440
  errorCode,
465
441
  });
466
442
  }
@@ -469,7 +445,7 @@ const de_StartConversationCommand = async (output, context) => {
469
445
  if (output.statusCode !== 200 && output.statusCode >= 300) {
470
446
  return de_StartConversationCommandError(output, context);
471
447
  }
472
- const contents = map({
448
+ const contents = (0, smithy_client_1.map)({
473
449
  $metadata: deserializeMetadata(output),
474
450
  });
475
451
  const data = output.body;
@@ -498,21 +474,21 @@ const de_StartConversationCommandError = async (output, context) => {
498
474
  throw await de_ValidationExceptionRes(parsedOutput, context);
499
475
  default:
500
476
  const parsedBody = parsedOutput.body;
501
- (0, smithy_client_1.throwDefaultError)({
477
+ return throwDefaultError({
502
478
  output,
503
479
  parsedBody,
504
- exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
505
480
  errorCode,
506
481
  });
507
482
  }
508
483
  };
509
- const map = smithy_client_1.map;
484
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException);
510
485
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
511
- const contents = map({});
486
+ const contents = (0, smithy_client_1.map)({});
512
487
  const data = parsedOutput.body;
513
- if (data.message != null) {
514
- contents.message = (0, smithy_client_1.expectString)(data.message);
515
- }
488
+ const doc = (0, smithy_client_1.take)(data, {
489
+ message: smithy_client_1.expectString,
490
+ });
491
+ Object.assign(contents, doc);
516
492
  const exception = new models_0_1.AccessDeniedException({
517
493
  $metadata: deserializeMetadata(parsedOutput),
518
494
  ...contents,
@@ -520,11 +496,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
520
496
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
521
497
  };
522
498
  const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
523
- const contents = map({});
499
+ const contents = (0, smithy_client_1.map)({});
524
500
  const data = parsedOutput.body;
525
- if (data.message != null) {
526
- contents.message = (0, smithy_client_1.expectString)(data.message);
527
- }
501
+ const doc = (0, smithy_client_1.take)(data, {
502
+ message: smithy_client_1.expectString,
503
+ });
504
+ Object.assign(contents, doc);
528
505
  const exception = new models_0_1.BadGatewayException({
529
506
  $metadata: deserializeMetadata(parsedOutput),
530
507
  ...contents,
@@ -532,11 +509,12 @@ const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
532
509
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
533
510
  };
534
511
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
535
- const contents = map({});
512
+ const contents = (0, smithy_client_1.map)({});
536
513
  const data = parsedOutput.body;
537
- if (data.message != null) {
538
- contents.message = (0, smithy_client_1.expectString)(data.message);
539
- }
514
+ const doc = (0, smithy_client_1.take)(data, {
515
+ message: smithy_client_1.expectString,
516
+ });
517
+ Object.assign(contents, doc);
540
518
  const exception = new models_0_1.ConflictException({
541
519
  $metadata: deserializeMetadata(parsedOutput),
542
520
  ...contents,
@@ -544,11 +522,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
544
522
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
545
523
  };
546
524
  const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
547
- const contents = map({});
525
+ const contents = (0, smithy_client_1.map)({});
548
526
  const data = parsedOutput.body;
549
- if (data.message != null) {
550
- contents.message = (0, smithy_client_1.expectString)(data.message);
551
- }
527
+ const doc = (0, smithy_client_1.take)(data, {
528
+ message: smithy_client_1.expectString,
529
+ });
530
+ Object.assign(contents, doc);
552
531
  const exception = new models_0_1.DependencyFailedException({
553
532
  $metadata: deserializeMetadata(parsedOutput),
554
533
  ...contents,
@@ -556,11 +535,12 @@ const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
556
535
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
557
536
  };
558
537
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
559
- const contents = map({});
538
+ const contents = (0, smithy_client_1.map)({});
560
539
  const data = parsedOutput.body;
561
- if (data.message != null) {
562
- contents.message = (0, smithy_client_1.expectString)(data.message);
563
- }
540
+ const doc = (0, smithy_client_1.take)(data, {
541
+ message: smithy_client_1.expectString,
542
+ });
543
+ Object.assign(contents, doc);
564
544
  const exception = new models_0_1.InternalServerException({
565
545
  $metadata: deserializeMetadata(parsedOutput),
566
546
  ...contents,
@@ -568,11 +548,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
568
548
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
569
549
  };
570
550
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
571
- const contents = map({});
551
+ const contents = (0, smithy_client_1.map)({});
572
552
  const data = parsedOutput.body;
573
- if (data.message != null) {
574
- contents.message = (0, smithy_client_1.expectString)(data.message);
575
- }
553
+ const doc = (0, smithy_client_1.take)(data, {
554
+ message: smithy_client_1.expectString,
555
+ });
556
+ Object.assign(contents, doc);
576
557
  const exception = new models_0_1.ResourceNotFoundException({
577
558
  $metadata: deserializeMetadata(parsedOutput),
578
559
  ...contents,
@@ -580,11 +561,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
580
561
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
581
562
  };
582
563
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
583
- const contents = map({});
564
+ const contents = (0, smithy_client_1.map)({});
584
565
  const data = parsedOutput.body;
585
- if (data.message != null) {
586
- contents.message = (0, smithy_client_1.expectString)(data.message);
587
- }
566
+ const doc = (0, smithy_client_1.take)(data, {
567
+ message: smithy_client_1.expectString,
568
+ });
569
+ Object.assign(contents, doc);
588
570
  const exception = new models_0_1.ThrottlingException({
589
571
  $metadata: deserializeMetadata(parsedOutput),
590
572
  ...contents,
@@ -592,11 +574,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
592
574
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
593
575
  };
594
576
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
595
- const contents = map({});
577
+ const contents = (0, smithy_client_1.map)({});
596
578
  const data = parsedOutput.body;
597
- if (data.message != null) {
598
- contents.message = (0, smithy_client_1.expectString)(data.message);
599
- }
579
+ const doc = (0, smithy_client_1.take)(data, {
580
+ message: smithy_client_1.expectString,
581
+ });
582
+ Object.assign(contents, doc);
600
583
  const exception = new models_0_1.ValidationException({
601
584
  $metadata: deserializeMetadata(parsedOutput),
602
585
  ...contents,
@@ -644,7 +627,7 @@ const se_DisconnectionEvent_event = (input, context) => {
644
627
  ":content-type": { type: "string", value: "application/json" },
645
628
  };
646
629
  let body = new Uint8Array();
647
- body = se_DisconnectionEvent(input, context);
630
+ body = (0, smithy_client_1._json)(input);
648
631
  body = context.utf8Decoder(JSON.stringify(body));
649
632
  return { headers, body };
650
633
  };
@@ -655,7 +638,7 @@ const se_DTMFInputEvent_event = (input, context) => {
655
638
  ":content-type": { type: "string", value: "application/json" },
656
639
  };
657
640
  let body = new Uint8Array();
658
- body = se_DTMFInputEvent(input, context);
641
+ body = (0, smithy_client_1._json)(input);
659
642
  body = context.utf8Decoder(JSON.stringify(body));
660
643
  return { headers, body };
661
644
  };
@@ -666,7 +649,7 @@ const se_PlaybackCompletionEvent_event = (input, context) => {
666
649
  ":content-type": { type: "string", value: "application/json" },
667
650
  };
668
651
  let body = new Uint8Array();
669
- body = se_PlaybackCompletionEvent(input, context);
652
+ body = (0, smithy_client_1._json)(input);
670
653
  body = context.utf8Decoder(JSON.stringify(body));
671
654
  return { headers, body };
672
655
  };
@@ -677,7 +660,7 @@ const se_TextInputEvent_event = (input, context) => {
677
660
  ":content-type": { type: "string", value: "application/json" },
678
661
  };
679
662
  let body = new Uint8Array();
680
- body = se_TextInputEvent(input, context);
663
+ body = (0, smithy_client_1._json)(input);
681
664
  body = context.utf8Decoder(JSON.stringify(body));
682
665
  return { headers, body };
683
666
  };
@@ -793,7 +776,7 @@ const de_DependencyFailedException_event = async (output, context) => {
793
776
  const de_HeartbeatEvent_event = async (output, context) => {
794
777
  const contents = {};
795
778
  const data = await parseBody(output.body, context);
796
- Object.assign(contents, de_HeartbeatEvent(data, context));
779
+ Object.assign(contents, (0, smithy_client_1._json)(data));
797
780
  return contents;
798
781
  };
799
782
  const de_IntentResultEvent_event = async (output, context) => {
@@ -812,7 +795,7 @@ const de_InternalServerException_event = async (output, context) => {
812
795
  const de_PlaybackInterruptionEvent_event = async (output, context) => {
813
796
  const contents = {};
814
797
  const data = await parseBody(output.body, context);
815
- Object.assign(contents, de_PlaybackInterruptionEvent(data, context));
798
+ Object.assign(contents, (0, smithy_client_1._json)(data));
816
799
  return contents;
817
800
  };
818
801
  const de_ResourceNotFoundException_event = async (output, context) => {
@@ -825,7 +808,7 @@ const de_ResourceNotFoundException_event = async (output, context) => {
825
808
  const de_TextResponseEvent_event = async (output, context) => {
826
809
  const contents = {};
827
810
  const data = await parseBody(output.body, context);
828
- Object.assign(contents, de_TextResponseEvent(data, context));
811
+ Object.assign(contents, (0, smithy_client_1._json)(data));
829
812
  return contents;
830
813
  };
831
814
  const de_ThrottlingException_event = async (output, context) => {
@@ -838,7 +821,7 @@ const de_ThrottlingException_event = async (output, context) => {
838
821
  const de_TranscriptEvent_event = async (output, context) => {
839
822
  const contents = {};
840
823
  const data = await parseBody(output.body, context);
841
- Object.assign(contents, de_TranscriptEvent(data, context));
824
+ Object.assign(contents, (0, smithy_client_1._json)(data));
842
825
  return contents;
843
826
  };
844
827
  const de_ValidationException_event = async (output, context) => {
@@ -848,176 +831,75 @@ const de_ValidationException_event = async (output, context) => {
848
831
  };
849
832
  return de_ValidationExceptionRes(parsedOutput, context);
850
833
  };
851
- const se_ActiveContext = (input, context) => {
852
- return {
853
- ...(input.contextAttributes != null && {
854
- contextAttributes: se_ActiveContextParametersMap(input.contextAttributes, context),
855
- }),
856
- ...(input.name != null && { name: input.name }),
857
- ...(input.timeToLive != null && { timeToLive: se_ActiveContextTimeToLive(input.timeToLive, context) }),
858
- };
859
- };
860
- const se_ActiveContextParametersMap = (input, context) => {
861
- return Object.entries(input).reduce((acc, [key, value]) => {
862
- if (value === null) {
863
- return acc;
864
- }
865
- acc[key] = value;
866
- return acc;
867
- }, {});
868
- };
869
- const se_ActiveContextsList = (input, context) => {
870
- return input
871
- .filter((e) => e != null)
872
- .map((entry) => {
873
- return se_ActiveContext(entry, context);
874
- });
875
- };
876
- const se_ActiveContextTimeToLive = (input, context) => {
877
- return {
878
- ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }),
879
- ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }),
880
- };
881
- };
882
834
  const se_AudioInputEvent = (input, context) => {
883
- return {
884
- ...(input.audioChunk != null && { audioChunk: context.base64Encoder(input.audioChunk) }),
885
- ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
886
- ...(input.contentType != null && { contentType: input.contentType }),
887
- ...(input.eventId != null && { eventId: input.eventId }),
888
- };
889
- };
890
- const se_Button = (input, context) => {
891
- return {
892
- ...(input.text != null && { text: input.text }),
893
- ...(input.value != null && { value: input.value }),
894
- };
895
- };
896
- const se_ButtonsList = (input, context) => {
897
- return input
898
- .filter((e) => e != null)
899
- .map((entry) => {
900
- return se_Button(entry, context);
835
+ return (0, smithy_client_1.take)(input, {
836
+ audioChunk: context.base64Encoder,
837
+ clientTimestampMillis: [],
838
+ contentType: [],
839
+ eventId: [],
901
840
  });
902
841
  };
903
842
  const se_ConfigurationEvent = (input, context) => {
904
- return {
905
- ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
906
- ...(input.disablePlayback != null && { disablePlayback: input.disablePlayback }),
907
- ...(input.eventId != null && { eventId: input.eventId }),
908
- ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }),
909
- ...(input.responseContentType != null && { responseContentType: input.responseContentType }),
910
- ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }),
911
- ...(input.welcomeMessages != null && { welcomeMessages: se_Messages(input.welcomeMessages, context) }),
912
- };
843
+ return (0, smithy_client_1.take)(input, {
844
+ clientTimestampMillis: [],
845
+ disablePlayback: [],
846
+ eventId: [],
847
+ requestAttributes: smithy_client_1._json,
848
+ responseContentType: [],
849
+ sessionState: (_) => se_SessionState(_, context),
850
+ welcomeMessages: smithy_client_1._json,
851
+ });
913
852
  };
914
853
  const se_DialogAction = (input, context) => {
915
- return {
916
- ...(input.slotElicitationStyle != null && { slotElicitationStyle: input.slotElicitationStyle }),
917
- ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
918
- ...(input.subSlotToElicit != null && { subSlotToElicit: se_ElicitSubSlot(input.subSlotToElicit, context) }),
919
- ...(input.type != null && { type: input.type }),
920
- };
921
- };
922
- const se_DisconnectionEvent = (input, context) => {
923
- return {
924
- ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
925
- ...(input.eventId != null && { eventId: input.eventId }),
926
- };
927
- };
928
- const se_DTMFInputEvent = (input, context) => {
929
- return {
930
- ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
931
- ...(input.eventId != null && { eventId: input.eventId }),
932
- ...(input.inputCharacter != null && { inputCharacter: input.inputCharacter }),
933
- };
854
+ return (0, smithy_client_1.take)(input, {
855
+ slotElicitationStyle: [],
856
+ slotToElicit: [],
857
+ subSlotToElicit: (_) => se_ElicitSubSlot(_, context),
858
+ type: [],
859
+ });
934
860
  };
935
861
  const se_ElicitSubSlot = (input, context) => {
936
- return {
937
- ...(input.name != null && { name: input.name }),
938
- ...(input.subSlotToElicit != null && { subSlotToElicit: se_ElicitSubSlot(input.subSlotToElicit, context) }),
939
- };
940
- };
941
- const se_ImageResponseCard = (input, context) => {
942
- return {
943
- ...(input.buttons != null && { buttons: se_ButtonsList(input.buttons, context) }),
944
- ...(input.imageUrl != null && { imageUrl: input.imageUrl }),
945
- ...(input.subtitle != null && { subtitle: input.subtitle }),
946
- ...(input.title != null && { title: input.title }),
947
- };
862
+ return (0, smithy_client_1.take)(input, {
863
+ name: [],
864
+ subSlotToElicit: (_) => se_ElicitSubSlot(_, context),
865
+ });
948
866
  };
949
867
  const se_Intent = (input, context) => {
950
- return {
951
- ...(input.confirmationState != null && { confirmationState: input.confirmationState }),
952
- ...(input.name != null && { name: input.name }),
953
- ...(input.slots != null && { slots: se_Slots(input.slots, context) }),
954
- ...(input.state != null && { state: input.state }),
955
- };
956
- };
957
- const se_Message = (input, context) => {
958
- return {
959
- ...(input.content != null && { content: input.content }),
960
- ...(input.contentType != null && { contentType: input.contentType }),
961
- ...(input.imageResponseCard != null && {
962
- imageResponseCard: se_ImageResponseCard(input.imageResponseCard, context),
963
- }),
964
- };
965
- };
966
- const se_Messages = (input, context) => {
967
- return input
968
- .filter((e) => e != null)
969
- .map((entry) => {
970
- return se_Message(entry, context);
868
+ return (0, smithy_client_1.take)(input, {
869
+ confirmationState: [],
870
+ name: [],
871
+ slots: (_) => se_Slots(_, context),
872
+ state: [],
971
873
  });
972
874
  };
973
- const se_PlaybackCompletionEvent = (input, context) => {
974
- return {
975
- ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
976
- ...(input.eventId != null && { eventId: input.eventId }),
977
- };
978
- };
979
875
  const se_RuntimeHintDetails = (input, context) => {
980
- return {
981
- ...(input.runtimeHintValues != null && {
982
- runtimeHintValues: se_RuntimeHintValuesList(input.runtimeHintValues, context),
983
- }),
984
- ...(input.subSlotHints != null && { subSlotHints: se_SlotHintsSlotMap(input.subSlotHints, context) }),
985
- };
876
+ return (0, smithy_client_1.take)(input, {
877
+ runtimeHintValues: smithy_client_1._json,
878
+ subSlotHints: (_) => se_SlotHintsSlotMap(_, context),
879
+ });
986
880
  };
987
881
  const se_RuntimeHints = (input, context) => {
988
- return {
989
- ...(input.slotHints != null && { slotHints: se_SlotHintsIntentMap(input.slotHints, context) }),
990
- };
991
- };
992
- const se_RuntimeHintValue = (input, context) => {
993
- return {
994
- ...(input.phrase != null && { phrase: input.phrase }),
995
- };
996
- };
997
- const se_RuntimeHintValuesList = (input, context) => {
998
- return input
999
- .filter((e) => e != null)
1000
- .map((entry) => {
1001
- return se_RuntimeHintValue(entry, context);
882
+ return (0, smithy_client_1.take)(input, {
883
+ slotHints: (_) => se_SlotHintsIntentMap(_, context),
1002
884
  });
1003
885
  };
1004
886
  const se_SessionState = (input, context) => {
1005
- return {
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) }),
1009
- ...(input.originatingRequestId != null && { originatingRequestId: input.originatingRequestId }),
1010
- ...(input.runtimeHints != null && { runtimeHints: se_RuntimeHints(input.runtimeHints, context) }),
1011
- ...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }),
1012
- };
887
+ return (0, smithy_client_1.take)(input, {
888
+ activeContexts: smithy_client_1._json,
889
+ dialogAction: (_) => se_DialogAction(_, context),
890
+ intent: (_) => se_Intent(_, context),
891
+ originatingRequestId: [],
892
+ runtimeHints: (_) => se_RuntimeHints(_, context),
893
+ sessionAttributes: smithy_client_1._json,
894
+ });
1013
895
  };
1014
896
  const se_Slot = (input, context) => {
1015
- return {
1016
- ...(input.shape != null && { shape: input.shape }),
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) }),
1020
- };
897
+ return (0, smithy_client_1.take)(input, {
898
+ shape: [],
899
+ subSlots: (_) => se_Slots(_, context),
900
+ value: smithy_client_1._json,
901
+ values: (_) => se_Values(_, context),
902
+ });
1021
903
  };
1022
904
  const se_SlotHintsIntentMap = (input, context) => {
1023
905
  return Object.entries(input).reduce((acc, [key, value]) => {
@@ -1046,36 +928,6 @@ const se_Slots = (input, context) => {
1046
928
  return acc;
1047
929
  }, {});
1048
930
  };
1049
- const se_StringList = (input, context) => {
1050
- return input
1051
- .filter((e) => e != null)
1052
- .map((entry) => {
1053
- return entry;
1054
- });
1055
- };
1056
- const se_StringMap = (input, context) => {
1057
- return Object.entries(input).reduce((acc, [key, value]) => {
1058
- if (value === null) {
1059
- return acc;
1060
- }
1061
- acc[key] = value;
1062
- return acc;
1063
- }, {});
1064
- };
1065
- const se_TextInputEvent = (input, context) => {
1066
- return {
1067
- ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
1068
- ...(input.eventId != null && { eventId: input.eventId }),
1069
- ...(input.text != null && { text: input.text }),
1070
- };
1071
- };
1072
- const se_Value = (input, context) => {
1073
- return {
1074
- ...(input.interpretedValue != null && { interpretedValue: input.interpretedValue }),
1075
- ...(input.originalValue != null && { originalValue: input.originalValue }),
1076
- ...(input.resolvedValues != null && { resolvedValues: se_StringList(input.resolvedValues, context) }),
1077
- };
1078
- };
1079
931
  const se_Values = (input, context) => {
1080
932
  return input
1081
933
  .filter((e) => e != null)
@@ -1083,221 +935,108 @@ const se_Values = (input, context) => {
1083
935
  return se_Slot(entry, context);
1084
936
  });
1085
937
  };
1086
- const de_ActiveContext = (output, context) => {
1087
- return {
1088
- contextAttributes: output.contextAttributes != null ? de_ActiveContextParametersMap(output.contextAttributes, context) : undefined,
1089
- name: (0, smithy_client_1.expectString)(output.name),
1090
- timeToLive: output.timeToLive != null ? de_ActiveContextTimeToLive(output.timeToLive, context) : undefined,
1091
- };
1092
- };
1093
- const de_ActiveContextParametersMap = (output, context) => {
1094
- return Object.entries(output).reduce((acc, [key, value]) => {
1095
- if (value === null) {
1096
- return acc;
1097
- }
1098
- acc[key] = (0, smithy_client_1.expectString)(value);
1099
- return acc;
1100
- }, {});
1101
- };
1102
- const de_ActiveContextsList = (output, context) => {
1103
- const retVal = (output || [])
1104
- .filter((e) => e != null)
1105
- .map((entry) => {
1106
- if (entry === null) {
1107
- return null;
1108
- }
1109
- return de_ActiveContext(entry, context);
1110
- });
1111
- return retVal;
1112
- };
1113
- const de_ActiveContextTimeToLive = (output, context) => {
1114
- return {
1115
- timeToLiveInSeconds: (0, smithy_client_1.expectInt32)(output.timeToLiveInSeconds),
1116
- turnsToLive: (0, smithy_client_1.expectInt32)(output.turnsToLive),
1117
- };
1118
- };
1119
938
  const de_AudioResponseEvent = (output, context) => {
1120
- return {
1121
- audioChunk: output.audioChunk != null ? context.base64Decoder(output.audioChunk) : undefined,
1122
- contentType: (0, smithy_client_1.expectString)(output.contentType),
1123
- eventId: (0, smithy_client_1.expectString)(output.eventId),
1124
- };
1125
- };
1126
- const de_Button = (output, context) => {
1127
- return {
1128
- text: (0, smithy_client_1.expectString)(output.text),
1129
- value: (0, smithy_client_1.expectString)(output.value),
1130
- };
1131
- };
1132
- const de_ButtonsList = (output, context) => {
1133
- const retVal = (output || [])
1134
- .filter((e) => e != null)
1135
- .map((entry) => {
1136
- if (entry === null) {
1137
- return null;
1138
- }
1139
- return de_Button(entry, context);
939
+ return (0, smithy_client_1.take)(output, {
940
+ audioChunk: context.base64Decoder,
941
+ contentType: smithy_client_1.expectString,
942
+ eventId: smithy_client_1.expectString,
1140
943
  });
1141
- return retVal;
1142
944
  };
1143
945
  const de_ConfidenceScore = (output, context) => {
1144
- return {
1145
- score: (0, smithy_client_1.limitedParseDouble)(output.score),
1146
- };
946
+ return (0, smithy_client_1.take)(output, {
947
+ score: smithy_client_1.limitedParseDouble,
948
+ });
1147
949
  };
1148
950
  const de_DialogAction = (output, context) => {
1149
- return {
1150
- slotElicitationStyle: (0, smithy_client_1.expectString)(output.slotElicitationStyle),
1151
- slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
1152
- subSlotToElicit: output.subSlotToElicit != null ? de_ElicitSubSlot(output.subSlotToElicit, context) : undefined,
1153
- type: (0, smithy_client_1.expectString)(output.type),
1154
- };
951
+ return (0, smithy_client_1.take)(output, {
952
+ slotElicitationStyle: smithy_client_1.expectString,
953
+ slotToElicit: smithy_client_1.expectString,
954
+ subSlotToElicit: (_) => de_ElicitSubSlot(_, context),
955
+ type: smithy_client_1.expectString,
956
+ });
1155
957
  };
1156
958
  const de_ElicitSubSlot = (output, context) => {
1157
- return {
1158
- name: (0, smithy_client_1.expectString)(output.name),
1159
- subSlotToElicit: output.subSlotToElicit != null ? de_ElicitSubSlot(output.subSlotToElicit, context) : undefined,
1160
- };
1161
- };
1162
- const de_HeartbeatEvent = (output, context) => {
1163
- return {
1164
- eventId: (0, smithy_client_1.expectString)(output.eventId),
1165
- };
1166
- };
1167
- const de_ImageResponseCard = (output, context) => {
1168
- return {
1169
- buttons: output.buttons != null ? de_ButtonsList(output.buttons, context) : undefined,
1170
- imageUrl: (0, smithy_client_1.expectString)(output.imageUrl),
1171
- subtitle: (0, smithy_client_1.expectString)(output.subtitle),
1172
- title: (0, smithy_client_1.expectString)(output.title),
1173
- };
959
+ return (0, smithy_client_1.take)(output, {
960
+ name: smithy_client_1.expectString,
961
+ subSlotToElicit: (_) => de_ElicitSubSlot(_, context),
962
+ });
1174
963
  };
1175
964
  const de_Intent = (output, context) => {
1176
- return {
1177
- confirmationState: (0, smithy_client_1.expectString)(output.confirmationState),
1178
- name: (0, smithy_client_1.expectString)(output.name),
1179
- slots: output.slots != null ? de_Slots(output.slots, context) : undefined,
1180
- state: (0, smithy_client_1.expectString)(output.state),
1181
- };
965
+ return (0, smithy_client_1.take)(output, {
966
+ confirmationState: smithy_client_1.expectString,
967
+ name: smithy_client_1.expectString,
968
+ slots: (_) => de_Slots(_, context),
969
+ state: smithy_client_1.expectString,
970
+ });
1182
971
  };
1183
972
  const de_IntentResultEvent = (output, context) => {
1184
- return {
1185
- eventId: (0, smithy_client_1.expectString)(output.eventId),
1186
- inputMode: (0, smithy_client_1.expectString)(output.inputMode),
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,
1190
- sessionId: (0, smithy_client_1.expectString)(output.sessionId),
1191
- sessionState: output.sessionState != null ? de_SessionState(output.sessionState, context) : undefined,
1192
- };
973
+ return (0, smithy_client_1.take)(output, {
974
+ eventId: smithy_client_1.expectString,
975
+ inputMode: smithy_client_1.expectString,
976
+ interpretations: (_) => de_Interpretations(_, context),
977
+ recognizedBotMember: smithy_client_1._json,
978
+ requestAttributes: smithy_client_1._json,
979
+ sessionId: smithy_client_1.expectString,
980
+ sessionState: (_) => de_SessionState(_, context),
981
+ });
1193
982
  };
1194
983
  const de_Interpretation = (output, context) => {
1195
- return {
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,
1199
- };
984
+ return (0, smithy_client_1.take)(output, {
985
+ intent: (_) => de_Intent(_, context),
986
+ nluConfidence: (_) => de_ConfidenceScore(_, context),
987
+ sentimentResponse: (_) => de_SentimentResponse(_, context),
988
+ });
1200
989
  };
1201
990
  const de_Interpretations = (output, context) => {
1202
991
  const retVal = (output || [])
1203
992
  .filter((e) => e != null)
1204
993
  .map((entry) => {
1205
- if (entry === null) {
1206
- return null;
1207
- }
1208
994
  return de_Interpretation(entry, context);
1209
995
  });
1210
996
  return retVal;
1211
997
  };
1212
- const de_Message = (output, context) => {
1213
- return {
1214
- content: (0, smithy_client_1.expectString)(output.content),
1215
- contentType: (0, smithy_client_1.expectString)(output.contentType),
1216
- imageResponseCard: output.imageResponseCard != null ? de_ImageResponseCard(output.imageResponseCard, context) : undefined,
1217
- };
1218
- };
1219
- const de_Messages = (output, context) => {
1220
- const retVal = (output || [])
1221
- .filter((e) => e != null)
1222
- .map((entry) => {
1223
- if (entry === null) {
1224
- return null;
1225
- }
1226
- return de_Message(entry, context);
1227
- });
1228
- return retVal;
1229
- };
1230
- const de_PlaybackInterruptionEvent = (output, context) => {
1231
- return {
1232
- causedByEventId: (0, smithy_client_1.expectString)(output.causedByEventId),
1233
- eventId: (0, smithy_client_1.expectString)(output.eventId),
1234
- eventReason: (0, smithy_client_1.expectString)(output.eventReason),
1235
- };
1236
- };
1237
- const de_RecognizedBotMember = (output, context) => {
1238
- return {
1239
- botId: (0, smithy_client_1.expectString)(output.botId),
1240
- botName: (0, smithy_client_1.expectString)(output.botName),
1241
- };
1242
- };
1243
998
  const de_RuntimeHintDetails = (output, context) => {
1244
- return {
1245
- runtimeHintValues: output.runtimeHintValues != null ? de_RuntimeHintValuesList(output.runtimeHintValues, context) : undefined,
1246
- subSlotHints: output.subSlotHints != null ? de_SlotHintsSlotMap(output.subSlotHints, context) : undefined,
1247
- };
999
+ return (0, smithy_client_1.take)(output, {
1000
+ runtimeHintValues: smithy_client_1._json,
1001
+ subSlotHints: (_) => de_SlotHintsSlotMap(_, context),
1002
+ });
1248
1003
  };
1249
1004
  const de_RuntimeHints = (output, context) => {
1250
- return {
1251
- slotHints: output.slotHints != null ? de_SlotHintsIntentMap(output.slotHints, context) : undefined,
1252
- };
1253
- };
1254
- const de_RuntimeHintValue = (output, context) => {
1255
- return {
1256
- phrase: (0, smithy_client_1.expectString)(output.phrase),
1257
- };
1258
- };
1259
- const de_RuntimeHintValuesList = (output, context) => {
1260
- const retVal = (output || [])
1261
- .filter((e) => e != null)
1262
- .map((entry) => {
1263
- if (entry === null) {
1264
- return null;
1265
- }
1266
- return de_RuntimeHintValue(entry, context);
1005
+ return (0, smithy_client_1.take)(output, {
1006
+ slotHints: (_) => de_SlotHintsIntentMap(_, context),
1267
1007
  });
1268
- return retVal;
1269
1008
  };
1270
1009
  const de_SentimentResponse = (output, context) => {
1271
- return {
1272
- sentiment: (0, smithy_client_1.expectString)(output.sentiment),
1273
- sentimentScore: output.sentimentScore != null ? de_SentimentScore(output.sentimentScore, context) : undefined,
1274
- };
1010
+ return (0, smithy_client_1.take)(output, {
1011
+ sentiment: smithy_client_1.expectString,
1012
+ sentimentScore: (_) => de_SentimentScore(_, context),
1013
+ });
1275
1014
  };
1276
1015
  const de_SentimentScore = (output, context) => {
1277
- return {
1278
- mixed: (0, smithy_client_1.limitedParseDouble)(output.mixed),
1279
- negative: (0, smithy_client_1.limitedParseDouble)(output.negative),
1280
- neutral: (0, smithy_client_1.limitedParseDouble)(output.neutral),
1281
- positive: (0, smithy_client_1.limitedParseDouble)(output.positive),
1282
- };
1016
+ return (0, smithy_client_1.take)(output, {
1017
+ mixed: smithy_client_1.limitedParseDouble,
1018
+ negative: smithy_client_1.limitedParseDouble,
1019
+ neutral: smithy_client_1.limitedParseDouble,
1020
+ positive: smithy_client_1.limitedParseDouble,
1021
+ });
1283
1022
  };
1284
1023
  const de_SessionState = (output, context) => {
1285
- return {
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,
1289
- originatingRequestId: (0, smithy_client_1.expectString)(output.originatingRequestId),
1290
- runtimeHints: output.runtimeHints != null ? de_RuntimeHints(output.runtimeHints, context) : undefined,
1291
- sessionAttributes: output.sessionAttributes != null ? de_StringMap(output.sessionAttributes, context) : undefined,
1292
- };
1024
+ return (0, smithy_client_1.take)(output, {
1025
+ activeContexts: smithy_client_1._json,
1026
+ dialogAction: (_) => de_DialogAction(_, context),
1027
+ intent: (_) => de_Intent(_, context),
1028
+ originatingRequestId: smithy_client_1.expectString,
1029
+ runtimeHints: (_) => de_RuntimeHints(_, context),
1030
+ sessionAttributes: smithy_client_1._json,
1031
+ });
1293
1032
  };
1294
1033
  const de_Slot = (output, context) => {
1295
- return {
1296
- shape: (0, smithy_client_1.expectString)(output.shape),
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,
1300
- };
1034
+ return (0, smithy_client_1.take)(output, {
1035
+ shape: smithy_client_1.expectString,
1036
+ subSlots: (_) => de_Slots(_, context),
1037
+ value: smithy_client_1._json,
1038
+ values: (_) => de_Values(_, context),
1039
+ });
1301
1040
  };
1302
1041
  const de_SlotHintsIntentMap = (output, context) => {
1303
1042
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -1326,52 +1065,10 @@ const de_Slots = (output, context) => {
1326
1065
  return acc;
1327
1066
  }, {});
1328
1067
  };
1329
- const de_StringList = (output, context) => {
1330
- const retVal = (output || [])
1331
- .filter((e) => e != null)
1332
- .map((entry) => {
1333
- if (entry === null) {
1334
- return null;
1335
- }
1336
- return (0, smithy_client_1.expectString)(entry);
1337
- });
1338
- return retVal;
1339
- };
1340
- const de_StringMap = (output, context) => {
1341
- return Object.entries(output).reduce((acc, [key, value]) => {
1342
- if (value === null) {
1343
- return acc;
1344
- }
1345
- acc[key] = (0, smithy_client_1.expectString)(value);
1346
- return acc;
1347
- }, {});
1348
- };
1349
- const de_TextResponseEvent = (output, context) => {
1350
- return {
1351
- eventId: (0, smithy_client_1.expectString)(output.eventId),
1352
- messages: output.messages != null ? de_Messages(output.messages, context) : undefined,
1353
- };
1354
- };
1355
- const de_TranscriptEvent = (output, context) => {
1356
- return {
1357
- eventId: (0, smithy_client_1.expectString)(output.eventId),
1358
- transcript: (0, smithy_client_1.expectString)(output.transcript),
1359
- };
1360
- };
1361
- const de_Value = (output, context) => {
1362
- return {
1363
- interpretedValue: (0, smithy_client_1.expectString)(output.interpretedValue),
1364
- originalValue: (0, smithy_client_1.expectString)(output.originalValue),
1365
- resolvedValues: output.resolvedValues != null ? de_StringList(output.resolvedValues, context) : undefined,
1366
- };
1367
- };
1368
1068
  const de_Values = (output, context) => {
1369
1069
  const retVal = (output || [])
1370
1070
  .filter((e) => e != null)
1371
1071
  .map((entry) => {
1372
- if (entry === null) {
1373
- return null;
1374
- }
1375
1072
  return de_Slot(entry, context);
1376
1073
  });
1377
1074
  return retVal;