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