@aws-sdk/client-migrationhuborchestrator 3.504.0 → 3.507.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.
@@ -387,7 +387,7 @@ export const se_UpdateWorkflowStepGroupCommand = async (input, context) => {
387
387
  };
388
388
  export const de_CreateWorkflowCommand = async (output, context) => {
389
389
  if (output.statusCode !== 200 && output.statusCode >= 300) {
390
- return de_CreateWorkflowCommandError(output, context);
390
+ return de_CommandError(output, context);
391
391
  }
392
392
  const contents = map({
393
393
  $metadata: deserializeMetadata(output),
@@ -409,37 +409,9 @@ export const de_CreateWorkflowCommand = async (output, context) => {
409
409
  Object.assign(contents, doc);
410
410
  return contents;
411
411
  };
412
- const de_CreateWorkflowCommandError = async (output, context) => {
413
- const parsedOutput = {
414
- ...output,
415
- body: await parseErrorBody(output.body, context),
416
- };
417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
418
- switch (errorCode) {
419
- case "AccessDeniedException":
420
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
421
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
422
- case "InternalServerException":
423
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
424
- throw await de_InternalServerExceptionRes(parsedOutput, context);
425
- case "ThrottlingException":
426
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
427
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
428
- case "ValidationException":
429
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
430
- throw await de_ValidationExceptionRes(parsedOutput, context);
431
- default:
432
- const parsedBody = parsedOutput.body;
433
- return throwDefaultError({
434
- output,
435
- parsedBody,
436
- errorCode,
437
- });
438
- }
439
- };
440
412
  export const de_CreateWorkflowStepCommand = async (output, context) => {
441
413
  if (output.statusCode !== 200 && output.statusCode >= 300) {
442
- return de_CreateWorkflowStepCommandError(output, context);
414
+ return de_CommandError(output, context);
443
415
  }
444
416
  const contents = map({
445
417
  $metadata: deserializeMetadata(output),
@@ -454,37 +426,9 @@ export const de_CreateWorkflowStepCommand = async (output, context) => {
454
426
  Object.assign(contents, doc);
455
427
  return contents;
456
428
  };
457
- const de_CreateWorkflowStepCommandError = async (output, context) => {
458
- const parsedOutput = {
459
- ...output,
460
- body: await parseErrorBody(output.body, context),
461
- };
462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
463
- switch (errorCode) {
464
- case "AccessDeniedException":
465
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
466
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
467
- case "InternalServerException":
468
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
469
- throw await de_InternalServerExceptionRes(parsedOutput, context);
470
- case "ThrottlingException":
471
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
472
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
473
- case "ValidationException":
474
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
475
- throw await de_ValidationExceptionRes(parsedOutput, context);
476
- default:
477
- const parsedBody = parsedOutput.body;
478
- return throwDefaultError({
479
- output,
480
- parsedBody,
481
- errorCode,
482
- });
483
- }
484
- };
485
429
  export const de_CreateWorkflowStepGroupCommand = async (output, context) => {
486
430
  if (output.statusCode !== 200 && output.statusCode >= 300) {
487
- return de_CreateWorkflowStepGroupCommandError(output, context);
431
+ return de_CommandError(output, context);
488
432
  }
489
433
  const contents = map({
490
434
  $metadata: deserializeMetadata(output),
@@ -503,37 +447,9 @@ export const de_CreateWorkflowStepGroupCommand = async (output, context) => {
503
447
  Object.assign(contents, doc);
504
448
  return contents;
505
449
  };
506
- const de_CreateWorkflowStepGroupCommandError = async (output, context) => {
507
- const parsedOutput = {
508
- ...output,
509
- body: await parseErrorBody(output.body, context),
510
- };
511
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
512
- switch (errorCode) {
513
- case "AccessDeniedException":
514
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
515
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
516
- case "InternalServerException":
517
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
518
- throw await de_InternalServerExceptionRes(parsedOutput, context);
519
- case "ThrottlingException":
520
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
521
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
522
- case "ValidationException":
523
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
524
- throw await de_ValidationExceptionRes(parsedOutput, context);
525
- default:
526
- const parsedBody = parsedOutput.body;
527
- return throwDefaultError({
528
- output,
529
- parsedBody,
530
- errorCode,
531
- });
532
- }
533
- };
534
450
  export const de_DeleteWorkflowCommand = async (output, context) => {
535
451
  if (output.statusCode !== 202 && output.statusCode >= 300) {
536
- return de_DeleteWorkflowCommandError(output, context);
452
+ return de_CommandError(output, context);
537
453
  }
538
454
  const contents = map({
539
455
  $metadata: deserializeMetadata(output),
@@ -547,40 +463,9 @@ export const de_DeleteWorkflowCommand = async (output, context) => {
547
463
  Object.assign(contents, doc);
548
464
  return contents;
549
465
  };
550
- const de_DeleteWorkflowCommandError = async (output, context) => {
551
- const parsedOutput = {
552
- ...output,
553
- body: await parseErrorBody(output.body, context),
554
- };
555
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
556
- switch (errorCode) {
557
- case "AccessDeniedException":
558
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
559
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
560
- case "InternalServerException":
561
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
562
- throw await de_InternalServerExceptionRes(parsedOutput, context);
563
- case "ResourceNotFoundException":
564
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
565
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
566
- case "ThrottlingException":
567
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
568
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
569
- case "ValidationException":
570
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
571
- throw await de_ValidationExceptionRes(parsedOutput, context);
572
- default:
573
- const parsedBody = parsedOutput.body;
574
- return throwDefaultError({
575
- output,
576
- parsedBody,
577
- errorCode,
578
- });
579
- }
580
- };
581
466
  export const de_DeleteWorkflowStepCommand = async (output, context) => {
582
467
  if (output.statusCode !== 200 && output.statusCode >= 300) {
583
- return de_DeleteWorkflowStepCommandError(output, context);
468
+ return de_CommandError(output, context);
584
469
  }
585
470
  const contents = map({
586
471
  $metadata: deserializeMetadata(output),
@@ -588,40 +473,9 @@ export const de_DeleteWorkflowStepCommand = async (output, context) => {
588
473
  await collectBody(output.body, context);
589
474
  return contents;
590
475
  };
591
- const de_DeleteWorkflowStepCommandError = async (output, context) => {
592
- const parsedOutput = {
593
- ...output,
594
- body: await parseErrorBody(output.body, context),
595
- };
596
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
597
- switch (errorCode) {
598
- case "AccessDeniedException":
599
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
600
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
601
- case "InternalServerException":
602
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
603
- throw await de_InternalServerExceptionRes(parsedOutput, context);
604
- case "ResourceNotFoundException":
605
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
606
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
607
- case "ThrottlingException":
608
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
609
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
610
- case "ValidationException":
611
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
612
- throw await de_ValidationExceptionRes(parsedOutput, context);
613
- default:
614
- const parsedBody = parsedOutput.body;
615
- return throwDefaultError({
616
- output,
617
- parsedBody,
618
- errorCode,
619
- });
620
- }
621
- };
622
476
  export const de_DeleteWorkflowStepGroupCommand = async (output, context) => {
623
477
  if (output.statusCode !== 202 && output.statusCode >= 300) {
624
- return de_DeleteWorkflowStepGroupCommandError(output, context);
478
+ return de_CommandError(output, context);
625
479
  }
626
480
  const contents = map({
627
481
  $metadata: deserializeMetadata(output),
@@ -629,40 +483,9 @@ export const de_DeleteWorkflowStepGroupCommand = async (output, context) => {
629
483
  await collectBody(output.body, context);
630
484
  return contents;
631
485
  };
632
- const de_DeleteWorkflowStepGroupCommandError = async (output, context) => {
633
- const parsedOutput = {
634
- ...output,
635
- body: await parseErrorBody(output.body, context),
636
- };
637
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
638
- switch (errorCode) {
639
- case "AccessDeniedException":
640
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
641
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
642
- case "InternalServerException":
643
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
644
- throw await de_InternalServerExceptionRes(parsedOutput, context);
645
- case "ResourceNotFoundException":
646
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
647
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
648
- case "ThrottlingException":
649
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
650
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
651
- case "ValidationException":
652
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
653
- throw await de_ValidationExceptionRes(parsedOutput, context);
654
- default:
655
- const parsedBody = parsedOutput.body;
656
- return throwDefaultError({
657
- output,
658
- parsedBody,
659
- errorCode,
660
- });
661
- }
662
- };
663
486
  export const de_GetTemplateCommand = async (output, context) => {
664
487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
665
- return de_GetTemplateCommandError(output, context);
488
+ return de_CommandError(output, context);
666
489
  }
667
490
  const contents = map({
668
491
  $metadata: deserializeMetadata(output),
@@ -680,37 +503,9 @@ export const de_GetTemplateCommand = async (output, context) => {
680
503
  Object.assign(contents, doc);
681
504
  return contents;
682
505
  };
683
- const de_GetTemplateCommandError = async (output, context) => {
684
- const parsedOutput = {
685
- ...output,
686
- body: await parseErrorBody(output.body, context),
687
- };
688
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
689
- switch (errorCode) {
690
- case "AccessDeniedException":
691
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
692
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
693
- case "InternalServerException":
694
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
695
- throw await de_InternalServerExceptionRes(parsedOutput, context);
696
- case "ResourceNotFoundException":
697
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
698
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
699
- case "ThrottlingException":
700
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
701
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
702
- default:
703
- const parsedBody = parsedOutput.body;
704
- return throwDefaultError({
705
- output,
706
- parsedBody,
707
- errorCode,
708
- });
709
- }
710
- };
711
506
  export const de_GetTemplateStepCommand = async (output, context) => {
712
507
  if (output.statusCode !== 200 && output.statusCode >= 300) {
713
- return de_GetTemplateStepCommandError(output, context);
508
+ return de_CommandError(output, context);
714
509
  }
715
510
  const contents = map({
716
511
  $metadata: deserializeMetadata(output),
@@ -732,40 +527,9 @@ export const de_GetTemplateStepCommand = async (output, context) => {
732
527
  Object.assign(contents, doc);
733
528
  return contents;
734
529
  };
735
- const de_GetTemplateStepCommandError = async (output, context) => {
736
- const parsedOutput = {
737
- ...output,
738
- body: await parseErrorBody(output.body, context),
739
- };
740
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
741
- switch (errorCode) {
742
- case "AccessDeniedException":
743
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
744
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
745
- case "InternalServerException":
746
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
747
- throw await de_InternalServerExceptionRes(parsedOutput, context);
748
- case "ResourceNotFoundException":
749
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
750
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
751
- case "ThrottlingException":
752
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
753
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
754
- case "ValidationException":
755
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
756
- throw await de_ValidationExceptionRes(parsedOutput, context);
757
- default:
758
- const parsedBody = parsedOutput.body;
759
- return throwDefaultError({
760
- output,
761
- parsedBody,
762
- errorCode,
763
- });
764
- }
765
- };
766
530
  export const de_GetTemplateStepGroupCommand = async (output, context) => {
767
531
  if (output.statusCode !== 200 && output.statusCode >= 300) {
768
- return de_GetTemplateStepGroupCommandError(output, context);
532
+ return de_CommandError(output, context);
769
533
  }
770
534
  const contents = map({
771
535
  $metadata: deserializeMetadata(output),
@@ -786,40 +550,9 @@ export const de_GetTemplateStepGroupCommand = async (output, context) => {
786
550
  Object.assign(contents, doc);
787
551
  return contents;
788
552
  };
789
- const de_GetTemplateStepGroupCommandError = async (output, context) => {
790
- const parsedOutput = {
791
- ...output,
792
- body: await parseErrorBody(output.body, context),
793
- };
794
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
795
- switch (errorCode) {
796
- case "AccessDeniedException":
797
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
798
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
799
- case "InternalServerException":
800
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
801
- throw await de_InternalServerExceptionRes(parsedOutput, context);
802
- case "ResourceNotFoundException":
803
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
804
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
805
- case "ThrottlingException":
806
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
807
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
808
- case "ValidationException":
809
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
810
- throw await de_ValidationExceptionRes(parsedOutput, context);
811
- default:
812
- const parsedBody = parsedOutput.body;
813
- return throwDefaultError({
814
- output,
815
- parsedBody,
816
- errorCode,
817
- });
818
- }
819
- };
820
553
  export const de_GetWorkflowCommand = async (output, context) => {
821
554
  if (output.statusCode !== 200 && output.statusCode >= 300) {
822
- return de_GetWorkflowCommandError(output, context);
555
+ return de_CommandError(output, context);
823
556
  }
824
557
  const contents = map({
825
558
  $metadata: deserializeMetadata(output),
@@ -850,40 +583,9 @@ export const de_GetWorkflowCommand = async (output, context) => {
850
583
  Object.assign(contents, doc);
851
584
  return contents;
852
585
  };
853
- const de_GetWorkflowCommandError = async (output, context) => {
854
- const parsedOutput = {
855
- ...output,
856
- body: await parseErrorBody(output.body, context),
857
- };
858
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
859
- switch (errorCode) {
860
- case "AccessDeniedException":
861
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
862
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
863
- case "InternalServerException":
864
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
865
- throw await de_InternalServerExceptionRes(parsedOutput, context);
866
- case "ResourceNotFoundException":
867
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
868
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
869
- case "ThrottlingException":
870
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
871
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
872
- case "ValidationException":
873
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
874
- throw await de_ValidationExceptionRes(parsedOutput, context);
875
- default:
876
- const parsedBody = parsedOutput.body;
877
- return throwDefaultError({
878
- output,
879
- parsedBody,
880
- errorCode,
881
- });
882
- }
883
- };
884
586
  export const de_GetWorkflowStepCommand = async (output, context) => {
885
587
  if (output.statusCode !== 200 && output.statusCode >= 300) {
886
- return de_GetWorkflowStepCommandError(output, context);
588
+ return de_CommandError(output, context);
887
589
  }
888
590
  const contents = map({
889
591
  $metadata: deserializeMetadata(output),
@@ -915,37 +617,9 @@ export const de_GetWorkflowStepCommand = async (output, context) => {
915
617
  Object.assign(contents, doc);
916
618
  return contents;
917
619
  };
918
- const de_GetWorkflowStepCommandError = 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 "AccessDeniedException":
926
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
927
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
928
- case "InternalServerException":
929
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
930
- throw await de_InternalServerExceptionRes(parsedOutput, context);
931
- case "ResourceNotFoundException":
932
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
933
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
934
- case "ThrottlingException":
935
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
936
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
937
- default:
938
- const parsedBody = parsedOutput.body;
939
- return throwDefaultError({
940
- output,
941
- parsedBody,
942
- errorCode,
943
- });
944
- }
945
- };
946
620
  export const de_GetWorkflowStepGroupCommand = async (output, context) => {
947
621
  if (output.statusCode !== 200 && output.statusCode >= 300) {
948
- return de_GetWorkflowStepGroupCommandError(output, context);
622
+ return de_CommandError(output, context);
949
623
  }
950
624
  const contents = map({
951
625
  $metadata: deserializeMetadata(output),
@@ -968,40 +642,9 @@ export const de_GetWorkflowStepGroupCommand = async (output, context) => {
968
642
  Object.assign(contents, doc);
969
643
  return contents;
970
644
  };
971
- const de_GetWorkflowStepGroupCommandError = async (output, context) => {
972
- const parsedOutput = {
973
- ...output,
974
- body: await parseErrorBody(output.body, context),
975
- };
976
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
977
- switch (errorCode) {
978
- case "AccessDeniedException":
979
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
980
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
981
- case "InternalServerException":
982
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
983
- throw await de_InternalServerExceptionRes(parsedOutput, context);
984
- case "ResourceNotFoundException":
985
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
986
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
987
- case "ThrottlingException":
988
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
989
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
990
- case "ValidationException":
991
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
992
- throw await de_ValidationExceptionRes(parsedOutput, context);
993
- default:
994
- const parsedBody = parsedOutput.body;
995
- return throwDefaultError({
996
- output,
997
- parsedBody,
998
- errorCode,
999
- });
1000
- }
1001
- };
1002
645
  export const de_ListPluginsCommand = async (output, context) => {
1003
646
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1004
- return de_ListPluginsCommandError(output, context);
647
+ return de_CommandError(output, context);
1005
648
  }
1006
649
  const contents = map({
1007
650
  $metadata: deserializeMetadata(output),
@@ -1014,34 +657,9 @@ export const de_ListPluginsCommand = async (output, context) => {
1014
657
  Object.assign(contents, doc);
1015
658
  return contents;
1016
659
  };
1017
- const de_ListPluginsCommandError = async (output, context) => {
1018
- const parsedOutput = {
1019
- ...output,
1020
- body: await parseErrorBody(output.body, context),
1021
- };
1022
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1023
- switch (errorCode) {
1024
- case "AccessDeniedException":
1025
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1026
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1027
- case "InternalServerException":
1028
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1029
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1030
- case "ValidationException":
1031
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1032
- throw await de_ValidationExceptionRes(parsedOutput, context);
1033
- default:
1034
- const parsedBody = parsedOutput.body;
1035
- return throwDefaultError({
1036
- output,
1037
- parsedBody,
1038
- errorCode,
1039
- });
1040
- }
1041
- };
1042
660
  export const de_ListTagsForResourceCommand = async (output, context) => {
1043
661
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1044
- return de_ListTagsForResourceCommandError(output, context);
662
+ return de_CommandError(output, context);
1045
663
  }
1046
664
  const contents = map({
1047
665
  $metadata: deserializeMetadata(output),
@@ -1053,31 +671,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1053
671
  Object.assign(contents, doc);
1054
672
  return contents;
1055
673
  };
1056
- const de_ListTagsForResourceCommandError = async (output, context) => {
1057
- const parsedOutput = {
1058
- ...output,
1059
- body: await parseErrorBody(output.body, context),
1060
- };
1061
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1062
- switch (errorCode) {
1063
- case "ResourceNotFoundException":
1064
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1065
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1066
- case "ValidationException":
1067
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1068
- throw await de_ValidationExceptionRes(parsedOutput, context);
1069
- default:
1070
- const parsedBody = parsedOutput.body;
1071
- return throwDefaultError({
1072
- output,
1073
- parsedBody,
1074
- errorCode,
1075
- });
1076
- }
1077
- };
1078
674
  export const de_ListTemplatesCommand = async (output, context) => {
1079
675
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1080
- return de_ListTemplatesCommandError(output, context);
676
+ return de_CommandError(output, context);
1081
677
  }
1082
678
  const contents = map({
1083
679
  $metadata: deserializeMetadata(output),
@@ -1090,34 +686,9 @@ export const de_ListTemplatesCommand = async (output, context) => {
1090
686
  Object.assign(contents, doc);
1091
687
  return contents;
1092
688
  };
1093
- const de_ListTemplatesCommandError = async (output, context) => {
1094
- const parsedOutput = {
1095
- ...output,
1096
- body: await parseErrorBody(output.body, context),
1097
- };
1098
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1099
- switch (errorCode) {
1100
- case "AccessDeniedException":
1101
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1102
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1103
- case "InternalServerException":
1104
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1105
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1106
- case "ThrottlingException":
1107
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1108
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1109
- default:
1110
- const parsedBody = parsedOutput.body;
1111
- return throwDefaultError({
1112
- output,
1113
- parsedBody,
1114
- errorCode,
1115
- });
1116
- }
1117
- };
1118
689
  export const de_ListTemplateStepGroupsCommand = async (output, context) => {
1119
690
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1120
- return de_ListTemplateStepGroupsCommandError(output, context);
691
+ return de_CommandError(output, context);
1121
692
  }
1122
693
  const contents = map({
1123
694
  $metadata: deserializeMetadata(output),
@@ -1130,37 +701,9 @@ export const de_ListTemplateStepGroupsCommand = async (output, context) => {
1130
701
  Object.assign(contents, doc);
1131
702
  return contents;
1132
703
  };
1133
- const de_ListTemplateStepGroupsCommandError = async (output, context) => {
1134
- const parsedOutput = {
1135
- ...output,
1136
- body: await parseErrorBody(output.body, context),
1137
- };
1138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1139
- switch (errorCode) {
1140
- case "AccessDeniedException":
1141
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1142
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1143
- case "InternalServerException":
1144
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1145
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1146
- case "ResourceNotFoundException":
1147
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1148
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1149
- case "ThrottlingException":
1150
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1151
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1152
- default:
1153
- const parsedBody = parsedOutput.body;
1154
- return throwDefaultError({
1155
- output,
1156
- parsedBody,
1157
- errorCode,
1158
- });
1159
- }
1160
- };
1161
704
  export const de_ListTemplateStepsCommand = async (output, context) => {
1162
705
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1163
- return de_ListTemplateStepsCommandError(output, context);
706
+ return de_CommandError(output, context);
1164
707
  }
1165
708
  const contents = map({
1166
709
  $metadata: deserializeMetadata(output),
@@ -1173,86 +716,24 @@ export const de_ListTemplateStepsCommand = async (output, context) => {
1173
716
  Object.assign(contents, doc);
1174
717
  return contents;
1175
718
  };
1176
- const de_ListTemplateStepsCommandError = async (output, context) => {
1177
- const parsedOutput = {
1178
- ...output,
1179
- body: await parseErrorBody(output.body, context),
1180
- };
1181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1182
- switch (errorCode) {
1183
- case "AccessDeniedException":
1184
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1185
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1186
- case "InternalServerException":
1187
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1188
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1189
- case "ResourceNotFoundException":
1190
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1191
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1192
- case "ThrottlingException":
1193
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1194
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1195
- case "ValidationException":
1196
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1197
- throw await de_ValidationExceptionRes(parsedOutput, context);
1198
- default:
1199
- const parsedBody = parsedOutput.body;
1200
- return throwDefaultError({
1201
- output,
1202
- parsedBody,
1203
- errorCode,
1204
- });
1205
- }
1206
- };
1207
719
  export const de_ListWorkflowsCommand = async (output, context) => {
1208
720
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1209
- return de_ListWorkflowsCommandError(output, context);
721
+ return de_CommandError(output, context);
1210
722
  }
1211
723
  const contents = map({
1212
724
  $metadata: deserializeMetadata(output),
1213
725
  });
1214
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1215
- const doc = take(data, {
1216
- migrationWorkflowSummary: (_) => de_MigrationWorkflowSummaryList(_, context),
1217
- nextToken: __expectString,
1218
- });
1219
- Object.assign(contents, doc);
1220
- return contents;
1221
- };
1222
- const de_ListWorkflowsCommandError = async (output, context) => {
1223
- const parsedOutput = {
1224
- ...output,
1225
- body: await parseErrorBody(output.body, context),
1226
- };
1227
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1228
- switch (errorCode) {
1229
- case "AccessDeniedException":
1230
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1231
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1232
- case "InternalServerException":
1233
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1234
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1235
- case "ResourceNotFoundException":
1236
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1237
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1238
- case "ThrottlingException":
1239
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1240
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1241
- case "ValidationException":
1242
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1243
- throw await de_ValidationExceptionRes(parsedOutput, context);
1244
- default:
1245
- const parsedBody = parsedOutput.body;
1246
- return throwDefaultError({
1247
- output,
1248
- parsedBody,
1249
- errorCode,
1250
- });
1251
- }
726
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
727
+ const doc = take(data, {
728
+ migrationWorkflowSummary: (_) => de_MigrationWorkflowSummaryList(_, context),
729
+ nextToken: __expectString,
730
+ });
731
+ Object.assign(contents, doc);
732
+ return contents;
1252
733
  };
1253
734
  export const de_ListWorkflowStepGroupsCommand = async (output, context) => {
1254
735
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1255
- return de_ListWorkflowStepGroupsCommandError(output, context);
736
+ return de_CommandError(output, context);
1256
737
  }
1257
738
  const contents = map({
1258
739
  $metadata: deserializeMetadata(output),
@@ -1265,40 +746,9 @@ export const de_ListWorkflowStepGroupsCommand = async (output, context) => {
1265
746
  Object.assign(contents, doc);
1266
747
  return contents;
1267
748
  };
1268
- const de_ListWorkflowStepGroupsCommandError = async (output, context) => {
1269
- const parsedOutput = {
1270
- ...output,
1271
- body: await parseErrorBody(output.body, context),
1272
- };
1273
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1274
- switch (errorCode) {
1275
- case "AccessDeniedException":
1276
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1277
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1278
- case "InternalServerException":
1279
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1280
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1281
- case "ResourceNotFoundException":
1282
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1283
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1284
- case "ThrottlingException":
1285
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1286
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1287
- case "ValidationException":
1288
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1289
- throw await de_ValidationExceptionRes(parsedOutput, context);
1290
- default:
1291
- const parsedBody = parsedOutput.body;
1292
- return throwDefaultError({
1293
- output,
1294
- parsedBody,
1295
- errorCode,
1296
- });
1297
- }
1298
- };
1299
749
  export const de_ListWorkflowStepsCommand = async (output, context) => {
1300
750
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1301
- return de_ListWorkflowStepsCommandError(output, context);
751
+ return de_CommandError(output, context);
1302
752
  }
1303
753
  const contents = map({
1304
754
  $metadata: deserializeMetadata(output),
@@ -1311,37 +761,9 @@ export const de_ListWorkflowStepsCommand = async (output, context) => {
1311
761
  Object.assign(contents, doc);
1312
762
  return contents;
1313
763
  };
1314
- const de_ListWorkflowStepsCommandError = async (output, context) => {
1315
- const parsedOutput = {
1316
- ...output,
1317
- body: await parseErrorBody(output.body, context),
1318
- };
1319
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1320
- switch (errorCode) {
1321
- case "AccessDeniedException":
1322
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1323
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1324
- case "InternalServerException":
1325
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1326
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1327
- case "ThrottlingException":
1328
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1329
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1330
- case "ValidationException":
1331
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1332
- throw await de_ValidationExceptionRes(parsedOutput, context);
1333
- default:
1334
- const parsedBody = parsedOutput.body;
1335
- return throwDefaultError({
1336
- output,
1337
- parsedBody,
1338
- errorCode,
1339
- });
1340
- }
1341
- };
1342
764
  export const de_RetryWorkflowStepCommand = async (output, context) => {
1343
765
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1344
- return de_RetryWorkflowStepCommandError(output, context);
766
+ return de_CommandError(output, context);
1345
767
  }
1346
768
  const contents = map({
1347
769
  $metadata: deserializeMetadata(output),
@@ -1356,37 +778,9 @@ export const de_RetryWorkflowStepCommand = async (output, context) => {
1356
778
  Object.assign(contents, doc);
1357
779
  return contents;
1358
780
  };
1359
- const de_RetryWorkflowStepCommandError = async (output, context) => {
1360
- const parsedOutput = {
1361
- ...output,
1362
- body: await parseErrorBody(output.body, context),
1363
- };
1364
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1365
- switch (errorCode) {
1366
- case "AccessDeniedException":
1367
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1368
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1369
- case "InternalServerException":
1370
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1371
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1372
- case "ResourceNotFoundException":
1373
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1374
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1375
- case "ThrottlingException":
1376
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1377
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1378
- default:
1379
- const parsedBody = parsedOutput.body;
1380
- return throwDefaultError({
1381
- output,
1382
- parsedBody,
1383
- errorCode,
1384
- });
1385
- }
1386
- };
1387
781
  export const de_StartWorkflowCommand = async (output, context) => {
1388
782
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1389
- return de_StartWorkflowCommandError(output, context);
783
+ return de_CommandError(output, context);
1390
784
  }
1391
785
  const contents = map({
1392
786
  $metadata: deserializeMetadata(output),
@@ -1402,40 +796,9 @@ export const de_StartWorkflowCommand = async (output, context) => {
1402
796
  Object.assign(contents, doc);
1403
797
  return contents;
1404
798
  };
1405
- const de_StartWorkflowCommandError = async (output, context) => {
1406
- const parsedOutput = {
1407
- ...output,
1408
- body: await parseErrorBody(output.body, context),
1409
- };
1410
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1411
- switch (errorCode) {
1412
- case "AccessDeniedException":
1413
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1414
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1415
- case "InternalServerException":
1416
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1417
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1418
- case "ResourceNotFoundException":
1419
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1420
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1421
- case "ThrottlingException":
1422
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1423
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1424
- case "ValidationException":
1425
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1426
- throw await de_ValidationExceptionRes(parsedOutput, context);
1427
- default:
1428
- const parsedBody = parsedOutput.body;
1429
- return throwDefaultError({
1430
- output,
1431
- parsedBody,
1432
- errorCode,
1433
- });
1434
- }
1435
- };
1436
799
  export const de_StopWorkflowCommand = async (output, context) => {
1437
800
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1438
- return de_StopWorkflowCommandError(output, context);
801
+ return de_CommandError(output, context);
1439
802
  }
1440
803
  const contents = map({
1441
804
  $metadata: deserializeMetadata(output),
@@ -1451,40 +814,9 @@ export const de_StopWorkflowCommand = async (output, context) => {
1451
814
  Object.assign(contents, doc);
1452
815
  return contents;
1453
816
  };
1454
- const de_StopWorkflowCommandError = async (output, context) => {
1455
- const parsedOutput = {
1456
- ...output,
1457
- body: await parseErrorBody(output.body, context),
1458
- };
1459
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1460
- switch (errorCode) {
1461
- case "AccessDeniedException":
1462
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1463
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1464
- case "InternalServerException":
1465
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1466
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1467
- case "ResourceNotFoundException":
1468
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1469
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1470
- case "ThrottlingException":
1471
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1472
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1473
- case "ValidationException":
1474
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1475
- throw await de_ValidationExceptionRes(parsedOutput, context);
1476
- default:
1477
- const parsedBody = parsedOutput.body;
1478
- return throwDefaultError({
1479
- output,
1480
- parsedBody,
1481
- errorCode,
1482
- });
1483
- }
1484
- };
1485
817
  export const de_TagResourceCommand = async (output, context) => {
1486
818
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1487
- return de_TagResourceCommandError(output, context);
819
+ return de_CommandError(output, context);
1488
820
  }
1489
821
  const contents = map({
1490
822
  $metadata: deserializeMetadata(output),
@@ -1492,31 +824,9 @@ export const de_TagResourceCommand = async (output, context) => {
1492
824
  await collectBody(output.body, context);
1493
825
  return contents;
1494
826
  };
1495
- const de_TagResourceCommandError = async (output, context) => {
1496
- const parsedOutput = {
1497
- ...output,
1498
- body: await parseErrorBody(output.body, context),
1499
- };
1500
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1501
- switch (errorCode) {
1502
- case "ResourceNotFoundException":
1503
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1504
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1505
- case "ValidationException":
1506
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1507
- throw await de_ValidationExceptionRes(parsedOutput, context);
1508
- default:
1509
- const parsedBody = parsedOutput.body;
1510
- return throwDefaultError({
1511
- output,
1512
- parsedBody,
1513
- errorCode,
1514
- });
1515
- }
1516
- };
1517
827
  export const de_UntagResourceCommand = async (output, context) => {
1518
828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1519
- return de_UntagResourceCommandError(output, context);
829
+ return de_CommandError(output, context);
1520
830
  }
1521
831
  const contents = map({
1522
832
  $metadata: deserializeMetadata(output),
@@ -1524,31 +834,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1524
834
  await collectBody(output.body, context);
1525
835
  return contents;
1526
836
  };
1527
- const de_UntagResourceCommandError = async (output, context) => {
1528
- const parsedOutput = {
1529
- ...output,
1530
- body: await parseErrorBody(output.body, context),
1531
- };
1532
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1533
- switch (errorCode) {
1534
- case "ResourceNotFoundException":
1535
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1536
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1537
- case "ValidationException":
1538
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1539
- throw await de_ValidationExceptionRes(parsedOutput, context);
1540
- default:
1541
- const parsedBody = parsedOutput.body;
1542
- return throwDefaultError({
1543
- output,
1544
- parsedBody,
1545
- errorCode,
1546
- });
1547
- }
1548
- };
1549
837
  export const de_UpdateWorkflowCommand = async (output, context) => {
1550
838
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1551
- return de_UpdateWorkflowCommandError(output, context);
839
+ return de_CommandError(output, context);
1552
840
  }
1553
841
  const contents = map({
1554
842
  $metadata: deserializeMetadata(output),
@@ -1571,40 +859,9 @@ export const de_UpdateWorkflowCommand = async (output, context) => {
1571
859
  Object.assign(contents, doc);
1572
860
  return contents;
1573
861
  };
1574
- const de_UpdateWorkflowCommandError = async (output, context) => {
1575
- const parsedOutput = {
1576
- ...output,
1577
- body: await parseErrorBody(output.body, context),
1578
- };
1579
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1580
- switch (errorCode) {
1581
- case "AccessDeniedException":
1582
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1583
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1584
- case "InternalServerException":
1585
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1586
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1587
- case "ResourceNotFoundException":
1588
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1589
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1590
- case "ThrottlingException":
1591
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1592
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1593
- case "ValidationException":
1594
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1595
- throw await de_ValidationExceptionRes(parsedOutput, context);
1596
- default:
1597
- const parsedBody = parsedOutput.body;
1598
- return throwDefaultError({
1599
- output,
1600
- parsedBody,
1601
- errorCode,
1602
- });
1603
- }
1604
- };
1605
862
  export const de_UpdateWorkflowStepCommand = async (output, context) => {
1606
863
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1607
- return de_UpdateWorkflowStepCommandError(output, context);
864
+ return de_CommandError(output, context);
1608
865
  }
1609
866
  const contents = map({
1610
867
  $metadata: deserializeMetadata(output),
@@ -1619,37 +876,9 @@ export const de_UpdateWorkflowStepCommand = async (output, context) => {
1619
876
  Object.assign(contents, doc);
1620
877
  return contents;
1621
878
  };
1622
- const de_UpdateWorkflowStepCommandError = async (output, context) => {
1623
- const parsedOutput = {
1624
- ...output,
1625
- body: await parseErrorBody(output.body, context),
1626
- };
1627
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1628
- switch (errorCode) {
1629
- case "AccessDeniedException":
1630
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1631
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1632
- case "InternalServerException":
1633
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1634
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1635
- case "ThrottlingException":
1636
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1637
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1638
- case "ValidationException":
1639
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1640
- throw await de_ValidationExceptionRes(parsedOutput, context);
1641
- default:
1642
- const parsedBody = parsedOutput.body;
1643
- return throwDefaultError({
1644
- output,
1645
- parsedBody,
1646
- errorCode,
1647
- });
1648
- }
1649
- };
1650
879
  export const de_UpdateWorkflowStepGroupCommand = async (output, context) => {
1651
880
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1652
- return de_UpdateWorkflowStepGroupCommandError(output, context);
881
+ return de_CommandError(output, context);
1653
882
  }
1654
883
  const contents = map({
1655
884
  $metadata: deserializeMetadata(output),
@@ -1668,7 +897,7 @@ export const de_UpdateWorkflowStepGroupCommand = async (output, context) => {
1668
897
  Object.assign(contents, doc);
1669
898
  return contents;
1670
899
  };
1671
- const de_UpdateWorkflowStepGroupCommandError = async (output, context) => {
900
+ const de_CommandError = async (output, context) => {
1672
901
  const parsedOutput = {
1673
902
  ...output,
1674
903
  body: await parseErrorBody(output.body, context),
@@ -1681,15 +910,15 @@ const de_UpdateWorkflowStepGroupCommandError = async (output, context) => {
1681
910
  case "InternalServerException":
1682
911
  case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1683
912
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1684
- case "ResourceNotFoundException":
1685
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1686
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1687
913
  case "ThrottlingException":
1688
914
  case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1689
915
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1690
916
  case "ValidationException":
1691
917
  case "com.amazonaws.migrationhuborchestrator#ValidationException":
1692
918
  throw await de_ValidationExceptionRes(parsedOutput, context);
919
+ case "ResourceNotFoundException":
920
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
921
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1693
922
  default:
1694
923
  const parsedBody = parsedOutput.body;
1695
924
  return throwDefaultError({