@aws-sdk/client-amplifyuibuilder 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.
@@ -401,7 +401,7 @@ export const se_UpdateThemeCommand = async (input, context) => {
401
401
  };
402
402
  export const de_CreateComponentCommand = async (output, context) => {
403
403
  if (output.statusCode !== 200 && output.statusCode >= 300) {
404
- return de_CreateComponentCommandError(output, context);
404
+ return de_CommandError(output, context);
405
405
  }
406
406
  const contents = map({
407
407
  $metadata: deserializeMetadata(output),
@@ -410,37 +410,9 @@ export const de_CreateComponentCommand = async (output, context) => {
410
410
  contents.entity = de_Component(data, context);
411
411
  return contents;
412
412
  };
413
- const de_CreateComponentCommandError = async (output, context) => {
414
- const parsedOutput = {
415
- ...output,
416
- body: await parseErrorBody(output.body, context),
417
- };
418
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
419
- switch (errorCode) {
420
- case "InternalServerException":
421
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
422
- throw await de_InternalServerExceptionRes(parsedOutput, context);
423
- case "InvalidParameterException":
424
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
425
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
426
- case "ResourceConflictException":
427
- case "com.amazonaws.amplifyuibuilder#ResourceConflictException":
428
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
429
- case "ServiceQuotaExceededException":
430
- case "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException":
431
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
432
- default:
433
- const parsedBody = parsedOutput.body;
434
- return throwDefaultError({
435
- output,
436
- parsedBody,
437
- errorCode,
438
- });
439
- }
440
- };
441
413
  export const de_CreateFormCommand = async (output, context) => {
442
414
  if (output.statusCode !== 200 && output.statusCode >= 300) {
443
- return de_CreateFormCommandError(output, context);
415
+ return de_CommandError(output, context);
444
416
  }
445
417
  const contents = map({
446
418
  $metadata: deserializeMetadata(output),
@@ -449,37 +421,9 @@ export const de_CreateFormCommand = async (output, context) => {
449
421
  contents.entity = de_Form(data, context);
450
422
  return contents;
451
423
  };
452
- const de_CreateFormCommandError = async (output, context) => {
453
- const parsedOutput = {
454
- ...output,
455
- body: await parseErrorBody(output.body, context),
456
- };
457
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
458
- switch (errorCode) {
459
- case "InternalServerException":
460
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
461
- throw await de_InternalServerExceptionRes(parsedOutput, context);
462
- case "InvalidParameterException":
463
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
464
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
465
- case "ResourceConflictException":
466
- case "com.amazonaws.amplifyuibuilder#ResourceConflictException":
467
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
468
- case "ServiceQuotaExceededException":
469
- case "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException":
470
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
471
- default:
472
- const parsedBody = parsedOutput.body;
473
- return throwDefaultError({
474
- output,
475
- parsedBody,
476
- errorCode,
477
- });
478
- }
479
- };
480
424
  export const de_CreateThemeCommand = async (output, context) => {
481
425
  if (output.statusCode !== 200 && output.statusCode >= 300) {
482
- return de_CreateThemeCommandError(output, context);
426
+ return de_CommandError(output, context);
483
427
  }
484
428
  const contents = map({
485
429
  $metadata: deserializeMetadata(output),
@@ -488,37 +432,9 @@ export const de_CreateThemeCommand = async (output, context) => {
488
432
  contents.entity = de_Theme(data, context);
489
433
  return contents;
490
434
  };
491
- const de_CreateThemeCommandError = async (output, context) => {
492
- const parsedOutput = {
493
- ...output,
494
- body: await parseErrorBody(output.body, context),
495
- };
496
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
497
- switch (errorCode) {
498
- case "InternalServerException":
499
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
500
- throw await de_InternalServerExceptionRes(parsedOutput, context);
501
- case "InvalidParameterException":
502
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
503
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
504
- case "ResourceConflictException":
505
- case "com.amazonaws.amplifyuibuilder#ResourceConflictException":
506
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
507
- case "ServiceQuotaExceededException":
508
- case "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException":
509
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
510
- default:
511
- const parsedBody = parsedOutput.body;
512
- return throwDefaultError({
513
- output,
514
- parsedBody,
515
- errorCode,
516
- });
517
- }
518
- };
519
435
  export const de_DeleteComponentCommand = async (output, context) => {
520
436
  if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_DeleteComponentCommandError(output, context);
437
+ return de_CommandError(output, context);
522
438
  }
523
439
  const contents = map({
524
440
  $metadata: deserializeMetadata(output),
@@ -526,34 +442,9 @@ export const de_DeleteComponentCommand = async (output, context) => {
526
442
  await collectBody(output.body, context);
527
443
  return contents;
528
444
  };
529
- const de_DeleteComponentCommandError = async (output, context) => {
530
- const parsedOutput = {
531
- ...output,
532
- body: await parseErrorBody(output.body, context),
533
- };
534
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
535
- switch (errorCode) {
536
- case "InternalServerException":
537
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
538
- throw await de_InternalServerExceptionRes(parsedOutput, context);
539
- case "InvalidParameterException":
540
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
541
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
542
- case "ResourceNotFoundException":
543
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
544
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
545
- default:
546
- const parsedBody = parsedOutput.body;
547
- return throwDefaultError({
548
- output,
549
- parsedBody,
550
- errorCode,
551
- });
552
- }
553
- };
554
445
  export const de_DeleteFormCommand = async (output, context) => {
555
446
  if (output.statusCode !== 200 && output.statusCode >= 300) {
556
- return de_DeleteFormCommandError(output, context);
447
+ return de_CommandError(output, context);
557
448
  }
558
449
  const contents = map({
559
450
  $metadata: deserializeMetadata(output),
@@ -561,34 +452,9 @@ export const de_DeleteFormCommand = async (output, context) => {
561
452
  await collectBody(output.body, context);
562
453
  return contents;
563
454
  };
564
- const de_DeleteFormCommandError = async (output, context) => {
565
- const parsedOutput = {
566
- ...output,
567
- body: await parseErrorBody(output.body, context),
568
- };
569
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
570
- switch (errorCode) {
571
- case "InternalServerException":
572
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
573
- throw await de_InternalServerExceptionRes(parsedOutput, context);
574
- case "InvalidParameterException":
575
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
576
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
577
- case "ResourceNotFoundException":
578
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
579
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
580
- default:
581
- const parsedBody = parsedOutput.body;
582
- return throwDefaultError({
583
- output,
584
- parsedBody,
585
- errorCode,
586
- });
587
- }
588
- };
589
455
  export const de_DeleteThemeCommand = async (output, context) => {
590
456
  if (output.statusCode !== 200 && output.statusCode >= 300) {
591
- return de_DeleteThemeCommandError(output, context);
457
+ return de_CommandError(output, context);
592
458
  }
593
459
  const contents = map({
594
460
  $metadata: deserializeMetadata(output),
@@ -596,34 +462,9 @@ export const de_DeleteThemeCommand = async (output, context) => {
596
462
  await collectBody(output.body, context);
597
463
  return contents;
598
464
  };
599
- const de_DeleteThemeCommandError = async (output, context) => {
600
- const parsedOutput = {
601
- ...output,
602
- body: await parseErrorBody(output.body, context),
603
- };
604
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
605
- switch (errorCode) {
606
- case "InternalServerException":
607
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
608
- throw await de_InternalServerExceptionRes(parsedOutput, context);
609
- case "InvalidParameterException":
610
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
611
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
612
- case "ResourceNotFoundException":
613
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
614
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
615
- default:
616
- const parsedBody = parsedOutput.body;
617
- return throwDefaultError({
618
- output,
619
- parsedBody,
620
- errorCode,
621
- });
622
- }
623
- };
624
465
  export const de_ExchangeCodeForTokenCommand = async (output, context) => {
625
466
  if (output.statusCode !== 200 && output.statusCode >= 300) {
626
- return de_ExchangeCodeForTokenCommandError(output, context);
467
+ return de_CommandError(output, context);
627
468
  }
628
469
  const contents = map({
629
470
  $metadata: deserializeMetadata(output),
@@ -637,28 +478,9 @@ export const de_ExchangeCodeForTokenCommand = async (output, context) => {
637
478
  Object.assign(contents, doc);
638
479
  return contents;
639
480
  };
640
- const de_ExchangeCodeForTokenCommandError = 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 "InvalidParameterException":
648
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
649
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
650
- default:
651
- const parsedBody = parsedOutput.body;
652
- return throwDefaultError({
653
- output,
654
- parsedBody,
655
- errorCode,
656
- });
657
- }
658
- };
659
481
  export const de_ExportComponentsCommand = async (output, context) => {
660
482
  if (output.statusCode !== 200 && output.statusCode >= 300) {
661
- return de_ExportComponentsCommandError(output, context);
483
+ return de_CommandError(output, context);
662
484
  }
663
485
  const contents = map({
664
486
  $metadata: deserializeMetadata(output),
@@ -671,31 +493,9 @@ export const de_ExportComponentsCommand = async (output, context) => {
671
493
  Object.assign(contents, doc);
672
494
  return contents;
673
495
  };
674
- const de_ExportComponentsCommandError = async (output, context) => {
675
- const parsedOutput = {
676
- ...output,
677
- body: await parseErrorBody(output.body, context),
678
- };
679
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
680
- switch (errorCode) {
681
- case "InternalServerException":
682
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
683
- throw await de_InternalServerExceptionRes(parsedOutput, context);
684
- case "InvalidParameterException":
685
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
686
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
687
- default:
688
- const parsedBody = parsedOutput.body;
689
- return throwDefaultError({
690
- output,
691
- parsedBody,
692
- errorCode,
693
- });
694
- }
695
- };
696
496
  export const de_ExportFormsCommand = async (output, context) => {
697
497
  if (output.statusCode !== 200 && output.statusCode >= 300) {
698
- return de_ExportFormsCommandError(output, context);
498
+ return de_CommandError(output, context);
699
499
  }
700
500
  const contents = map({
701
501
  $metadata: deserializeMetadata(output),
@@ -708,31 +508,9 @@ export const de_ExportFormsCommand = async (output, context) => {
708
508
  Object.assign(contents, doc);
709
509
  return contents;
710
510
  };
711
- const de_ExportFormsCommandError = async (output, context) => {
712
- const parsedOutput = {
713
- ...output,
714
- body: await parseErrorBody(output.body, context),
715
- };
716
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
717
- switch (errorCode) {
718
- case "InternalServerException":
719
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
720
- throw await de_InternalServerExceptionRes(parsedOutput, context);
721
- case "InvalidParameterException":
722
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
723
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
724
- default:
725
- const parsedBody = parsedOutput.body;
726
- return throwDefaultError({
727
- output,
728
- parsedBody,
729
- errorCode,
730
- });
731
- }
732
- };
733
511
  export const de_ExportThemesCommand = async (output, context) => {
734
512
  if (output.statusCode !== 200 && output.statusCode >= 300) {
735
- return de_ExportThemesCommandError(output, context);
513
+ return de_CommandError(output, context);
736
514
  }
737
515
  const contents = map({
738
516
  $metadata: deserializeMetadata(output),
@@ -745,31 +523,9 @@ export const de_ExportThemesCommand = async (output, context) => {
745
523
  Object.assign(contents, doc);
746
524
  return contents;
747
525
  };
748
- const de_ExportThemesCommandError = async (output, context) => {
749
- const parsedOutput = {
750
- ...output,
751
- body: await parseErrorBody(output.body, context),
752
- };
753
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
754
- switch (errorCode) {
755
- case "InternalServerException":
756
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
757
- throw await de_InternalServerExceptionRes(parsedOutput, context);
758
- case "InvalidParameterException":
759
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
760
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
761
- default:
762
- const parsedBody = parsedOutput.body;
763
- return throwDefaultError({
764
- output,
765
- parsedBody,
766
- errorCode,
767
- });
768
- }
769
- };
770
526
  export const de_GetCodegenJobCommand = async (output, context) => {
771
527
  if (output.statusCode !== 200 && output.statusCode >= 300) {
772
- return de_GetCodegenJobCommandError(output, context);
528
+ return de_CommandError(output, context);
773
529
  }
774
530
  const contents = map({
775
531
  $metadata: deserializeMetadata(output),
@@ -778,37 +534,9 @@ export const de_GetCodegenJobCommand = async (output, context) => {
778
534
  contents.job = de_CodegenJob(data, context);
779
535
  return contents;
780
536
  };
781
- const de_GetCodegenJobCommandError = async (output, context) => {
782
- const parsedOutput = {
783
- ...output,
784
- body: await parseErrorBody(output.body, context),
785
- };
786
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
787
- switch (errorCode) {
788
- case "InternalServerException":
789
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
790
- throw await de_InternalServerExceptionRes(parsedOutput, context);
791
- case "InvalidParameterException":
792
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
793
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
794
- case "ResourceNotFoundException":
795
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
796
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
797
- case "ThrottlingException":
798
- case "com.amazonaws.amplifyuibuilder#ThrottlingException":
799
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
800
- default:
801
- const parsedBody = parsedOutput.body;
802
- return throwDefaultError({
803
- output,
804
- parsedBody,
805
- errorCode,
806
- });
807
- }
808
- };
809
537
  export const de_GetComponentCommand = async (output, context) => {
810
538
  if (output.statusCode !== 200 && output.statusCode >= 300) {
811
- return de_GetComponentCommandError(output, context);
539
+ return de_CommandError(output, context);
812
540
  }
813
541
  const contents = map({
814
542
  $metadata: deserializeMetadata(output),
@@ -817,70 +545,20 @@ export const de_GetComponentCommand = async (output, context) => {
817
545
  contents.component = de_Component(data, context);
818
546
  return contents;
819
547
  };
820
- const de_GetComponentCommandError = async (output, context) => {
821
- const parsedOutput = {
822
- ...output,
823
- body: await parseErrorBody(output.body, context),
824
- };
825
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
826
- switch (errorCode) {
827
- case "InternalServerException":
828
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
829
- throw await de_InternalServerExceptionRes(parsedOutput, context);
830
- case "InvalidParameterException":
831
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
832
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
833
- case "ResourceNotFoundException":
834
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
835
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
836
- default:
837
- const parsedBody = parsedOutput.body;
838
- return throwDefaultError({
839
- output,
840
- parsedBody,
841
- errorCode,
842
- });
843
- }
844
- };
845
548
  export const de_GetFormCommand = async (output, context) => {
846
549
  if (output.statusCode !== 200 && output.statusCode >= 300) {
847
- return de_GetFormCommandError(output, context);
550
+ return de_CommandError(output, context);
848
551
  }
849
552
  const contents = map({
850
553
  $metadata: deserializeMetadata(output),
851
554
  });
852
555
  const data = __expectObject(await parseBody(output.body, context));
853
556
  contents.form = de_Form(data, context);
854
- return contents;
855
- };
856
- const de_GetFormCommandError = async (output, context) => {
857
- const parsedOutput = {
858
- ...output,
859
- body: await parseErrorBody(output.body, context),
860
- };
861
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
862
- switch (errorCode) {
863
- case "InternalServerException":
864
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
865
- throw await de_InternalServerExceptionRes(parsedOutput, context);
866
- case "InvalidParameterException":
867
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
868
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
869
- case "ResourceNotFoundException":
870
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
871
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
872
- default:
873
- const parsedBody = parsedOutput.body;
874
- return throwDefaultError({
875
- output,
876
- parsedBody,
877
- errorCode,
878
- });
879
- }
557
+ return contents;
880
558
  };
881
559
  export const de_GetMetadataCommand = async (output, context) => {
882
560
  if (output.statusCode !== 200 && output.statusCode >= 300) {
883
- return de_GetMetadataCommandError(output, context);
561
+ return de_CommandError(output, context);
884
562
  }
885
563
  const contents = map({
886
564
  $metadata: deserializeMetadata(output),
@@ -892,31 +570,9 @@ export const de_GetMetadataCommand = async (output, context) => {
892
570
  Object.assign(contents, doc);
893
571
  return contents;
894
572
  };
895
- const de_GetMetadataCommandError = async (output, context) => {
896
- const parsedOutput = {
897
- ...output,
898
- body: await parseErrorBody(output.body, context),
899
- };
900
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
901
- switch (errorCode) {
902
- case "InvalidParameterException":
903
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
904
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
905
- case "UnauthorizedException":
906
- case "com.amazonaws.amplifyuibuilder#UnauthorizedException":
907
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
908
- default:
909
- const parsedBody = parsedOutput.body;
910
- return throwDefaultError({
911
- output,
912
- parsedBody,
913
- errorCode,
914
- });
915
- }
916
- };
917
573
  export const de_GetThemeCommand = async (output, context) => {
918
574
  if (output.statusCode !== 200 && output.statusCode >= 300) {
919
- return de_GetThemeCommandError(output, context);
575
+ return de_CommandError(output, context);
920
576
  }
921
577
  const contents = map({
922
578
  $metadata: deserializeMetadata(output),
@@ -925,34 +581,9 @@ export const de_GetThemeCommand = async (output, context) => {
925
581
  contents.theme = de_Theme(data, context);
926
582
  return contents;
927
583
  };
928
- const de_GetThemeCommandError = async (output, context) => {
929
- const parsedOutput = {
930
- ...output,
931
- body: await parseErrorBody(output.body, context),
932
- };
933
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
934
- switch (errorCode) {
935
- case "InternalServerException":
936
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
937
- throw await de_InternalServerExceptionRes(parsedOutput, context);
938
- case "InvalidParameterException":
939
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
940
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
941
- case "ResourceNotFoundException":
942
- case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
943
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
944
- default:
945
- const parsedBody = parsedOutput.body;
946
- return throwDefaultError({
947
- output,
948
- parsedBody,
949
- errorCode,
950
- });
951
- }
952
- };
953
584
  export const de_ListCodegenJobsCommand = async (output, context) => {
954
585
  if (output.statusCode !== 200 && output.statusCode >= 300) {
955
- return de_ListCodegenJobsCommandError(output, context);
586
+ return de_CommandError(output, context);
956
587
  }
957
588
  const contents = map({
958
589
  $metadata: deserializeMetadata(output),
@@ -965,34 +596,9 @@ export const de_ListCodegenJobsCommand = async (output, context) => {
965
596
  Object.assign(contents, doc);
966
597
  return contents;
967
598
  };
968
- const de_ListCodegenJobsCommandError = async (output, context) => {
969
- const parsedOutput = {
970
- ...output,
971
- body: await parseErrorBody(output.body, context),
972
- };
973
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
974
- switch (errorCode) {
975
- case "InternalServerException":
976
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
977
- throw await de_InternalServerExceptionRes(parsedOutput, context);
978
- case "InvalidParameterException":
979
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
980
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
981
- case "ThrottlingException":
982
- case "com.amazonaws.amplifyuibuilder#ThrottlingException":
983
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
984
- default:
985
- const parsedBody = parsedOutput.body;
986
- return throwDefaultError({
987
- output,
988
- parsedBody,
989
- errorCode,
990
- });
991
- }
992
- };
993
599
  export const de_ListComponentsCommand = async (output, context) => {
994
600
  if (output.statusCode !== 200 && output.statusCode >= 300) {
995
- return de_ListComponentsCommandError(output, context);
601
+ return de_CommandError(output, context);
996
602
  }
997
603
  const contents = map({
998
604
  $metadata: deserializeMetadata(output),
@@ -1005,31 +611,9 @@ export const de_ListComponentsCommand = async (output, context) => {
1005
611
  Object.assign(contents, doc);
1006
612
  return contents;
1007
613
  };
1008
- const de_ListComponentsCommandError = async (output, context) => {
1009
- const parsedOutput = {
1010
- ...output,
1011
- body: await parseErrorBody(output.body, context),
1012
- };
1013
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1014
- switch (errorCode) {
1015
- case "InternalServerException":
1016
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
1017
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1018
- case "InvalidParameterException":
1019
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1020
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1021
- default:
1022
- const parsedBody = parsedOutput.body;
1023
- return throwDefaultError({
1024
- output,
1025
- parsedBody,
1026
- errorCode,
1027
- });
1028
- }
1029
- };
1030
614
  export const de_ListFormsCommand = async (output, context) => {
1031
615
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1032
- return de_ListFormsCommandError(output, context);
616
+ return de_CommandError(output, context);
1033
617
  }
1034
618
  const contents = map({
1035
619
  $metadata: deserializeMetadata(output),
@@ -1042,31 +626,9 @@ export const de_ListFormsCommand = async (output, context) => {
1042
626
  Object.assign(contents, doc);
1043
627
  return contents;
1044
628
  };
1045
- const de_ListFormsCommandError = async (output, context) => {
1046
- const parsedOutput = {
1047
- ...output,
1048
- body: await parseErrorBody(output.body, context),
1049
- };
1050
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1051
- switch (errorCode) {
1052
- case "InternalServerException":
1053
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
1054
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1055
- case "InvalidParameterException":
1056
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1057
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1058
- default:
1059
- const parsedBody = parsedOutput.body;
1060
- return throwDefaultError({
1061
- output,
1062
- parsedBody,
1063
- errorCode,
1064
- });
1065
- }
1066
- };
1067
629
  export const de_ListThemesCommand = async (output, context) => {
1068
630
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1069
- return de_ListThemesCommandError(output, context);
631
+ return de_CommandError(output, context);
1070
632
  }
1071
633
  const contents = map({
1072
634
  $metadata: deserializeMetadata(output),
@@ -1079,31 +641,9 @@ export const de_ListThemesCommand = async (output, context) => {
1079
641
  Object.assign(contents, doc);
1080
642
  return contents;
1081
643
  };
1082
- const de_ListThemesCommandError = async (output, context) => {
1083
- const parsedOutput = {
1084
- ...output,
1085
- body: await parseErrorBody(output.body, context),
1086
- };
1087
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1088
- switch (errorCode) {
1089
- case "InternalServerException":
1090
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
1091
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1092
- case "InvalidParameterException":
1093
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1094
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1095
- default:
1096
- const parsedBody = parsedOutput.body;
1097
- return throwDefaultError({
1098
- output,
1099
- parsedBody,
1100
- errorCode,
1101
- });
1102
- }
1103
- };
1104
644
  export const de_PutMetadataFlagCommand = async (output, context) => {
1105
645
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1106
- return de_PutMetadataFlagCommandError(output, context);
646
+ return de_CommandError(output, context);
1107
647
  }
1108
648
  const contents = map({
1109
649
  $metadata: deserializeMetadata(output),
@@ -1111,31 +651,9 @@ export const de_PutMetadataFlagCommand = async (output, context) => {
1111
651
  await collectBody(output.body, context);
1112
652
  return contents;
1113
653
  };
1114
- const de_PutMetadataFlagCommandError = async (output, context) => {
1115
- const parsedOutput = {
1116
- ...output,
1117
- body: await parseErrorBody(output.body, context),
1118
- };
1119
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1120
- switch (errorCode) {
1121
- case "InvalidParameterException":
1122
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1123
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1124
- case "UnauthorizedException":
1125
- case "com.amazonaws.amplifyuibuilder#UnauthorizedException":
1126
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1127
- default:
1128
- const parsedBody = parsedOutput.body;
1129
- return throwDefaultError({
1130
- output,
1131
- parsedBody,
1132
- errorCode,
1133
- });
1134
- }
1135
- };
1136
654
  export const de_RefreshTokenCommand = async (output, context) => {
1137
655
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1138
- return de_RefreshTokenCommandError(output, context);
656
+ return de_CommandError(output, context);
1139
657
  }
1140
658
  const contents = map({
1141
659
  $metadata: deserializeMetadata(output),
@@ -1148,28 +666,9 @@ export const de_RefreshTokenCommand = async (output, context) => {
1148
666
  Object.assign(contents, doc);
1149
667
  return contents;
1150
668
  };
1151
- const de_RefreshTokenCommandError = async (output, context) => {
1152
- const parsedOutput = {
1153
- ...output,
1154
- body: await parseErrorBody(output.body, context),
1155
- };
1156
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1157
- switch (errorCode) {
1158
- case "InvalidParameterException":
1159
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1160
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1161
- default:
1162
- const parsedBody = parsedOutput.body;
1163
- return throwDefaultError({
1164
- output,
1165
- parsedBody,
1166
- errorCode,
1167
- });
1168
- }
1169
- };
1170
669
  export const de_StartCodegenJobCommand = async (output, context) => {
1171
670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1172
- return de_StartCodegenJobCommandError(output, context);
671
+ return de_CommandError(output, context);
1173
672
  }
1174
673
  const contents = map({
1175
674
  $metadata: deserializeMetadata(output),
@@ -1178,34 +677,9 @@ export const de_StartCodegenJobCommand = async (output, context) => {
1178
677
  contents.entity = de_CodegenJob(data, context);
1179
678
  return contents;
1180
679
  };
1181
- const de_StartCodegenJobCommandError = async (output, context) => {
1182
- const parsedOutput = {
1183
- ...output,
1184
- body: await parseErrorBody(output.body, context),
1185
- };
1186
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- switch (errorCode) {
1188
- case "InternalServerException":
1189
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
1190
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1191
- case "InvalidParameterException":
1192
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1193
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1194
- case "ThrottlingException":
1195
- case "com.amazonaws.amplifyuibuilder#ThrottlingException":
1196
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1197
- default:
1198
- const parsedBody = parsedOutput.body;
1199
- return throwDefaultError({
1200
- output,
1201
- parsedBody,
1202
- errorCode,
1203
- });
1204
- }
1205
- };
1206
680
  export const de_UpdateComponentCommand = async (output, context) => {
1207
681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1208
- return de_UpdateComponentCommandError(output, context);
682
+ return de_CommandError(output, context);
1209
683
  }
1210
684
  const contents = map({
1211
685
  $metadata: deserializeMetadata(output),
@@ -1214,34 +688,9 @@ export const de_UpdateComponentCommand = async (output, context) => {
1214
688
  contents.entity = de_Component(data, context);
1215
689
  return contents;
1216
690
  };
1217
- const de_UpdateComponentCommandError = 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 "InternalServerException":
1225
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
1226
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1227
- case "InvalidParameterException":
1228
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1229
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1230
- case "ResourceConflictException":
1231
- case "com.amazonaws.amplifyuibuilder#ResourceConflictException":
1232
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
1233
- default:
1234
- const parsedBody = parsedOutput.body;
1235
- return throwDefaultError({
1236
- output,
1237
- parsedBody,
1238
- errorCode,
1239
- });
1240
- }
1241
- };
1242
691
  export const de_UpdateFormCommand = async (output, context) => {
1243
692
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1244
- return de_UpdateFormCommandError(output, context);
693
+ return de_CommandError(output, context);
1245
694
  }
1246
695
  const contents = map({
1247
696
  $metadata: deserializeMetadata(output),
@@ -1250,34 +699,9 @@ export const de_UpdateFormCommand = async (output, context) => {
1250
699
  contents.entity = de_Form(data, context);
1251
700
  return contents;
1252
701
  };
1253
- const de_UpdateFormCommandError = async (output, context) => {
1254
- const parsedOutput = {
1255
- ...output,
1256
- body: await parseErrorBody(output.body, context),
1257
- };
1258
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
- switch (errorCode) {
1260
- case "InternalServerException":
1261
- case "com.amazonaws.amplifyuibuilder#InternalServerException":
1262
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1263
- case "InvalidParameterException":
1264
- case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1265
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1266
- case "ResourceConflictException":
1267
- case "com.amazonaws.amplifyuibuilder#ResourceConflictException":
1268
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
1269
- default:
1270
- const parsedBody = parsedOutput.body;
1271
- return throwDefaultError({
1272
- output,
1273
- parsedBody,
1274
- errorCode,
1275
- });
1276
- }
1277
- };
1278
702
  export const de_UpdateThemeCommand = async (output, context) => {
1279
703
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1280
- return de_UpdateThemeCommandError(output, context);
704
+ return de_CommandError(output, context);
1281
705
  }
1282
706
  const contents = map({
1283
707
  $metadata: deserializeMetadata(output),
@@ -1286,7 +710,7 @@ export const de_UpdateThemeCommand = async (output, context) => {
1286
710
  contents.entity = de_Theme(data, context);
1287
711
  return contents;
1288
712
  };
1289
- const de_UpdateThemeCommandError = async (output, context) => {
713
+ const de_CommandError = async (output, context) => {
1290
714
  const parsedOutput = {
1291
715
  ...output,
1292
716
  body: await parseErrorBody(output.body, context),
@@ -1302,6 +726,18 @@ const de_UpdateThemeCommandError = async (output, context) => {
1302
726
  case "ResourceConflictException":
1303
727
  case "com.amazonaws.amplifyuibuilder#ResourceConflictException":
1304
728
  throw await de_ResourceConflictExceptionRes(parsedOutput, context);
729
+ case "ServiceQuotaExceededException":
730
+ case "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException":
731
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
732
+ case "ResourceNotFoundException":
733
+ case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
734
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
735
+ case "ThrottlingException":
736
+ case "com.amazonaws.amplifyuibuilder#ThrottlingException":
737
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
738
+ case "UnauthorizedException":
739
+ case "com.amazonaws.amplifyuibuilder#UnauthorizedException":
740
+ throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1305
741
  default:
1306
742
  const parsedBody = parsedOutput.body;
1307
743
  return throwDefaultError({