@aws-sdk/client-billingconductor 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.
@@ -506,7 +506,7 @@ export const se_UpdatePricingRuleCommand = async (input, context) => {
506
506
  };
507
507
  export const de_AssociateAccountsCommand = async (output, context) => {
508
508
  if (output.statusCode !== 200 && output.statusCode >= 300) {
509
- return de_AssociateAccountsCommandError(output, context);
509
+ return de_CommandError(output, context);
510
510
  }
511
511
  const contents = map({
512
512
  $metadata: deserializeMetadata(output),
@@ -518,46 +518,9 @@ export const de_AssociateAccountsCommand = async (output, context) => {
518
518
  Object.assign(contents, doc);
519
519
  return contents;
520
520
  };
521
- const de_AssociateAccountsCommandError = async (output, context) => {
522
- const parsedOutput = {
523
- ...output,
524
- body: await parseErrorBody(output.body, context),
525
- };
526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
527
- switch (errorCode) {
528
- case "AccessDeniedException":
529
- case "com.amazonaws.billingconductor#AccessDeniedException":
530
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
531
- case "ConflictException":
532
- case "com.amazonaws.billingconductor#ConflictException":
533
- throw await de_ConflictExceptionRes(parsedOutput, context);
534
- case "InternalServerException":
535
- case "com.amazonaws.billingconductor#InternalServerException":
536
- throw await de_InternalServerExceptionRes(parsedOutput, context);
537
- case "ResourceNotFoundException":
538
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
539
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
540
- case "ServiceLimitExceededException":
541
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
542
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
543
- case "ThrottlingException":
544
- case "com.amazonaws.billingconductor#ThrottlingException":
545
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
546
- case "ValidationException":
547
- case "com.amazonaws.billingconductor#ValidationException":
548
- throw await de_ValidationExceptionRes(parsedOutput, context);
549
- default:
550
- const parsedBody = parsedOutput.body;
551
- return throwDefaultError({
552
- output,
553
- parsedBody,
554
- errorCode,
555
- });
556
- }
557
- };
558
521
  export const de_AssociatePricingRulesCommand = async (output, context) => {
559
522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
560
- return de_AssociatePricingRulesCommandError(output, context);
523
+ return de_CommandError(output, context);
561
524
  }
562
525
  const contents = map({
563
526
  $metadata: deserializeMetadata(output),
@@ -569,46 +532,9 @@ export const de_AssociatePricingRulesCommand = async (output, context) => {
569
532
  Object.assign(contents, doc);
570
533
  return contents;
571
534
  };
572
- const de_AssociatePricingRulesCommandError = async (output, context) => {
573
- const parsedOutput = {
574
- ...output,
575
- body: await parseErrorBody(output.body, context),
576
- };
577
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
578
- switch (errorCode) {
579
- case "AccessDeniedException":
580
- case "com.amazonaws.billingconductor#AccessDeniedException":
581
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
582
- case "ConflictException":
583
- case "com.amazonaws.billingconductor#ConflictException":
584
- throw await de_ConflictExceptionRes(parsedOutput, context);
585
- case "InternalServerException":
586
- case "com.amazonaws.billingconductor#InternalServerException":
587
- throw await de_InternalServerExceptionRes(parsedOutput, context);
588
- case "ResourceNotFoundException":
589
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
590
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
591
- case "ServiceLimitExceededException":
592
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
593
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
594
- case "ThrottlingException":
595
- case "com.amazonaws.billingconductor#ThrottlingException":
596
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
597
- case "ValidationException":
598
- case "com.amazonaws.billingconductor#ValidationException":
599
- throw await de_ValidationExceptionRes(parsedOutput, context);
600
- default:
601
- const parsedBody = parsedOutput.body;
602
- return throwDefaultError({
603
- output,
604
- parsedBody,
605
- errorCode,
606
- });
607
- }
608
- };
609
535
  export const de_BatchAssociateResourcesToCustomLineItemCommand = async (output, context) => {
610
536
  if (output.statusCode !== 200 && output.statusCode >= 300) {
611
- return de_BatchAssociateResourcesToCustomLineItemCommandError(output, context);
537
+ return de_CommandError(output, context);
612
538
  }
613
539
  const contents = map({
614
540
  $metadata: deserializeMetadata(output),
@@ -621,46 +547,9 @@ export const de_BatchAssociateResourcesToCustomLineItemCommand = async (output,
621
547
  Object.assign(contents, doc);
622
548
  return contents;
623
549
  };
624
- const de_BatchAssociateResourcesToCustomLineItemCommandError = async (output, context) => {
625
- const parsedOutput = {
626
- ...output,
627
- body: await parseErrorBody(output.body, context),
628
- };
629
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
630
- switch (errorCode) {
631
- case "AccessDeniedException":
632
- case "com.amazonaws.billingconductor#AccessDeniedException":
633
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
634
- case "ConflictException":
635
- case "com.amazonaws.billingconductor#ConflictException":
636
- throw await de_ConflictExceptionRes(parsedOutput, context);
637
- case "InternalServerException":
638
- case "com.amazonaws.billingconductor#InternalServerException":
639
- throw await de_InternalServerExceptionRes(parsedOutput, context);
640
- case "ResourceNotFoundException":
641
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
642
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
643
- case "ServiceLimitExceededException":
644
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
645
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
646
- case "ThrottlingException":
647
- case "com.amazonaws.billingconductor#ThrottlingException":
648
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
649
- case "ValidationException":
650
- case "com.amazonaws.billingconductor#ValidationException":
651
- throw await de_ValidationExceptionRes(parsedOutput, context);
652
- default:
653
- const parsedBody = parsedOutput.body;
654
- return throwDefaultError({
655
- output,
656
- parsedBody,
657
- errorCode,
658
- });
659
- }
660
- };
661
550
  export const de_BatchDisassociateResourcesFromCustomLineItemCommand = async (output, context) => {
662
551
  if (output.statusCode !== 200 && output.statusCode >= 300) {
663
- return de_BatchDisassociateResourcesFromCustomLineItemCommandError(output, context);
552
+ return de_CommandError(output, context);
664
553
  }
665
554
  const contents = map({
666
555
  $metadata: deserializeMetadata(output),
@@ -673,43 +562,9 @@ export const de_BatchDisassociateResourcesFromCustomLineItemCommand = async (out
673
562
  Object.assign(contents, doc);
674
563
  return contents;
675
564
  };
676
- const de_BatchDisassociateResourcesFromCustomLineItemCommandError = async (output, context) => {
677
- const parsedOutput = {
678
- ...output,
679
- body: await parseErrorBody(output.body, context),
680
- };
681
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
- switch (errorCode) {
683
- case "AccessDeniedException":
684
- case "com.amazonaws.billingconductor#AccessDeniedException":
685
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
686
- case "ConflictException":
687
- case "com.amazonaws.billingconductor#ConflictException":
688
- throw await de_ConflictExceptionRes(parsedOutput, context);
689
- case "InternalServerException":
690
- case "com.amazonaws.billingconductor#InternalServerException":
691
- throw await de_InternalServerExceptionRes(parsedOutput, context);
692
- case "ResourceNotFoundException":
693
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
694
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
695
- case "ThrottlingException":
696
- case "com.amazonaws.billingconductor#ThrottlingException":
697
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
698
- case "ValidationException":
699
- case "com.amazonaws.billingconductor#ValidationException":
700
- throw await de_ValidationExceptionRes(parsedOutput, context);
701
- default:
702
- const parsedBody = parsedOutput.body;
703
- return throwDefaultError({
704
- output,
705
- parsedBody,
706
- errorCode,
707
- });
708
- }
709
- };
710
565
  export const de_CreateBillingGroupCommand = async (output, context) => {
711
566
  if (output.statusCode !== 200 && output.statusCode >= 300) {
712
- return de_CreateBillingGroupCommandError(output, context);
567
+ return de_CommandError(output, context);
713
568
  }
714
569
  const contents = map({
715
570
  $metadata: deserializeMetadata(output),
@@ -721,43 +576,9 @@ export const de_CreateBillingGroupCommand = async (output, context) => {
721
576
  Object.assign(contents, doc);
722
577
  return contents;
723
578
  };
724
- const de_CreateBillingGroupCommandError = async (output, context) => {
725
- const parsedOutput = {
726
- ...output,
727
- body: await parseErrorBody(output.body, context),
728
- };
729
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
730
- switch (errorCode) {
731
- case "AccessDeniedException":
732
- case "com.amazonaws.billingconductor#AccessDeniedException":
733
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
734
- case "ConflictException":
735
- case "com.amazonaws.billingconductor#ConflictException":
736
- throw await de_ConflictExceptionRes(parsedOutput, context);
737
- case "InternalServerException":
738
- case "com.amazonaws.billingconductor#InternalServerException":
739
- throw await de_InternalServerExceptionRes(parsedOutput, context);
740
- case "ServiceLimitExceededException":
741
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
742
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
743
- case "ThrottlingException":
744
- case "com.amazonaws.billingconductor#ThrottlingException":
745
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
746
- case "ValidationException":
747
- case "com.amazonaws.billingconductor#ValidationException":
748
- throw await de_ValidationExceptionRes(parsedOutput, context);
749
- default:
750
- const parsedBody = parsedOutput.body;
751
- return throwDefaultError({
752
- output,
753
- parsedBody,
754
- errorCode,
755
- });
756
- }
757
- };
758
579
  export const de_CreateCustomLineItemCommand = async (output, context) => {
759
580
  if (output.statusCode !== 200 && output.statusCode >= 300) {
760
- return de_CreateCustomLineItemCommandError(output, context);
581
+ return de_CommandError(output, context);
761
582
  }
762
583
  const contents = map({
763
584
  $metadata: deserializeMetadata(output),
@@ -769,43 +590,9 @@ export const de_CreateCustomLineItemCommand = async (output, context) => {
769
590
  Object.assign(contents, doc);
770
591
  return contents;
771
592
  };
772
- const de_CreateCustomLineItemCommandError = async (output, context) => {
773
- const parsedOutput = {
774
- ...output,
775
- body: await parseErrorBody(output.body, context),
776
- };
777
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
778
- switch (errorCode) {
779
- case "AccessDeniedException":
780
- case "com.amazonaws.billingconductor#AccessDeniedException":
781
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
782
- case "ConflictException":
783
- case "com.amazonaws.billingconductor#ConflictException":
784
- throw await de_ConflictExceptionRes(parsedOutput, context);
785
- case "InternalServerException":
786
- case "com.amazonaws.billingconductor#InternalServerException":
787
- throw await de_InternalServerExceptionRes(parsedOutput, context);
788
- case "ServiceLimitExceededException":
789
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
790
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
791
- case "ThrottlingException":
792
- case "com.amazonaws.billingconductor#ThrottlingException":
793
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
794
- case "ValidationException":
795
- case "com.amazonaws.billingconductor#ValidationException":
796
- throw await de_ValidationExceptionRes(parsedOutput, context);
797
- default:
798
- const parsedBody = parsedOutput.body;
799
- return throwDefaultError({
800
- output,
801
- parsedBody,
802
- errorCode,
803
- });
804
- }
805
- };
806
593
  export const de_CreatePricingPlanCommand = async (output, context) => {
807
594
  if (output.statusCode !== 200 && output.statusCode >= 300) {
808
- return de_CreatePricingPlanCommandError(output, context);
595
+ return de_CommandError(output, context);
809
596
  }
810
597
  const contents = map({
811
598
  $metadata: deserializeMetadata(output),
@@ -817,46 +604,9 @@ export const de_CreatePricingPlanCommand = async (output, context) => {
817
604
  Object.assign(contents, doc);
818
605
  return contents;
819
606
  };
820
- const de_CreatePricingPlanCommandError = 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 "AccessDeniedException":
828
- case "com.amazonaws.billingconductor#AccessDeniedException":
829
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
830
- case "ConflictException":
831
- case "com.amazonaws.billingconductor#ConflictException":
832
- throw await de_ConflictExceptionRes(parsedOutput, context);
833
- case "InternalServerException":
834
- case "com.amazonaws.billingconductor#InternalServerException":
835
- throw await de_InternalServerExceptionRes(parsedOutput, context);
836
- case "ResourceNotFoundException":
837
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
838
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
839
- case "ServiceLimitExceededException":
840
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
841
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
842
- case "ThrottlingException":
843
- case "com.amazonaws.billingconductor#ThrottlingException":
844
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
845
- case "ValidationException":
846
- case "com.amazonaws.billingconductor#ValidationException":
847
- throw await de_ValidationExceptionRes(parsedOutput, context);
848
- default:
849
- const parsedBody = parsedOutput.body;
850
- return throwDefaultError({
851
- output,
852
- parsedBody,
853
- errorCode,
854
- });
855
- }
856
- };
857
607
  export const de_CreatePricingRuleCommand = async (output, context) => {
858
608
  if (output.statusCode !== 200 && output.statusCode >= 300) {
859
- return de_CreatePricingRuleCommandError(output, context);
609
+ return de_CommandError(output, context);
860
610
  }
861
611
  const contents = map({
862
612
  $metadata: deserializeMetadata(output),
@@ -868,43 +618,9 @@ export const de_CreatePricingRuleCommand = async (output, context) => {
868
618
  Object.assign(contents, doc);
869
619
  return contents;
870
620
  };
871
- const de_CreatePricingRuleCommandError = async (output, context) => {
872
- const parsedOutput = {
873
- ...output,
874
- body: await parseErrorBody(output.body, context),
875
- };
876
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
877
- switch (errorCode) {
878
- case "AccessDeniedException":
879
- case "com.amazonaws.billingconductor#AccessDeniedException":
880
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
881
- case "ConflictException":
882
- case "com.amazonaws.billingconductor#ConflictException":
883
- throw await de_ConflictExceptionRes(parsedOutput, context);
884
- case "InternalServerException":
885
- case "com.amazonaws.billingconductor#InternalServerException":
886
- throw await de_InternalServerExceptionRes(parsedOutput, context);
887
- case "ServiceLimitExceededException":
888
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
889
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
890
- case "ThrottlingException":
891
- case "com.amazonaws.billingconductor#ThrottlingException":
892
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
893
- case "ValidationException":
894
- case "com.amazonaws.billingconductor#ValidationException":
895
- throw await de_ValidationExceptionRes(parsedOutput, context);
896
- default:
897
- const parsedBody = parsedOutput.body;
898
- return throwDefaultError({
899
- output,
900
- parsedBody,
901
- errorCode,
902
- });
903
- }
904
- };
905
621
  export const de_DeleteBillingGroupCommand = async (output, context) => {
906
622
  if (output.statusCode !== 200 && output.statusCode >= 300) {
907
- return de_DeleteBillingGroupCommandError(output, context);
623
+ return de_CommandError(output, context);
908
624
  }
909
625
  const contents = map({
910
626
  $metadata: deserializeMetadata(output),
@@ -916,37 +632,9 @@ export const de_DeleteBillingGroupCommand = async (output, context) => {
916
632
  Object.assign(contents, doc);
917
633
  return contents;
918
634
  };
919
- const de_DeleteBillingGroupCommandError = async (output, context) => {
920
- const parsedOutput = {
921
- ...output,
922
- body: await parseErrorBody(output.body, context),
923
- };
924
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
925
- switch (errorCode) {
926
- case "AccessDeniedException":
927
- case "com.amazonaws.billingconductor#AccessDeniedException":
928
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
929
- case "InternalServerException":
930
- case "com.amazonaws.billingconductor#InternalServerException":
931
- throw await de_InternalServerExceptionRes(parsedOutput, context);
932
- case "ThrottlingException":
933
- case "com.amazonaws.billingconductor#ThrottlingException":
934
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
935
- case "ValidationException":
936
- case "com.amazonaws.billingconductor#ValidationException":
937
- throw await de_ValidationExceptionRes(parsedOutput, context);
938
- default:
939
- const parsedBody = parsedOutput.body;
940
- return throwDefaultError({
941
- output,
942
- parsedBody,
943
- errorCode,
944
- });
945
- }
946
- };
947
635
  export const de_DeleteCustomLineItemCommand = async (output, context) => {
948
636
  if (output.statusCode !== 200 && output.statusCode >= 300) {
949
- return de_DeleteCustomLineItemCommandError(output, context);
637
+ return de_CommandError(output, context);
950
638
  }
951
639
  const contents = map({
952
640
  $metadata: deserializeMetadata(output),
@@ -958,40 +646,9 @@ export const de_DeleteCustomLineItemCommand = async (output, context) => {
958
646
  Object.assign(contents, doc);
959
647
  return contents;
960
648
  };
961
- const de_DeleteCustomLineItemCommandError = async (output, context) => {
962
- const parsedOutput = {
963
- ...output,
964
- body: await parseErrorBody(output.body, context),
965
- };
966
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
967
- switch (errorCode) {
968
- case "AccessDeniedException":
969
- case "com.amazonaws.billingconductor#AccessDeniedException":
970
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
971
- case "ConflictException":
972
- case "com.amazonaws.billingconductor#ConflictException":
973
- throw await de_ConflictExceptionRes(parsedOutput, context);
974
- case "InternalServerException":
975
- case "com.amazonaws.billingconductor#InternalServerException":
976
- throw await de_InternalServerExceptionRes(parsedOutput, context);
977
- case "ThrottlingException":
978
- case "com.amazonaws.billingconductor#ThrottlingException":
979
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
980
- case "ValidationException":
981
- case "com.amazonaws.billingconductor#ValidationException":
982
- throw await de_ValidationExceptionRes(parsedOutput, context);
983
- default:
984
- const parsedBody = parsedOutput.body;
985
- return throwDefaultError({
986
- output,
987
- parsedBody,
988
- errorCode,
989
- });
990
- }
991
- };
992
649
  export const de_DeletePricingPlanCommand = async (output, context) => {
993
650
  if (output.statusCode !== 200 && output.statusCode >= 300) {
994
- return de_DeletePricingPlanCommandError(output, context);
651
+ return de_CommandError(output, context);
995
652
  }
996
653
  const contents = map({
997
654
  $metadata: deserializeMetadata(output),
@@ -1003,40 +660,9 @@ export const de_DeletePricingPlanCommand = async (output, context) => {
1003
660
  Object.assign(contents, doc);
1004
661
  return contents;
1005
662
  };
1006
- const de_DeletePricingPlanCommandError = async (output, context) => {
1007
- const parsedOutput = {
1008
- ...output,
1009
- body: await parseErrorBody(output.body, context),
1010
- };
1011
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1012
- switch (errorCode) {
1013
- case "AccessDeniedException":
1014
- case "com.amazonaws.billingconductor#AccessDeniedException":
1015
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1016
- case "ConflictException":
1017
- case "com.amazonaws.billingconductor#ConflictException":
1018
- throw await de_ConflictExceptionRes(parsedOutput, context);
1019
- case "InternalServerException":
1020
- case "com.amazonaws.billingconductor#InternalServerException":
1021
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1022
- case "ThrottlingException":
1023
- case "com.amazonaws.billingconductor#ThrottlingException":
1024
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1025
- case "ValidationException":
1026
- case "com.amazonaws.billingconductor#ValidationException":
1027
- throw await de_ValidationExceptionRes(parsedOutput, context);
1028
- default:
1029
- const parsedBody = parsedOutput.body;
1030
- return throwDefaultError({
1031
- output,
1032
- parsedBody,
1033
- errorCode,
1034
- });
1035
- }
1036
- };
1037
663
  export const de_DeletePricingRuleCommand = async (output, context) => {
1038
664
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1039
- return de_DeletePricingRuleCommandError(output, context);
665
+ return de_CommandError(output, context);
1040
666
  }
1041
667
  const contents = map({
1042
668
  $metadata: deserializeMetadata(output),
@@ -1048,40 +674,9 @@ export const de_DeletePricingRuleCommand = async (output, context) => {
1048
674
  Object.assign(contents, doc);
1049
675
  return contents;
1050
676
  };
1051
- const de_DeletePricingRuleCommandError = async (output, context) => {
1052
- const parsedOutput = {
1053
- ...output,
1054
- body: await parseErrorBody(output.body, context),
1055
- };
1056
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1057
- switch (errorCode) {
1058
- case "AccessDeniedException":
1059
- case "com.amazonaws.billingconductor#AccessDeniedException":
1060
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1061
- case "ConflictException":
1062
- case "com.amazonaws.billingconductor#ConflictException":
1063
- throw await de_ConflictExceptionRes(parsedOutput, context);
1064
- case "InternalServerException":
1065
- case "com.amazonaws.billingconductor#InternalServerException":
1066
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1067
- case "ThrottlingException":
1068
- case "com.amazonaws.billingconductor#ThrottlingException":
1069
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1070
- case "ValidationException":
1071
- case "com.amazonaws.billingconductor#ValidationException":
1072
- throw await de_ValidationExceptionRes(parsedOutput, context);
1073
- default:
1074
- const parsedBody = parsedOutput.body;
1075
- return throwDefaultError({
1076
- output,
1077
- parsedBody,
1078
- errorCode,
1079
- });
1080
- }
1081
- };
1082
677
  export const de_DisassociateAccountsCommand = async (output, context) => {
1083
678
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1084
- return de_DisassociateAccountsCommandError(output, context);
679
+ return de_CommandError(output, context);
1085
680
  }
1086
681
  const contents = map({
1087
682
  $metadata: deserializeMetadata(output),
@@ -1093,137 +688,38 @@ export const de_DisassociateAccountsCommand = async (output, context) => {
1093
688
  Object.assign(contents, doc);
1094
689
  return contents;
1095
690
  };
1096
- const de_DisassociateAccountsCommandError = async (output, context) => {
1097
- const parsedOutput = {
1098
- ...output,
1099
- body: await parseErrorBody(output.body, context),
1100
- };
1101
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1102
- switch (errorCode) {
1103
- case "AccessDeniedException":
1104
- case "com.amazonaws.billingconductor#AccessDeniedException":
1105
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1106
- case "ConflictException":
1107
- case "com.amazonaws.billingconductor#ConflictException":
1108
- throw await de_ConflictExceptionRes(parsedOutput, context);
1109
- case "InternalServerException":
1110
- case "com.amazonaws.billingconductor#InternalServerException":
1111
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1112
- case "ResourceNotFoundException":
1113
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1114
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1115
- case "ThrottlingException":
1116
- case "com.amazonaws.billingconductor#ThrottlingException":
1117
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1118
- case "ValidationException":
1119
- case "com.amazonaws.billingconductor#ValidationException":
1120
- throw await de_ValidationExceptionRes(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- return throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
691
  export const de_DisassociatePricingRulesCommand = async (output, context) => {
1131
692
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
- return de_DisassociatePricingRulesCommandError(output, context);
1133
- }
1134
- const contents = map({
1135
- $metadata: deserializeMetadata(output),
1136
- });
1137
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1138
- const doc = take(data, {
1139
- Arn: __expectString,
1140
- });
1141
- Object.assign(contents, doc);
1142
- return contents;
1143
- };
1144
- const de_DisassociatePricingRulesCommandError = async (output, context) => {
1145
- const parsedOutput = {
1146
- ...output,
1147
- body: await parseErrorBody(output.body, context),
1148
- };
1149
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1150
- switch (errorCode) {
1151
- case "AccessDeniedException":
1152
- case "com.amazonaws.billingconductor#AccessDeniedException":
1153
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1154
- case "ConflictException":
1155
- case "com.amazonaws.billingconductor#ConflictException":
1156
- throw await de_ConflictExceptionRes(parsedOutput, context);
1157
- case "InternalServerException":
1158
- case "com.amazonaws.billingconductor#InternalServerException":
1159
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1160
- case "ResourceNotFoundException":
1161
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1162
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1163
- case "ThrottlingException":
1164
- case "com.amazonaws.billingconductor#ThrottlingException":
1165
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1166
- case "ValidationException":
1167
- case "com.amazonaws.billingconductor#ValidationException":
1168
- throw await de_ValidationExceptionRes(parsedOutput, context);
1169
- default:
1170
- const parsedBody = parsedOutput.body;
1171
- return throwDefaultError({
1172
- output,
1173
- parsedBody,
1174
- errorCode,
1175
- });
1176
- }
1177
- };
1178
- export const de_GetBillingGroupCostReportCommand = async (output, context) => {
1179
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1180
- return de_GetBillingGroupCostReportCommandError(output, context);
693
+ return de_CommandError(output, context);
1181
694
  }
1182
695
  const contents = map({
1183
696
  $metadata: deserializeMetadata(output),
1184
697
  });
1185
698
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1186
- const doc = take(data, {
1187
- BillingGroupCostReportResults: _json,
1188
- NextToken: __expectString,
1189
- });
1190
- Object.assign(contents, doc);
1191
- return contents;
1192
- };
1193
- const de_GetBillingGroupCostReportCommandError = async (output, context) => {
1194
- const parsedOutput = {
1195
- ...output,
1196
- body: await parseErrorBody(output.body, context),
1197
- };
1198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1199
- switch (errorCode) {
1200
- case "AccessDeniedException":
1201
- case "com.amazonaws.billingconductor#AccessDeniedException":
1202
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1203
- case "InternalServerException":
1204
- case "com.amazonaws.billingconductor#InternalServerException":
1205
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1206
- case "ResourceNotFoundException":
1207
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1208
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1209
- case "ThrottlingException":
1210
- case "com.amazonaws.billingconductor#ThrottlingException":
1211
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1212
- case "ValidationException":
1213
- case "com.amazonaws.billingconductor#ValidationException":
1214
- throw await de_ValidationExceptionRes(parsedOutput, context);
1215
- default:
1216
- const parsedBody = parsedOutput.body;
1217
- return throwDefaultError({
1218
- output,
1219
- parsedBody,
1220
- errorCode,
1221
- });
699
+ const doc = take(data, {
700
+ Arn: __expectString,
701
+ });
702
+ Object.assign(contents, doc);
703
+ return contents;
704
+ };
705
+ export const de_GetBillingGroupCostReportCommand = async (output, context) => {
706
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
707
+ return de_CommandError(output, context);
1222
708
  }
709
+ const contents = map({
710
+ $metadata: deserializeMetadata(output),
711
+ });
712
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
713
+ const doc = take(data, {
714
+ BillingGroupCostReportResults: _json,
715
+ NextToken: __expectString,
716
+ });
717
+ Object.assign(contents, doc);
718
+ return contents;
1223
719
  };
1224
720
  export const de_ListAccountAssociationsCommand = async (output, context) => {
1225
721
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1226
- return de_ListAccountAssociationsCommandError(output, context);
722
+ return de_CommandError(output, context);
1227
723
  }
1228
724
  const contents = map({
1229
725
  $metadata: deserializeMetadata(output),
@@ -1236,40 +732,9 @@ export const de_ListAccountAssociationsCommand = async (output, context) => {
1236
732
  Object.assign(contents, doc);
1237
733
  return contents;
1238
734
  };
1239
- const de_ListAccountAssociationsCommandError = async (output, context) => {
1240
- const parsedOutput = {
1241
- ...output,
1242
- body: await parseErrorBody(output.body, context),
1243
- };
1244
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1245
- switch (errorCode) {
1246
- case "AccessDeniedException":
1247
- case "com.amazonaws.billingconductor#AccessDeniedException":
1248
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1249
- case "InternalServerException":
1250
- case "com.amazonaws.billingconductor#InternalServerException":
1251
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1252
- case "ResourceNotFoundException":
1253
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1254
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1255
- case "ThrottlingException":
1256
- case "com.amazonaws.billingconductor#ThrottlingException":
1257
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1258
- case "ValidationException":
1259
- case "com.amazonaws.billingconductor#ValidationException":
1260
- throw await de_ValidationExceptionRes(parsedOutput, context);
1261
- default:
1262
- const parsedBody = parsedOutput.body;
1263
- return throwDefaultError({
1264
- output,
1265
- parsedBody,
1266
- errorCode,
1267
- });
1268
- }
1269
- };
1270
735
  export const de_ListBillingGroupCostReportsCommand = async (output, context) => {
1271
736
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1272
- return de_ListBillingGroupCostReportsCommandError(output, context);
737
+ return de_CommandError(output, context);
1273
738
  }
1274
739
  const contents = map({
1275
740
  $metadata: deserializeMetadata(output),
@@ -1282,40 +747,9 @@ export const de_ListBillingGroupCostReportsCommand = async (output, context) =>
1282
747
  Object.assign(contents, doc);
1283
748
  return contents;
1284
749
  };
1285
- const de_ListBillingGroupCostReportsCommandError = async (output, context) => {
1286
- const parsedOutput = {
1287
- ...output,
1288
- body: await parseErrorBody(output.body, context),
1289
- };
1290
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1291
- switch (errorCode) {
1292
- case "AccessDeniedException":
1293
- case "com.amazonaws.billingconductor#AccessDeniedException":
1294
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1295
- case "InternalServerException":
1296
- case "com.amazonaws.billingconductor#InternalServerException":
1297
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1298
- case "ResourceNotFoundException":
1299
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1300
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1301
- case "ThrottlingException":
1302
- case "com.amazonaws.billingconductor#ThrottlingException":
1303
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1304
- case "ValidationException":
1305
- case "com.amazonaws.billingconductor#ValidationException":
1306
- throw await de_ValidationExceptionRes(parsedOutput, context);
1307
- default:
1308
- const parsedBody = parsedOutput.body;
1309
- return throwDefaultError({
1310
- output,
1311
- parsedBody,
1312
- errorCode,
1313
- });
1314
- }
1315
- };
1316
750
  export const de_ListBillingGroupsCommand = async (output, context) => {
1317
751
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1318
- return de_ListBillingGroupsCommandError(output, context);
752
+ return de_CommandError(output, context);
1319
753
  }
1320
754
  const contents = map({
1321
755
  $metadata: deserializeMetadata(output),
@@ -1328,40 +762,9 @@ export const de_ListBillingGroupsCommand = async (output, context) => {
1328
762
  Object.assign(contents, doc);
1329
763
  return contents;
1330
764
  };
1331
- const de_ListBillingGroupsCommandError = async (output, context) => {
1332
- const parsedOutput = {
1333
- ...output,
1334
- body: await parseErrorBody(output.body, context),
1335
- };
1336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1337
- switch (errorCode) {
1338
- case "AccessDeniedException":
1339
- case "com.amazonaws.billingconductor#AccessDeniedException":
1340
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1341
- case "InternalServerException":
1342
- case "com.amazonaws.billingconductor#InternalServerException":
1343
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1344
- case "ResourceNotFoundException":
1345
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1346
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1347
- case "ThrottlingException":
1348
- case "com.amazonaws.billingconductor#ThrottlingException":
1349
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1350
- case "ValidationException":
1351
- case "com.amazonaws.billingconductor#ValidationException":
1352
- throw await de_ValidationExceptionRes(parsedOutput, context);
1353
- default:
1354
- const parsedBody = parsedOutput.body;
1355
- return throwDefaultError({
1356
- output,
1357
- parsedBody,
1358
- errorCode,
1359
- });
1360
- }
1361
- };
1362
765
  export const de_ListCustomLineItemsCommand = async (output, context) => {
1363
766
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1364
- return de_ListCustomLineItemsCommandError(output, context);
767
+ return de_CommandError(output, context);
1365
768
  }
1366
769
  const contents = map({
1367
770
  $metadata: deserializeMetadata(output),
@@ -1374,40 +777,9 @@ export const de_ListCustomLineItemsCommand = async (output, context) => {
1374
777
  Object.assign(contents, doc);
1375
778
  return contents;
1376
779
  };
1377
- const de_ListCustomLineItemsCommandError = async (output, context) => {
1378
- const parsedOutput = {
1379
- ...output,
1380
- body: await parseErrorBody(output.body, context),
1381
- };
1382
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1383
- switch (errorCode) {
1384
- case "AccessDeniedException":
1385
- case "com.amazonaws.billingconductor#AccessDeniedException":
1386
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1387
- case "InternalServerException":
1388
- case "com.amazonaws.billingconductor#InternalServerException":
1389
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1390
- case "ResourceNotFoundException":
1391
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1392
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1393
- case "ThrottlingException":
1394
- case "com.amazonaws.billingconductor#ThrottlingException":
1395
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1396
- case "ValidationException":
1397
- case "com.amazonaws.billingconductor#ValidationException":
1398
- throw await de_ValidationExceptionRes(parsedOutput, context);
1399
- default:
1400
- const parsedBody = parsedOutput.body;
1401
- return throwDefaultError({
1402
- output,
1403
- parsedBody,
1404
- errorCode,
1405
- });
1406
- }
1407
- };
1408
780
  export const de_ListCustomLineItemVersionsCommand = async (output, context) => {
1409
781
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1410
- return de_ListCustomLineItemVersionsCommandError(output, context);
782
+ return de_CommandError(output, context);
1411
783
  }
1412
784
  const contents = map({
1413
785
  $metadata: deserializeMetadata(output),
@@ -1420,37 +792,9 @@ export const de_ListCustomLineItemVersionsCommand = async (output, context) => {
1420
792
  Object.assign(contents, doc);
1421
793
  return contents;
1422
794
  };
1423
- const de_ListCustomLineItemVersionsCommandError = async (output, context) => {
1424
- const parsedOutput = {
1425
- ...output,
1426
- body: await parseErrorBody(output.body, context),
1427
- };
1428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1429
- switch (errorCode) {
1430
- case "AccessDeniedException":
1431
- case "com.amazonaws.billingconductor#AccessDeniedException":
1432
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1433
- case "InternalServerException":
1434
- case "com.amazonaws.billingconductor#InternalServerException":
1435
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1436
- case "ThrottlingException":
1437
- case "com.amazonaws.billingconductor#ThrottlingException":
1438
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1439
- case "ValidationException":
1440
- case "com.amazonaws.billingconductor#ValidationException":
1441
- throw await de_ValidationExceptionRes(parsedOutput, context);
1442
- default:
1443
- const parsedBody = parsedOutput.body;
1444
- return throwDefaultError({
1445
- output,
1446
- parsedBody,
1447
- errorCode,
1448
- });
1449
- }
1450
- };
1451
795
  export const de_ListPricingPlansCommand = async (output, context) => {
1452
796
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1453
- return de_ListPricingPlansCommandError(output, context);
797
+ return de_CommandError(output, context);
1454
798
  }
1455
799
  const contents = map({
1456
800
  $metadata: deserializeMetadata(output),
@@ -1464,37 +808,9 @@ export const de_ListPricingPlansCommand = async (output, context) => {
1464
808
  Object.assign(contents, doc);
1465
809
  return contents;
1466
810
  };
1467
- const de_ListPricingPlansCommandError = async (output, context) => {
1468
- const parsedOutput = {
1469
- ...output,
1470
- body: await parseErrorBody(output.body, context),
1471
- };
1472
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1473
- switch (errorCode) {
1474
- case "AccessDeniedException":
1475
- case "com.amazonaws.billingconductor#AccessDeniedException":
1476
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1477
- case "InternalServerException":
1478
- case "com.amazonaws.billingconductor#InternalServerException":
1479
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1480
- case "ThrottlingException":
1481
- case "com.amazonaws.billingconductor#ThrottlingException":
1482
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1483
- case "ValidationException":
1484
- case "com.amazonaws.billingconductor#ValidationException":
1485
- throw await de_ValidationExceptionRes(parsedOutput, context);
1486
- default:
1487
- const parsedBody = parsedOutput.body;
1488
- return throwDefaultError({
1489
- output,
1490
- parsedBody,
1491
- errorCode,
1492
- });
1493
- }
1494
- };
1495
811
  export const de_ListPricingPlansAssociatedWithPricingRuleCommand = async (output, context) => {
1496
812
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1497
- return de_ListPricingPlansAssociatedWithPricingRuleCommandError(output, context);
813
+ return de_CommandError(output, context);
1498
814
  }
1499
815
  const contents = map({
1500
816
  $metadata: deserializeMetadata(output),
@@ -1509,84 +825,25 @@ export const de_ListPricingPlansAssociatedWithPricingRuleCommand = async (output
1509
825
  Object.assign(contents, doc);
1510
826
  return contents;
1511
827
  };
1512
- const de_ListPricingPlansAssociatedWithPricingRuleCommandError = async (output, context) => {
1513
- const parsedOutput = {
1514
- ...output,
1515
- body: await parseErrorBody(output.body, context),
1516
- };
1517
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1518
- switch (errorCode) {
1519
- case "AccessDeniedException":
1520
- case "com.amazonaws.billingconductor#AccessDeniedException":
1521
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1522
- case "InternalServerException":
1523
- case "com.amazonaws.billingconductor#InternalServerException":
1524
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1525
- case "ResourceNotFoundException":
1526
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1527
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1528
- case "ThrottlingException":
1529
- case "com.amazonaws.billingconductor#ThrottlingException":
1530
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1531
- case "ValidationException":
1532
- case "com.amazonaws.billingconductor#ValidationException":
1533
- throw await de_ValidationExceptionRes(parsedOutput, context);
1534
- default:
1535
- const parsedBody = parsedOutput.body;
1536
- return throwDefaultError({
1537
- output,
1538
- parsedBody,
1539
- errorCode,
1540
- });
1541
- }
1542
- };
1543
828
  export const de_ListPricingRulesCommand = async (output, context) => {
1544
829
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1545
- return de_ListPricingRulesCommandError(output, context);
830
+ return de_CommandError(output, context);
1546
831
  }
1547
832
  const contents = map({
1548
833
  $metadata: deserializeMetadata(output),
1549
834
  });
1550
835
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1551
- const doc = take(data, {
1552
- BillingPeriod: __expectString,
1553
- NextToken: __expectString,
1554
- PricingRules: (_) => de_PricingRuleList(_, context),
1555
- });
1556
- Object.assign(contents, doc);
1557
- return contents;
1558
- };
1559
- const de_ListPricingRulesCommandError = async (output, context) => {
1560
- const parsedOutput = {
1561
- ...output,
1562
- body: await parseErrorBody(output.body, context),
1563
- };
1564
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1565
- switch (errorCode) {
1566
- case "AccessDeniedException":
1567
- case "com.amazonaws.billingconductor#AccessDeniedException":
1568
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1569
- case "InternalServerException":
1570
- case "com.amazonaws.billingconductor#InternalServerException":
1571
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1572
- case "ThrottlingException":
1573
- case "com.amazonaws.billingconductor#ThrottlingException":
1574
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1575
- case "ValidationException":
1576
- case "com.amazonaws.billingconductor#ValidationException":
1577
- throw await de_ValidationExceptionRes(parsedOutput, context);
1578
- default:
1579
- const parsedBody = parsedOutput.body;
1580
- return throwDefaultError({
1581
- output,
1582
- parsedBody,
1583
- errorCode,
1584
- });
1585
- }
836
+ const doc = take(data, {
837
+ BillingPeriod: __expectString,
838
+ NextToken: __expectString,
839
+ PricingRules: (_) => de_PricingRuleList(_, context),
840
+ });
841
+ Object.assign(contents, doc);
842
+ return contents;
1586
843
  };
1587
844
  export const de_ListPricingRulesAssociatedToPricingPlanCommand = async (output, context) => {
1588
845
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1589
- return de_ListPricingRulesAssociatedToPricingPlanCommandError(output, context);
846
+ return de_CommandError(output, context);
1590
847
  }
1591
848
  const contents = map({
1592
849
  $metadata: deserializeMetadata(output),
@@ -1601,40 +858,9 @@ export const de_ListPricingRulesAssociatedToPricingPlanCommand = async (output,
1601
858
  Object.assign(contents, doc);
1602
859
  return contents;
1603
860
  };
1604
- const de_ListPricingRulesAssociatedToPricingPlanCommandError = async (output, context) => {
1605
- const parsedOutput = {
1606
- ...output,
1607
- body: await parseErrorBody(output.body, context),
1608
- };
1609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1610
- switch (errorCode) {
1611
- case "AccessDeniedException":
1612
- case "com.amazonaws.billingconductor#AccessDeniedException":
1613
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1614
- case "InternalServerException":
1615
- case "com.amazonaws.billingconductor#InternalServerException":
1616
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1617
- case "ResourceNotFoundException":
1618
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1619
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1620
- case "ThrottlingException":
1621
- case "com.amazonaws.billingconductor#ThrottlingException":
1622
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1623
- case "ValidationException":
1624
- case "com.amazonaws.billingconductor#ValidationException":
1625
- throw await de_ValidationExceptionRes(parsedOutput, context);
1626
- default:
1627
- const parsedBody = parsedOutput.body;
1628
- return throwDefaultError({
1629
- output,
1630
- parsedBody,
1631
- errorCode,
1632
- });
1633
- }
1634
- };
1635
861
  export const de_ListResourcesAssociatedToCustomLineItemCommand = async (output, context) => {
1636
862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1637
- return de_ListResourcesAssociatedToCustomLineItemCommandError(output, context);
863
+ return de_CommandError(output, context);
1638
864
  }
1639
865
  const contents = map({
1640
866
  $metadata: deserializeMetadata(output),
@@ -1648,40 +874,9 @@ export const de_ListResourcesAssociatedToCustomLineItemCommand = async (output,
1648
874
  Object.assign(contents, doc);
1649
875
  return contents;
1650
876
  };
1651
- const de_ListResourcesAssociatedToCustomLineItemCommandError = async (output, context) => {
1652
- const parsedOutput = {
1653
- ...output,
1654
- body: await parseErrorBody(output.body, context),
1655
- };
1656
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
- switch (errorCode) {
1658
- case "AccessDeniedException":
1659
- case "com.amazonaws.billingconductor#AccessDeniedException":
1660
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1661
- case "InternalServerException":
1662
- case "com.amazonaws.billingconductor#InternalServerException":
1663
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1664
- case "ResourceNotFoundException":
1665
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1666
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1667
- case "ThrottlingException":
1668
- case "com.amazonaws.billingconductor#ThrottlingException":
1669
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1670
- case "ValidationException":
1671
- case "com.amazonaws.billingconductor#ValidationException":
1672
- throw await de_ValidationExceptionRes(parsedOutput, context);
1673
- default:
1674
- const parsedBody = parsedOutput.body;
1675
- return throwDefaultError({
1676
- output,
1677
- parsedBody,
1678
- errorCode,
1679
- });
1680
- }
1681
- };
1682
877
  export const de_ListTagsForResourceCommand = async (output, context) => {
1683
878
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1684
- return de_ListTagsForResourceCommandError(output, context);
879
+ return de_CommandError(output, context);
1685
880
  }
1686
881
  const contents = map({
1687
882
  $metadata: deserializeMetadata(output),
@@ -1693,40 +888,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1693
888
  Object.assign(contents, doc);
1694
889
  return contents;
1695
890
  };
1696
- const de_ListTagsForResourceCommandError = async (output, context) => {
1697
- const parsedOutput = {
1698
- ...output,
1699
- body: await parseErrorBody(output.body, context),
1700
- };
1701
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1702
- switch (errorCode) {
1703
- case "AccessDeniedException":
1704
- case "com.amazonaws.billingconductor#AccessDeniedException":
1705
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1706
- case "InternalServerException":
1707
- case "com.amazonaws.billingconductor#InternalServerException":
1708
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1709
- case "ResourceNotFoundException":
1710
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1711
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1712
- case "ThrottlingException":
1713
- case "com.amazonaws.billingconductor#ThrottlingException":
1714
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1715
- case "ValidationException":
1716
- case "com.amazonaws.billingconductor#ValidationException":
1717
- throw await de_ValidationExceptionRes(parsedOutput, context);
1718
- default:
1719
- const parsedBody = parsedOutput.body;
1720
- return throwDefaultError({
1721
- output,
1722
- parsedBody,
1723
- errorCode,
1724
- });
1725
- }
1726
- };
1727
891
  export const de_TagResourceCommand = async (output, context) => {
1728
892
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1729
- return de_TagResourceCommandError(output, context);
893
+ return de_CommandError(output, context);
1730
894
  }
1731
895
  const contents = map({
1732
896
  $metadata: deserializeMetadata(output),
@@ -1734,40 +898,9 @@ export const de_TagResourceCommand = async (output, context) => {
1734
898
  await collectBody(output.body, context);
1735
899
  return contents;
1736
900
  };
1737
- const de_TagResourceCommandError = async (output, context) => {
1738
- const parsedOutput = {
1739
- ...output,
1740
- body: await parseErrorBody(output.body, context),
1741
- };
1742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1743
- switch (errorCode) {
1744
- case "AccessDeniedException":
1745
- case "com.amazonaws.billingconductor#AccessDeniedException":
1746
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1747
- case "InternalServerException":
1748
- case "com.amazonaws.billingconductor#InternalServerException":
1749
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1750
- case "ResourceNotFoundException":
1751
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1752
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1753
- case "ThrottlingException":
1754
- case "com.amazonaws.billingconductor#ThrottlingException":
1755
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1756
- case "ValidationException":
1757
- case "com.amazonaws.billingconductor#ValidationException":
1758
- throw await de_ValidationExceptionRes(parsedOutput, context);
1759
- default:
1760
- const parsedBody = parsedOutput.body;
1761
- return throwDefaultError({
1762
- output,
1763
- parsedBody,
1764
- errorCode,
1765
- });
1766
- }
1767
- };
1768
901
  export const de_UntagResourceCommand = async (output, context) => {
1769
902
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1770
- return de_UntagResourceCommandError(output, context);
903
+ return de_CommandError(output, context);
1771
904
  }
1772
905
  const contents = map({
1773
906
  $metadata: deserializeMetadata(output),
@@ -1775,40 +908,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1775
908
  await collectBody(output.body, context);
1776
909
  return contents;
1777
910
  };
1778
- const de_UntagResourceCommandError = async (output, context) => {
1779
- const parsedOutput = {
1780
- ...output,
1781
- body: await parseErrorBody(output.body, context),
1782
- };
1783
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1784
- switch (errorCode) {
1785
- case "AccessDeniedException":
1786
- case "com.amazonaws.billingconductor#AccessDeniedException":
1787
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1788
- case "InternalServerException":
1789
- case "com.amazonaws.billingconductor#InternalServerException":
1790
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1791
- case "ResourceNotFoundException":
1792
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1793
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1794
- case "ThrottlingException":
1795
- case "com.amazonaws.billingconductor#ThrottlingException":
1796
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1797
- case "ValidationException":
1798
- case "com.amazonaws.billingconductor#ValidationException":
1799
- throw await de_ValidationExceptionRes(parsedOutput, context);
1800
- default:
1801
- const parsedBody = parsedOutput.body;
1802
- return throwDefaultError({
1803
- output,
1804
- parsedBody,
1805
- errorCode,
1806
- });
1807
- }
1808
- };
1809
911
  export const de_UpdateBillingGroupCommand = async (output, context) => {
1810
912
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1811
- return de_UpdateBillingGroupCommandError(output, context);
913
+ return de_CommandError(output, context);
1812
914
  }
1813
915
  const contents = map({
1814
916
  $metadata: deserializeMetadata(output),
@@ -1829,43 +931,9 @@ export const de_UpdateBillingGroupCommand = async (output, context) => {
1829
931
  Object.assign(contents, doc);
1830
932
  return contents;
1831
933
  };
1832
- const de_UpdateBillingGroupCommandError = async (output, context) => {
1833
- const parsedOutput = {
1834
- ...output,
1835
- body: await parseErrorBody(output.body, context),
1836
- };
1837
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1838
- switch (errorCode) {
1839
- case "AccessDeniedException":
1840
- case "com.amazonaws.billingconductor#AccessDeniedException":
1841
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1842
- case "ConflictException":
1843
- case "com.amazonaws.billingconductor#ConflictException":
1844
- throw await de_ConflictExceptionRes(parsedOutput, context);
1845
- case "InternalServerException":
1846
- case "com.amazonaws.billingconductor#InternalServerException":
1847
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1848
- case "ResourceNotFoundException":
1849
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1850
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1851
- case "ThrottlingException":
1852
- case "com.amazonaws.billingconductor#ThrottlingException":
1853
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1854
- case "ValidationException":
1855
- case "com.amazonaws.billingconductor#ValidationException":
1856
- throw await de_ValidationExceptionRes(parsedOutput, context);
1857
- default:
1858
- const parsedBody = parsedOutput.body;
1859
- return throwDefaultError({
1860
- output,
1861
- parsedBody,
1862
- errorCode,
1863
- });
1864
- }
1865
- };
1866
934
  export const de_UpdateCustomLineItemCommand = async (output, context) => {
1867
935
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1868
- return de_UpdateCustomLineItemCommandError(output, context);
936
+ return de_CommandError(output, context);
1869
937
  }
1870
938
  const contents = map({
1871
939
  $metadata: deserializeMetadata(output),
@@ -1883,40 +951,9 @@ export const de_UpdateCustomLineItemCommand = async (output, context) => {
1883
951
  Object.assign(contents, doc);
1884
952
  return contents;
1885
953
  };
1886
- const de_UpdateCustomLineItemCommandError = async (output, context) => {
1887
- const parsedOutput = {
1888
- ...output,
1889
- body: await parseErrorBody(output.body, context),
1890
- };
1891
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1892
- switch (errorCode) {
1893
- case "AccessDeniedException":
1894
- case "com.amazonaws.billingconductor#AccessDeniedException":
1895
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1896
- case "InternalServerException":
1897
- case "com.amazonaws.billingconductor#InternalServerException":
1898
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1899
- case "ResourceNotFoundException":
1900
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1901
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1902
- case "ThrottlingException":
1903
- case "com.amazonaws.billingconductor#ThrottlingException":
1904
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1905
- case "ValidationException":
1906
- case "com.amazonaws.billingconductor#ValidationException":
1907
- throw await de_ValidationExceptionRes(parsedOutput, context);
1908
- default:
1909
- const parsedBody = parsedOutput.body;
1910
- return throwDefaultError({
1911
- output,
1912
- parsedBody,
1913
- errorCode,
1914
- });
1915
- }
1916
- };
1917
954
  export const de_UpdatePricingPlanCommand = async (output, context) => {
1918
955
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1919
- return de_UpdatePricingPlanCommandError(output, context);
956
+ return de_CommandError(output, context);
1920
957
  }
1921
958
  const contents = map({
1922
959
  $metadata: deserializeMetadata(output),
@@ -1932,43 +969,9 @@ export const de_UpdatePricingPlanCommand = async (output, context) => {
1932
969
  Object.assign(contents, doc);
1933
970
  return contents;
1934
971
  };
1935
- const de_UpdatePricingPlanCommandError = async (output, context) => {
1936
- const parsedOutput = {
1937
- ...output,
1938
- body: await parseErrorBody(output.body, context),
1939
- };
1940
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1941
- switch (errorCode) {
1942
- case "AccessDeniedException":
1943
- case "com.amazonaws.billingconductor#AccessDeniedException":
1944
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1945
- case "ConflictException":
1946
- case "com.amazonaws.billingconductor#ConflictException":
1947
- throw await de_ConflictExceptionRes(parsedOutput, context);
1948
- case "InternalServerException":
1949
- case "com.amazonaws.billingconductor#InternalServerException":
1950
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1951
- case "ResourceNotFoundException":
1952
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1953
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1954
- case "ThrottlingException":
1955
- case "com.amazonaws.billingconductor#ThrottlingException":
1956
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1957
- case "ValidationException":
1958
- case "com.amazonaws.billingconductor#ValidationException":
1959
- throw await de_ValidationExceptionRes(parsedOutput, context);
1960
- default:
1961
- const parsedBody = parsedOutput.body;
1962
- return throwDefaultError({
1963
- output,
1964
- parsedBody,
1965
- errorCode,
1966
- });
1967
- }
1968
- };
1969
972
  export const de_UpdatePricingRuleCommand = async (output, context) => {
1970
973
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1971
- return de_UpdatePricingRuleCommandError(output, context);
974
+ return de_CommandError(output, context);
1972
975
  }
1973
976
  const contents = map({
1974
977
  $metadata: deserializeMetadata(output),
@@ -1992,7 +995,7 @@ export const de_UpdatePricingRuleCommand = async (output, context) => {
1992
995
  Object.assign(contents, doc);
1993
996
  return contents;
1994
997
  };
1995
- const de_UpdatePricingRuleCommandError = async (output, context) => {
998
+ const de_CommandError = async (output, context) => {
1996
999
  const parsedOutput = {
1997
1000
  ...output,
1998
1001
  body: await parseErrorBody(output.body, context),
@@ -2011,6 +1014,9 @@ const de_UpdatePricingRuleCommandError = async (output, context) => {
2011
1014
  case "ResourceNotFoundException":
2012
1015
  case "com.amazonaws.billingconductor#ResourceNotFoundException":
2013
1016
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1017
+ case "ServiceLimitExceededException":
1018
+ case "com.amazonaws.billingconductor#ServiceLimitExceededException":
1019
+ throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
2014
1020
  case "ThrottlingException":
2015
1021
  case "com.amazonaws.billingconductor#ThrottlingException":
2016
1022
  throw await de_ThrottlingExceptionRes(parsedOutput, context);