@aws-sdk/client-comprehendmedical 3.504.0 → 3.509.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.
@@ -161,7 +161,7 @@ export const se_StopSNOMEDCTInferenceJobCommand = async (input, context) => {
161
161
  };
162
162
  export const de_DescribeEntitiesDetectionV2JobCommand = async (output, context) => {
163
163
  if (output.statusCode >= 300) {
164
- return de_DescribeEntitiesDetectionV2JobCommandError(output, context);
164
+ return de_CommandError(output, context);
165
165
  }
166
166
  const data = await parseBody(output.body, context);
167
167
  let contents = {};
@@ -172,37 +172,9 @@ export const de_DescribeEntitiesDetectionV2JobCommand = async (output, context)
172
172
  };
173
173
  return response;
174
174
  };
175
- const de_DescribeEntitiesDetectionV2JobCommandError = async (output, context) => {
176
- const parsedOutput = {
177
- ...output,
178
- body: await parseErrorBody(output.body, context),
179
- };
180
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
181
- switch (errorCode) {
182
- case "InternalServerException":
183
- case "com.amazonaws.comprehendmedical#InternalServerException":
184
- throw await de_InternalServerExceptionRes(parsedOutput, context);
185
- case "InvalidRequestException":
186
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
187
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
188
- case "ResourceNotFoundException":
189
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
190
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
191
- case "TooManyRequestsException":
192
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
193
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
194
- default:
195
- const parsedBody = parsedOutput.body;
196
- return throwDefaultError({
197
- output,
198
- parsedBody,
199
- errorCode,
200
- });
201
- }
202
- };
203
175
  export const de_DescribeICD10CMInferenceJobCommand = async (output, context) => {
204
176
  if (output.statusCode >= 300) {
205
- return de_DescribeICD10CMInferenceJobCommandError(output, context);
177
+ return de_CommandError(output, context);
206
178
  }
207
179
  const data = await parseBody(output.body, context);
208
180
  let contents = {};
@@ -213,37 +185,9 @@ export const de_DescribeICD10CMInferenceJobCommand = async (output, context) =>
213
185
  };
214
186
  return response;
215
187
  };
216
- const de_DescribeICD10CMInferenceJobCommandError = async (output, context) => {
217
- const parsedOutput = {
218
- ...output,
219
- body: await parseErrorBody(output.body, context),
220
- };
221
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
222
- switch (errorCode) {
223
- case "InternalServerException":
224
- case "com.amazonaws.comprehendmedical#InternalServerException":
225
- throw await de_InternalServerExceptionRes(parsedOutput, context);
226
- case "InvalidRequestException":
227
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
228
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
229
- case "ResourceNotFoundException":
230
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
231
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
232
- case "TooManyRequestsException":
233
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
234
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
235
- default:
236
- const parsedBody = parsedOutput.body;
237
- return throwDefaultError({
238
- output,
239
- parsedBody,
240
- errorCode,
241
- });
242
- }
243
- };
244
188
  export const de_DescribePHIDetectionJobCommand = async (output, context) => {
245
189
  if (output.statusCode >= 300) {
246
- return de_DescribePHIDetectionJobCommandError(output, context);
190
+ return de_CommandError(output, context);
247
191
  }
248
192
  const data = await parseBody(output.body, context);
249
193
  let contents = {};
@@ -254,37 +198,9 @@ export const de_DescribePHIDetectionJobCommand = async (output, context) => {
254
198
  };
255
199
  return response;
256
200
  };
257
- const de_DescribePHIDetectionJobCommandError = async (output, context) => {
258
- const parsedOutput = {
259
- ...output,
260
- body: await parseErrorBody(output.body, context),
261
- };
262
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
- switch (errorCode) {
264
- case "InternalServerException":
265
- case "com.amazonaws.comprehendmedical#InternalServerException":
266
- throw await de_InternalServerExceptionRes(parsedOutput, context);
267
- case "InvalidRequestException":
268
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
269
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
270
- case "ResourceNotFoundException":
271
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
272
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
273
- case "TooManyRequestsException":
274
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
275
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
276
- default:
277
- const parsedBody = parsedOutput.body;
278
- return throwDefaultError({
279
- output,
280
- parsedBody,
281
- errorCode,
282
- });
283
- }
284
- };
285
201
  export const de_DescribeRxNormInferenceJobCommand = async (output, context) => {
286
202
  if (output.statusCode >= 300) {
287
- return de_DescribeRxNormInferenceJobCommandError(output, context);
203
+ return de_CommandError(output, context);
288
204
  }
289
205
  const data = await parseBody(output.body, context);
290
206
  let contents = {};
@@ -295,37 +211,9 @@ export const de_DescribeRxNormInferenceJobCommand = async (output, context) => {
295
211
  };
296
212
  return response;
297
213
  };
