@aws-sdk/client-forecast 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.
@@ -382,7 +382,7 @@ export const se_UpdateDatasetGroupCommand = async (input, context) => {
382
382
  };
383
383
  export const de_CreateAutoPredictorCommand = async (output, context) => {
384
384
  if (output.statusCode >= 300) {
385
- return de_CreateAutoPredictorCommandError(output, context);
385
+ return de_CommandError(output, context);
386
386
  }
387
387
  const data = await parseBody(output.body, context);
388
388
  let contents = {};
@@ -393,40 +393,9 @@ export const de_CreateAutoPredictorCommand = async (output, context) => {
393
393
  };
394
394
  return response;
395
395
  };
396
- const de_CreateAutoPredictorCommandError = async (output, context) => {
397
- const parsedOutput = {
398
- ...output,
399
- body: await parseErrorBody(output.body, context),
400
- };
401
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
- switch (errorCode) {
403
- case "InvalidInputException":
404
- case "com.amazonaws.forecast#InvalidInputException":
405
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
406
- case "LimitExceededException":
407
- case "com.amazonaws.forecast#LimitExceededException":
408
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
409
- case "ResourceAlreadyExistsException":
410
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
411
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
412
- case "ResourceInUseException":
413
- case "com.amazonaws.forecast#ResourceInUseException":
414
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
415
- case "ResourceNotFoundException":
416
- case "com.amazonaws.forecast#ResourceNotFoundException":
417
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
418
- default:
419
- const parsedBody = parsedOutput.body;
420
- return throwDefaultError({
421
- output,
422
- parsedBody,
423
- errorCode,
424
- });
425
- }
426
- };
427
396
  export const de_CreateDatasetCommand = async (output, context) => {
428
397
  if (output.statusCode >= 300) {
429
- return de_CreateDatasetCommandError(output, context);
398
+ return de_CommandError(output, context);
430
399
  }
431
400
  const data = await parseBody(output.body, context);
432
401
  let contents = {};
@@ -437,34 +406,9 @@ export const de_CreateDatasetCommand = async (output, context) => {
437
406
  };
438
407
  return response;
439
408
  };
440
- const de_CreateDatasetCommandError = async (output, context) => {
441
- const parsedOutput = {
442
- ...output,
443
- body: await parseErrorBody(output.body, context),
444
- };
445
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
446
- switch (errorCode) {
447
- case "InvalidInputException":
448
- case "com.amazonaws.forecast#InvalidInputException":
449
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
450
- case "LimitExceededException":
451
- case "com.amazonaws.forecast#LimitExceededException":
452
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
453
- case "ResourceAlreadyExistsException":
454
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
455
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
456
- default:
457
- const parsedBody = parsedOutput.body;
458
- return throwDefaultError({
459
- output,
460
- parsedBody,
461
- errorCode,
462
- });
463
- }
464
- };
465
409
  export const de_CreateDatasetGroupCommand = async (output, context) => {
466
410
  if (output.statusCode >= 300) {
467
- return de_CreateDatasetGroupCommandError(output, context);
411
+ return de_CommandError(output, context);
468
412
  }
469
413
  const data = await parseBody(output.body, context);
470
414
  let contents = {};
@@ -475,40 +419,9 @@ export const de_CreateDatasetGroupCommand = async (output, context) => {
475
419
  };
476
420
  return response;
477
421
  };
478
- const de_CreateDatasetGroupCommandError = async (output, context) => {
479
- const parsedOutput = {
480
- ...output,
481
- body: await parseErrorBody(output.body, context),
482
- };
483
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
484
- switch (errorCode) {
485
- case "InvalidInputException":
486
- case "com.amazonaws.forecast#InvalidInputException":
487
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
488
- case "LimitExceededException":
489
- case "com.amazonaws.forecast#LimitExceededException":
490
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
491
- case "ResourceAlreadyExistsException":
492
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
493
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
494
- case "ResourceInUseException":
495
- case "com.amazonaws.forecast#ResourceInUseException":
496
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
497
- case "ResourceNotFoundException":
498
- case "com.amazonaws.forecast#ResourceNotFoundException":
499
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
500
- default:
501
- const parsedBody = parsedOutput.body;
502
- return throwDefaultError({
503
- output,
504
- parsedBody,
505
- errorCode,
506
- });
507
- }
508
- };
509
422
  export const de_CreateDatasetImportJobCommand = async (output, context) => {
510
423
  if (output.statusCode >= 300) {
511
- return de_CreateDatasetImportJobCommandError(output, context);
424
+ return de_CommandError(output, context);
512
425
  }
513
426
  const data = await parseBody(output.body, context);
514
427
  let contents = {};
@@ -519,40 +432,9 @@ export const de_CreateDatasetImportJobCommand = async (output, context) => {
519
432
  };
520
433
  return response;
521
434
  };
522
- const de_CreateDatasetImportJobCommandError = async (output, context) => {
523
- const parsedOutput = {
524
- ...output,
525
- body: await parseErrorBody(output.body, context),
526
- };
527
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
528
- switch (errorCode) {
529
- case "InvalidInputException":
530
- case "com.amazonaws.forecast#InvalidInputException":
531
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
532
- case "LimitExceededException":
533
- case "com.amazonaws.forecast#LimitExceededException":
534
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
535
- case "ResourceAlreadyExistsException":
536
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
537
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
538
- case "ResourceInUseException":
539
- case "com.amazonaws.forecast#ResourceInUseException":
540
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
541
- case "ResourceNotFoundException":
542
- case "com.amazonaws.forecast#ResourceNotFoundException":
543
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
544
- default:
545
- const parsedBody = parsedOutput.body;
546
- return throwDefaultError({
547
- output,
548
- parsedBody,
549
- errorCode,
550
- });
551
- }
552
- };
553
435
  export const de_CreateExplainabilityCommand = async (output, context) => {
554
436
  if (output.statusCode >= 300) {
555
- return de_CreateExplainabilityCommandError(output, context);
437
+ return de_CommandError(output, context);
556
438
  }
557
439
  const data = await parseBody(output.body, context);
558
440
  let contents = {};
@@ -563,40 +445,9 @@ export const de_CreateExplainabilityCommand = async (output, context) => {
563
445
  };
564
446
  return response;
565
447
  };
566
- const de_CreateExplainabilityCommandError = async (output, context) => {
567
- const parsedOutput = {
568
- ...output,
569
- body: await parseErrorBody(output.body, context),
570
- };
571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
572
- switch (errorCode) {
573
- case "InvalidInputException":
574
- case "com.amazonaws.forecast#InvalidInputException":
575
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
576
- case "LimitExceededException":
577
- case "com.amazonaws.forecast#LimitExceededException":
578
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
579
- case "ResourceAlreadyExistsException":
580
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
581
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
582
- case "ResourceInUseException":
583
- case "com.amazonaws.forecast#ResourceInUseException":
584
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
585
- case "ResourceNotFoundException":
586
- case "com.amazonaws.forecast#ResourceNotFoundException":
587
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
588
- default:
589
- const parsedBody = parsedOutput.body;
590
- return throwDefaultError({
591
- output,
592
- parsedBody,
593
- errorCode,
594
- });
595
- }
596
- };
597
448
  export const de_CreateExplainabilityExportCommand = async (output, context) => {
598
449
  if (output.statusCode >= 300) {
599
- return de_CreateExplainabilityExportCommandError(output, context);
450
+ return de_CommandError(output, context);
600
451
  }
601
452
  const data = await parseBody(output.body, context);
602
453
  let contents = {};
@@ -607,40 +458,9 @@ export const de_CreateExplainabilityExportCommand = async (output, context) => {
607
458
  };
608
459
  return response;
609
460
  };
610
- const de_CreateExplainabilityExportCommandError = async (output, context) => {
611
- const parsedOutput = {
612
- ...output,
613
- body: await parseErrorBody(output.body, context),
614
- };
615
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
616
- switch (errorCode) {
617
- case "InvalidInputException":
618
- case "com.amazonaws.forecast#InvalidInputException":
619
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
620
- case "LimitExceededException":
621
- case "com.amazonaws.forecast#LimitExceededException":
622
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
623
- case "ResourceAlreadyExistsException":
624
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
625
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
626
- case "ResourceInUseException":
627
- case "com.amazonaws.forecast#ResourceInUseException":
628
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
629
- case "ResourceNotFoundException":
630
- case "com.amazonaws.forecast#ResourceNotFoundException":
631
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
632
- default:
633
- const parsedBody = parsedOutput.body;
634
- return throwDefaultError({
635
- output,
636
- parsedBody,
637
- errorCode,
638
- });
639
- }
640
- };
641
461
  export const de_CreateForecastCommand = async (output, context) => {
642
462
  if (output.statusCode >= 300) {
643
- return de_CreateForecastCommandError(output, context);
463
+ return de_CommandError(output, context);
644
464
  }
645
465
  const data = await parseBody(output.body, context);
646
466
  let contents = {};
@@ -651,40 +471,9 @@ export const de_CreateForecastCommand = async (output, context) => {
651
471
  };
652
472
  return response;
653
473
  };
654
- const de_CreateForecastCommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "InvalidInputException":
662
- case "com.amazonaws.forecast#InvalidInputException":
663
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
664
- case "LimitExceededException":
665
- case "com.amazonaws.forecast#LimitExceededException":
666
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
667
- case "ResourceAlreadyExistsException":
668
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
669
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
670
- case "ResourceInUseException":
671
- case "com.amazonaws.forecast#ResourceInUseException":
672
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
673
- case "ResourceNotFoundException":
674
- case "com.amazonaws.forecast#ResourceNotFoundException":
675
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
676
- default:
677
- const parsedBody = parsedOutput.body;
678
- return throwDefaultError({
679
- output,
680
- parsedBody,
681
- errorCode,
682
- });
683
- }
684
- };
685
474
  export const de_CreateForecastExportJobCommand = async (output, context) => {
686
475
  if (output.statusCode >= 300) {
687
- return de_CreateForecastExportJobCommandError(output, context);
476
+ return de_CommandError(output, context);
688
477
  }
689
478
  const data = await parseBody(output.body, context);
690
479
  let contents = {};
@@ -695,40 +484,22 @@ export const de_CreateForecastExportJobCommand = async (output, context) => {
695
484
  };
696
485
  return response;
697
486
  };
