@aws-sdk/client-medical-imaging 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.
@@ -329,7 +329,7 @@ export const se_UpdateImageSetMetadataCommand = async (input, context) => {
329
329
  };
330
330
  export const de_CopyImageSetCommand = async (output, context) => {
331
331
  if (output.statusCode !== 200 && output.statusCode >= 300) {
332
- return de_CopyImageSetCommandError(output, context);
332
+ return de_CommandError(output, context);
333
333
  }
334
334
  const contents = map({
335
335
  $metadata: deserializeMetadata(output),
@@ -343,46 +343,9 @@ export const de_CopyImageSetCommand = async (output, context) => {
343
343
  Object.assign(contents, doc);
344
344
  return contents;
345
345
  };
346
- const de_CopyImageSetCommandError = async (output, context) => {
347
- const parsedOutput = {
348
- ...output,
349
- body: await parseErrorBody(output.body, context),
350
- };
351
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
- switch (errorCode) {
353
- case "AccessDeniedException":
354
- case "com.amazonaws.medicalimaging#AccessDeniedException":
355
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
356
- case "ConflictException":
357
- case "com.amazonaws.medicalimaging#ConflictException":
358
- throw await de_ConflictExceptionRes(parsedOutput, context);
359
- case "InternalServerException":
360
- case "com.amazonaws.medicalimaging#InternalServerException":
361
- throw await de_InternalServerExceptionRes(parsedOutput, context);
362
- case "ResourceNotFoundException":
363
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
364
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
365
- case "ServiceQuotaExceededException":
366
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
367
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
368
- case "ThrottlingException":
369
- case "com.amazonaws.medicalimaging#ThrottlingException":
370
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
371
- case "ValidationException":
372
- case "com.amazonaws.medicalimaging#ValidationException":
373
- throw await de_ValidationExceptionRes(parsedOutput, context);
374
- default:
375
- const parsedBody = parsedOutput.body;
376
- return throwDefaultError({
377
- output,
378
- parsedBody,
379
- errorCode,
380
- });
381
- }
382
- };
383
346
  export const de_CreateDatastoreCommand = async (output, context) => {
384
347
  if (output.statusCode !== 200 && output.statusCode >= 300) {
385
- return de_CreateDatastoreCommandError(output, context);
348
+ return de_CommandError(output, context);
386
349
  }
387
350
  const contents = map({
388
351
  $metadata: deserializeMetadata(output),
@@ -395,43 +358,9 @@ export const de_CreateDatastoreCommand = async (output, context) => {
395
358
  Object.assign(contents, doc);
396
359
  return contents;
397
360
  };
398
- const de_CreateDatastoreCommandError = async (output, context) => {
399
- const parsedOutput = {
400
- ...output,
401
- body: await parseErrorBody(output.body, context),
402
- };
403
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
404
- switch (errorCode) {
405
- case "AccessDeniedException":
406
- case "com.amazonaws.medicalimaging#AccessDeniedException":
407
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
408
- case "ConflictException":
409
- case "com.amazonaws.medicalimaging#ConflictException":
410
- throw await de_ConflictExceptionRes(parsedOutput, context);
411
- case "InternalServerException":
412
- case "com.amazonaws.medicalimaging#InternalServerException":
413
- throw await de_InternalServerExceptionRes(parsedOutput, context);
414
- case "ServiceQuotaExceededException":
415
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
416
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
417
- case "ThrottlingException":
418
- case "com.amazonaws.medicalimaging#ThrottlingException":
419
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
420
- case "ValidationException":
421
- case "com.amazonaws.medicalimaging#ValidationException":
422
- throw await de_ValidationExceptionRes(parsedOutput, context);
423
- default:
424
- const parsedBody = parsedOutput.body;
425
- return throwDefaultError({
426
- output,
427
- parsedBody,
428
- errorCode,
429
- });
430
- }
431
- };
432
361
  export const de_DeleteDatastoreCommand = async (output, context) => {
433
362
  if (output.statusCode !== 200 && output.statusCode >= 300) {
434
- return de_DeleteDatastoreCommandError(output, context);
363
+ return de_CommandError(output, context);
435
364
  }
436
365
  const contents = map({
437
366
  $metadata: deserializeMetadata(output),
@@ -444,43 +373,9 @@ export const de_DeleteDatastoreCommand = async (output, context) => {
444
373
  Object.assign(contents, doc);
445
374
  return contents;
446
375
  };
447
- const de_DeleteDatastoreCommandError = async (output, context) => {
448
- const parsedOutput = {
449
- ...output,
450
- body: await parseErrorBody(output.body, context),
451
- };
452
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
453
- switch (errorCode) {
454
- case "AccessDeniedException":
455
- case "com.amazonaws.medicalimaging#AccessDeniedException":
456
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
457
- case "ConflictException":
458
- case "com.amazonaws.medicalimaging#ConflictException":
459
- throw await de_ConflictExceptionRes(parsedOutput, context);
460
- case "InternalServerException":
461
- case "com.amazonaws.medicalimaging#InternalServerException":
462
- throw await de_InternalServerExceptionRes(parsedOutput, context);
463
- case "ResourceNotFoundException":
464
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
465
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
466
- case "ThrottlingException":
467
- case "com.amazonaws.medicalimaging#ThrottlingException":
468
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
469
- case "ValidationException":
470
- case "com.amazonaws.medicalimaging#ValidationException":
471
- throw await de_ValidationExceptionRes(parsedOutput, context);
472
- default:
473
- const parsedBody = parsedOutput.body;
474
- return throwDefaultError({
475
- output,
476
- parsedBody,
477
- errorCode,
478
- });
479
- }
480
- };
481
376
  export const de_DeleteImageSetCommand = async (output, context) => {
482
377
  if (output.statusCode !== 200 && output.statusCode >= 300) {
483
- return de_DeleteImageSetCommandError(output, context);
378
+ return de_CommandError(output, context);
484
379
  }
485
380
  const contents = map({
486
381
  $metadata: deserializeMetadata(output),
@@ -495,43 +390,9 @@ export const de_DeleteImageSetCommand = async (output, context) => {
495
390
  Object.assign(contents, doc);
496
391
  return contents;
497
392
  };
498
- const de_DeleteImageSetCommandError = async (output, context) => {
499
- const parsedOutput = {
500
- ...output,
501
- body: await parseErrorBody(output.body, context),
502
- };
503
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
- switch (errorCode) {
505
- case "AccessDeniedException":
506
- case "com.amazonaws.medicalimaging#AccessDeniedException":
507
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
508
- case "ConflictException":
509
- case "com.amazonaws.medicalimaging#ConflictException":
510
- throw await de_ConflictExceptionRes(parsedOutput, context);
511
- case "InternalServerException":
512
- case "com.amazonaws.medicalimaging#InternalServerException":
513
- throw await de_InternalServerExceptionRes(parsedOutput, context);
514
- case "ResourceNotFoundException":
515
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
516
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
517
- case "ThrottlingException":
518
- case "com.amazonaws.medicalimaging#ThrottlingException":
519
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
520
- case "ValidationException":
521
- case "com.amazonaws.medicalimaging#ValidationException":
522
- throw await de_ValidationExceptionRes(parsedOutput, context);
523
- default:
524
- const parsedBody = parsedOutput.body;
525
- return throwDefaultError({
526
- output,
527
- parsedBody,
528
- errorCode,
529
- });
530
- }
531
- };
532
393
  export const de_GetDatastoreCommand = async (output, context) => {
533
394
  if (output.statusCode !== 200 && output.statusCode >= 300) {
534
- return de_GetDatastoreCommandError(output, context);
395
+ return de_CommandError(output, context);
535
396
  }
536
397
  const contents = map({
537
398
  $metadata: deserializeMetadata(output),
@@ -543,40 +404,9 @@ export const de_GetDatastoreCommand = async (output, context) => {
543
404
  Object.assign(contents, doc);
544
405
  return contents;
545
406
  };
546
- const de_GetDatastoreCommandError = async (output, context) => {
547
- const parsedOutput = {
548
- ...output,
549
- body: await parseErrorBody(output.body, context),
550
- };
551
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
552
- switch (errorCode) {
553
- case "AccessDeniedException":
554
- case "com.amazonaws.medicalimaging#AccessDeniedException":
555
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
556
- case "InternalServerException":
557
- case "com.amazonaws.medicalimaging#InternalServerException":
558
- throw await de_InternalServerExceptionRes(parsedOutput, context);
559
- case "ResourceNotFoundException":
560
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
561
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
562
- case "ThrottlingException":
563
- case "com.amazonaws.medicalimaging#ThrottlingException":
564
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
565
- case "ValidationException":
566
- case "com.amazonaws.medicalimaging#ValidationException":
567
- throw await de_ValidationExceptionRes(parsedOutput, context);
568
- default:
569
- const parsedBody = parsedOutput.body;
570
- return throwDefaultError({
571
- output,
572
- parsedBody,
573
- errorCode,
574
- });
575
- }
576
- };
577
407
  export const de_GetDICOMImportJobCommand = async (output, context) => {
578
408
  if (output.statusCode !== 200 && output.statusCode >= 300) {
579
- return de_GetDICOMImportJobCommandError(output, context);
409
+ return de_CommandError(output, context);
580
410
  }
581
411
  const contents = map({
582
412
  $metadata: deserializeMetadata(output),
@@ -588,43 +418,9 @@ export const de_GetDICOMImportJobCommand = async (output, context) => {
588
418
  Object.assign(contents, doc);
589
419
  return contents;
590
420
  };
591
- const de_GetDICOMImportJobCommandError = async (output, context) => {
592
- const parsedOutput = {
593
- ...output,
594
- body: await parseErrorBody(output.body, context),
595
- };
596
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
597
- switch (errorCode) {
598
- case "AccessDeniedException":
599
- case "com.amazonaws.medicalimaging#AccessDeniedException":
600
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
601
- case "ConflictException":
602
- case "com.amazonaws.medicalimaging#ConflictException":
603
- throw await de_ConflictExceptionRes(parsedOutput, context);
604
- case "InternalServerException":
605
- case "com.amazonaws.medicalimaging#InternalServerException":
606
- throw await de_InternalServerExceptionRes(parsedOutput, context);
607
- case "ResourceNotFoundException":
608
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
609
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
610
- case "ThrottlingException":
611
- case "com.amazonaws.medicalimaging#ThrottlingException":
612
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
613
- case "ValidationException":
614
- case "com.amazonaws.medicalimaging#ValidationException":
615
- throw await de_ValidationExceptionRes(parsedOutput, context);
616
- default:
617
- const parsedBody = parsedOutput.body;
618
- return throwDefaultError({
619
- output,
620
- parsedBody,
621
- errorCode,
622
- });
623
- }
624
- };
625
421
  export const de_GetImageFrameCommand = async (output, context) => {
626
422
  if (output.statusCode !== 200 && output.statusCode >= 300) {
627
- return de_GetImageFrameCommandError(output, context);
423
+ return de_CommandError(output, context);
628
424
  }
629
425
  const contents = map({
630
426
  $metadata: deserializeMetadata(output),
@@ -635,43 +431,9 @@ export const de_GetImageFrameCommand = async (output, context) => {
635
431
  contents.imageFrameBlob = data;
636
432
  return contents;
637
433
  };
638
- const de_GetImageFrameCommandError = async (output, context) => {
639
- const parsedOutput = {
640
- ...output,
641
- body: await parseErrorBody(output.body, context),
642
- };
643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
644
- switch (errorCode) {
645
- case "AccessDeniedException":
646
- case "com.amazonaws.medicalimaging#AccessDeniedException":
647
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
648
- case "ConflictException":
649
- case "com.amazonaws.medicalimaging#ConflictException":
650
- throw await de_ConflictExceptionRes(parsedOutput, context);
651
- case "InternalServerException":
652
- case "com.amazonaws.medicalimaging#InternalServerException":
653
- throw await de_InternalServerExceptionRes(parsedOutput, context);
654
- case "ResourceNotFoundException":
655
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
656
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
657
- case "ThrottlingException":
658
- case "com.amazonaws.medicalimaging#ThrottlingException":
659
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
660
- case "ValidationException":
661
- case "com.amazonaws.medicalimaging#ValidationException":
662
- throw await de_ValidationExceptionRes(parsedOutput, context);
663
- default:
664
- const parsedBody = parsedOutput.body;
665
- return throwDefaultError({
666
- output,
667
- parsedBody,
668
- errorCode,
669
- });
670
- }
671
- };
672
434
  export const de_GetImageSetCommand = async (output, context) => {
673
435
  if (output.statusCode !== 200 && output.statusCode >= 300) {
674
- return de_GetImageSetCommandError(output, context);
436
+ return de_CommandError(output, context);
675
437
  }
676
438
  const contents = map({
677
439
  $metadata: deserializeMetadata(output),
@@ -692,43 +454,9 @@ export const de_GetImageSetCommand = async (output, context) => {
692
454
  Object.assign(contents, doc);
693
455
  return contents;
694
456
  };
695
- const de_GetImageSetCommandError = async (output, context) => {
696
- const parsedOutput = {
697
- ...output,
698
- body: await parseErrorBody(output.body, context),
699
- };
700
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
701
- switch (errorCode) {
702
- case "AccessDeniedException":
703
- case "com.amazonaws.medicalimaging#AccessDeniedException":
704
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
705
- case "ConflictException":
706
- case "com.amazonaws.medicalimaging#ConflictException":
707
- throw await de_ConflictExceptionRes(parsedOutput, context);
708
- case "InternalServerException":
709
- case "com.amazonaws.medicalimaging#InternalServerException":
710
- throw await de_InternalServerExceptionRes(parsedOutput, context);
711
- case "ResourceNotFoundException":
712
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
713
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
714
- case "ThrottlingException":
715
- case "com.amazonaws.medicalimaging#ThrottlingException":
716
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
717
- case "ValidationException":
718
- case "com.amazonaws.medicalimaging#ValidationException":
719
- throw await de_ValidationExceptionRes(parsedOutput, context);
720
- default:
721
- const parsedBody = parsedOutput.body;
722
- return throwDefaultError({
723
- output,
724
- parsedBody,
725
- errorCode,
726
- });
727
- }
728
- };
729
457
  export const de_GetImageSetMetadataCommand = async (output, context) => {
730
458
  if (output.statusCode !== 200 && output.statusCode >= 300) {
731
- return de_GetImageSetMetadataCommandError(output, context);
459
+ return de_CommandError(output, context);
732
460
  }
733
461
  const contents = map({
734
462
  $metadata: deserializeMetadata(output),
@@ -740,43 +468,9 @@ export const de_GetImageSetMetadataCommand = async (output, context) => {
740
468
  contents.imageSetMetadataBlob = data;
741
469
  return contents;
742
470
  };
743
- const de_GetImageSetMetadataCommandError = async (output, context) => {
744
- const parsedOutput = {
745
- ...output,
746
- body: await parseErrorBody(output.body, context),
747
- };
748
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
749
- switch (errorCode) {
750
- case "AccessDeniedException":
751
- case "com.amazonaws.medicalimaging#AccessDeniedException":
752
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
753
- case "ConflictException":
754
- case "com.amazonaws.medicalimaging#ConflictException":
755
- throw await de_ConflictExceptionRes(parsedOutput, context);
756
- case "InternalServerException":
757
- case "com.amazonaws.medicalimaging#InternalServerException":
758
- throw await de_InternalServerExceptionRes(parsedOutput, context);
759
- case "ResourceNotFoundException":
760
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
761
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
762
- case "ThrottlingException":
763
- case "com.amazonaws.medicalimaging#ThrottlingException":
764
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
765
- case "ValidationException":
766
- case "com.amazonaws.medicalimaging#ValidationException":
767
- throw await de_ValidationExceptionRes(parsedOutput, context);
768
- default:
769
- const parsedBody = parsedOutput.body;
770
- return throwDefaultError({
771
- output,
772
- parsedBody,
773
- errorCode,
774
- });
775
- }
776
- };
777
471
  export const de_ListDatastoresCommand = async (output, context) => {
778
472
  if (output.statusCode !== 200 && output.statusCode >= 300) {
779
- return de_ListDatastoresCommandError(output, context);
473
+ return de_CommandError(output, context);
780
474
  }
781
475
  const contents = map({
782
476
  $metadata: deserializeMetadata(output),
@@ -789,37 +483,9 @@ export const de_ListDatastoresCommand = async (output, context) => {
789
483
  Object.assign(contents, doc);
790
484
  return contents;
791
485
  };
792
- const de_ListDatastoresCommandError = async (output, context) => {
793
- const parsedOutput = {
794
- ...output,
795
- body: await parseErrorBody(output.body, context),
796
- };
797
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
798
- switch (errorCode) {
799
- case "AccessDeniedException":
800
- case "com.amazonaws.medicalimaging#AccessDeniedException":
801
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
802
- case "InternalServerException":
803
- case "com.amazonaws.medicalimaging#InternalServerException":
804
- throw await de_InternalServerExceptionRes(parsedOutput, context);
805
- case "ThrottlingException":
806
- case "com.amazonaws.medicalimaging#ThrottlingException":
807
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
808
- case "ValidationException":
809
- case "com.amazonaws.medicalimaging#ValidationException":
810
- throw await de_ValidationExceptionRes(parsedOutput, context);
811
- default:
812
- const parsedBody = parsedOutput.body;
813
- return throwDefaultError({
814
- output,
815
- parsedBody,
816
- errorCode,
817
- });
818
- }
819
- };
820
486
  export const de_ListDICOMImportJobsCommand = async (output, context) => {
821
487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
822
- return de_ListDICOMImportJobsCommandError(output, context);
488
+ return de_CommandError(output, context);
823
489
  }
824
490
  const contents = map({
825
491
  $metadata: deserializeMetadata(output),
@@ -832,43 +498,9 @@ export const de_ListDICOMImportJobsCommand = async (output, context) => {
832
498
  Object.assign(contents, doc);
833
499
  return contents;
834
500
  };
835
- const de_ListDICOMImportJobsCommandError = async (output, context) => {
836
- const parsedOutput = {
837
- ...output,
838
- body: await parseErrorBody(output.body, context),
839
- };
840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
841
- switch (errorCode) {
842
- case "AccessDeniedException":
843
- case "com.amazonaws.medicalimaging#AccessDeniedException":
844
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
845
- case "ConflictException":
846
- case "com.amazonaws.medicalimaging#ConflictException":
847
- throw await de_ConflictExceptionRes(parsedOutput, context);
848
- case "InternalServerException":
849
- case "com.amazonaws.medicalimaging#InternalServerException":
850
- throw await de_InternalServerExceptionRes(parsedOutput, context);
851
- case "ResourceNotFoundException":
852
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
853
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
854
- case "ThrottlingException":
855
- case "com.amazonaws.medicalimaging#ThrottlingException":
856
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
857
- case "ValidationException":
858
- case "com.amazonaws.medicalimaging#ValidationException":
859
- throw await de_ValidationExceptionRes(parsedOutput, context);
860
- default:
861
- const parsedBody = parsedOutput.body;
862
- return throwDefaultError({
863
- output,
864
- parsedBody,
865
- errorCode,
866
- });
867
- }
868
- };
869
501
  export const de_ListImageSetVersionsCommand = async (output, context) => {
870
502
  if (output.statusCode !== 200 && output.statusCode >= 300) {
871
- return de_ListImageSetVersionsCommandError(output, context);
503
+ return de_CommandError(output, context);
872
504
  }
873
505
  const contents = map({
874
506
  $metadata: deserializeMetadata(output),
@@ -881,43 +513,9 @@ export const de_ListImageSetVersionsCommand = async (output, context) => {
881
513
  Object.assign(contents, doc);
882
514
  return contents;
883
515
  };
884
- const de_ListImageSetVersionsCommandError = async (output, context) => {
885
- const parsedOutput = {
886
- ...output,
887
- body: await parseErrorBody(output.body, context),
888
- };
889
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
890
- switch (errorCode) {
891
- case "AccessDeniedException":
892
- case "com.amazonaws.medicalimaging#AccessDeniedException":
893
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
894
- case "ConflictException":
895
- case "com.amazonaws.medicalimaging#ConflictException":
896
- throw await de_ConflictExceptionRes(parsedOutput, context);
897
- case "InternalServerException":
898
- case "com.amazonaws.medicalimaging#InternalServerException":
899
- throw await de_InternalServerExceptionRes(parsedOutput, context);
900
- case "ResourceNotFoundException":
901
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
902
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
903
- case "ThrottlingException":
904
- case "com.amazonaws.medicalimaging#ThrottlingException":
905
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
906
- case "ValidationException":
907
- case "com.amazonaws.medicalimaging#ValidationException":
908
- throw await de_ValidationExceptionRes(parsedOutput, context);
909
- default:
910
- const parsedBody = parsedOutput.body;
911
- return throwDefaultError({
912
- output,
913
- parsedBody,
914
- errorCode,
915
- });
916
- }
917
- };
918
516
  export const de_ListTagsForResourceCommand = async (output, context) => {
919
517
  if (output.statusCode !== 200 && output.statusCode >= 300) {
920
- return de_ListTagsForResourceCommandError(output, context);
518
+ return de_CommandError(output, context);
921
519
  }
922
520
  const contents = map({
923
521
  $metadata: deserializeMetadata(output),
@@ -929,40 +527,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
929
527
  Object.assign(contents, doc);
930
528
  return contents;
931
529
  };
932
- const de_ListTagsForResourceCommandError = async (output, context) => {
933
- const parsedOutput = {
934
- ...output,
935
- body: await parseErrorBody(output.body, context),
936
- };
937
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
- switch (errorCode) {
939
- case "AccessDeniedException":
940
- case "com.amazonaws.medicalimaging#AccessDeniedException":
941
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
942
- case "InternalServerException":
943
- case "com.amazonaws.medicalimaging#InternalServerException":
944
- throw await de_InternalServerExceptionRes(parsedOutput, context);
945
- case "ResourceNotFoundException":
946
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
947
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
948
- case "ThrottlingException":
949
- case "com.amazonaws.medicalimaging#ThrottlingException":
950
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
951
- case "ValidationException":
952
- case "com.amazonaws.medicalimaging#ValidationException":
953
- throw await de_ValidationExceptionRes(parsedOutput, context);
954
- default:
955
- const parsedBody = parsedOutput.body;
956
- return throwDefaultError({
957
- output,
958
- parsedBody,
959
- errorCode,
960
- });
961
- }
962
- };
963
530
  export const de_SearchImageSetsCommand = async (output, context) => {
964
531
  if (output.statusCode !== 200 && output.statusCode >= 300) {
965
- return de_SearchImageSetsCommandError(output, context);
532
+ return de_CommandError(output, context);
966
533
  }
967
534
  const contents = map({
968
535
  $metadata: deserializeMetadata(output),
@@ -975,43 +542,9 @@ export const de_SearchImageSetsCommand = async (output, context) => {
975
542
  Object.assign(contents, doc);
976
543
  return contents;
977
544
  };
978
- const de_SearchImageSetsCommandError = async (output, context) => {
979
- const parsedOutput = {
980
- ...output,
981
- body: await parseErrorBody(output.body, context),
982
- };
983
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
984
- switch (errorCode) {
985
- case "AccessDeniedException":
986
- case "com.amazonaws.medicalimaging#AccessDeniedException":
987
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
988
- case "ConflictException":
989
- case "com.amazonaws.medicalimaging#ConflictException":
990
- throw await de_ConflictExceptionRes(parsedOutput, context);
991
- case "InternalServerException":
992
- case "com.amazonaws.medicalimaging#InternalServerException":
993
- throw await de_InternalServerExceptionRes(parsedOutput, context);
994
- case "ResourceNotFoundException":
995
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
996
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
997
- case "ThrottlingException":
998
- case "com.amazonaws.medicalimaging#ThrottlingException":
999
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1000
- case "ValidationException":
1001
- case "com.amazonaws.medicalimaging#ValidationException":
1002
- throw await de_ValidationExceptionRes(parsedOutput, context);
1003
- default:
1004
- const parsedBody = parsedOutput.body;
1005
- return throwDefaultError({
1006
- output,
1007
- parsedBody,
1008
- errorCode,
1009
- });
1010
- }
1011
- };
1012
545
  export const de_StartDICOMImportJobCommand = async (output, context) => {
1013
546
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1014
- return de_StartDICOMImportJobCommandError(output, context);
547
+ return de_CommandError(output, context);
1015
548
  }
1016
549
  const contents = map({
1017
550
  $metadata: deserializeMetadata(output),
@@ -1026,46 +559,9 @@ export const de_StartDICOMImportJobCommand = async (output, context) => {
1026
559
  Object.assign(contents, doc);
1027
560
  return contents;
1028
561
  };
1029
- const de_StartDICOMImportJobCommandError = async (output, context) => {
1030
- const parsedOutput = {
1031
- ...output,
1032
- body: await parseErrorBody(output.body, context),
1033
- };
1034
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1035
- switch (errorCode) {
1036
- case "AccessDeniedException":
1037
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1038
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1039
- case "ConflictException":
1040
- case "com.amazonaws.medicalimaging#ConflictException":
1041
- throw await de_ConflictExceptionRes(parsedOutput, context);
1042
- case "InternalServerException":
1043
- case "com.amazonaws.medicalimaging#InternalServerException":
1044
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1045
- case "ResourceNotFoundException":
1046
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1047
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1048
- case "ServiceQuotaExceededException":
1049
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
1050
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1051
- case "ThrottlingException":
1052
- case "com.amazonaws.medicalimaging#ThrottlingException":
1053
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1054
- case "ValidationException":
1055
- case "com.amazonaws.medicalimaging#ValidationException":
1056
- throw await de_ValidationExceptionRes(parsedOutput, context);
1057
- default:
1058
- const parsedBody = parsedOutput.body;
1059
- return throwDefaultError({
1060
- output,
1061
- parsedBody,
1062
- errorCode,
1063
- });
1064
- }
1065
- };
1066
562
  export const de_TagResourceCommand = async (output, context) => {
1067
563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1068
- return de_TagResourceCommandError(output, context);
564
+ return de_CommandError(output, context);
1069
565
  }
1070
566
  const contents = map({
1071
567
  $metadata: deserializeMetadata(output),
@@ -1073,40 +569,9 @@ export const de_TagResourceCommand = async (output, context) => {
1073
569
  await collectBody(output.body, context);
1074
570
  return contents;
1075
571
  };
1076
- const de_TagResourceCommandError = async (output, context) => {
1077
- const parsedOutput = {
1078
- ...output,
1079
- body: await parseErrorBody(output.body, context),
1080
- };
1081
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1082
- switch (errorCode) {
1083
- case "AccessDeniedException":
1084
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1085
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1086
- case "InternalServerException":
1087
- case "com.amazonaws.medicalimaging#InternalServerException":
1088
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1089
- case "ResourceNotFoundException":
1090
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1091
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1092
- case "ThrottlingException":
1093
- case "com.amazonaws.medicalimaging#ThrottlingException":
1094
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1095
- case "ValidationException":
1096
- case "com.amazonaws.medicalimaging#ValidationException":
1097
- throw await de_ValidationExceptionRes(parsedOutput, context);
1098
- default:
1099
- const parsedBody = parsedOutput.body;
1100
- return throwDefaultError({
1101
- output,
1102
- parsedBody,
1103
- errorCode,
1104
- });
1105
- }
1106
- };
1107
572
  export const de_UntagResourceCommand = async (output, context) => {
1108
573
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1109
- return de_UntagResourceCommandError(output, context);
574
+ return de_CommandError(output, context);
1110
575
  }
1111
576
  const contents = map({
1112
577
  $metadata: deserializeMetadata(output),
@@ -1114,40 +579,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1114
579
  await collectBody(output.body, context);
1115
580
  return contents;
1116
581
  };
1117
- const de_UntagResourceCommandError = async (output, context) => {
1118
- const parsedOutput = {
1119
- ...output,
1120
- body: await parseErrorBody(output.body, context),
1121
- };
1122
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1123
- switch (errorCode) {
1124
- case "AccessDeniedException":
1125
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1126
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1127
- case "InternalServerException":
1128
- case "com.amazonaws.medicalimaging#InternalServerException":
1129
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1130
- case "ResourceNotFoundException":
1131
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1132
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1133
- case "ThrottlingException":
1134
- case "com.amazonaws.medicalimaging#ThrottlingException":
1135
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1136
- case "ValidationException":
1137
- case "com.amazonaws.medicalimaging#ValidationException":
1138
- throw await de_ValidationExceptionRes(parsedOutput, context);
1139
- default:
1140
- const parsedBody = parsedOutput.body;
1141
- return throwDefaultError({
1142
- output,
1143
- parsedBody,
1144
- errorCode,
1145
- });
1146
- }
1147
- };
1148
582
  export const de_UpdateImageSetMetadataCommand = async (output, context) => {
1149
583
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1150
- return de_UpdateImageSetMetadataCommandError(output, context);
584
+ return de_CommandError(output, context);
1151
585
  }
1152
586
  const contents = map({
1153
587
  $metadata: deserializeMetadata(output),
@@ -1166,7 +600,7 @@ export const de_UpdateImageSetMetadataCommand = async (output, context) => {
1166
600
  Object.assign(contents, doc);
1167
601
  return contents;
1168
602
  };
1169
- const de_UpdateImageSetMetadataCommandError = async (output, context) => {
603
+ const de_CommandError = async (output, context) => {
1170
604
  const parsedOutput = {
1171
605
  ...output,
1172
606
  body: await parseErrorBody(output.body, context),