298
- const de_DescribeRxNormInferenceJobCommandError = async (output, context) => {
299
- const parsedOutput = {
300
- ...output,
301
- body: await parseErrorBody(output.body, context),
302
- };
303
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
304
- switch (errorCode) {
305
- case "InternalServerException":
306
- case "com.amazonaws.comprehendmedical#InternalServerException":
307
- throw await de_InternalServerExceptionRes(parsedOutput, context);
308
- case "InvalidRequestException":
309
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
310
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
311
- case "ResourceNotFoundException":
312
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
313
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
314
- case "TooManyRequestsException":
315
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
316
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
317
- default:
318
- const parsedBody = parsedOutput.body;
319
- return throwDefaultError({
320
- output,
321
- parsedBody,
322
- errorCode,
323
- });
324
- }
325
- };
326
214
  export const de_DescribeSNOMEDCTInferenceJobCommand = async (output, context) => {
327
215
  if (output.statusCode >= 300) {
328
- return de_DescribeSNOMEDCTInferenceJobCommandError(output, context);
216
+ return de_CommandError(output, context);
329
217
  }
330
218
  const data = await parseBody(output.body, context);
331
219
  let contents = {};
@@ -336,37 +224,9 @@ export const de_DescribeSNOMEDCTInferenceJobCommand = async (output, context) =>
336
224
  };
337
225
  return response;
338
226
  };
339
- const de_DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
340
- const parsedOutput = {
341
- ...output,
342
- body: await parseErrorBody(output.body, context),
343
- };
344
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
345
- switch (errorCode) {
346
- case "InternalServerException":
347
- case "com.amazonaws.comprehendmedical#InternalServerException":
348
- throw await de_InternalServerExceptionRes(parsedOutput, context);
349
- case "InvalidRequestException":
350
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
351
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
352
- case "ResourceNotFoundException":
353
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
354
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
355
- case "TooManyRequestsException":
356
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
357
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
358
- default:
359
- const parsedBody = parsedOutput.body;
360
- return throwDefaultError({
361
- output,
362
- parsedBody,
363
- errorCode,
364
- });
365
- }
366
- };
367
227
  export const de_DetectEntitiesCommand = async (output, context) => {
368
228
  if (output.statusCode >= 300) {
369
- return de_DetectEntitiesCommandError(output, context);
229
+ return de_CommandError(output, context);
370
230
  }
371
231
  const data = await parseBody(output.body, context);
372
232
  let contents = {};
@@ -377,43 +237,9 @@ export const de_DetectEntitiesCommand = async (output, context) => {
377
237
  };
378
238
  return response;
379
239
  };
380
- const de_DetectEntitiesCommandError = async (output, context) => {
381
- const parsedOutput = {
382
- ...output,
383
- body: await parseErrorBody(output.body, context),
384
- };
385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
386
- switch (errorCode) {
387
- case "InternalServerException":
388
- case "com.amazonaws.comprehendmedical#InternalServerException":
389
- throw await de_InternalServerExceptionRes(parsedOutput, context);
390
- case "InvalidEncodingException":
391
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
392
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
393
- case "InvalidRequestException":
394
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
395
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
396
- case "ServiceUnavailableException":
397
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
398
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
399
- case "TextSizeLimitExceededException":
400
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
401
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
402
- case "TooManyRequestsException":
403
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
404
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
405
- default:
406
- const parsedBody = parsedOutput.body;
407
- return throwDefaultError({
408
- output,
409
- parsedBody,
410
- errorCode,
411
- });
412
- }
413
- };
414
240
  export const de_DetectEntitiesV2Command = async (output, context) => {
415
241
  if (output.statusCode >= 300) {
416
- return de_DetectEntitiesV2CommandError(output, context);
242
+ return de_CommandError(output, context);
417
243
  }
418
244
  const data = await parseBody(output.body, context);
419
245
  let contents = {};
@@ -424,43 +250,9 @@ export const de_DetectEntitiesV2Command = async (output, context) => {
424
250
  };
425
251
  return response;
426
252
  };
