@aws-sdk/client-migration-hub-refactor-spaces 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.
@@ -317,7 +317,7 @@ export const se_UpdateRouteCommand = async (input, context) => {
317
317
  };
318
318
  export const de_CreateApplicationCommand = async (output, context) => {
319
319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
320
- return de_CreateApplicationCommandError(output, context);
320
+ return de_CommandError(output, context);
321
321
  }
322
322
  const contents = map({
323
323
  $metadata: deserializeMetadata(output),
@@ -341,46 +341,9 @@ export const de_CreateApplicationCommand = async (output, context) => {
341
341
  Object.assign(contents, doc);
342
342
  return contents;
343
343
  };
344
- const de_CreateApplicationCommandError = async (output, context) => {
345
- const parsedOutput = {
346
- ...output,
347
- body: await parseErrorBody(output.body, context),
348
- };
349
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
350
- switch (errorCode) {
351
- case "AccessDeniedException":
352
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
353
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
354
- case "ConflictException":
355
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
356
- throw await de_ConflictExceptionRes(parsedOutput, context);
357
- case "InternalServerException":
358
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
359
- throw await de_InternalServerExceptionRes(parsedOutput, context);
360
- case "ResourceNotFoundException":
361
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
362
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
363
- case "ServiceQuotaExceededException":
364
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
365
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
366
- case "ThrottlingException":
367
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
368
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
369
- case "ValidationException":
370
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
371
- throw await de_ValidationExceptionRes(parsedOutput, context);
372
- default:
373
- const parsedBody = parsedOutput.body;
374
- return throwDefaultError({
375
- output,
376
- parsedBody,
377
- errorCode,
378
- });
379
- }
380
- };
381
344
  export const de_CreateEnvironmentCommand = async (output, context) => {
382
345
  if (output.statusCode !== 200 && output.statusCode >= 300) {
383
- return de_CreateEnvironmentCommandError(output, context);
346
+ return de_CommandError(output, context);
384
347
  }
385
348
  const contents = map({
386
349
  $metadata: deserializeMetadata(output),
@@ -401,46 +364,9 @@ export const de_CreateEnvironmentCommand = async (output, context) => {
401
364
  Object.assign(contents, doc);
402
365
  return contents;
403
366
  };
404
- const de_CreateEnvironmentCommandError = async (output, context) => {
405
- const parsedOutput = {
406
- ...output,
407
- body: await parseErrorBody(output.body, context),
408
- };
409
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
410
- switch (errorCode) {
411
- case "AccessDeniedException":
412
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
413
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
414
- case "ConflictException":
415
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
416
- throw await de_ConflictExceptionRes(parsedOutput, context);
417
- case "InternalServerException":
418
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
419
- throw await de_InternalServerExceptionRes(parsedOutput, context);
420
- case "ResourceNotFoundException":
421
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
422
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
423
- case "ServiceQuotaExceededException":
424
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
425
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
426
- case "ThrottlingException":
427
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
428
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
429
- case "ValidationException":
430
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
431
- throw await de_ValidationExceptionRes(parsedOutput, context);
432
- default:
433
- const parsedBody = parsedOutput.body;
434
- return throwDefaultError({
435
- output,
436
- parsedBody,
437
- errorCode,
438
- });
439
- }
440
- };
441
367
  export const de_CreateRouteCommand = async (output, context) => {
442
368
  if (output.statusCode !== 200 && output.statusCode >= 300) {
443
- return de_CreateRouteCommandError(output, context);
369
+ return de_CommandError(output, context);
444
370
  }
445
371
  const contents = map({
446
372
  $metadata: deserializeMetadata(output),
@@ -463,46 +389,9 @@ export const de_CreateRouteCommand = async (output, context) => {
463
389
  Object.assign(contents, doc);
464
390
  return contents;
465
391
  };
466
- const de_CreateRouteCommandError = async (output, context) => {
467
- const parsedOutput = {
468
- ...output,
469
- body: await parseErrorBody(output.body, context),
470
- };
471
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
472
- switch (errorCode) {
473
- case "AccessDeniedException":
474
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
475
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
476
- case "ConflictException":
477
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
478
- throw await de_ConflictExceptionRes(parsedOutput, context);
479
- case "InternalServerException":
480
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
481
- throw await de_InternalServerExceptionRes(parsedOutput, context);
482
- case "ResourceNotFoundException":
483
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
484
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
485
- case "ServiceQuotaExceededException":
486
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
487
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
488
- case "ThrottlingException":
489
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
490
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
491
- case "ValidationException":
492
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
493
- throw await de_ValidationExceptionRes(parsedOutput, context);
494
- default:
495
- const parsedBody = parsedOutput.body;
496
- return throwDefaultError({
497
- output,
498
- parsedBody,
499
- errorCode,
500
- });
501
- }
502
- };
503
392
  export const de_CreateServiceCommand = async (output, context) => {
504
393
  if (output.statusCode !== 200 && output.statusCode >= 300) {
505
- return de_CreateServiceCommandError(output, context);
394
+ return de_CommandError(output, context);
506
395
  }
507
396
  const contents = map({
508
397
  $metadata: deserializeMetadata(output),
@@ -529,46 +418,9 @@ export const de_CreateServiceCommand = async (output, context) => {
529
418
  Object.assign(contents, doc);
530
419
  return contents;
531
420
  };
532
- const de_CreateServiceCommandError = async (output, context) => {
533
- const parsedOutput = {
534
- ...output,
535
- body: await parseErrorBody(output.body, context),
536
- };
537
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
538
- switch (errorCode) {
539
- case "AccessDeniedException":
540
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
541
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
542
- case "ConflictException":
543
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
544
- throw await de_ConflictExceptionRes(parsedOutput, context);
545
- case "InternalServerException":
546
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
547
- throw await de_InternalServerExceptionRes(parsedOutput, context);
548
- case "ResourceNotFoundException":
549
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
550
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
551
- case "ServiceQuotaExceededException":
552
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
553
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
554
- case "ThrottlingException":
555
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
556
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
557
- case "ValidationException":
558
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
559
- throw await de_ValidationExceptionRes(parsedOutput, context);
560
- default:
561
- const parsedBody = parsedOutput.body;
562
- return throwDefaultError({
563
- output,
564
- parsedBody,
565
- errorCode,
566
- });
567
- }
568
- };
569
421
  export const de_DeleteApplicationCommand = async (output, context) => {
570
422
  if (output.statusCode !== 200 && output.statusCode >= 300) {
571
- return de_DeleteApplicationCommandError(output, context);
423
+ return de_CommandError(output, context);
572
424
  }
573
425
  const contents = map({
574
426
  $metadata: deserializeMetadata(output),
@@ -585,43 +437,9 @@ export const de_DeleteApplicationCommand = async (output, context) => {
585
437
  Object.assign(contents, doc);
586
438
  return contents;
587
439
  };
588
- const de_DeleteApplicationCommandError = async (output, context) => {
589
- const parsedOutput = {
590
- ...output,
591
- body: await parseErrorBody(output.body, context),
592
- };
593
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
594
- switch (errorCode) {
595
- case "AccessDeniedException":
596
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
597
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
598
- case "ConflictException":
599
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
600
- throw await de_ConflictExceptionRes(parsedOutput, context);
601
- case "InternalServerException":
602
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
603
- throw await de_InternalServerExceptionRes(parsedOutput, context);
604
- case "ResourceNotFoundException":
605
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
606
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
607
- case "ThrottlingException":
608
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
609
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
610
- case "ValidationException":
611
- case "com.amazonaws.migrationhubrefactorspaces#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
440
  export const de_DeleteEnvironmentCommand = async (output, context) => {
623
441
  if (output.statusCode !== 200 && output.statusCode >= 300) {
624
- return de_DeleteEnvironmentCommandError(output, context);
442
+ return de_CommandError(output, context);
625
443
  }
626
444
  const contents = map({
627
445
  $metadata: deserializeMetadata(output),
@@ -637,43 +455,9 @@ export const de_DeleteEnvironmentCommand = async (output, context) => {
637
455
  Object.assign(contents, doc);
638
456
  return contents;
639
457
  };
640
- const de_DeleteEnvironmentCommandError = async (output, context) => {
641
- const parsedOutput = {
642
- ...output,
643
- body: await parseErrorBody(output.body, context),
644
- };
645
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
646
- switch (errorCode) {
647
- case "AccessDeniedException":
648
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
649
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
650
- case "ConflictException":
651
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
652
- throw await de_ConflictExceptionRes(parsedOutput, context);
653
- case "InternalServerException":
654
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
655
- throw await de_InternalServerExceptionRes(parsedOutput, context);
656
- case "ResourceNotFoundException":
657
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
658
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
659
- case "ThrottlingException":
660
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
661
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
662
- case "ValidationException":
663
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
664
- throw await de_ValidationExceptionRes(parsedOutput, context);
665
- default:
666
- const parsedBody = parsedOutput.body;
667
- return throwDefaultError({
668
- output,
669
- parsedBody,
670
- errorCode,
671
- });
672
- }
673
- };
674
458
  export const de_DeleteResourcePolicyCommand = async (output, context) => {
675
459
  if (output.statusCode !== 200 && output.statusCode >= 300) {
676
- return de_DeleteResourcePolicyCommandError(output, context);
460
+ return de_CommandError(output, context);
677
461
  }
678
462
  const contents = map({
679
463
  $metadata: deserializeMetadata(output),
@@ -681,40 +465,9 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
681
465
  await collectBody(output.body, context);
682
466
  return contents;
683
467
  };
684
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
685
- const parsedOutput = {
686
- ...output,
687
- body: await parseErrorBody(output.body, context),
688
- };
689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
690
- switch (errorCode) {
691
- case "AccessDeniedException":
692
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
693
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
694
- case "InternalServerException":
695
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
696
- throw await de_InternalServerExceptionRes(parsedOutput, context);
697
- case "ResourceNotFoundException":
698
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
699
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
700
- case "ThrottlingException":
701
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
702
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
703
- case "ValidationException":
704
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
705
- throw await de_ValidationExceptionRes(parsedOutput, context);
706
- default:
707
- const parsedBody = parsedOutput.body;
708
- return throwDefaultError({
709
- output,
710
- parsedBody,
711
- errorCode,
712
- });
713
- }
714
- };
715
468
  export const de_DeleteRouteCommand = async (output, context) => {
716
469
  if (output.statusCode !== 200 && output.statusCode >= 300) {
717
- return de_DeleteRouteCommandError(output, context);
470
+ return de_CommandError(output, context);
718
471
  }
719
472
  const contents = map({
720
473
  $metadata: deserializeMetadata(output),
@@ -731,43 +484,9 @@ export const de_DeleteRouteCommand = async (output, context) => {
731
484
  Object.assign(contents, doc);
732
485
  return contents;
733
486
  };
734
- const de_DeleteRouteCommandError = async (output, context) => {
735
- const parsedOutput = {
736
- ...output,
737
- body: await parseErrorBody(output.body, context),
738
- };
739
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
- switch (errorCode) {
741
- case "AccessDeniedException":
742
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
743
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
744
- case "ConflictException":
745
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
746
- throw await de_ConflictExceptionRes(parsedOutput, context);
747
- case "InternalServerException":
748
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
749
- throw await de_InternalServerExceptionRes(parsedOutput, context);
750
- case "ResourceNotFoundException":
751
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
752
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
753
- case "ThrottlingException":
754
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
755
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
756
- case "ValidationException":
757
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
758
- throw await de_ValidationExceptionRes(parsedOutput, context);
759
- default:
760
- const parsedBody = parsedOutput.body;
761
- return throwDefaultError({
762
- output,
763
- parsedBody,
764
- errorCode,
765
- });
766
- }
767
- };
768
487
  export const de_DeleteServiceCommand = async (output, context) => {
769
488
  if (output.statusCode !== 200 && output.statusCode >= 300) {
770
- return de_DeleteServiceCommandError(output, context);
489
+ return de_CommandError(output, context);
771
490
  }
772
491
  const contents = map({
773
492
  $metadata: deserializeMetadata(output),
@@ -785,43 +504,9 @@ export const de_DeleteServiceCommand = async (output, context) => {
785
504
  Object.assign(contents, doc);
786
505
  return contents;
787
506
  };
788
- const de_DeleteServiceCommandError = async (output, context) => {
789
- const parsedOutput = {
790
- ...output,
791
- body: await parseErrorBody(output.body, context),
792
- };
793
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
794
- switch (errorCode) {
795
- case "AccessDeniedException":
796
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
797
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
798
- case "ConflictException":
799
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
800
- throw await de_ConflictExceptionRes(parsedOutput, context);
801
- case "InternalServerException":
802
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
803
- throw await de_InternalServerExceptionRes(parsedOutput, context);
804
- case "ResourceNotFoundException":
805
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
806
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
807
- case "ThrottlingException":
808
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
809
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
810
- case "ValidationException":
811
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
812
- throw await de_ValidationExceptionRes(parsedOutput, context);
813
- default:
814
- const parsedBody = parsedOutput.body;
815
- return throwDefaultError({
816
- output,
817
- parsedBody,
818
- errorCode,
819
- });
820
- }
821
- };
822
507
  export const de_GetApplicationCommand = async (output, context) => {
823
508
  if (output.statusCode !== 200 && output.statusCode >= 300) {
824
- return de_GetApplicationCommandError(output, context);
509
+ return de_CommandError(output, context);
825
510
  }
826
511
  const contents = map({
827
512
  $metadata: deserializeMetadata(output),
@@ -846,40 +531,9 @@ export const de_GetApplicationCommand = async (output, context) => {
846
531
  Object.assign(contents, doc);
847
532
  return contents;
848
533
  };
849
- const de_GetApplicationCommandError = async (output, context) => {
850
- const parsedOutput = {
851
- ...output,
852
- body: await parseErrorBody(output.body, context),
853
- };
854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
855
- switch (errorCode) {
856
- case "AccessDeniedException":
857
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
858
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
859
- case "InternalServerException":
860
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
861
- throw await de_InternalServerExceptionRes(parsedOutput, context);
862
- case "ResourceNotFoundException":
863
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
864
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
865
- case "ThrottlingException":
866
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
867
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
868
- case "ValidationException":
869
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
870
- throw await de_ValidationExceptionRes(parsedOutput, context);
871
- default:
872
- const parsedBody = parsedOutput.body;
873
- return throwDefaultError({
874
- output,
875
- parsedBody,
876
- errorCode,
877
- });
878
- }
879
- };
880
534
  export const de_GetEnvironmentCommand = async (output, context) => {
881
535
  if (output.statusCode !== 200 && output.statusCode >= 300) {
882
- return de_GetEnvironmentCommandError(output, context);
536
+ return de_CommandError(output, context);
883
537
  }
884
538
  const contents = map({
885
539
  $metadata: deserializeMetadata(output),
@@ -902,40 +556,9 @@ export const de_GetEnvironmentCommand = async (output, context) => {
902
556
  Object.assign(contents, doc);
903
557
  return contents;
904
558
  };
905
- const de_GetEnvironmentCommandError = async (output, context) => {
906
- const parsedOutput = {
907
- ...output,
908
- body: await parseErrorBody(output.body, context),
909
- };
910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
911
- switch (errorCode) {
912
- case "AccessDeniedException":
913
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
914
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
915
- case "InternalServerException":
916
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
917
- throw await de_InternalServerExceptionRes(parsedOutput, context);
918
- case "ResourceNotFoundException":
919
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
920
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
921
- case "ThrottlingException":
922
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
923
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
924
- case "ValidationException":
925
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
926
- throw await de_ValidationExceptionRes(parsedOutput, context);
927
- default:
928
- const parsedBody = parsedOutput.body;
929
- return throwDefaultError({
930
- output,
931
- parsedBody,
932
- errorCode,
933
- });
934
- }
935
- };
936
559
  export const de_GetResourcePolicyCommand = async (output, context) => {
937
560
  if (output.statusCode !== 200 && output.statusCode >= 300) {
938
- return de_GetResourcePolicyCommandError(output, context);
561
+ return de_CommandError(output, context);
939
562
  }
940
563
  const contents = map({
941
564
  $metadata: deserializeMetadata(output),
@@ -947,40 +570,9 @@ export const de_GetResourcePolicyCommand = async (output, context) => {
947
570
  Object.assign(contents, doc);
948
571
  return contents;
949
572
  };
950
- const de_GetResourcePolicyCommandError = async (output, context) => {
951
- const parsedOutput = {
952
- ...output,
953
- body: await parseErrorBody(output.body, context),
954
- };
955
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
956
- switch (errorCode) {
957
- case "AccessDeniedException":
958
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
959
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
960
- case "InternalServerException":
961
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
962
- throw await de_InternalServerExceptionRes(parsedOutput, context);
963
- case "ResourceNotFoundException":
964
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
965
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
966
- case "ThrottlingException":
967
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
968
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
969
- case "ValidationException":
970
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
971
- throw await de_ValidationExceptionRes(parsedOutput, context);
972
- default:
973
- const parsedBody = parsedOutput.body;
974
- return throwDefaultError({
975
- output,
976
- parsedBody,
977
- errorCode,
978
- });
979
- }
980
- };
981
573
  export const de_GetRouteCommand = async (output, context) => {
982
574
  if (output.statusCode !== 200 && output.statusCode >= 300) {
983
- return de_GetRouteCommandError(output, context);
575
+ return de_CommandError(output, context);
984
576
  }
985
577
  const contents = map({
986
578
  $metadata: deserializeMetadata(output),
@@ -1009,40 +601,9 @@ export const de_GetRouteCommand = async (output, context) => {
1009
601
  Object.assign(contents, doc);
1010
602
  return contents;
1011
603
  };
1012
- const de_GetRouteCommandError = async (output, context) => {
1013
- const parsedOutput = {
1014
- ...output,
1015
- body: await parseErrorBody(output.body, context),
1016
- };
1017
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1018
- switch (errorCode) {
1019
- case "AccessDeniedException":
1020
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1021
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1022
- case "InternalServerException":
1023
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1024
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1025
- case "ResourceNotFoundException":
1026
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1027
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1028
- case "ThrottlingException":
1029
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1030
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1031
- case "ValidationException":
1032
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1033
- throw await de_ValidationExceptionRes(parsedOutput, context);
1034
- default:
1035
- const parsedBody = parsedOutput.body;
1036
- return throwDefaultError({
1037
- output,
1038
- parsedBody,
1039
- errorCode,
1040
- });
1041
- }
1042
- };
1043
604
  export const de_GetServiceCommand = async (output, context) => {
1044
605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1045
- return de_GetServiceCommandError(output, context);
606
+ return de_CommandError(output, context);
1046
607
  }
1047
608
  const contents = map({
1048
609
  $metadata: deserializeMetadata(output),
@@ -1070,92 +631,24 @@ export const de_GetServiceCommand = async (output, context) => {
1070
631
  Object.assign(contents, doc);
1071
632
  return contents;
1072
633
  };
1073
- const de_GetServiceCommandError = 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 "AccessDeniedException":
1081
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1082
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1083
- case "InternalServerException":
1084
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1085
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1086
- case "ResourceNotFoundException":
1087
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1088
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1089
- case "ThrottlingException":
1090
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1091
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1092
- case "ValidationException":
1093
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1094
- throw await de_ValidationExceptionRes(parsedOutput, context);
1095
- default:
1096
- const parsedBody = parsedOutput.body;
1097
- return throwDefaultError({
1098
- output,
1099
- parsedBody,
1100
- errorCode,
1101
- });
1102
- }
1103
- };
1104
634
  export const de_ListApplicationsCommand = async (output, context) => {
1105
635
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1106
- return de_ListApplicationsCommandError(output, context);
1107
- }
1108
- const contents = map({
1109
- $metadata: deserializeMetadata(output),
1110
- });
1111
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1112
- const doc = take(data, {
1113
- ApplicationSummaryList: (_) => de_ApplicationSummaries(_, context),
1114
- NextToken: __expectString,
1115
- });
1116
- Object.assign(contents, doc);
1117
- return contents;
1118
- };
1119
- const de_ListApplicationsCommandError = async (output, context) => {
1120
- const parsedOutput = {
1121
- ...output,
1122
- body: await parseErrorBody(output.body, context),
1123
- };
1124
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1125
- switch (errorCode) {
1126
- case "AccessDeniedException":
1127
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1128
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1129
- case "ConflictException":
1130
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
1131
- throw await de_ConflictExceptionRes(parsedOutput, context);
1132
- case "InternalServerException":
1133
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1134
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1135
- case "ResourceNotFoundException":
1136
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1137
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1138
- case "ServiceQuotaExceededException":
1139
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
1140
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1141
- case "ThrottlingException":
1142
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1143
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1144
- case "ValidationException":
1145
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1146
- throw await de_ValidationExceptionRes(parsedOutput, context);
1147
- default:
1148
- const parsedBody = parsedOutput.body;
1149
- return throwDefaultError({
1150
- output,
1151
- parsedBody,
1152
- errorCode,
1153
- });
636
+ return de_CommandError(output, context);
1154
637
  }
638
+ const contents = map({
639
+ $metadata: deserializeMetadata(output),
640
+ });
641
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
642
+ const doc = take(data, {
643
+ ApplicationSummaryList: (_) => de_ApplicationSummaries(_, context),
644
+ NextToken: __expectString,
645
+ });
646
+ Object.assign(contents, doc);
647
+ return contents;
1155
648
  };
1156
649
  export const de_ListEnvironmentsCommand = async (output, context) => {
1157
650
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1158
- return de_ListEnvironmentsCommandError(output, context);
651
+ return de_CommandError(output, context);
1159
652
  }
1160
653
  const contents = map({
1161
654
  $metadata: deserializeMetadata(output),
@@ -1168,40 +661,9 @@ export const de_ListEnvironmentsCommand = async (output, context) => {
1168
661
  Object.assign(contents, doc);
1169
662
  return contents;
1170
663
  };
1171
- const de_ListEnvironmentsCommandError = async (output, context) => {
1172
- const parsedOutput = {
1173
- ...output,
1174
- body: await parseErrorBody(output.body, context),
1175
- };
1176
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1177
- switch (errorCode) {
1178
- case "AccessDeniedException":
1179
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1180
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1181
- case "InternalServerException":
1182
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1183
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1184
- case "ResourceNotFoundException":
1185
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1186
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1187
- case "ThrottlingException":
1188
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1189
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1190
- case "ValidationException":
1191
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1192
- throw await de_ValidationExceptionRes(parsedOutput, context);
1193
- default:
1194
- const parsedBody = parsedOutput.body;
1195
- return throwDefaultError({
1196
- output,
1197
- parsedBody,
1198
- errorCode,
1199
- });
1200
- }
1201
- };
1202
664
  export const de_ListEnvironmentVpcsCommand = async (output, context) => {
1203
665
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1204
- return de_ListEnvironmentVpcsCommandError(output, context);
666
+ return de_CommandError(output, context);
1205
667
  }
1206
668
  const contents = map({
1207
669
  $metadata: deserializeMetadata(output),
@@ -1214,40 +676,9 @@ export const de_ListEnvironmentVpcsCommand = async (output, context) => {
1214
676
  Object.assign(contents, doc);
1215
677
  return contents;
1216
678
  };
1217
- const de_ListEnvironmentVpcsCommandError = async (output, context) => {
1218
- const parsedOutput = {
1219
- ...output,
1220
- body: await parseErrorBody(output.body, context),
1221
- };
1222
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1223
- switch (errorCode) {
1224
- case "AccessDeniedException":
1225
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1226
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1227
- case "InternalServerException":
1228
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1229
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1230
- case "ResourceNotFoundException":
1231
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1232
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1233
- case "ThrottlingException":
1234
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1235
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1236
- case "ValidationException":
1237
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1238
- throw await de_ValidationExceptionRes(parsedOutput, context);
1239
- default:
1240
- const parsedBody = parsedOutput.body;
1241
- return throwDefaultError({
1242
- output,
1243
- parsedBody,
1244
- errorCode,
1245
- });
1246
- }
1247
- };
1248
679
  export const de_ListRoutesCommand = async (output, context) => {
1249
680
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1250
- return de_ListRoutesCommandError(output, context);
681
+ return de_CommandError(output, context);
1251
682
  }
1252
683
  const contents = map({
1253
684
  $metadata: deserializeMetadata(output),
@@ -1260,46 +691,9 @@ export const de_ListRoutesCommand = async (output, context) => {
1260
691
  Object.assign(contents, doc);
1261
692
  return contents;
1262
693
  };
1263
- const de_ListRoutesCommandError = async (output, context) => {
1264
- const parsedOutput = {
1265
- ...output,
1266
- body: await parseErrorBody(output.body, context),
1267
- };
1268
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
- switch (errorCode) {
1270
- case "AccessDeniedException":
1271
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1272
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1273
- case "ConflictException":
1274
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
1275
- throw await de_ConflictExceptionRes(parsedOutput, context);
1276
- case "InternalServerException":
1277
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1278
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1279
- case "ResourceNotFoundException":
1280
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1281
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1282
- case "ServiceQuotaExceededException":
1283
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
1284
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1285
- case "ThrottlingException":
1286
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1287
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1288
- case "ValidationException":
1289
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1290
- throw await de_ValidationExceptionRes(parsedOutput, context);
1291
- default:
1292
- const parsedBody = parsedOutput.body;
1293
- return throwDefaultError({
1294
- output,
1295
- parsedBody,
1296
- errorCode,
1297
- });
1298
- }
1299
- };
1300
694
  export const de_ListServicesCommand = async (output, context) => {
1301
695
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1302
- return de_ListServicesCommandError(output, context);
696
+ return de_CommandError(output, context);
1303
697
  }
1304
698
  const contents = map({
1305
699
  $metadata: deserializeMetadata(output),
@@ -1312,46 +706,9 @@ export const de_ListServicesCommand = async (output, context) => {
1312
706
  Object.assign(contents, doc);
1313
707
  return contents;
1314
708
  };
1315
- const de_ListServicesCommandError = async (output, context) => {
1316
- const parsedOutput = {
1317
- ...output,
1318
- body: await parseErrorBody(output.body, context),
1319
- };
1320
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1321
- switch (errorCode) {
1322
- case "AccessDeniedException":
1323
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1324
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1325
- case "ConflictException":
1326
- case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
1327
- throw await de_ConflictExceptionRes(parsedOutput, context);
1328
- case "InternalServerException":
1329
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1330
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1331
- case "ResourceNotFoundException":
1332
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1333
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1334
- case "ServiceQuotaExceededException":
1335
- case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
1336
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1337
- case "ThrottlingException":
1338
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1339
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1340
- case "ValidationException":
1341
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1342
- throw await de_ValidationExceptionRes(parsedOutput, context);
1343
- default:
1344
- const parsedBody = parsedOutput.body;
1345
- return throwDefaultError({
1346
- output,
1347
- parsedBody,
1348
- errorCode,
1349
- });
1350
- }
1351
- };
1352
709
  export const de_ListTagsForResourceCommand = async (output, context) => {
1353
710
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1354
- return de_ListTagsForResourceCommandError(output, context);
711
+ return de_CommandError(output, context);
1355
712
  }
1356
713
  const contents = map({
1357
714
  $metadata: deserializeMetadata(output),
@@ -1363,34 +720,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1363
720
  Object.assign(contents, doc);
1364
721
  return contents;
1365
722
  };
1366
- const de_ListTagsForResourceCommandError = async (output, context) => {
1367
- const parsedOutput = {
1368
- ...output,
1369
- body: await parseErrorBody(output.body, context),
1370
- };
1371
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1372
- switch (errorCode) {
1373
- case "InternalServerException":
1374
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1375
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1376
- case "ResourceNotFoundException":
1377
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1378
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1379
- case "ValidationException":
1380
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1381
- throw await de_ValidationExceptionRes(parsedOutput, context);
1382
- default:
1383
- const parsedBody = parsedOutput.body;
1384
- return throwDefaultError({
1385
- output,
1386
- parsedBody,
1387
- errorCode,
1388
- });
1389
- }
1390
- };
1391
723
  export const de_PutResourcePolicyCommand = async (output, context) => {
1392
724
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1393
- return de_PutResourcePolicyCommandError(output, context);
725
+ return de_CommandError(output, context);
1394
726
  }
1395
727
  const contents = map({
1396
728
  $metadata: deserializeMetadata(output),
@@ -1398,43 +730,9 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
1398
730
  await collectBody(output.body, context);
1399
731
  return contents;
1400
732
  };
1401
- const de_PutResourcePolicyCommandError = async (output, context) => {
1402
- const parsedOutput = {
1403
- ...output,
1404
- body: await parseErrorBody(output.body, context),
1405
- };
1406
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1407
- switch (errorCode) {
1408
- case "AccessDeniedException":
1409
- case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1410
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1411
- case "InternalServerException":
1412
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1413
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1414
- case "InvalidResourcePolicyException":
1415
- case "com.amazonaws.migrationhubrefactorspaces#InvalidResourcePolicyException":
1416
- throw await de_InvalidResourcePolicyExceptionRes(parsedOutput, context);
1417
- case "ResourceNotFoundException":
1418
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1419
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1420
- case "ThrottlingException":
1421
- case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1422
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1423
- case "ValidationException":
1424
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1425
- throw await de_ValidationExceptionRes(parsedOutput, context);
1426
- default:
1427
- const parsedBody = parsedOutput.body;
1428
- return throwDefaultError({
1429
- output,
1430
- parsedBody,
1431
- errorCode,
1432
- });
1433
- }
1434
- };
1435
733
  export const de_TagResourceCommand = async (output, context) => {
1436
734
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1437
- return de_TagResourceCommandError(output, context);
735
+ return de_CommandError(output, context);
1438
736
  }
1439
737
  const contents = map({
1440
738
  $metadata: deserializeMetadata(output),
@@ -1442,34 +740,9 @@ export const de_TagResourceCommand = async (output, context) => {
1442
740
  await collectBody(output.body, context);
1443
741
  return contents;
1444
742
  };
1445
- const de_TagResourceCommandError = async (output, context) => {
1446
- const parsedOutput = {
1447
- ...output,
1448
- body: await parseErrorBody(output.body, context),
1449
- };
1450
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1451
- switch (errorCode) {
1452
- case "InternalServerException":
1453
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1454
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1455
- case "ResourceNotFoundException":
1456
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1457
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1458
- case "ValidationException":
1459
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1460
- throw await de_ValidationExceptionRes(parsedOutput, context);
1461
- default:
1462
- const parsedBody = parsedOutput.body;
1463
- return throwDefaultError({
1464
- output,
1465
- parsedBody,
1466
- errorCode,
1467
- });
1468
- }
1469
- };
1470
743
  export const de_UntagResourceCommand = async (output, context) => {
1471
744
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1472
- return de_UntagResourceCommandError(output, context);
745
+ return de_CommandError(output, context);
1473
746
  }
1474
747
  const contents = map({
1475
748
  $metadata: deserializeMetadata(output),
@@ -1477,34 +750,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1477
750
  await collectBody(output.body, context);
1478
751
  return contents;
1479
752
  };
1480
- const de_UntagResourceCommandError = async (output, context) => {
1481
- const parsedOutput = {
1482
- ...output,
1483
- body: await parseErrorBody(output.body, context),
1484
- };
1485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1486
- switch (errorCode) {
1487
- case "InternalServerException":
1488
- case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1489
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1490
- case "ResourceNotFoundException":
1491
- case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1492
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1493
- case "ValidationException":
1494
- case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1495
- throw await de_ValidationExceptionRes(parsedOutput, context);
1496
- default:
1497
- const parsedBody = parsedOutput.body;
1498
- return throwDefaultError({
1499
- output,
1500
- parsedBody,
1501
- errorCode,
1502
- });
1503
- }
1504
- };
1505
753
  export const de_UpdateRouteCommand = async (output, context) => {
1506
754
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1507
- return de_UpdateRouteCommandError(output, context);
755
+ return de_CommandError(output, context);
1508
756
  }
1509
757
  const contents = map({
1510
758
  $metadata: deserializeMetadata(output),
@@ -1521,7 +769,7 @@ export const de_UpdateRouteCommand = async (output, context) => {
1521
769
  Object.assign(contents, doc);
1522
770
  return contents;
1523
771
  };
1524
- const de_UpdateRouteCommandError = async (output, context) => {
772
+ const de_CommandError = async (output, context) => {
1525
773
  const parsedOutput = {
1526
774
  ...output,
1527
775
  body: await parseErrorBody(output.body, context),
@@ -1531,18 +779,27 @@ const de_UpdateRouteCommandError = async (output, context) => {
1531
779
  case "AccessDeniedException":
1532
780
  case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
1533
781
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
782
+ case "ConflictException":
783
+ case "com.amazonaws.migrationhubrefactorspaces#ConflictException":
784
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1534
785
  case "InternalServerException":
1535
786
  case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
1536
787
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1537
788
  case "ResourceNotFoundException":
1538
789
  case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
1539
790
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
791
+ case "ServiceQuotaExceededException":
792
+ case "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException":
793
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1540
794
  case "ThrottlingException":
1541
795
  case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
1542
796
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1543
797
  case "ValidationException":
1544
798
  case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
1545
799
  throw await de_ValidationExceptionRes(parsedOutput, context);
800
+ case "InvalidResourcePolicyException":
801
+ case "com.amazonaws.migrationhubrefactorspaces#InvalidResourcePolicyException":
802
+ throw await de_InvalidResourcePolicyExceptionRes(parsedOutput, context);
1546
803
  default:
1547
804
  const parsedBody = parsedOutput.body;
1548
805
  return throwDefaultError({