698
- const de_CreateForecastExportJobCommandError = async (output, context) => {
699
- const parsedOutput = {
700
- ...output,
701
- body: await parseErrorBody(output.body, context),
702
- };
703
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
704
- switch (errorCode) {
705
- case "InvalidInputException":
706
- case "com.amazonaws.forecast#InvalidInputException":
707
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
708
- case "LimitExceededException":
709
- case "com.amazonaws.forecast#LimitExceededException":
710
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
711
- case "ResourceAlreadyExistsException":
712
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
713
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
714
- case "ResourceInUseException":
715
- case "com.amazonaws.forecast#ResourceInUseException":
716
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
717
- case "ResourceNotFoundException":
718
- case "com.amazonaws.forecast#ResourceNotFoundException":
719
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
720
- default:
721
- const parsedBody = parsedOutput.body;
722
- return throwDefaultError({
723
- output,
724
- parsedBody,
725
- errorCode,
726
- });
487
+ export const de_CreateMonitorCommand = async (output, context) => {
488
+ if (output.statusCode >= 300) {
489
+ return de_CommandError(output, context);
727
490
  }
491
+ const data = await parseBody(output.body, context);
492
+ let contents = {};
493
+ contents = _json(data);
494
+ const response = {
495
+ $metadata: deserializeMetadata(output),
496
+ ...contents,
497
+ };
498
+ return response;
728
499
  };
729
- export const de_CreateMonitorCommand = async (output, context) => {
500
+ export const de_CreatePredictorCommand = async (output, context) => {
730
501
  if (output.statusCode >= 300) {
731
- return de_CreateMonitorCommandError(output, context);
502
+ return de_CommandError(output, context);
732
503
  }
733
504
  const data = await parseBody(output.body, context);
734
505
  let contents = {};
@@ -739,128 +510,22 @@ export const de_CreateMonitorCommand = async (output, context) => {
739
510
  };
740
511
  return response;
741
512
  };
742
- const de_CreateMonitorCommandError = async (output, context) => {
743
- const parsedOutput = {
744
- ...output,
745
- body: await parseErrorBody(output.body, context),
746
- };
747
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
748
- switch (errorCode) {
749
- case "InvalidInputException":
750
- case "com.amazonaws.forecast#InvalidInputException":
751
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
752
- case "LimitExceededException":
753
- case "com.amazonaws.forecast#LimitExceededException":
754
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
755
- case "ResourceAlreadyExistsException":
756
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
757
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
758
- case "ResourceInUseException":
759
- case "com.amazonaws.forecast#ResourceInUseException":
760
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
761
- case "ResourceNotFoundException":
762
- case "com.amazonaws.forecast#ResourceNotFoundException":
763
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
764
- default:
765
- const parsedBody = parsedOutput.body;
766
- return throwDefaultError({
767
- output,
768
- parsedBody,
769
- errorCode,
770
- });
771
- }
772
- };
773
- export const de_CreatePredictorCommand = async (output, context) => {
774
- if (output.statusCode >= 300) {
775
- return de_CreatePredictorCommandError(output, context);
776
- }
777
- const data = await parseBody(output.body, context);
778
- let contents = {};
779
- contents = _json(data);
780
- const response = {
781
- $metadata: deserializeMetadata(output),
782
- ...contents,
783
- };
784
- return response;
785
- };
786
- const de_CreatePredictorCommandError = async (output, context) => {
787
- const parsedOutput = {
788
- ...output,
789
- body: await parseErrorBody(output.body, context),
790
- };
791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
- switch (errorCode) {
793
- case "InvalidInputException":
794
- case "com.amazonaws.forecast#InvalidInputException":
795
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
796
- case "LimitExceededException":
797
- case "com.amazonaws.forecast#LimitExceededException":
798
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
799
- case "ResourceAlreadyExistsException":
800
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
801
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
802
- case "ResourceInUseException":
803
- case "com.amazonaws.forecast#ResourceInUseException":
804
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
805
- case "ResourceNotFoundException":
806
- case "com.amazonaws.forecast#ResourceNotFoundException":
807
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
808
- default:
809
- const parsedBody = parsedOutput.body;
810
- return throwDefaultError({
811
- output,
812
- parsedBody,
813
- errorCode,
814
- });
815
- }
816
- };
817
- export const de_CreatePredictorBacktestExportJobCommand = async (output, context) => {
818
- if (output.statusCode >= 300) {
819
- return de_CreatePredictorBacktestExportJobCommandError(output, context);
820
- }
821
- const data = await parseBody(output.body, context);
822
- let contents = {};
823
- contents = _json(data);
824
- const response = {
825
- $metadata: deserializeMetadata(output),
826
- ...contents,
513
+ export const de_CreatePredictorBacktestExportJobCommand = async (output, context) => {
514
+ if (output.statusCode >= 300) {
515
+ return de_CommandError(output, context);
516
+ }
517
+ const data = await parseBody(output.body, context);
518
+ let contents = {};
519
+ contents = _json(data);
520
+ const response = {
521
+ $metadata: deserializeMetadata(output),
522
+ ...contents,
827
523
  };
828
524
  return response;
829
525
  };
830
- const de_CreatePredictorBacktestExportJobCommandError = async (output, context) => {
831
- const parsedOutput = {
832
- ...output,
833
- body: await parseErrorBody(output.body, context),
834
- };
835
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
836
- switch (errorCode) {
837
- case "InvalidInputException":
838
- case "com.amazonaws.forecast#InvalidInputException":
839
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
840
- case "LimitExceededException":
841
- case "com.amazonaws.forecast#LimitExceededException":
842
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
843
- case "ResourceAlreadyExistsException":
844
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
845
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
846
- case "ResourceInUseException":
847
- case "com.amazonaws.forecast#ResourceInUseException":
848
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
849
- case "ResourceNotFoundException":
850
- case "com.amazonaws.forecast#ResourceNotFoundException":
851
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
852
- default:
853
- const parsedBody = parsedOutput.body;
854
- return throwDefaultError({
855
- output,
856
- parsedBody,
857
- errorCode,
858
- });
859
- }
860
- };
861
526
  export const de_CreateWhatIfAnalysisCommand = async (output, context) => {
862
527
  if (output.statusCode >= 300) {
863
- return de_CreateWhatIfAnalysisCommandError(output, context);
528
+ return de_CommandError(output, context);
864
529
  }
865
530
  const data = await parseBody(output.body, context);
866
531
  let contents = {};
@@ -871,40 +536,9 @@ export const de_CreateWhatIfAnalysisCommand = async (output, context) => {
871
536
  };
872
537
  return response;
873
538
  };
874
- const de_CreateWhatIfAnalysisCommandError = async (output, context) => {
875
- const parsedOutput = {
876
- ...output,
877
- body: await parseErrorBody(output.body, context),
878
- };
879
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
880
- switch (errorCode) {
881
- case "InvalidInputException":
882
- case "com.amazonaws.forecast#InvalidInputException":
883
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
884
- case "LimitExceededException":
885
- case "com.amazonaws.forecast#LimitExceededException":
886
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
887
- case "ResourceAlreadyExistsException":
888
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
889
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
890
- case "ResourceInUseException":
891
- case "com.amazonaws.forecast#ResourceInUseException":
892
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
893
- case "ResourceNotFoundException":
894
- case "com.amazonaws.forecast#ResourceNotFoundException":
895
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
896
- default:
897
- const parsedBody = parsedOutput.body;
898
- return throwDefaultError({
899
- output,
900
- parsedBody,
901
- errorCode,
902
- });
903
- }
904
- };
905
539
  export const de_CreateWhatIfForecastCommand = async (output, context) => {
906
540
  if (output.statusCode >= 300) {
907
- return de_CreateWhatIfForecastCommandError(output, context);
541
+ return de_CommandError(output, context);
908
542
  }
909
543
  const data = await parseBody(output.body, context);
910
544
  let contents = {};
@@ -915,40 +549,9 @@ export const de_CreateWhatIfForecastCommand = async (output, context) => {
915
549
  };
916
550
  return response;
917
551
  };
918
- const de_CreateWhatIfForecastCommandError = async (output, context) => {
919
- const parsedOutput = {
920
- ...output,
921
- body: await parseErrorBody(output.body, context),
922
- };
923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
- switch (errorCode) {
925
- case "InvalidInputException":
926
- case "com.amazonaws.forecast#InvalidInputException":
927
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
928
- case "LimitExceededException":
929
- case "com.amazonaws.forecast#LimitExceededException":
930
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
931
- case "ResourceAlreadyExistsException":
932
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
933
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
934
- case "ResourceInUseException":
935
- case "com.amazonaws.forecast#ResourceInUseException":
936
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
937
- case "ResourceNotFoundException":
938
- case "com.amazonaws.forecast#ResourceNotFoundException":
939
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
940
- default:
941
- const parsedBody = parsedOutput.body;
942
- return throwDefaultError({
943
- output,
944
- parsedBody,
945
- errorCode,
946
- });
947
- }
948
- };
949
552
  export const de_CreateWhatIfForecastExportCommand = async (output, context) => {
950
553
  if (output.statusCode >= 300) {
951
- return de_CreateWhatIfForecastExportCommandError(output, context);
554
+ return de_CommandError(output, context);
952
555
  }
953
556
  const data = await parseBody(output.body, context);
954
557
  let contents = {};
@@ -959,40 +562,9 @@ export const de_CreateWhatIfForecastExportCommand = async (output, context) => {
959
562
  };
960
563
  return response;
961
564
  };
962
- const de_CreateWhatIfForecastExportCommandError = async (output, context) => {
963
- const parsedOutput = {
964
- ...output,
965
- body: await parseErrorBody(output.body, context),
966
- };
967
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
968
- switch (errorCode) {
969
- case "InvalidInputException":
970
- case "com.amazonaws.forecast#InvalidInputException":
971
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
972
- case "LimitExceededException":
973
- case "com.amazonaws.forecast#LimitExceededException":
974
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
975
- case "ResourceAlreadyExistsException":
976
- case "com.amazonaws.forecast#ResourceAlreadyExistsException":
977
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
978
- case "ResourceInUseException":
979
- case "com.amazonaws.forecast#ResourceInUseException":
980
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
981
- case "ResourceNotFoundException":
982
- case "com.amazonaws.forecast#ResourceNotFoundException":
983
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
984
- default:
985
- const parsedBody = parsedOutput.body;
986
- return throwDefaultError({
987
- output,
988
- parsedBody,
989
- errorCode,
990
- });
991
- }
992
- };
993
565
  export const de_DeleteDatasetCommand = async (output, context) => {
994
566
  if (output.statusCode >= 300) {
995
- return de_DeleteDatasetCommandError(output, context);
567
+ return de_CommandError(output, context);
996
568
  }
997
569
  await collectBody(output.body, context);
998
570
  const response = {
@@ -1000,34 +572,9 @@ export const de_DeleteDatasetCommand = async (output, context) => {
1000
572
  };
1001
573
  return response;
1002
574
  };
1003
- const de_DeleteDatasetCommandError = async (output, context) => {
1004
- const parsedOutput = {
1005
- ...output,
1006
- body: await parseErrorBody(output.body, context),
1007
- };
1008
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1009
- switch (errorCode) {
1010
- case "InvalidInputException":
1011
- case "com.amazonaws.forecast#InvalidInputException":
1012
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1013
- case "ResourceInUseException":
1014
- case "com.amazonaws.forecast#ResourceInUseException":
1015
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1016
- case "ResourceNotFoundException":
1017
- case "com.amazonaws.forecast#ResourceNotFoundException":
1018
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1019
- default:
1020
- const parsedBody = parsedOutput.body;
1021
- return throwDefaultError({
1022
- output,
1023
- parsedBody,
1024
- errorCode,
1025
- });
1026
- }
1027
- };
1028
575
  export const de_DeleteDatasetGroupCommand = async (output, context) => {
1029
576
  if (output.statusCode >= 300) {
1030
- return de_DeleteDatasetGroupCommandError(output, context);
577
+ return de_CommandError(output, context);
1031
578
  }
1032
579
  await collectBody(output.body, context);
1033
580
  const response = {
@@ -1035,34 +582,9 @@ export const de_DeleteDatasetGroupCommand = async (output, context) => {
1035
582
  };
1036
583
  return response;
1037
584
  };
1038
- const de_DeleteDatasetGroupCommandError = async (output, context) => {
1039
- const parsedOutput = {
1040
- ...output,
1041
- body: await parseErrorBody(output.body, context),
1042
- };
1043
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
- switch (errorCode) {
1045
- case "InvalidInputException":
1046
- case "com.amazonaws.forecast#InvalidInputException":
1047
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1048
- case "ResourceInUseException":
1049
- case "com.amazonaws.forecast#ResourceInUseException":
1050
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1051
- case "ResourceNotFoundException":
1052
- case "com.amazonaws.forecast#ResourceNotFoundException":
1053
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1054
- default:
1055
- const parsedBody = parsedOutput.body;
1056
- return throwDefaultError({
1057
- output,
1058
- parsedBody,
1059
- errorCode,
1060
- });
1061
- }
1062
- };
1063
585
  export const de_DeleteDatasetImportJobCommand = async (output, context) => {
1064
586
  if (output.statusCode >= 300) {
1065
- return de_DeleteDatasetImportJobCommandError(output, context);
587
+ return de_CommandError(output, context);
1066
588
  }
1067
589
  await collectBody(output.body, context);
1068
590
  const response = {
@@ -1070,34 +592,9 @@ export const de_DeleteDatasetImportJobCommand = async (output, context) => {
1070
592
  };
1071
593
  return response;
1072
594
  };
1073
- const de_DeleteDatasetImportJobCommandError = async (output, context) => {
1074
- const parsedOutput = {
1075
- ...output,
1076
- body: await parseErrorBody(output.body, context),
1077
- };
1078
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1079
- switch (errorCode) {
1080
- case "InvalidInputException":
1081
- case "com.amazonaws.forecast#InvalidInputException":
1082
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1083
- case "ResourceInUseException":
1084
- case "com.amazonaws.forecast#ResourceInUseException":
1085
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1086
- case "ResourceNotFoundException":
1087
- case "com.amazonaws.forecast#ResourceNotFoundException":
1088
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1089
- default:
1090
- const parsedBody = parsedOutput.body;
1091
- return throwDefaultError({
1092
- output,
1093
- parsedBody,
1094
- errorCode,
1095
- });
1096
- }
1097
- };
1098
595
  export const de_DeleteExplainabilityCommand = async (output, context) => {
1099
596
  if (output.statusCode >= 300) {
1100
- return de_DeleteExplainabilityCommandError(output, context);
597
+ return de_CommandError(output, context);
1101
598
  }
1102
599
  await collectBody(output.body, context);
1103
600
  const response = {
@@ -1105,34 +602,9 @@ export const de_DeleteExplainabilityCommand = async (output, context) => {
1105
602
  };
1106
603
  return response;
1107
604
  };
1108
- const de_DeleteExplainabilityCommandError = async (output, context) => {
1109
- const parsedOutput = {
1110
- ...output,
1111
- body: await parseErrorBody(output.body, context),
1112
- };
1113
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1114
- switch (errorCode) {
1115
- case "InvalidInputException":
1116
- case "com.amazonaws.forecast#InvalidInputException":
1117
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1118
- case "ResourceInUseException":
1119
- case "com.amazonaws.forecast#ResourceInUseException":
1120
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1121
- case "ResourceNotFoundException":
1122
- case "com.amazonaws.forecast#ResourceNotFoundException":
1123
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1124
- default:
1125
- const parsedBody = parsedOutput.body;
1126
- return throwDefaultError({
1127
- output,
1128
- parsedBody,
1129
- errorCode,
1130
- });
1131
- }
1132
- };
1133
605
  export const de_DeleteExplainabilityExportCommand = async (output, context) => {
1134
606
  if (output.statusCode >= 300) {
1135
- return de_DeleteExplainabilityExportCommandError(output, context);
607
+ return de_CommandError(output, context);
1136
608
  }
1137
609
  await collectBody(output.body, context);
1138
610
  const response = {
@@ -1140,34 +612,9 @@ export const de_DeleteExplainabilityExportCommand = async (output, context) => {
1140
612
  };
1141
613
  return response;
1142
614
  };
1143
- const de_DeleteExplainabilityExportCommandError = async (output, context) => {
1144
- const parsedOutput = {
1145
- ...output,
1146
- body: await parseErrorBody(output.body, context),
1147
- };
1148
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1149
- switch (errorCode) {
1150
- case "InvalidInputException":
1151
- case "com.amazonaws.forecast#InvalidInputException":
1152
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1153
- case "ResourceInUseException":
1154
- case "com.amazonaws.forecast#ResourceInUseException":
1155
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1156
- case "ResourceNotFoundException":
1157
- case "com.amazonaws.forecast#ResourceNotFoundException":
1158
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1159
- default:
1160
- const parsedBody = parsedOutput.body;
1161
- return throwDefaultError({
1162
- output,
1163
- parsedBody,
1164
- errorCode,
1165
- });
1166
- }
1167
- };
1168
615
  export const de_DeleteForecastCommand = async (output, context) => {
1169
616
  if (output.statusCode >= 300) {
1170
- return de_DeleteForecastCommandError(output, context);
617
+ return de_CommandError(output, context);
1171
618
  }
1172
619
  await collectBody(output.body, context);
1173
620
  const response = {
@@ -1175,34 +622,9 @@ export const de_DeleteForecastCommand = async (output, context) => {
1175
622
  };
1176
623
  return response;
1177
624
  };
1178
- const de_DeleteForecastCommandError = async (output, context) => {
1179
- const parsedOutput = {
1180
- ...output,
1181
- body: await parseErrorBody(output.body, context),
1182
- };
1183
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1184
- switch (errorCode) {
1185
- case "InvalidInputException":
1186
- case "com.amazonaws.forecast#InvalidInputException":
1187
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1188
- case "ResourceInUseException":
1189
- case "com.amazonaws.forecast#ResourceInUseException":
1190
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1191
- case "ResourceNotFoundException":
1192
- case "com.amazonaws.forecast#ResourceNotFoundException":
1193
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1194
- default:
1195
- const parsedBody = parsedOutput.body;
1196
- return throwDefaultError({
1197
- output,
1198
- parsedBody,
1199
- errorCode,
1200
- });
1201
- }
1202
- };
1203
625
  export const de_DeleteForecastExportJobCommand = async (output, context) => {
1204
626
  if (output.statusCode >= 300) {
1205
- return de_DeleteForecastExportJobCommandError(output, context);
627
+ return de_CommandError(output, context);
1206
628
  }
1207
629
  await collectBody(output.body, context);
1208
630
  const response = {
@@ -1210,34 +632,9 @@ export const de_DeleteForecastExportJobCommand = async (output, context) => {
1210
632
  };
1211
633
  return response;
1212
634
  };
1213
- const de_DeleteForecastExportJobCommandError = async (output, context) => {
1214
- const parsedOutput = {
1215
- ...output,
1216
- body: await parseErrorBody(output.body, context),
1217
- };
1218
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1219
- switch (errorCode) {
1220
- case "InvalidInputException":
1221
- case "com.amazonaws.forecast#InvalidInputException":
1222
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1223
- case "ResourceInUseException":
1224
- case "com.amazonaws.forecast#ResourceInUseException":
1225
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1226
- case "ResourceNotFoundException":
1227
- case "com.amazonaws.forecast#ResourceNotFoundException":
1228
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1229
- default:
1230
- const parsedBody = parsedOutput.body;
1231
- return throwDefaultError({
1232
- output,
1233
- parsedBody,
1234
- errorCode,
1235
- });
1236
- }
1237
- };
1238
635
  export const de_DeleteMonitorCommand = async (output, context) => {
1239
636
  if (output.statusCode >= 300) {
1240
- return de_DeleteMonitorCommandError(output, context);
637
+ return de_CommandError(output, context);
1241
638
  }
1242
639
  await collectBody(output.body, context);
1243
640
  const response = {
@@ -1245,34 +642,9 @@ export const de_DeleteMonitorCommand = async (output, context) => {
1245
642
  };
1246
643
  return response;
1247
644
  };
1248
- const de_DeleteMonitorCommandError = async (output, context) => {
1249
- const parsedOutput = {
1250
- ...output,
1251
- body: await parseErrorBody(output.body, context),
1252
- };
1253
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1254
- switch (errorCode) {
1255
- case "InvalidInputException":
1256
- case "com.amazonaws.forecast#InvalidInputException":
1257
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1258
- case "ResourceInUseException":
1259
- case "com.amazonaws.forecast#ResourceInUseException":
1260
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1261
- case "ResourceNotFoundException":
1262
- case "com.amazonaws.forecast#ResourceNotFoundException":
1263
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1264
- default:
1265
- const parsedBody = parsedOutput.body;
1266
- return throwDefaultError({
1267
- output,
1268
- parsedBody,
1269
- errorCode,
1270
- });
1271
- }
1272
- };
1273
645
  export const de_DeletePredictorCommand = async (output, context) => {
1274
646
  if (output.statusCode >= 300) {
1275
- return de_DeletePredictorCommandError(output, context);
647
+ return de_CommandError(output, context);
1276
648
  }
1277
649
  await collectBody(output.body, context);
1278
650
  const response = {
@@ -1280,34 +652,9 @@ export const de_DeletePredictorCommand = async (output, context) => {
1280
652
  };
1281
653
  return response;
1282
654
  };
1283
- const de_DeletePredictorCommandError = async (output, context) => {
1284
- const parsedOutput = {
1285
- ...output,
1286
- body: await parseErrorBody(output.body, context),
1287
- };
1288
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1289
- switch (errorCode) {
1290
- case "InvalidInputException":
1291
- case "com.amazonaws.forecast#InvalidInputException":
1292
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1293
- case "ResourceInUseException":
1294
- case "com.amazonaws.forecast#ResourceInUseException":
1295
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1296
- case "ResourceNotFoundException":
1297
- case "com.amazonaws.forecast#ResourceNotFoundException":
1298
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1299
- default:
1300
- const parsedBody = parsedOutput.body;
1301
- return throwDefaultError({
1302
- output,
1303
- parsedBody,
1304
- errorCode,
1305
- });
1306
- }
1307
- };
1308
655
  export const de_DeletePredictorBacktestExportJobCommand = async (output, context) => {
1309
656
  if (output.statusCode >= 300) {
1310
- return de_DeletePredictorBacktestExportJobCommandError(output, context);
657
+ return de_CommandError(output, context);
1311
658
  }
1312
659
  await collectBody(output.body, context);
1313
660
  const response = {
@@ -1315,34 +662,9 @@ export const de_DeletePredictorBacktestExportJobCommand = async (output, context
1315
662
  };
1316
663
  return response;
1317
664
  };
1318
- const de_DeletePredictorBacktestExportJobCommandError = async (output, context) => {
1319
- const parsedOutput = {
1320
- ...output,
1321
- body: await parseErrorBody(output.body, context),
1322
- };
1323
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1324
- switch (errorCode) {
1325
- case "InvalidInputException":
1326
- case "com.amazonaws.forecast#InvalidInputException":
1327
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1328
- case "ResourceInUseException":
1329
- case "com.amazonaws.forecast#ResourceInUseException":
1330
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1331
- case "ResourceNotFoundException":
1332
- case "com.amazonaws.forecast#ResourceNotFoundException":
1333
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1334
- default:
1335
- const parsedBody = parsedOutput.body;
1336
- return throwDefaultError({
1337
- output,
1338
- parsedBody,
1339
- errorCode,
1340
- });
1341
- }
1342
- };
1343
665
  export const de_DeleteResourceTreeCommand = async (output, context) => {
1344
666
  if (output.statusCode >= 300) {
1345
- return de_DeleteResourceTreeCommandError(output, context);
667
+ return de_CommandError(output, context);
1346
668
  }
1347
669
  await collectBody(output.body, context);
1348
670
  const response = {
@@ -1350,34 +672,9 @@ export const de_DeleteResourceTreeCommand = async (output, context) => {
1350
672
  };
1351
673
  return response;
1352
674
  };
1353
- const de_DeleteResourceTreeCommandError = async (output, context) => {
1354
- const parsedOutput = {
1355
- ...output,
1356
- body: await parseErrorBody(output.body, context),
1357
- };
1358
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1359
- switch (errorCode) {
1360
- case "InvalidInputException":
1361
- case "com.amazonaws.forecast#InvalidInputException":
1362
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1363
- case "ResourceInUseException":
1364
- case "com.amazonaws.forecast#ResourceInUseException":
1365
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1366
- case "ResourceNotFoundException":
1367
- case "com.amazonaws.forecast#ResourceNotFoundException":
1368
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1369
- default:
1370
- const parsedBody = parsedOutput.body;
1371
- return throwDefaultError({
1372
- output,
1373
- parsedBody,
1374
- errorCode,
1375
- });
1376
- }
1377
- };
1378
675
  export const de_DeleteWhatIfAnalysisCommand = async (output, context) => {
1379
676
  if (output.statusCode >= 300) {
1380
- return de_DeleteWhatIfAnalysisCommandError(output, context);
677
+ return de_CommandError(output, context);
1381
678
  }
1382
679
  await collectBody(output.body, context);
1383
680
  const response = {
@@ -1385,69 +682,19 @@ export const de_DeleteWhatIfAnalysisCommand = async (output, context) => {
1385
682
  };
1386
683
  return response;
1387
684
  };
1388
- const de_DeleteWhatIfAnalysisCommandError = async (output, context) => {
1389
- const parsedOutput = {
1390
- ...output,
1391
- body: await parseErrorBody(output.body, context),
1392
- };
1393
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1394
- switch (errorCode) {
1395
- case "InvalidInputException":
1396
- case "com.amazonaws.forecast#InvalidInputException":
1397
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1398
- case "ResourceInUseException":
1399
- case "com.amazonaws.forecast#ResourceInUseException":
1400
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1401
- case "ResourceNotFoundException":
1402
- case "com.amazonaws.forecast#ResourceNotFoundException":
1403
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1404
- default:
1405
- const parsedBody = parsedOutput.body;
1406
- return throwDefaultError({
1407
- output,
1408
- parsedBody,
1409
- errorCode,
1410
- });
1411
- }
1412
- };
1413
685
  export const de_DeleteWhatIfForecastCommand = async (output, context) => {
1414
686
  if (output.statusCode >= 300) {
1415
- return de_DeleteWhatIfForecastCommandError(output, context);
687
+ return de_CommandError(output, context);
1416
688
  }
1417
689
  await collectBody(output.body, context);
1418
690
  const response = {
1419
691
  $metadata: deserializeMetadata(output),
1420
692
  };
1421
- return response;
1422
- };
1423
- const de_DeleteWhatIfForecastCommandError = async (output, context) => {
1424
- const parsedOutput = {
1425
- ...output,
1426
- body: await parseErrorBody(output.body, context),
1427
- };
1428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1429
- switch (errorCode) {
1430
- case "InvalidInputException":
1431
- case "com.amazonaws.forecast#InvalidInputException":
1432
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1433
- case "ResourceInUseException":
1434
- case "com.amazonaws.forecast#ResourceInUseException":
1435
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1436
- case "ResourceNotFoundException":
1437
- case "com.amazonaws.forecast#ResourceNotFoundException":
1438
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1439
- default:
1440
- const parsedBody = parsedOutput.body;
1441
- return throwDefaultError({
1442
- output,
1443
- parsedBody,
1444
- errorCode,
1445
- });
1446
- }
693
+ return response;
1447
694
  };
1448
695
  export const de_DeleteWhatIfForecastExportCommand = async (output, context) => {
1449
696
  if (output.statusCode >= 300) {
1450
- return de_DeleteWhatIfForecastExportCommandError(output, context);
697
+ return de_CommandError(output, context);
1451
698
  }
1452
699
  await collectBody(output.body, context);
1453
700
  const response = {
@@ -1455,34 +702,9 @@ export const de_DeleteWhatIfForecastExportCommand = async (output, context) => {
1455
702
  };
1456
703
  return response;
1457
704
  };
1458
- const de_DeleteWhatIfForecastExportCommandError = async (output, context) => {
1459
- const parsedOutput = {
1460
- ...output,
1461
- body: await parseErrorBody(output.body, context),
1462
- };
1463
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1464
- switch (errorCode) {
1465
- case "InvalidInputException":
1466
- case "com.amazonaws.forecast#InvalidInputException":
1467
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1468
- case "ResourceInUseException":
1469
- case "com.amazonaws.forecast#ResourceInUseException":
1470
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1471
- case "ResourceNotFoundException":
1472
- case "com.amazonaws.forecast#ResourceNotFoundException":
1473
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1474
- default:
1475
- const parsedBody = parsedOutput.body;
1476
- return throwDefaultError({
1477
- output,
1478
- parsedBody,
1479
- errorCode,
1480
- });
1481
- }
1482
- };
1483
705
  export const de_DescribeAutoPredictorCommand = async (output, context) => {
1484
706
  if (output.statusCode >= 300) {
1485
- return de_DescribeAutoPredictorCommandError(output, context);
707
+ return de_CommandError(output, context);
1486
708
  }
1487
709
  const data = await parseBody(output.body, context);
1488
710
  let contents = {};
@@ -1493,31 +715,9 @@ export const de_DescribeAutoPredictorCommand = async (output, context) => {
1493
715
  };
1494
716
  return response;
1495
717
  };
1496
- const de_DescribeAutoPredictorCommandError = async (output, context) => {
1497
- const parsedOutput = {
1498
- ...output,
1499
- body: await parseErrorBody(output.body, context),
1500
- };
1501
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1502
- switch (errorCode) {
1503
- case "InvalidInputException":
1504
- case "com.amazonaws.forecast#InvalidInputException":
1505
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1506
- case "ResourceNotFoundException":
1507
- case "com.amazonaws.forecast#ResourceNotFoundException":
1508
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1509
- default:
1510
- const parsedBody = parsedOutput.body;
1511
- return throwDefaultError({
1512
- output,
1513
- parsedBody,
1514
- errorCode,
1515
- });
1516
- }
1517
- };
1518
718
  export const de_DescribeDatasetCommand = async (output, context) => {
1519
719
  if (output.statusCode >= 300) {
1520
- return de_DescribeDatasetCommandError(output, context);
720
+ return de_CommandError(output, context);
1521
721
  }
1522
722
  const data = await parseBody(output.body, context);
1523
723
  let contents = {};
@@ -1528,31 +728,9 @@ export const de_DescribeDatasetCommand = async (output, context) => {
1528
728
  };
1529
729
  return response;
1530
730
  };
1531
- const de_DescribeDatasetCommandError = async (output, context) => {
1532
- const parsedOutput = {
1533
- ...output,
1534
- body: await parseErrorBody(output.body, context),
1535
- };
1536
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1537
- switch (errorCode) {
1538
- case "InvalidInputException":
1539
- case "com.amazonaws.forecast#InvalidInputException":
1540
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1541
- case "ResourceNotFoundException":
1542
- case "com.amazonaws.forecast#ResourceNotFoundException":
1543
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1544
- default:
1545
- const parsedBody = parsedOutput.body;
1546
- return throwDefaultError({
1547
- output,
1548
- parsedBody,
1549
- errorCode,
1550
- });
1551
- }
1552
- };
1553
731
  export const de_DescribeDatasetGroupCommand = async (output, context) => {
1554
732
  if (output.statusCode >= 300) {
1555
- return de_DescribeDatasetGroupCommandError(output, context);
733
+ return de_CommandError(output, context);
1556
734
  }
1557
735
  const data = await parseBody(output.body, context);
1558
736
  let contents = {};
@@ -1563,31 +741,9 @@ export const de_DescribeDatasetGroupCommand = async (output, context) => {
1563
741
  };
1564
742
  return response;
1565
743
  };
1566
- const de_DescribeDatasetGroupCommandError = async (output, context) => {
1567
- const parsedOutput = {
1568
- ...output,
1569
- body: await parseErrorBody(output.body, context),
1570
- };
1571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1572
- switch (errorCode) {
1573
- case "InvalidInputException":
1574
- case "com.amazonaws.forecast#InvalidInputException":
1575
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1576
- case "ResourceNotFoundException":
1577
- case "com.amazonaws.forecast#ResourceNotFoundException":
1578
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1579
- default:
1580
- const parsedBody = parsedOutput.body;
1581
- return throwDefaultError({
1582
- output,
1583
- parsedBody,
1584
- errorCode,
1585
- });
1586
- }
1587
- };
1588
744
  export const de_DescribeDatasetImportJobCommand = async (output, context) => {
1589
745
  if (output.statusCode >= 300) {
1590
- return de_DescribeDatasetImportJobCommandError(output, context);
746
+ return de_CommandError(output, context);
1591
747
  }
1592
748
  const data = await parseBody(output.body, context);
1593
749
  let contents = {};
@@ -1598,31 +754,9 @@ export const de_DescribeDatasetImportJobCommand = async (output, context) => {
1598
754
  };
1599
755
  return response;
1600
756
  };
1601
- const de_DescribeDatasetImportJobCommandError = async (output, context) => {
1602
- const parsedOutput = {
1603
- ...output,
1604
- body: await parseErrorBody(output.body, context),
1605
- };
1606
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1607
- switch (errorCode) {
1608
- case "InvalidInputException":
1609
- case "com.amazonaws.forecast#InvalidInputException":
1610
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1611
- case "ResourceNotFoundException":
1612
- case "com.amazonaws.forecast#ResourceNotFoundException":
1613
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1614
- default:
1615
- const parsedBody = parsedOutput.body;
1616
- return throwDefaultError({
1617
- output,
1618
- parsedBody,
1619
- errorCode,
1620
- });
1621
- }
1622
- };
1623
757
  export const de_DescribeExplainabilityCommand = async (output, context) => {
1624
758
  if (output.statusCode >= 300) {
1625
- return de_DescribeExplainabilityCommandError(output, context);
759
+ return de_CommandError(output, context);
1626
760
  }
1627
761
  const data = await parseBody(output.body, context);
1628
762
  let contents = {};
@@ -1633,31 +767,9 @@ export const de_DescribeExplainabilityCommand = async (output, context) => {
1633
767
  };
1634
768
  return response;
1635
769
  };
1636
- const de_DescribeExplainabilityCommandError = async (output, context) => {
1637
- const parsedOutput = {
1638
- ...output,
1639
- body: await parseErrorBody(output.body, context),
1640
- };
1641
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1642
- switch (errorCode) {
1643
- case "InvalidInputException":
1644
- case "com.amazonaws.forecast#InvalidInputException":
1645
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1646
- case "ResourceNotFoundException":
1647
- case "com.amazonaws.forecast#ResourceNotFoundException":
1648
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1649
- default:
1650
- const parsedBody = parsedOutput.body;
1651
- return throwDefaultError({
1652
- output,
1653
- parsedBody,
1654
- errorCode,
1655
- });
1656
- }
1657
- };
1658
770
  export const de_DescribeExplainabilityExportCommand = async (output, context) => {
1659
771
  if (output.statusCode >= 300) {
1660
- return de_DescribeExplainabilityExportCommandError(output, context);
772
+ return de_CommandError(output, context);
1661
773
  }
1662
774
  const data = await parseBody(output.body, context);
1663
775
  let contents = {};
@@ -1668,31 +780,9 @@ export const de_DescribeExplainabilityExportCommand = async (output, context) =>
1668
780
  };
1669
781
  return response;
1670
782
  };
1671
- const de_DescribeExplainabilityExportCommandError = async (output, context) => {
1672
- const parsedOutput = {
1673
- ...output,
1674
- body: await parseErrorBody(output.body, context),
1675
- };
1676
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1677
- switch (errorCode) {
1678
- case "InvalidInputException":
1679
- case "com.amazonaws.forecast#InvalidInputException":
1680
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1681
- case "ResourceNotFoundException":
1682
- case "com.amazonaws.forecast#ResourceNotFoundException":
1683
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1684
- default:
1685
- const parsedBody = parsedOutput.body;
1686
- return throwDefaultError({
1687
- output,
1688
- parsedBody,
1689
- errorCode,
1690
- });
1691
- }
1692
- };
1693
783
  export const de_DescribeForecastCommand = async (output, context) => {
1694
784
  if (output.statusCode >= 300) {
1695
- return de_DescribeForecastCommandError(output, context);
785
+ return de_CommandError(output, context);
1696
786
  }
1697
787
  const data = await parseBody(output.body, context);
1698
788
  let contents = {};
@@ -1703,31 +793,9 @@ export const de_DescribeForecastCommand = async (output, context) => {
1703
793
  };
1704
794
  return response;
1705
795
  };
1706
- const de_DescribeForecastCommandError = async (output, context) => {
1707
- const parsedOutput = {
1708
- ...output,
1709
- body: await parseErrorBody(output.body, context),
1710
- };
1711
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1712
- switch (errorCode) {
1713
- case "InvalidInputException":
1714
- case "com.amazonaws.forecast#InvalidInputException":
1715
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1716
- case "ResourceNotFoundException":
1717
- case "com.amazonaws.forecast#ResourceNotFoundException":
1718
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1719
- default:
1720
- const parsedBody = parsedOutput.body;
1721
- return throwDefaultError({
1722
- output,
1723
- parsedBody,
1724
- errorCode,
1725
- });
1726
- }
1727
- };
1728
796
  export const de_DescribeForecastExportJobCommand = async (output, context) => {
1729
797
  if (output.statusCode >= 300) {
1730
- return de_DescribeForecastExportJobCommandError(output, context);
798
+ return de_CommandError(output, context);
1731
799
  }
1732
800
  const data = await parseBody(output.body, context);
1733
801
  let contents = {};
@@ -1738,31 +806,9 @@ export const de_DescribeForecastExportJobCommand = async (output, context) => {
1738
806
  };
1739
807
  return response;
1740
808
  };
1741
- const de_DescribeForecastExportJobCommandError = async (output, context) => {
1742
- const parsedOutput = {
1743
- ...output,
1744
- body: await parseErrorBody(output.body, context),
1745
- };
1746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
- switch (errorCode) {
1748
- case "InvalidInputException":
1749
- case "com.amazonaws.forecast#InvalidInputException":
1750
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1751
- case "ResourceNotFoundException":
1752
- case "com.amazonaws.forecast#ResourceNotFoundException":
1753
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1754
- default:
1755
- const parsedBody = parsedOutput.body;
1756
- return throwDefaultError({
1757
- output,
1758
- parsedBody,
1759
- errorCode,
1760
- });
1761
- }
1762
- };
1763
809
  export const de_DescribeMonitorCommand = async (output, context) => {
1764
810
  if (output.statusCode >= 300) {
1765
- return de_DescribeMonitorCommandError(output, context);
811
+ return de_CommandError(output, context);
1766
812
  }
1767
813
  const data = await parseBody(output.body, context);
1768
814
  let contents = {};
@@ -1773,31 +819,9 @@ export const de_DescribeMonitorCommand = async (output, context) => {
1773
819
  };
1774
820
  return response;
1775
821
  };
1776
- const de_DescribeMonitorCommandError = async (output, context) => {
1777
- const parsedOutput = {
1778
- ...output,
1779
- body: await parseErrorBody(output.body, context),
1780
- };
1781
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1782
- switch (errorCode) {
1783
- case "InvalidInputException":
1784
- case "com.amazonaws.forecast#InvalidInputException":
1785
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1786
- case "ResourceNotFoundException":
1787
- case "com.amazonaws.forecast#ResourceNotFoundException":
1788
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1789
- default:
1790
- const parsedBody = parsedOutput.body;
1791
- return throwDefaultError({
1792
- output,
1793
- parsedBody,
1794
- errorCode,
1795
- });
1796
- }
1797
- };
1798
822
  export const de_DescribePredictorCommand = async (output, context) => {
1799
823
  if (output.statusCode >= 300) {
1800
- return de_DescribePredictorCommandError(output, context);
824
+ return de_CommandError(output, context);
1801
825
  }
1802
826
  const data = await parseBody(output.body, context);
1803
827
  let contents = {};
@@ -1808,31 +832,9 @@ export const de_DescribePredictorCommand = async (output, context) => {
1808
832
  };
1809
833
  return response;
1810
834
  };
1811
- const de_DescribePredictorCommandError = async (output, context) => {
1812
- const parsedOutput = {
1813
- ...output,
1814
- body: await parseErrorBody(output.body, context),
1815
- };
1816
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1817
- switch (errorCode) {
1818
- case "InvalidInputException":
1819
- case "com.amazonaws.forecast#InvalidInputException":
1820
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1821
- case "ResourceNotFoundException":
1822
- case "com.amazonaws.forecast#ResourceNotFoundException":
1823
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1824
- default:
1825
- const parsedBody = parsedOutput.body;
1826
- return throwDefaultError({
1827
- output,
1828
- parsedBody,
1829
- errorCode,
1830
- });
1831
- }
1832
- };
1833
835
  export const de_DescribePredictorBacktestExportJobCommand = async (output, context) => {
1834
836
  if (output.statusCode >= 300) {
1835
- return de_DescribePredictorBacktestExportJobCommandError(output, context);
837
+ return de_CommandError(output, context);
1836
838
  }
1837
839
  const data = await parseBody(output.body, context);
1838
840
  let contents = {};
@@ -1843,31 +845,9 @@ export const de_DescribePredictorBacktestExportJobCommand = async (output, conte
1843
845
  };
1844
846
  return response;
1845
847
  };
1846
- const de_DescribePredictorBacktestExportJobCommandError = async (output, context) => {
1847
- const parsedOutput = {
1848
- ...output,
1849
- body: await parseErrorBody(output.body, context),
1850
- };
1851
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1852
- switch (errorCode) {
1853
- case "InvalidInputException":
1854
- case "com.amazonaws.forecast#InvalidInputException":
1855
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1856
- case "ResourceNotFoundException":
1857
- case "com.amazonaws.forecast#ResourceNotFoundException":
1858
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1859
- default:
1860
- const parsedBody = parsedOutput.body;
1861
- return throwDefaultError({
1862
- output,
1863
- parsedBody,
1864
- errorCode,
1865
- });
1866
- }
1867
- };
1868
848
  export const de_DescribeWhatIfAnalysisCommand = async (output, context) => {
1869
849
  if (output.statusCode >= 300) {
1870
- return de_DescribeWhatIfAnalysisCommandError(output, context);
850
+ return de_CommandError(output, context);
1871
851
  }
1872
852
  const data = await parseBody(output.body, context);
1873
853
  let contents = {};
@@ -1878,31 +858,9 @@ export const de_DescribeWhatIfAnalysisCommand = async (output, context) => {
1878
858
  };
1879
859
  return response;
1880
860
  };
1881
- const de_DescribeWhatIfAnalysisCommandError = async (output, context) => {
1882
- const parsedOutput = {
1883
- ...output,
1884
- body: await parseErrorBody(output.body, context),
1885
- };
1886
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1887
- switch (errorCode) {
1888
- case "InvalidInputException":
1889
- case "com.amazonaws.forecast#InvalidInputException":
1890
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1891
- case "ResourceNotFoundException":
1892
- case "com.amazonaws.forecast#ResourceNotFoundException":
1893
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1894
- default:
1895
- const parsedBody = parsedOutput.body;
1896
- return throwDefaultError({
1897
- output,
1898
- parsedBody,
1899
- errorCode,
1900
- });
1901
- }
1902
- };
1903
861
  export const de_DescribeWhatIfForecastCommand = async (output, context) => {
1904
862
  if (output.statusCode >= 300) {
1905
- return de_DescribeWhatIfForecastCommandError(output, context);
863
+ return de_CommandError(output, context);
1906
864
  }
1907
865
  const data = await parseBody(output.body, context);
1908
866
  let contents = {};
@@ -1913,31 +871,9 @@ export const de_DescribeWhatIfForecastCommand = async (output, context) => {
1913
871
  };
1914
872
  return response;
1915
873
  };
1916
- const de_DescribeWhatIfForecastCommandError = async (output, context) => {
1917
- const parsedOutput = {
1918
- ...output,
1919
- body: await parseErrorBody(output.body, context),
1920
- };
1921
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1922
- switch (errorCode) {
1923
- case "InvalidInputException":
1924
- case "com.amazonaws.forecast#InvalidInputException":
1925
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1926
- case "ResourceNotFoundException":
1927
- case "com.amazonaws.forecast#ResourceNotFoundException":
1928
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1929
- default:
1930
- const parsedBody = parsedOutput.body;
1931
- return throwDefaultError({
1932
- output,
1933
- parsedBody,
1934
- errorCode,
1935
- });
1936
- }
1937
- };
1938
874
  export const de_DescribeWhatIfForecastExportCommand = async (output, context) => {
1939
875
  if (output.statusCode >= 300) {
1940
- return de_DescribeWhatIfForecastExportCommandError(output, context);
876
+ return de_CommandError(output, context);
1941
877
  }
1942
878
  const data = await parseBody(output.body, context);
1943
879
  let contents = {};
@@ -1948,31 +884,9 @@ export const de_DescribeWhatIfForecastExportCommand = async (output, context) =>
1948
884
  };
1949
885
  return response;
1950
886
  };
1951
- const de_DescribeWhatIfForecastExportCommandError = async (output, context) => {
1952
- const parsedOutput = {
1953
- ...output,
1954
- body: await parseErrorBody(output.body, context),
1955
- };
1956
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1957
- switch (errorCode) {
1958
- case "InvalidInputException":
1959
- case "com.amazonaws.forecast#InvalidInputException":
1960
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1961
- case "ResourceNotFoundException":
1962
- case "com.amazonaws.forecast#ResourceNotFoundException":
1963
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1964
- default:
1965
- const parsedBody = parsedOutput.body;
1966
- return throwDefaultError({
1967
- output,
1968
- parsedBody,
1969
- errorCode,
1970
- });
1971
- }
1972
- };
1973
887
  export const de_GetAccuracyMetricsCommand = async (output, context) => {
1974
888
  if (output.statusCode >= 300) {
1975
- return de_GetAccuracyMetricsCommandError(output, context);
889
+ return de_CommandError(output, context);
1976
890
  }
1977
891
  const data = await parseBody(output.body, context);
1978
892
  let contents = {};
@@ -1983,34 +897,9 @@ export const de_GetAccuracyMetricsCommand = async (output, context) => {
1983
897
  };
1984
898
  return response;
1985
899
  };
1986
- const de_GetAccuracyMetricsCommandError = async (output, context) => {
1987
- const parsedOutput = {
1988
- ...output,
1989
- body: await parseErrorBody(output.body, context),
1990
- };
1991
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1992
- switch (errorCode) {
1993
- case "InvalidInputException":
1994
- case "com.amazonaws.forecast#InvalidInputException":
1995
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1996
- case "ResourceInUseException":
1997
- case "com.amazonaws.forecast#ResourceInUseException":
1998
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1999
- case "ResourceNotFoundException":
2000
- case "com.amazonaws.forecast#ResourceNotFoundException":
2001
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2002
- default:
2003
- const parsedBody = parsedOutput.body;
2004
- return throwDefaultError({
2005
- output,
2006
- parsedBody,
2007
- errorCode,
2008
- });
2009
- }
2010
- };
2011
900
  export const de_ListDatasetGroupsCommand = async (output, context) => {
2012
901
  if (output.statusCode >= 300) {
2013
- return de_ListDatasetGroupsCommandError(output, context);
902
+ return de_CommandError(output, context);
2014
903
  }
2015
904
  const data = await parseBody(output.body, context);
2016
905
  let contents = {};
@@ -2021,28 +910,9 @@ export const de_ListDatasetGroupsCommand = async (output, context) => {
2021
910
  };
2022
911
  return response;
2023
912
  };
2024
- const de_ListDatasetGroupsCommandError = async (output, context) => {
2025
- const parsedOutput = {
2026
- ...output,
2027
- body: await parseErrorBody(output.body, context),
2028
- };
2029
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2030
- switch (errorCode) {
2031
- case "InvalidNextTokenException":
2032
- case "com.amazonaws.forecast#InvalidNextTokenException":
2033
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2034
- default:
2035
- const parsedBody = parsedOutput.body;
2036
- return throwDefaultError({
2037
- output,
2038
- parsedBody,
2039
- errorCode,
2040
- });
2041
- }
2042
- };
2043
913
  export const de_ListDatasetImportJobsCommand = async (output, context) => {
2044
914
  if (output.statusCode >= 300) {
2045
- return de_ListDatasetImportJobsCommandError(output, context);
915
+ return de_CommandError(output, context);
2046
916
  }
2047
917
  const data = await parseBody(output.body, context);
2048
918
  let contents = {};
@@ -2053,31 +923,9 @@ export const de_ListDatasetImportJobsCommand = async (output, context) => {
2053
923
  };
2054
924
  return response;
2055
925
  };
2056
- const de_ListDatasetImportJobsCommandError = async (output, context) => {
2057
- const parsedOutput = {
2058
- ...output,
2059
- body: await parseErrorBody(output.body, context),
2060
- };
2061
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2062
- switch (errorCode) {
2063
- case "InvalidInputException":
2064
- case "com.amazonaws.forecast#InvalidInputException":
2065
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2066
- case "InvalidNextTokenException":
2067
- case "com.amazonaws.forecast#InvalidNextTokenException":
2068
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2069
- default:
2070
- const parsedBody = parsedOutput.body;
2071
- return throwDefaultError({
2072
- output,
2073
- parsedBody,
2074
- errorCode,
2075
- });
2076
- }
2077
- };
2078
926
  export const de_ListDatasetsCommand = async (output, context) => {
2079
927
  if (output.statusCode >= 300) {
2080
- return de_ListDatasetsCommandError(output, context);
928
+ return de_CommandError(output, context);
2081
929
  }
2082
930
  const data = await parseBody(output.body, context);
2083
931
  let contents = {};
@@ -2088,28 +936,9 @@ export const de_ListDatasetsCommand = async (output, context) => {
2088
936
  };
2089
937
  return response;
2090
938
  };
2091
- const de_ListDatasetsCommandError = async (output, context) => {
2092
- const parsedOutput = {
2093
- ...output,
2094
- body: await parseErrorBody(output.body, context),
2095
- };
2096
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2097
- switch (errorCode) {
2098
- case "InvalidNextTokenException":
2099
- case "com.amazonaws.forecast#InvalidNextTokenException":
2100
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2101
- default:
2102
- const parsedBody = parsedOutput.body;
2103
- return throwDefaultError({
2104
- output,
2105
- parsedBody,
2106
- errorCode,
2107
- });
2108
- }
2109
- };
2110
939
  export const de_ListExplainabilitiesCommand = async (output, context) => {
2111
940
  if (output.statusCode >= 300) {
2112
- return de_ListExplainabilitiesCommandError(output, context);
941
+ return de_CommandError(output, context);
2113
942
  }
2114
943
  const data = await parseBody(output.body, context);
2115
944
  let contents = {};
@@ -2120,31 +949,9 @@ export const de_ListExplainabilitiesCommand = async (output, context) => {
2120
949
  };
2121
950
  return response;
2122
951
  };
2123
- const de_ListExplainabilitiesCommandError = async (output, context) => {
2124
- const parsedOutput = {
2125
- ...output,
2126
- body: await parseErrorBody(output.body, context),
2127
- };
2128
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2129
- switch (errorCode) {
2130
- case "InvalidInputException":
2131
- case "com.amazonaws.forecast#InvalidInputException":
2132
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2133
- case "InvalidNextTokenException":
2134
- case "com.amazonaws.forecast#InvalidNextTokenException":
2135
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2136
- default:
2137
- const parsedBody = parsedOutput.body;
2138
- return throwDefaultError({
2139
- output,
2140
- parsedBody,
2141
- errorCode,
2142
- });
2143
- }
2144
- };
2145
952
  export const de_ListExplainabilityExportsCommand = async (output, context) => {
2146
953
  if (output.statusCode >= 300) {
2147
- return de_ListExplainabilityExportsCommandError(output, context);
954
+ return de_CommandError(output, context);
2148
955
  }
2149
956
  const data = await parseBody(output.body, context);
2150
957
  let contents = {};
@@ -2155,31 +962,9 @@ export const de_ListExplainabilityExportsCommand = async (output, context) => {
2155
962
  };
2156
963
  return response;
2157
964
  };
2158
- const de_ListExplainabilityExportsCommandError = async (output, context) => {
2159
- const parsedOutput = {
2160
- ...output,
2161
- body: await parseErrorBody(output.body, context),
2162
- };
2163
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2164
- switch (errorCode) {
2165
- case "InvalidInputException":
2166
- case "com.amazonaws.forecast#InvalidInputException":
2167
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2168
- case "InvalidNextTokenException":
2169
- case "com.amazonaws.forecast#InvalidNextTokenException":
2170
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2171
- default:
2172
- const parsedBody = parsedOutput.body;
2173
- return throwDefaultError({
2174
- output,
2175
- parsedBody,
2176
- errorCode,
2177
- });
2178
- }
2179
- };
2180
965
  export const de_ListForecastExportJobsCommand = async (output, context) => {
2181
966
  if (output.statusCode >= 300) {
2182
- return de_ListForecastExportJobsCommandError(output, context);
967
+ return de_CommandError(output, context);
2183
968
  }
2184
969
  const data = await parseBody(output.body, context);
2185
970
  let contents = {};
@@ -2190,31 +975,9 @@ export const de_ListForecastExportJobsCommand = async (output, context) => {
2190
975
  };
2191
976
  return response;
2192
977
  };
2193
- const de_ListForecastExportJobsCommandError = async (output, context) => {
2194
- const parsedOutput = {
2195
- ...output,
2196
- body: await parseErrorBody(output.body, context),
2197
- };
2198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2199
- switch (errorCode) {
2200
- case "InvalidInputException":
2201
- case "com.amazonaws.forecast#InvalidInputException":
2202
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2203
- case "InvalidNextTokenException":
2204
- case "com.amazonaws.forecast#InvalidNextTokenException":
2205
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2206
- default:
2207
- const parsedBody = parsedOutput.body;
2208
- return throwDefaultError({
2209
- output,
2210
- parsedBody,
2211
- errorCode,
2212
- });
2213
- }
2214
- };
2215
978
  export const de_ListForecastsCommand = async (output, context) => {
2216
979
  if (output.statusCode >= 300) {
2217
- return de_ListForecastsCommandError(output, context);
980
+ return de_CommandError(output, context);
2218
981
  }
2219
982
  const data = await parseBody(output.body, context);
2220
983
  let contents = {};
@@ -2225,69 +988,22 @@ export const de_ListForecastsCommand = async (output, context) => {
2225
988
  };
2226
989
  return response;
2227
990
  };
2228
- const de_ListForecastsCommandError = async (output, context) => {
2229
- const parsedOutput = {
2230
- ...output,
2231
- body: await parseErrorBody(output.body, context),
2232
- };
2233
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2234
- switch (errorCode) {
2235
- case "InvalidInputException":
2236
- case "com.amazonaws.forecast#InvalidInputException":
2237
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2238
- case "InvalidNextTokenException":
2239
- case "com.amazonaws.forecast#InvalidNextTokenException":
2240
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2241
- default:
2242
- const parsedBody = parsedOutput.body;
2243
- return throwDefaultError({
2244
- output,
2245
- parsedBody,
2246
- errorCode,
2247
- });
2248
- }
2249
- };
2250
991
  export const de_ListMonitorEvaluationsCommand = async (output, context) => {
2251
992
  if (output.statusCode >= 300) {
2252
- return de_ListMonitorEvaluationsCommandError(output, context);
993
+ return de_CommandError(output, context);
2253
994
  }
2254
995
  const data = await parseBody(output.body, context);
2255
996
  let contents = {};
2256
997
  contents = de_ListMonitorEvaluationsResponse(data, context);
2257
998
  const response = {
2258
- $metadata: deserializeMetadata(output),
2259
- ...contents,
2260
- };
2261
- return response;
2262
- };
2263
- const de_ListMonitorEvaluationsCommandError = async (output, context) => {
2264
- const parsedOutput = {
2265
- ...output,
2266
- body: await parseErrorBody(output.body, context),
2267
- };
2268
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2269
- switch (errorCode) {
2270
- case "InvalidInputException":
2271
- case "com.amazonaws.forecast#InvalidInputException":
2272
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2273
- case "InvalidNextTokenException":
2274
- case "com.amazonaws.forecast#InvalidNextTokenException":
2275
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2276
- case "ResourceNotFoundException":
2277
- case "com.amazonaws.forecast#ResourceNotFoundException":
2278
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2279
- default:
2280
- const parsedBody = parsedOutput.body;
2281
- return throwDefaultError({
2282
- output,
2283
- parsedBody,
2284
- errorCode,
2285
- });
2286
- }
999
+ $metadata: deserializeMetadata(output),
1000
+ ...contents,
1001
+ };
1002
+ return response;
2287
1003
  };
2288
1004
  export const de_ListMonitorsCommand = async (output, context) => {
2289
1005
  if (output.statusCode >= 300) {
2290
- return de_ListMonitorsCommandError(output, context);
1006
+ return de_CommandError(output, context);
2291
1007
  }
2292
1008
  const data = await parseBody(output.body, context);
2293
1009
  let contents = {};
@@ -2298,31 +1014,9 @@ export const de_ListMonitorsCommand = async (output, context) => {
2298
1014
  };
2299
1015
  return response;
2300
1016
  };
2301
- const de_ListMonitorsCommandError = async (output, context) => {
2302
- const parsedOutput = {
2303
- ...output,
2304
- body: await parseErrorBody(output.body, context),
2305
- };
2306
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2307
- switch (errorCode) {
2308
- case "InvalidInputException":
2309
- case "com.amazonaws.forecast#InvalidInputException":
2310
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2311
- case "InvalidNextTokenException":
2312
- case "com.amazonaws.forecast#InvalidNextTokenException":
2313
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2314
- default:
2315
- const parsedBody = parsedOutput.body;
2316
- return throwDefaultError({
2317
- output,
2318
- parsedBody,
2319
- errorCode,
2320
- });
2321
- }
2322
- };
2323
1017
  export const de_ListPredictorBacktestExportJobsCommand = async (output, context) => {
2324
1018
  if (output.statusCode >= 300) {
2325
- return de_ListPredictorBacktestExportJobsCommandError(output, context);
1019
+ return de_CommandError(output, context);
2326
1020
  }
2327
1021
  const data = await parseBody(output.body, context);
2328
1022
  let contents = {};
@@ -2333,31 +1027,9 @@ export const de_ListPredictorBacktestExportJobsCommand = async (output, context)
2333
1027
  };
2334
1028
  return response;
2335
1029
  };
2336
- const de_ListPredictorBacktestExportJobsCommandError = async (output, context) => {
2337
- const parsedOutput = {
2338
- ...output,
2339
- body: await parseErrorBody(output.body, context),
2340
- };
2341
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2342
- switch (errorCode) {
2343
- case "InvalidInputException":
2344
- case "com.amazonaws.forecast#InvalidInputException":
2345
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2346
- case "InvalidNextTokenException":
2347
- case "com.amazonaws.forecast#InvalidNextTokenException":
2348
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2349
- default:
2350
- const parsedBody = parsedOutput.body;
2351
- return throwDefaultError({
2352
- output,
2353
- parsedBody,
2354
- errorCode,
2355
- });
2356
- }
2357
- };
2358
1030
  export const de_ListPredictorsCommand = async (output, context) => {
2359
1031
  if (output.statusCode >= 300) {
2360
- return de_ListPredictorsCommandError(output, context);
1032
+ return de_CommandError(output, context);
2361
1033
  }
2362
1034
  const data = await parseBody(output.body, context);
2363
1035
  let contents = {};
@@ -2368,31 +1040,9 @@ export const de_ListPredictorsCommand = async (output, context) => {
2368
1040
  };
2369
1041
  return response;
2370
1042
  };
2371
- const de_ListPredictorsCommandError = async (output, context) => {
2372
- const parsedOutput = {
2373
- ...output,
2374
- body: await parseErrorBody(output.body, context),
2375
- };
2376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2377
- switch (errorCode) {
2378
- case "InvalidInputException":
2379
- case "com.amazonaws.forecast#InvalidInputException":
2380
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2381
- case "InvalidNextTokenException":
2382
- case "com.amazonaws.forecast#InvalidNextTokenException":
2383
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2384
- default:
2385
- const parsedBody = parsedOutput.body;
2386
- return throwDefaultError({
2387
- output,
2388
- parsedBody,
2389
- errorCode,
2390
- });
2391
- }
2392
- };
2393
1043
  export const de_ListTagsForResourceCommand = async (output, context) => {
2394
1044
  if (output.statusCode >= 300) {
2395
- return de_ListTagsForResourceCommandError(output, context);
1045
+ return de_CommandError(output, context);
2396
1046
  }
2397
1047
  const data = await parseBody(output.body, context);
2398
1048
  let contents = {};
@@ -2403,31 +1053,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2403
1053
  };
2404
1054
  return response;
2405
1055
  };
2406
- const de_ListTagsForResourceCommandError = async (output, context) => {
2407
- const parsedOutput = {
2408
- ...output,
2409
- body: await parseErrorBody(output.body, context),
2410
- };
2411
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2412
- switch (errorCode) {
2413
- case "InvalidInputException":
2414
- case "com.amazonaws.forecast#InvalidInputException":
2415
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2416
- case "ResourceNotFoundException":
2417
- case "com.amazonaws.forecast#ResourceNotFoundException":
2418
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2419
- default:
2420
- const parsedBody = parsedOutput.body;
2421
- return throwDefaultError({
2422
- output,
2423
- parsedBody,
2424
- errorCode,
2425
- });
2426
- }
2427
- };
2428
1056
  export const de_ListWhatIfAnalysesCommand = async (output, context) => {
2429
1057
  if (output.statusCode >= 300) {
2430
- return de_ListWhatIfAnalysesCommandError(output, context);
1058
+ return de_CommandError(output, context);
2431
1059
  }
2432
1060
  const data = await parseBody(output.body, context);
2433
1061
  let contents = {};
@@ -2438,31 +1066,9 @@ export const de_ListWhatIfAnalysesCommand = async (output, context) => {
2438
1066
  };
2439
1067
  return response;
2440
1068
  };
2441
- const de_ListWhatIfAnalysesCommandError = async (output, context) => {
2442
- const parsedOutput = {
2443
- ...output,
2444
- body: await parseErrorBody(output.body, context),
2445
- };
2446
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2447
- switch (errorCode) {
2448
- case "InvalidInputException":
2449
- case "com.amazonaws.forecast#InvalidInputException":
2450
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2451
- case "InvalidNextTokenException":
2452
- case "com.amazonaws.forecast#InvalidNextTokenException":
2453
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2454
- default:
2455
- const parsedBody = parsedOutput.body;
2456
- return throwDefaultError({
2457
- output,
2458
- parsedBody,
2459
- errorCode,
2460
- });
2461
- }
2462
- };
2463
1069
  export const de_ListWhatIfForecastExportsCommand = async (output, context) => {
2464
1070
  if (output.statusCode >= 300) {
2465
- return de_ListWhatIfForecastExportsCommandError(output, context);
1071
+ return de_CommandError(output, context);
2466
1072
  }
2467
1073
  const data = await parseBody(output.body, context);
2468
1074
  let contents = {};
@@ -2473,31 +1079,9 @@ export const de_ListWhatIfForecastExportsCommand = async (output, context) => {
2473
1079
  };
2474
1080
  return response;
2475
1081
  };
2476
- const de_ListWhatIfForecastExportsCommandError = async (output, context) => {
2477
- const parsedOutput = {
2478
- ...output,
2479
- body: await parseErrorBody(output.body, context),
2480
- };
2481
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2482
- switch (errorCode) {
2483
- case "InvalidInputException":
2484
- case "com.amazonaws.forecast#InvalidInputException":
2485
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2486
- case "InvalidNextTokenException":
2487
- case "com.amazonaws.forecast#InvalidNextTokenException":
2488
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2489
- default:
2490
- const parsedBody = parsedOutput.body;
2491
- return throwDefaultError({
2492
- output,
2493
- parsedBody,
2494
- errorCode,
2495
- });
2496
- }
2497
- };
2498
1082
  export const de_ListWhatIfForecastsCommand = async (output, context) => {
2499
1083
  if (output.statusCode >= 300) {
2500
- return de_ListWhatIfForecastsCommandError(output, context);
1084
+ return de_CommandError(output, context);
2501
1085
  }
2502
1086
  const data = await parseBody(output.body, context);
2503
1087
  let contents = {};
@@ -2508,31 +1092,9 @@ export const de_ListWhatIfForecastsCommand = async (output, context) => {
2508
1092
  };
2509
1093
  return response;
2510
1094
  };
2511
- const de_ListWhatIfForecastsCommandError = async (output, context) => {
2512
- const parsedOutput = {
2513
- ...output,
2514
- body: await parseErrorBody(output.body, context),
2515
- };
2516
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2517
- switch (errorCode) {
2518
- case "InvalidInputException":
2519
- case "com.amazonaws.forecast#InvalidInputException":
2520
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2521
- case "InvalidNextTokenException":
2522
- case "com.amazonaws.forecast#InvalidNextTokenException":
2523
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2524
- default:
2525
- const parsedBody = parsedOutput.body;
2526
- return throwDefaultError({
2527
- output,
2528
- parsedBody,
2529
- errorCode,
2530
- });
2531
- }
2532
- };
2533
1095
  export const de_ResumeResourceCommand = async (output, context) => {
2534
1096
  if (output.statusCode >= 300) {
2535
- return de_ResumeResourceCommandError(output, context);
1097
+ return de_CommandError(output, context);
2536
1098
  }
2537
1099
  await collectBody(output.body, context);
2538
1100
  const response = {
@@ -2540,37 +1102,9 @@ export const de_ResumeResourceCommand = async (output, context) => {
2540
1102
  };
2541
1103
  return response;
2542
1104
  };
2543
- const de_ResumeResourceCommandError = async (output, context) => {
2544
- const parsedOutput = {
2545
- ...output,
2546
- body: await parseErrorBody(output.body, context),
2547
- };
2548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2549
- switch (errorCode) {
2550
- case "InvalidInputException":
2551
- case "com.amazonaws.forecast#InvalidInputException":
2552
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2553
- case "LimitExceededException":
2554
- case "com.amazonaws.forecast#LimitExceededException":
2555
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2556
- case "ResourceInUseException":
2557
- case "com.amazonaws.forecast#ResourceInUseException":
2558
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2559
- case "ResourceNotFoundException":
2560
- case "com.amazonaws.forecast#ResourceNotFoundException":
2561
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2562
- default:
2563
- const parsedBody = parsedOutput.body;
2564
- return throwDefaultError({
2565
- output,
2566
- parsedBody,
2567
- errorCode,
2568
- });
2569
- }
2570
- };
2571
1105
  export const de_StopResourceCommand = async (output, context) => {
2572
1106
  if (output.statusCode >= 300) {
2573
- return de_StopResourceCommandError(output, context);
1107
+ return de_CommandError(output, context);
2574
1108
  }
2575
1109
  await collectBody(output.body, context);
2576
1110
  const response = {
@@ -2578,34 +1112,9 @@ export const de_StopResourceCommand = async (output, context) => {
2578
1112
  };
2579
1113
  return response;
2580
1114
  };
2581
- const de_StopResourceCommandError = async (output, context) => {
2582
- const parsedOutput = {
2583
- ...output,
2584
- body: await parseErrorBody(output.body, context),
2585
- };
2586
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2587
- switch (errorCode) {
2588
- case "InvalidInputException":
2589
- case "com.amazonaws.forecast#InvalidInputException":
2590
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2591
- case "LimitExceededException":
2592
- case "com.amazonaws.forecast#LimitExceededException":
2593
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2594
- case "ResourceNotFoundException":
2595
- case "com.amazonaws.forecast#ResourceNotFoundException":
2596
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2597
- default:
2598
- const parsedBody = parsedOutput.body;
2599
- return throwDefaultError({
2600
- output,
2601
- parsedBody,
2602
- errorCode,
2603
- });
2604
- }
2605
- };
2606
1115
  export const de_TagResourceCommand = async (output, context) => {
2607
1116
  if (output.statusCode >= 300) {
2608
- return de_TagResourceCommandError(output, context);
1117
+ return de_CommandError(output, context);
2609
1118
  }
2610
1119
  const data = await parseBody(output.body, context);
2611
1120
  let contents = {};
@@ -2616,34 +1125,9 @@ export const de_TagResourceCommand = async (output, context) => {
2616
1125
  };
2617
1126
  return response;
2618
1127
  };
2619
- const de_TagResourceCommandError = async (output, context) => {
2620
- const parsedOutput = {
2621
- ...output,
2622
- body: await parseErrorBody(output.body, context),
2623
- };
2624
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2625
- switch (errorCode) {
2626
- case "InvalidInputException":
2627
- case "com.amazonaws.forecast#InvalidInputException":
2628
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2629
- case "LimitExceededException":
2630
- case "com.amazonaws.forecast#LimitExceededException":
2631
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2632
- case "ResourceNotFoundException":
2633
- case "com.amazonaws.forecast#ResourceNotFoundException":
2634
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2635
- default:
2636
- const parsedBody = parsedOutput.body;
2637
- return throwDefaultError({
2638
- output,
2639
- parsedBody,
2640
- errorCode,
2641
- });
2642
- }
2643
- };
2644
1128
  export const de_UntagResourceCommand = async (output, context) => {
2645
1129
  if (output.statusCode >= 300) {
2646
- return de_UntagResourceCommandError(output, context);
1130
+ return de_CommandError(output, context);
2647
1131
  }
2648
1132
  const data = await parseBody(output.body, context);
2649
1133
  let contents = {};
@@ -2654,31 +1138,9 @@ export const de_UntagResourceCommand = async (output, context) => {
2654
1138
  };
2655
1139
  return response;
2656
1140
  };
2657
- const de_UntagResourceCommandError = async (output, context) => {
2658
- const parsedOutput = {
2659
- ...output,
2660
- body: await parseErrorBody(output.body, context),
2661
- };
2662
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2663
- switch (errorCode) {
2664
- case "InvalidInputException":
2665
- case "com.amazonaws.forecast#InvalidInputException":
2666
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
2667
- case "ResourceNotFoundException":
2668
- case "com.amazonaws.forecast#ResourceNotFoundException":
2669
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2670
- default:
2671
- const parsedBody = parsedOutput.body;
2672
- return throwDefaultError({
2673
- output,
2674
- parsedBody,
2675
- errorCode,
2676
- });
2677
- }
2678
- };
2679
1141
  export const de_UpdateDatasetGroupCommand = async (output, context) => {
2680
1142
  if (output.statusCode >= 300) {
2681
- return de_UpdateDatasetGroupCommandError(output, context);
1143
+ return de_CommandError(output, context);
2682
1144
  }
2683
1145
  const data = await parseBody(output.body, context);
2684
1146
  let contents = {};
@@ -2689,7 +1151,7 @@ export const de_UpdateDatasetGroupCommand = async (output, context) => {
2689
1151
  };
2690
1152
  return response;
2691
1153
  };
2692
- const de_UpdateDatasetGroupCommandError = async (output, context) => {
1154
+ const de_CommandError = async (output, context) => {
2693
1155
  const parsedOutput = {
2694
1156
  ...output,
2695
1157
  body: await parseErrorBody(output.body, context),
@@ -2699,12 +1161,21 @@ const de_UpdateDatasetGroupCommandError = async (output, context) => {
2699
1161
  case "InvalidInputException":
2700
1162
  case "com.amazonaws.forecast#InvalidInputException":
2701
1163
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
1164
+ case "LimitExceededException":
1165
+ case "com.amazonaws.forecast#LimitExceededException":
1166
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1167
+ case "ResourceAlreadyExistsException":
1168
+ case "com.amazonaws.forecast#ResourceAlreadyExistsException":
1169
+ throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
2702
1170
  case "ResourceInUseException":
2703
1171
  case "com.amazonaws.forecast#ResourceInUseException":
2704
1172
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2705
1173
  case "ResourceNotFoundException":
2706
1174
  case "com.amazonaws.forecast#ResourceNotFoundException":
2707
1175
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1176
+ case "InvalidNextTokenException":
1177
+ case "com.amazonaws.forecast#InvalidNextTokenException":
1178
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2708
1179
  default:
2709
1180
  const parsedBody = parsedOutput.body;
2710
1181
  return throwDefaultError({