427
- const de_DetectEntitiesV2CommandError = async (output, context) => {
428
- const parsedOutput = {
429
- ...output,
430
- body: await parseErrorBody(output.body, context),
431
- };
432
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
433
- switch (errorCode) {
434
- case "InternalServerException":
435
- case "com.amazonaws.comprehendmedical#InternalServerException":
436
- throw await de_InternalServerExceptionRes(parsedOutput, context);
437
- case "InvalidEncodingException":
438
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
439
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
440
- case "InvalidRequestException":
441
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
442
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
443
- case "ServiceUnavailableException":
444
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
445
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
446
- case "TextSizeLimitExceededException":
447
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
448
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
449
- case "TooManyRequestsException":
450
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
451
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
452
- default:
453
- const parsedBody = parsedOutput.body;
454
- return throwDefaultError({
455
- output,
456
- parsedBody,
457
- errorCode,
458
- });
459
- }
460
- };
461
253
  export const de_DetectPHICommand = async (output, context) => {
462
254
  if (output.statusCode >= 300) {
463
- return de_DetectPHICommandError(output, context);
255
+ return de_CommandError(output, context);
464
256
  }
465
257
  const data = await parseBody(output.body, context);
466
258
  let contents = {};
@@ -471,43 +263,9 @@ export const de_DetectPHICommand = async (output, context) => {
471
263
  };
472
264
  return response;
473
265
  };
474
- const de_DetectPHICommandError = async (output, context) => {
475
- const parsedOutput = {
476
- ...output,
477
- body: await parseErrorBody(output.body, context),
478
- };
479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
480
- switch (errorCode) {
481
- case "InternalServerException":
482
- case "com.amazonaws.comprehendmedical#InternalServerException":
483
- throw await de_InternalServerExceptionRes(parsedOutput, context);
484
- case "InvalidEncodingException":
485
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
486
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
487
- case "InvalidRequestException":
488
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
489
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
490
- case "ServiceUnavailableException":
491
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
492
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
493
- case "TextSizeLimitExceededException":
494
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
495
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
496
- case "TooManyRequestsException":
497
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
498
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
499
- default:
500
- const parsedBody = parsedOutput.body;
501
- return throwDefaultError({
502
- output,
503
- parsedBody,
504
- errorCode,
505
- });
506
- }
507
- };
508
266
  export const de_InferICD10CMCommand = async (output, context) => {
509
267
  if (output.statusCode >= 300) {
510
- return de_InferICD10CMCommandError(output, context);
268
+ return de_CommandError(output, context);
511
269
  }
512
270
  const data = await parseBody(output.body, context);
513
271
  let contents = {};
@@ -518,43 +276,9 @@ export const de_InferICD10CMCommand = async (output, context) => {
518
276
  };
519
277
  return response;
520
278
  };
521
- const de_InferICD10CMCommandError = async (output, context) => {
522
- const parsedOutput = {
523
- ...output,
524
- body: await parseErrorBody(output.body, context),
525
- };
526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
527
- switch (errorCode) {
528
- case "InternalServerException":
529
- case "com.amazonaws.comprehendmedical#InternalServerException":
530
- throw await de_InternalServerExceptionRes(parsedOutput, context);
531
- case "InvalidEncodingException":
532
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
533
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
534
- case "InvalidRequestException":
535
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
536
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
537
- case "ServiceUnavailableException":
538
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
539
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
540
- case "TextSizeLimitExceededException":
541
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
542
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
543
- case "TooManyRequestsException":
544
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
545
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
546
- default:
547
- const parsedBody = parsedOutput.body;
548
- return throwDefaultError({
549
- output,
550
- parsedBody,
551
- errorCode,
552
- });
553
- }
554
- };
555
279
  export const de_InferRxNormCommand = async (output, context) => {
556
280
  if (output.statusCode >= 300) {
557
- return de_InferRxNormCommandError(output, context);
281
+ return de_CommandError(output, context);
558
282
  }
559
283
  const data = await parseBody(output.body, context);
560
284
  let contents = {};
@@ -565,43 +289,9 @@ export const de_InferRxNormCommand = async (output, context) => {
565
289
  };
566
290
  return response;
567
291
  };
568
- const de_InferRxNormCommandError = async (output, context) => {
569
- const parsedOutput = {
570
- ...output,
571
- body: await parseErrorBody(output.body, context),
572
- };
573
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
- switch (errorCode) {
575
- case "InternalServerException":
576
- case "com.amazonaws.comprehendmedical#InternalServerException":
577
- throw await de_InternalServerExceptionRes(parsedOutput, context);
578
- case "InvalidEncodingException":
579
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
580
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
581
- case "InvalidRequestException":
582
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
583
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
584
- case "ServiceUnavailableException":
585
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
586
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
587
- case "TextSizeLimitExceededException":
588
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
589
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
590
- case "TooManyRequestsException":
591
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
592
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
593
- default:
594
- const parsedBody = parsedOutput.body;
595
- return throwDefaultError({
596
- output,
597
- parsedBody,
598
- errorCode,
599
- });
600
- }
601
- };
602
292
  export const de_InferSNOMEDCTCommand = async (output, context) => {
603
293
  if (output.statusCode >= 300) {
604
- return de_InferSNOMEDCTCommandError(output, context);
294
+ return de_CommandError(output, context);
605
295
  }
606
296
  const data = await parseBody(output.body, context);
607
297
  let contents = {};
@@ -612,43 +302,9 @@ export const de_InferSNOMEDCTCommand = async (output, context) => {
612
302
  };
613
303
  return response;
614
304
  };
615
- const de_InferSNOMEDCTCommandError = async (output, context) => {
616
- const parsedOutput = {
617
- ...output,
618
- body: await parseErrorBody(output.body, context),
619
- };
620
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
621
- switch (errorCode) {
622
- case "InternalServerException":
623
- case "com.amazonaws.comprehendmedical#InternalServerException":
624
- throw await de_InternalServerExceptionRes(parsedOutput, context);
625
- case "InvalidEncodingException":
626
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
627
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
628
- case "InvalidRequestException":
629
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
630
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
631
- case "ServiceUnavailableException":
632
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
633
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
634
- case "TextSizeLimitExceededException":
635
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
636
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
637
- case "TooManyRequestsException":
638
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
639
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
640
- default:
641
- const parsedBody = parsedOutput.body;
642
- return throwDefaultError({
643
- output,
644
- parsedBody,
645
- errorCode,
646
- });
647
- }
648
- };
649
305
  export const de_ListEntitiesDetectionV2JobsCommand = async (output, context) => {
650
306
  if (output.statusCode >= 300) {
651
- return de_ListEntitiesDetectionV2JobsCommandError(output, context);
307
+ return de_CommandError(output, context);
652
308
  }
653
309
  const data = await parseBody(output.body, context);
654
310
  let contents = {};
@@ -659,37 +315,9 @@ export const de_ListEntitiesDetectionV2JobsCommand = async (output, context) =>
659
315
  };
660
316
  return response;
661
317
  };
662
- const de_ListEntitiesDetectionV2JobsCommandError = async (output, context) => {
663
- const parsedOutput = {
664
- ...output,
665
- body: await parseErrorBody(output.body, context),
666
- };
667
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
668
- switch (errorCode) {
669
- case "InternalServerException":
670
- case "com.amazonaws.comprehendmedical#InternalServerException":
671
- throw await de_InternalServerExceptionRes(parsedOutput, context);
672
- case "InvalidRequestException":
673
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
674
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
675
- case "TooManyRequestsException":
676
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
677
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
678
- case "ValidationException":
679
- case "com.amazonaws.comprehendmedical#ValidationException":
680
- throw await de_ValidationExceptionRes(parsedOutput, context);
681
- default:
682
- const parsedBody = parsedOutput.body;
683
- return throwDefaultError({
684
- output,
685
- parsedBody,
686
- errorCode,
687
- });
688
- }
689
- };
690
318
  export const de_ListICD10CMInferenceJobsCommand = async (output, context) => {
691
319
  if (output.statusCode >= 300) {
692
- return de_ListICD10CMInferenceJobsCommandError(output, context);
320
+ return de_CommandError(output, context);
693
321
  }
694
322
  const data = await parseBody(output.body, context);
695
323
  let contents = {};
@@ -700,37 +328,9 @@ export const de_ListICD10CMInferenceJobsCommand = async (output, context) => {
700
328
  };
701
329
  return response;
702
330
  };
703
- const de_ListICD10CMInferenceJobsCommandError = async (output, context) => {
704
- const parsedOutput = {
705
- ...output,
706
- body: await parseErrorBody(output.body, context),
707
- };
708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
709
- switch (errorCode) {
710
- case "InternalServerException":
711
- case "com.amazonaws.comprehendmedical#InternalServerException":
712
- throw await de_InternalServerExceptionRes(parsedOutput, context);
713
- case "InvalidRequestException":
714
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
715
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
716
- case "TooManyRequestsException":
717
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
718
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
719
- case "ValidationException":
720
- case "com.amazonaws.comprehendmedical#ValidationException":
721
- throw await de_ValidationExceptionRes(parsedOutput, context);
722
- default:
723
- const parsedBody = parsedOutput.body;
724
- return throwDefaultError({
725
- output,
726
- parsedBody,
727
- errorCode,
728
- });
729
- }
730
- };
731
331
  export const de_ListPHIDetectionJobsCommand = async (output, context) => {
732
332
  if (output.statusCode >= 300) {
733
- return de_ListPHIDetectionJobsCommandError(output, context);
333
+ return de_CommandError(output, context);
734
334
  }
735
335
  const data = await parseBody(output.body, context);
736
336
  let contents = {};
@@ -741,37 +341,9 @@ export const de_ListPHIDetectionJobsCommand = async (output, context) => {
741
341
  };
742
342
  return response;
743
343
  };
744
- const de_ListPHIDetectionJobsCommandError = async (output, context) => {
745
- const parsedOutput = {
746
- ...output,
747
- body: await parseErrorBody(output.body, context),
748
- };
749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
750
- switch (errorCode) {
751
- case "InternalServerException":
752
- case "com.amazonaws.comprehendmedical#InternalServerException":
753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
754
- case "InvalidRequestException":
755
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
756
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
757
- case "TooManyRequestsException":
758
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
759
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
760
- case "ValidationException":
761
- case "com.amazonaws.comprehendmedical#ValidationException":
762
- throw await de_ValidationExceptionRes(parsedOutput, context);
763
- default:
764
- const parsedBody = parsedOutput.body;
765
- return throwDefaultError({
766
- output,
767
- parsedBody,
768
- errorCode,
769
- });
770
- }
771
- };
772
344
  export const de_ListRxNormInferenceJobsCommand = async (output, context) => {
773
345
  if (output.statusCode >= 300) {
774
- return de_ListRxNormInferenceJobsCommandError(output, context);
346
+ return de_CommandError(output, context);
775
347
  }
776
348
  const data = await parseBody(output.body, context);
777
349
  let contents = {};
@@ -779,81 +351,25 @@ export const de_ListRxNormInferenceJobsCommand = async (output, context) => {
779
351
  const response = {
780
352
  $metadata: deserializeMetadata(output),
781
353
  ...contents,
782
- };
783
- return response;
784
- };
785
- const de_ListRxNormInferenceJobsCommandError = async (output, context) => {
786
- const parsedOutput = {
787
- ...output,
788
- body: await parseErrorBody(output.body, context),
789
- };
790
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
791
- switch (errorCode) {
792
- case "InternalServerException":
793
- case "com.amazonaws.comprehendmedical#InternalServerException":
794
- throw await de_InternalServerExceptionRes(parsedOutput, context);
795
- case "InvalidRequestException":
796
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
797
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
798
- case "TooManyRequestsException":
799
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
800
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
801
- case "ValidationException":
802
- case "com.amazonaws.comprehendmedical#ValidationException":
803
- throw await de_ValidationExceptionRes(parsedOutput, context);
804
- default:
805
- const parsedBody = parsedOutput.body;
806
- return throwDefaultError({
807
- output,
808
- parsedBody,
809
- errorCode,
810
- });
811
- }
812
- };
813
- export const de_ListSNOMEDCTInferenceJobsCommand = async (output, context) => {
814
- if (output.statusCode >= 300) {
815
- return de_ListSNOMEDCTInferenceJobsCommandError(output, context);
816
- }
817
- const data = await parseBody(output.body, context);
818
- let contents = {};
819
- contents = de_ListSNOMEDCTInferenceJobsResponse(data, context);
820
- const response = {
821
- $metadata: deserializeMetadata(output),
822
- ...contents,
823
- };
824
- return response;
825
- };
826
- const de_ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
827
- const parsedOutput = {
828
- ...output,
829
- body: await parseErrorBody(output.body, context),
830
- };
831
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
832
- switch (errorCode) {
833
- case "InternalServerException":
834
- case "com.amazonaws.comprehendmedical#InternalServerException":
835
- throw await de_InternalServerExceptionRes(parsedOutput, context);
836
- case "InvalidRequestException":
837
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
838
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
839
- case "TooManyRequestsException":
840
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
841
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
842
- case "ValidationException":
843
- case "com.amazonaws.comprehendmedical#ValidationException":
844
- throw await de_ValidationExceptionRes(parsedOutput, context);
845
- default:
846
- const parsedBody = parsedOutput.body;
847
- return throwDefaultError({
848
- output,
849
- parsedBody,
850
- errorCode,
851
- });
354
+ };
355
+ return response;
356
+ };
357
+ export const de_ListSNOMEDCTInferenceJobsCommand = async (output, context) => {
358
+ if (output.statusCode >= 300) {
359
+ return de_CommandError(output, context);
852
360
  }
361
+ const data = await parseBody(output.body, context);
362
+ let contents = {};
363
+ contents = de_ListSNOMEDCTInferenceJobsResponse(data, context);
364
+ const response = {
365
+ $metadata: deserializeMetadata(output),
366
+ ...contents,
367
+ };
368
+ return response;
853
369
  };
854
370
  export const de_StartEntitiesDetectionV2JobCommand = async (output, context) => {
855
371
  if (output.statusCode >= 300) {
856
- return de_StartEntitiesDetectionV2JobCommandError(output, context);
372
+ return de_CommandError(output, context);
857
373
  }
858
374
  const data = await parseBody(output.body, context);
859
375
  let contents = {};
@@ -864,37 +380,9 @@ export const de_StartEntitiesDetectionV2JobCommand = async (output, context) =>
864
380
  };
865
381
  return response;
866
382
  };
867
- const de_StartEntitiesDetectionV2JobCommandError = async (output, context) => {
868
- const parsedOutput = {
869
- ...output,
870
- body: await parseErrorBody(output.body, context),
871
- };
872
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
873
- switch (errorCode) {
874
- case "InternalServerException":
875
- case "com.amazonaws.comprehendmedical#InternalServerException":
876
- throw await de_InternalServerExceptionRes(parsedOutput, context);
877
- case "InvalidRequestException":
878
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
879
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
880
- case "ResourceNotFoundException":
881
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
882
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
883
- case "TooManyRequestsException":
884
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
885
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
886
- default:
887
- const parsedBody = parsedOutput.body;
888
- return throwDefaultError({
889
- output,
890
- parsedBody,
891
- errorCode,
892
- });
893
- }
894
- };
895
383
  export const de_StartICD10CMInferenceJobCommand = async (output, context) => {
896
384
  if (output.statusCode >= 300) {
897
- return de_StartICD10CMInferenceJobCommandError(output, context);
385
+ return de_CommandError(output, context);
898
386
  }
899
387
  const data = await parseBody(output.body, context);
900
388
  let contents = {};
@@ -905,37 +393,9 @@ export const de_StartICD10CMInferenceJobCommand = async (output, context) => {
905
393
  };
906
394
  return response;
907
395
  };
908
- const de_StartICD10CMInferenceJobCommandError = async (output, context) => {
909
- const parsedOutput = {
910
- ...output,
911
- body: await parseErrorBody(output.body, context),
912
- };
913
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
914
- switch (errorCode) {
915
- case "InternalServerException":
916
- case "com.amazonaws.comprehendmedical#InternalServerException":
917
- throw await de_InternalServerExceptionRes(parsedOutput, context);
918
- case "InvalidRequestException":
919
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
920
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
921
- case "ResourceNotFoundException":
922
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
923
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
924
- case "TooManyRequestsException":
925
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
926
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
927
- default:
928
- const parsedBody = parsedOutput.body;
929
- return throwDefaultError({
930
- output,
931
- parsedBody,
932
- errorCode,
933
- });
934
- }
935
- };
936
396
  export const de_StartPHIDetectionJobCommand = async (output, context) => {
937
397
  if (output.statusCode >= 300) {
938
- return de_StartPHIDetectionJobCommandError(output, context);
398
+ return de_CommandError(output, context);
939
399
  }
940
400
  const data = await parseBody(output.body, context);
941
401
  let contents = {};
@@ -946,37 +406,9 @@ export const de_StartPHIDetectionJobCommand = async (output, context) => {
946
406
  };
947
407
  return response;
948
408
  };
949
- const de_StartPHIDetectionJobCommandError = async (output, context) => {
950
- const parsedOutput = {
951
- ...output,
952
- body: await parseErrorBody(output.body, context),
953
- };
954
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
955
- switch (errorCode) {
956
- case "InternalServerException":
957
- case "com.amazonaws.comprehendmedical#InternalServerException":
958
- throw await de_InternalServerExceptionRes(parsedOutput, context);
959
- case "InvalidRequestException":
960
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
961
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
962
- case "ResourceNotFoundException":
963
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
964
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
965
- case "TooManyRequestsException":
966
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
967
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
968
- default:
969
- const parsedBody = parsedOutput.body;
970
- return throwDefaultError({
971
- output,
972
- parsedBody,
973
- errorCode,
974
- });
975
- }
976
- };
977
409
  export const de_StartRxNormInferenceJobCommand = async (output, context) => {
978
410
  if (output.statusCode >= 300) {
979
- return de_StartRxNormInferenceJobCommandError(output, context);
411
+ return de_CommandError(output, context);
980
412
  }
981
413
  const data = await parseBody(output.body, context);
982
414
  let contents = {};
@@ -987,37 +419,9 @@ export const de_StartRxNormInferenceJobCommand = async (output, context) => {
987
419
  };
988
420
  return response;
989
421
  };
990
- const de_StartRxNormInferenceJobCommandError = async (output, context) => {
991
- const parsedOutput = {
992
- ...output,
993
- body: await parseErrorBody(output.body, context),
994
- };
995
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
996
- switch (errorCode) {
997
- case "InternalServerException":
998
- case "com.amazonaws.comprehendmedical#InternalServerException":
999
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1000
- case "InvalidRequestException":
1001
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1002
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1003
- case "ResourceNotFoundException":
1004
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1005
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1006
- case "TooManyRequestsException":
1007
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1008
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1009
- default:
1010
- const parsedBody = parsedOutput.body;
1011
- return throwDefaultError({
1012
- output,
1013
- parsedBody,
1014
- errorCode,
1015
- });
1016
- }
1017
- };
1018
422
  export const de_StartSNOMEDCTInferenceJobCommand = async (output, context) => {
1019
423
  if (output.statusCode >= 300) {
1020
- return de_StartSNOMEDCTInferenceJobCommandError(output, context);
424
+ return de_CommandError(output, context);
1021
425
  }
1022
426
  const data = await parseBody(output.body, context);
1023
427
  let contents = {};
@@ -1028,37 +432,9 @@ export const de_StartSNOMEDCTInferenceJobCommand = async (output, context) => {
1028
432
  };
1029
433
  return response;
1030
434
  };
1031
- const de_StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
1032
- const parsedOutput = {
1033
- ...output,
1034
- body: await parseErrorBody(output.body, context),
1035
- };
1036
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1037
- switch (errorCode) {
1038
- case "InternalServerException":
1039
- case "com.amazonaws.comprehendmedical#InternalServerException":
1040
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1041
- case "InvalidRequestException":
1042
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1043
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1044
- case "ResourceNotFoundException":
1045
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1046
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1047
- case "TooManyRequestsException":
1048
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1049
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1050
- default:
1051
- const parsedBody = parsedOutput.body;
1052
- return throwDefaultError({
1053
- output,
1054
- parsedBody,
1055
- errorCode,
1056
- });
1057
- }
1058
- };
1059
435
  export const de_StopEntitiesDetectionV2JobCommand = async (output, context) => {
1060
436
  if (output.statusCode >= 300) {
1061
- return de_StopEntitiesDetectionV2JobCommandError(output, context);
437
+ return de_CommandError(output, context);
1062
438
  }
1063
439
  const data = await parseBody(output.body, context);
1064
440
  let contents = {};
@@ -1069,34 +445,9 @@ export const de_StopEntitiesDetectionV2JobCommand = async (output, context) => {
1069
445
  };
1070
446
  return response;
1071
447
  };
1072
- const de_StopEntitiesDetectionV2JobCommandError = async (output, context) => {
1073
- const parsedOutput = {
1074
- ...output,
1075
- body: await parseErrorBody(output.body, context),
1076
- };
1077
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1078
- switch (errorCode) {
1079
- case "InternalServerException":
1080
- case "com.amazonaws.comprehendmedical#InternalServerException":
1081
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1082
- case "InvalidRequestException":
1083
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1084
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1085
- case "ResourceNotFoundException":
1086
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1087
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1088
- default:
1089
- const parsedBody = parsedOutput.body;
1090
- return throwDefaultError({
1091
- output,
1092
- parsedBody,
1093
- errorCode,
1094
- });
1095
- }
1096
- };
1097
448
  export const de_StopICD10CMInferenceJobCommand = async (output, context) => {
1098
449
  if (output.statusCode >= 300) {
1099
- return de_StopICD10CMInferenceJobCommandError(output, context);
450
+ return de_CommandError(output, context);
1100
451
  }
1101
452
  const data = await parseBody(output.body, context);
1102
453
  let contents = {};
@@ -1107,34 +458,9 @@ export const de_StopICD10CMInferenceJobCommand = async (output, context) => {
1107
458
  };
1108
459
  return response;
1109
460
  };
1110
- const de_StopICD10CMInferenceJobCommandError = async (output, context) => {
1111
- const parsedOutput = {
1112
- ...output,
1113
- body: await parseErrorBody(output.body, context),
1114
- };
1115
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1116
- switch (errorCode) {
1117
- case "InternalServerException":
1118
- case "com.amazonaws.comprehendmedical#InternalServerException":
1119
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1120
- case "InvalidRequestException":
1121
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1122
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1123
- case "ResourceNotFoundException":
1124
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1125
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1126
- default:
1127
- const parsedBody = parsedOutput.body;
1128
- return throwDefaultError({
1129
- output,
1130
- parsedBody,
1131
- errorCode,
1132
- });
1133
- }
1134
- };
1135
461
  export const de_StopPHIDetectionJobCommand = async (output, context) => {
1136
462
  if (output.statusCode >= 300) {
1137
- return de_StopPHIDetectionJobCommandError(output, context);
463
+ return de_CommandError(output, context);
1138
464
  }
1139
465
  const data = await parseBody(output.body, context);
1140
466
  let contents = {};
@@ -1145,34 +471,9 @@ export const de_StopPHIDetectionJobCommand = async (output, context) => {
1145
471
  };
1146
472
  return response;
1147
473
  };
1148
- const de_StopPHIDetectionJobCommandError = async (output, context) => {
1149
- const parsedOutput = {
1150
- ...output,
1151
- body: await parseErrorBody(output.body, context),
1152
- };
1153
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1154
- switch (errorCode) {
1155
- case "InternalServerException":
1156
- case "com.amazonaws.comprehendmedical#InternalServerException":
1157
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1158
- case "InvalidRequestException":
1159
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1160
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1161
- case "ResourceNotFoundException":
1162
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1163
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1164
- default:
1165
- const parsedBody = parsedOutput.body;
1166
- return throwDefaultError({
1167
- output,
1168
- parsedBody,
1169
- errorCode,
1170
- });
1171
- }
1172
- };
1173
474
  export const de_StopRxNormInferenceJobCommand = async (output, context) => {
1174
475
  if (output.statusCode >= 300) {
1175
- return de_StopRxNormInferenceJobCommandError(output, context);
476
+ return de_CommandError(output, context);
1176
477
  }
1177
478
  const data = await parseBody(output.body, context);
1178
479
  let contents = {};
@@ -1183,34 +484,9 @@ export const de_StopRxNormInferenceJobCommand = async (output, context) => {
1183
484
  };
1184
485
  return response;
1185
486
  };
1186
- const de_StopRxNormInferenceJobCommandError = async (output, context) => {
1187
- const parsedOutput = {
1188
- ...output,
1189
- body: await parseErrorBody(output.body, context),
1190
- };
1191
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1192
- switch (errorCode) {
1193
- case "InternalServerException":
1194
- case "com.amazonaws.comprehendmedical#InternalServerException":
1195
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1196
- case "InvalidRequestException":
1197
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1198
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1199
- case "ResourceNotFoundException":
1200
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1202
- default:
1203
- const parsedBody = parsedOutput.body;
1204
- return throwDefaultError({
1205
- output,
1206
- parsedBody,
1207
- errorCode,
1208
- });
1209
- }
1210
- };
1211
487
  export const de_StopSNOMEDCTInferenceJobCommand = async (output, context) => {
1212
488
  if (output.statusCode >= 300) {
1213
- return de_StopSNOMEDCTInferenceJobCommandError(output, context);
489
+ return de_CommandError(output, context);
1214
490
  }
1215
491
  const data = await parseBody(output.body, context);
1216
492
  let contents = {};
@@ -1221,7 +497,7 @@ export const de_StopSNOMEDCTInferenceJobCommand = async (output, context) => {
1221
497
  };
1222
498
  return response;
1223
499
  };
1224
- const de_StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
500
+ const de_CommandError = async (output, context) => {
1225
501
  const parsedOutput = {
1226
502
  ...output,
1227
503
  body: await parseErrorBody(output.body, context),
@@ -1240,6 +516,18 @@ const de_StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
1240
516
  case "TooManyRequestsException":
1241
517
  case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1242
518
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
519
+ case "InvalidEncodingException":
520
+ case "com.amazonaws.comprehendmedical#InvalidEncodingException":
521
+ throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
522
+ case "ServiceUnavailableException":
523
+ case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
524
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
525
+ case "TextSizeLimitExceededException":
526
+ case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
527
+ throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
528
+ case "ValidationException":
529
+ case "com.amazonaws.comprehendmedical#ValidationException":
530
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1243
531
  default:
1244
532
  const parsedBody = parsedOutput.body;
1245
533
  return throwDefaultError({