@aws-sdk/client-tnb 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.
@@ -399,7 +399,7 @@ export const se_ValidateSolNetworkPackageContentCommand = async (input, context)
399
399
  };
400
400
  export const de_CancelSolNetworkOperationCommand = async (output, context) => {
401
401
  if (output.statusCode !== 202 && output.statusCode >= 300) {
402
- return de_CancelSolNetworkOperationCommandError(output, context);
402
+ return de_CommandError(output, context);
403
403
  }
404
404
  const contents = map({
405
405
  $metadata: deserializeMetadata(output),
@@ -407,40 +407,9 @@ export const de_CancelSolNetworkOperationCommand = async (output, context) => {
407
407
  await collectBody(output.body, context);
408
408
  return contents;
409
409
  };
410
- const de_CancelSolNetworkOperationCommandError = async (output, context) => {
411
- const parsedOutput = {
412
- ...output,
413
- body: await parseErrorBody(output.body, context),
414
- };
415
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
416
- switch (errorCode) {
417
- case "AccessDeniedException":
418
- case "com.amazonaws.tnb#AccessDeniedException":
419
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
420
- case "InternalServerException":
421
- case "com.amazonaws.tnb#InternalServerException":
422
- throw await de_InternalServerExceptionRes(parsedOutput, context);
423
- case "ResourceNotFoundException":
424
- case "com.amazonaws.tnb#ResourceNotFoundException":
425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
426
- case "ThrottlingException":
427
- case "com.amazonaws.tnb#ThrottlingException":
428
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
429
- case "ValidationException":
430
- case "com.amazonaws.tnb#ValidationException":
431
- throw await de_ValidationExceptionRes(parsedOutput, context);
432
- default:
433
- const parsedBody = parsedOutput.body;
434
- return throwDefaultError({
435
- output,
436
- parsedBody,
437
- errorCode,
438
- });
439
- }
440
- };
441
410
  export const de_CreateSolFunctionPackageCommand = async (output, context) => {
442
411
  if (output.statusCode !== 201 && output.statusCode >= 300) {
443
- return de_CreateSolFunctionPackageCommandError(output, context);
412
+ return de_CommandError(output, context);
444
413
  }
445
414
  const contents = map({
446
415
  $metadata: deserializeMetadata(output),
@@ -457,40 +426,9 @@ export const de_CreateSolFunctionPackageCommand = async (output, context) => {
457
426
  Object.assign(contents, doc);
458
427
  return contents;
459
428
  };
460
- const de_CreateSolFunctionPackageCommandError = async (output, context) => {
461
- const parsedOutput = {
462
- ...output,
463
- body: await parseErrorBody(output.body, context),
464
- };
465
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
466
- switch (errorCode) {
467
- case "AccessDeniedException":
468
- case "com.amazonaws.tnb#AccessDeniedException":
469
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
470
- case "InternalServerException":
471
- case "com.amazonaws.tnb#InternalServerException":
472
- throw await de_InternalServerExceptionRes(parsedOutput, context);
473
- case "ServiceQuotaExceededException":
474
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
475
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
476
- case "ThrottlingException":
477
- case "com.amazonaws.tnb#ThrottlingException":
478
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
479
- case "ValidationException":
480
- case "com.amazonaws.tnb#ValidationException":
481
- throw await de_ValidationExceptionRes(parsedOutput, context);
482
- default:
483
- const parsedBody = parsedOutput.body;
484
- return throwDefaultError({
485
- output,
486
- parsedBody,
487
- errorCode,
488
- });
489
- }
490
- };
491
429
  export const de_CreateSolNetworkInstanceCommand = async (output, context) => {
492
430
  if (output.statusCode !== 201 && output.statusCode >= 300) {
493
- return de_CreateSolNetworkInstanceCommandError(output, context);
431
+ return de_CommandError(output, context);
494
432
  }
495
433
  const contents = map({
496
434
  $metadata: deserializeMetadata(output),
@@ -506,43 +444,9 @@ export const de_CreateSolNetworkInstanceCommand = async (output, context) => {
506
444
  Object.assign(contents, doc);
507
445
  return contents;
508
446
  };
509
- const de_CreateSolNetworkInstanceCommandError = async (output, context) => {
510
- const parsedOutput = {
511
- ...output,
512
- body: await parseErrorBody(output.body, context),
513
- };
514
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
515
- switch (errorCode) {
516
- case "AccessDeniedException":
517
- case "com.amazonaws.tnb#AccessDeniedException":
518
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
519
- case "InternalServerException":
520
- case "com.amazonaws.tnb#InternalServerException":
521
- throw await de_InternalServerExceptionRes(parsedOutput, context);
522
- case "ResourceNotFoundException":
523
- case "com.amazonaws.tnb#ResourceNotFoundException":
524
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
525
- case "ServiceQuotaExceededException":
526
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
527
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
528
- case "ThrottlingException":
529
- case "com.amazonaws.tnb#ThrottlingException":
530
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
531
- case "ValidationException":
532
- case "com.amazonaws.tnb#ValidationException":
533
- throw await de_ValidationExceptionRes(parsedOutput, context);
534
- default:
535
- const parsedBody = parsedOutput.body;
536
- return throwDefaultError({
537
- output,
538
- parsedBody,
539
- errorCode,
540
- });
541
- }
542
- };
543
447
  export const de_CreateSolNetworkPackageCommand = async (output, context) => {
544
448
  if (output.statusCode !== 201 && output.statusCode >= 300) {
545
- return de_CreateSolNetworkPackageCommandError(output, context);
449
+ return de_CommandError(output, context);
546
450
  }
547
451
  const contents = map({
548
452
  $metadata: deserializeMetadata(output),
@@ -559,40 +463,9 @@ export const de_CreateSolNetworkPackageCommand = async (output, context) => {
559
463
  Object.assign(contents, doc);
560
464
  return contents;
561
465
  };
562
- const de_CreateSolNetworkPackageCommandError = async (output, context) => {
563
- const parsedOutput = {
564
- ...output,
565
- body: await parseErrorBody(output.body, context),
566
- };
567
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
568
- switch (errorCode) {
569
- case "AccessDeniedException":
570
- case "com.amazonaws.tnb#AccessDeniedException":
571
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
572
- case "InternalServerException":
573
- case "com.amazonaws.tnb#InternalServerException":
574
- throw await de_InternalServerExceptionRes(parsedOutput, context);
575
- case "ServiceQuotaExceededException":
576
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
577
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
578
- case "ThrottlingException":
579
- case "com.amazonaws.tnb#ThrottlingException":
580
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
581
- case "ValidationException":
582
- case "com.amazonaws.tnb#ValidationException":
583
- throw await de_ValidationExceptionRes(parsedOutput, context);
584
- default:
585
- const parsedBody = parsedOutput.body;
586
- return throwDefaultError({
587
- output,
588
- parsedBody,
589
- errorCode,
590
- });
591
- }
592
- };
593
466
  export const de_DeleteSolFunctionPackageCommand = async (output, context) => {
594
467
  if (output.statusCode !== 204 && output.statusCode >= 300) {
595
- return de_DeleteSolFunctionPackageCommandError(output, context);
468
+ return de_CommandError(output, context);
596
469
  }
597
470
  const contents = map({
598
471
  $metadata: deserializeMetadata(output),
@@ -600,40 +473,9 @@ export const de_DeleteSolFunctionPackageCommand = async (output, context) => {
600
473
  await collectBody(output.body, context);
601
474
  return contents;
602
475
  };
603
- const de_DeleteSolFunctionPackageCommandError = async (output, context) => {
604
- const parsedOutput = {
605
- ...output,
606
- body: await parseErrorBody(output.body, context),
607
- };
608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
- switch (errorCode) {
610
- case "AccessDeniedException":
611
- case "com.amazonaws.tnb#AccessDeniedException":
612
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
613
- case "InternalServerException":
614
- case "com.amazonaws.tnb#InternalServerException":
615
- throw await de_InternalServerExceptionRes(parsedOutput, context);
616
- case "ResourceNotFoundException":
617
- case "com.amazonaws.tnb#ResourceNotFoundException":
618
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
619
- case "ThrottlingException":
620
- case "com.amazonaws.tnb#ThrottlingException":
621
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
622
- case "ValidationException":
623
- case "com.amazonaws.tnb#ValidationException":
624
- throw await de_ValidationExceptionRes(parsedOutput, context);
625
- default:
626
- const parsedBody = parsedOutput.body;
627
- return throwDefaultError({
628
- output,
629
- parsedBody,
630
- errorCode,
631
- });
632
- }
633
- };
634
476
  export const de_DeleteSolNetworkInstanceCommand = async (output, context) => {
635
477
  if (output.statusCode !== 204 && output.statusCode >= 300) {
636
- return de_DeleteSolNetworkInstanceCommandError(output, context);
478
+ return de_CommandError(output, context);
637
479
  }
638
480
  const contents = map({
639
481
  $metadata: deserializeMetadata(output),
@@ -641,40 +483,9 @@ export const de_DeleteSolNetworkInstanceCommand = async (output, context) => {
641
483
  await collectBody(output.body, context);
642
484
  return contents;
643
485
  };
644
- const de_DeleteSolNetworkInstanceCommandError = async (output, context) => {
645
- const parsedOutput = {
646
- ...output,
647
- body: await parseErrorBody(output.body, context),
648
- };
649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
650
- switch (errorCode) {
651
- case "AccessDeniedException":
652
- case "com.amazonaws.tnb#AccessDeniedException":
653
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
654
- case "InternalServerException":
655
- case "com.amazonaws.tnb#InternalServerException":
656
- throw await de_InternalServerExceptionRes(parsedOutput, context);
657
- case "ResourceNotFoundException":
658
- case "com.amazonaws.tnb#ResourceNotFoundException":
659
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
660
- case "ThrottlingException":
661
- case "com.amazonaws.tnb#ThrottlingException":
662
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
663
- case "ValidationException":
664
- case "com.amazonaws.tnb#ValidationException":
665
- throw await de_ValidationExceptionRes(parsedOutput, context);
666
- default:
667
- const parsedBody = parsedOutput.body;
668
- return throwDefaultError({
669
- output,
670
- parsedBody,
671
- errorCode,
672
- });
673
- }
674
- };
675
486
  export const de_DeleteSolNetworkPackageCommand = async (output, context) => {
676
487
  if (output.statusCode !== 204 && output.statusCode >= 300) {
677
- return de_DeleteSolNetworkPackageCommandError(output, context);
488
+ return de_CommandError(output, context);
678
489
  }
679
490
  const contents = map({
680
491
  $metadata: deserializeMetadata(output),
@@ -682,40 +493,9 @@ export const de_DeleteSolNetworkPackageCommand = async (output, context) => {
682
493
  await collectBody(output.body, context);
683
494
  return contents;
684
495
  };
685
- const de_DeleteSolNetworkPackageCommandError = async (output, context) => {
686
- const parsedOutput = {
687
- ...output,
688
- body: await parseErrorBody(output.body, context),
689
- };
690
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
691
- switch (errorCode) {
692
- case "AccessDeniedException":
693
- case "com.amazonaws.tnb#AccessDeniedException":
694
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
695
- case "InternalServerException":
696
- case "com.amazonaws.tnb#InternalServerException":
697
- throw await de_InternalServerExceptionRes(parsedOutput, context);
698
- case "ResourceNotFoundException":
699
- case "com.amazonaws.tnb#ResourceNotFoundException":
700
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
701
- case "ThrottlingException":
702
- case "com.amazonaws.tnb#ThrottlingException":
703
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
704
- case "ValidationException":
705
- case "com.amazonaws.tnb#ValidationException":
706
- throw await de_ValidationExceptionRes(parsedOutput, context);
707
- default:
708
- const parsedBody = parsedOutput.body;
709
- return throwDefaultError({
710
- output,
711
- parsedBody,
712
- errorCode,
713
- });
714
- }
715
- };
716
496
  export const de_GetSolFunctionInstanceCommand = async (output, context) => {
717
497
  if (output.statusCode !== 200 && output.statusCode >= 300) {
718
- return de_GetSolFunctionInstanceCommandError(output, context);
498
+ return de_CommandError(output, context);
719
499
  }
720
500
  const contents = map({
721
501
  $metadata: deserializeMetadata(output),
@@ -738,40 +518,9 @@ export const de_GetSolFunctionInstanceCommand = async (output, context) => {
738
518
  Object.assign(contents, doc);
739
519
  return contents;
740
520
  };
741
- const de_GetSolFunctionInstanceCommandError = async (output, context) => {
742
- const parsedOutput = {
743
- ...output,
744
- body: await parseErrorBody(output.body, context),
745
- };
746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
747
- switch (errorCode) {
748
- case "AccessDeniedException":
749
- case "com.amazonaws.tnb#AccessDeniedException":
750
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
751
- case "InternalServerException":
752
- case "com.amazonaws.tnb#InternalServerException":
753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
754
- case "ResourceNotFoundException":
755
- case "com.amazonaws.tnb#ResourceNotFoundException":
756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
757
- case "ThrottlingException":
758
- case "com.amazonaws.tnb#ThrottlingException":
759
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
760
- case "ValidationException":
761
- case "com.amazonaws.tnb#ValidationException":
762
- throw await de_ValidationExceptionRes(parsedOutput, context);
763
- default:
764
- const parsedBody = parsedOutput.body;
765
- return throwDefaultError({
766
- output,
767
- parsedBody,
768
- errorCode,
769
- });
770
- }
771
- };
772
521
  export const de_GetSolFunctionPackageCommand = async (output, context) => {
773
522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
774
- return de_GetSolFunctionPackageCommandError(output, context);
523
+ return de_CommandError(output, context);
775
524
  }
776
525
  const contents = map({
777
526
  $metadata: deserializeMetadata(output),
@@ -793,40 +542,9 @@ export const de_GetSolFunctionPackageCommand = async (output, context) => {
793
542
  Object.assign(contents, doc);
794
543
  return contents;
795
544
  };
796
- const de_GetSolFunctionPackageCommandError = async (output, context) => {
797
- const parsedOutput = {
798
- ...output,
799
- body: await parseErrorBody(output.body, context),
800
- };
801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
802
- switch (errorCode) {
803
- case "AccessDeniedException":
804
- case "com.amazonaws.tnb#AccessDeniedException":
805
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
806
- case "InternalServerException":
807
- case "com.amazonaws.tnb#InternalServerException":
808
- throw await de_InternalServerExceptionRes(parsedOutput, context);
809
- case "ResourceNotFoundException":
810
- case "com.amazonaws.tnb#ResourceNotFoundException":
811
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
812
- case "ThrottlingException":
813
- case "com.amazonaws.tnb#ThrottlingException":
814
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
815
- case "ValidationException":
816
- case "com.amazonaws.tnb#ValidationException":
817
- throw await de_ValidationExceptionRes(parsedOutput, context);
818
- default:
819
- const parsedBody = parsedOutput.body;
820
- return throwDefaultError({
821
- output,
822
- parsedBody,
823
- errorCode,
824
- });
825
- }
826
- };
827
545
  export const de_GetSolFunctionPackageContentCommand = async (output, context) => {
828
546
  if (output.statusCode !== 200 && output.statusCode >= 300) {
829
- return de_GetSolFunctionPackageContentCommandError(output, context);
547
+ return de_CommandError(output, context);
830
548
  }
831
549
  const contents = map({
832
550
  $metadata: deserializeMetadata(output),
@@ -836,40 +554,9 @@ export const de_GetSolFunctionPackageContentCommand = async (output, context) =>
836
554
  contents.packageContent = data;
837
555
  return contents;
838
556
  };
839
- const de_GetSolFunctionPackageContentCommandError = async (output, context) => {
840
- const parsedOutput = {
841
- ...output,
842
- body: await parseErrorBody(output.body, context),
843
- };
844
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
- switch (errorCode) {
846
- case "AccessDeniedException":
847
- case "com.amazonaws.tnb#AccessDeniedException":
848
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
849
- case "InternalServerException":
850
- case "com.amazonaws.tnb#InternalServerException":
851
- throw await de_InternalServerExceptionRes(parsedOutput, context);
852
- case "ResourceNotFoundException":
853
- case "com.amazonaws.tnb#ResourceNotFoundException":
854
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
855
- case "ThrottlingException":
856
- case "com.amazonaws.tnb#ThrottlingException":
857
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
858
- case "ValidationException":
859
- case "com.amazonaws.tnb#ValidationException":
860
- throw await de_ValidationExceptionRes(parsedOutput, context);
861
- default:
862
- const parsedBody = parsedOutput.body;
863
- return throwDefaultError({
864
- output,
865
- parsedBody,
866
- errorCode,
867
- });
868
- }
869
- };
870
557
  export const de_GetSolFunctionPackageDescriptorCommand = async (output, context) => {
871
558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
872
- return de_GetSolFunctionPackageDescriptorCommandError(output, context);
559
+ return de_CommandError(output, context);
873
560
  }
874
561
  const contents = map({
875
562
  $metadata: deserializeMetadata(output),
@@ -879,40 +566,9 @@ export const de_GetSolFunctionPackageDescriptorCommand = async (output, context)
879
566
  contents.vnfd = data;
880
567
  return contents;
881
568
  };
882
- const de_GetSolFunctionPackageDescriptorCommandError = async (output, context) => {
883
- const parsedOutput = {
884
- ...output,
885
- body: await parseErrorBody(output.body, context),
886
- };
887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
- switch (errorCode) {
889
- case "AccessDeniedException":
890
- case "com.amazonaws.tnb#AccessDeniedException":
891
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
892
- case "InternalServerException":
893
- case "com.amazonaws.tnb#InternalServerException":
894
- throw await de_InternalServerExceptionRes(parsedOutput, context);
895
- case "ResourceNotFoundException":
896
- case "com.amazonaws.tnb#ResourceNotFoundException":
897
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
898
- case "ThrottlingException":
899
- case "com.amazonaws.tnb#ThrottlingException":
900
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
901
- case "ValidationException":
902
- case "com.amazonaws.tnb#ValidationException":
903
- throw await de_ValidationExceptionRes(parsedOutput, context);
904
- default:
905
- const parsedBody = parsedOutput.body;
906
- return throwDefaultError({
907
- output,
908
- parsedBody,
909
- errorCode,
910
- });
911
- }
912
- };
913
569
  export const de_GetSolNetworkInstanceCommand = async (output, context) => {
914
570
  if (output.statusCode !== 200 && output.statusCode >= 300) {
915
- return de_GetSolNetworkInstanceCommandError(output, context);
571
+ return de_CommandError(output, context);
916
572
  }
917
573
  const contents = map({
918
574
  $metadata: deserializeMetadata(output),
@@ -933,40 +589,9 @@ export const de_GetSolNetworkInstanceCommand = async (output, context) => {
933
589
  Object.assign(contents, doc);
934
590
  return contents;
935
591
  };
936
- const de_GetSolNetworkInstanceCommandError = async (output, context) => {
937
- const parsedOutput = {
938
- ...output,
939
- body: await parseErrorBody(output.body, context),
940
- };
941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
942
- switch (errorCode) {
943
- case "AccessDeniedException":
944
- case "com.amazonaws.tnb#AccessDeniedException":
945
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
946
- case "InternalServerException":
947
- case "com.amazonaws.tnb#InternalServerException":
948
- throw await de_InternalServerExceptionRes(parsedOutput, context);
949
- case "ResourceNotFoundException":
950
- case "com.amazonaws.tnb#ResourceNotFoundException":
951
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
952
- case "ThrottlingException":
953
- case "com.amazonaws.tnb#ThrottlingException":
954
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
955
- case "ValidationException":
956
- case "com.amazonaws.tnb#ValidationException":
957
- throw await de_ValidationExceptionRes(parsedOutput, context);
958
- default:
959
- const parsedBody = parsedOutput.body;
960
- return throwDefaultError({
961
- output,
962
- parsedBody,
963
- errorCode,
964
- });
965
- }
966
- };
967
592
  export const de_GetSolNetworkOperationCommand = async (output, context) => {
968
593
  if (output.statusCode !== 200 && output.statusCode >= 300) {
969
- return de_GetSolNetworkOperationCommandError(output, context);
594
+ return de_CommandError(output, context);
970
595
  }
971
596
  const contents = map({
972
597
  $metadata: deserializeMetadata(output),
@@ -986,40 +611,9 @@ export const de_GetSolNetworkOperationCommand = async (output, context) => {
986
611
  Object.assign(contents, doc);
987
612
  return contents;
988
613
  };
989
- const de_GetSolNetworkOperationCommandError = async (output, context) => {
990
- const parsedOutput = {
991
- ...output,
992
- body: await parseErrorBody(output.body, context),
993
- };
994
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
995
- switch (errorCode) {
996
- case "AccessDeniedException":
997
- case "com.amazonaws.tnb#AccessDeniedException":
998
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
999
- case "InternalServerException":
1000
- case "com.amazonaws.tnb#InternalServerException":
1001
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1002
- case "ResourceNotFoundException":
1003
- case "com.amazonaws.tnb#ResourceNotFoundException":
1004
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1005
- case "ThrottlingException":
1006
- case "com.amazonaws.tnb#ThrottlingException":
1007
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1008
- case "ValidationException":
1009
- case "com.amazonaws.tnb#ValidationException":
1010
- throw await de_ValidationExceptionRes(parsedOutput, context);
1011
- default:
1012
- const parsedBody = parsedOutput.body;
1013
- return throwDefaultError({
1014
- output,
1015
- parsedBody,
1016
- errorCode,
1017
- });
1018
- }
1019
- };
1020
614
  export const de_GetSolNetworkPackageCommand = async (output, context) => {
1021
615
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1022
- return de_GetSolNetworkPackageCommandError(output, context);
616
+ return de_CommandError(output, context);
1023
617
  }
1024
618
  const contents = map({
1025
619
  $metadata: deserializeMetadata(output),
@@ -1041,40 +635,9 @@ export const de_GetSolNetworkPackageCommand = async (output, context) => {
1041
635
  Object.assign(contents, doc);
1042
636
  return contents;
1043
637
  };
1044
- const de_GetSolNetworkPackageCommandError = async (output, context) => {
1045
- const parsedOutput = {
1046
- ...output,
1047
- body: await parseErrorBody(output.body, context),
1048
- };
1049
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1050
- switch (errorCode) {
1051
- case "AccessDeniedException":
1052
- case "com.amazonaws.tnb#AccessDeniedException":
1053
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1054
- case "InternalServerException":
1055
- case "com.amazonaws.tnb#InternalServerException":
1056
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1057
- case "ResourceNotFoundException":
1058
- case "com.amazonaws.tnb#ResourceNotFoundException":
1059
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1060
- case "ThrottlingException":
1061
- case "com.amazonaws.tnb#ThrottlingException":
1062
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1063
- case "ValidationException":
1064
- case "com.amazonaws.tnb#ValidationException":
1065
- throw await de_ValidationExceptionRes(parsedOutput, context);
1066
- default:
1067
- const parsedBody = parsedOutput.body;
1068
- return throwDefaultError({
1069
- output,
1070
- parsedBody,
1071
- errorCode,
1072
- });
1073
- }
1074
- };
1075
638
  export const de_GetSolNetworkPackageContentCommand = async (output, context) => {
1076
639
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
- return de_GetSolNetworkPackageContentCommandError(output, context);
640
+ return de_CommandError(output, context);
1078
641
  }
1079
642
  const contents = map({
1080
643
  $metadata: deserializeMetadata(output),
@@ -1084,40 +647,9 @@ export const de_GetSolNetworkPackageContentCommand = async (output, context) =>
1084
647
  contents.nsdContent = data;
1085
648
  return contents;
1086
649
  };
1087
- const de_GetSolNetworkPackageContentCommandError = async (output, context) => {
1088
- const parsedOutput = {
1089
- ...output,
1090
- body: await parseErrorBody(output.body, context),
1091
- };
1092
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1093
- switch (errorCode) {
1094
- case "AccessDeniedException":
1095
- case "com.amazonaws.tnb#AccessDeniedException":
1096
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1097
- case "InternalServerException":
1098
- case "com.amazonaws.tnb#InternalServerException":
1099
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1100
- case "ResourceNotFoundException":
1101
- case "com.amazonaws.tnb#ResourceNotFoundException":
1102
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1103
- case "ThrottlingException":
1104
- case "com.amazonaws.tnb#ThrottlingException":
1105
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1106
- case "ValidationException":
1107
- case "com.amazonaws.tnb#ValidationException":
1108
- throw await de_ValidationExceptionRes(parsedOutput, context);
1109
- default:
1110
- const parsedBody = parsedOutput.body;
1111
- return throwDefaultError({
1112
- output,
1113
- parsedBody,
1114
- errorCode,
1115
- });
1116
- }
1117
- };
1118
650
  export const de_GetSolNetworkPackageDescriptorCommand = async (output, context) => {
1119
651
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1120
- return de_GetSolNetworkPackageDescriptorCommandError(output, context);
652
+ return de_CommandError(output, context);
1121
653
  }
1122
654
  const contents = map({
1123
655
  $metadata: deserializeMetadata(output),
@@ -1127,40 +659,9 @@ export const de_GetSolNetworkPackageDescriptorCommand = async (output, context)
1127
659
  contents.nsd = data;
1128
660
  return contents;
1129
661
  };
1130
- const de_GetSolNetworkPackageDescriptorCommandError = async (output, context) => {
1131
- const parsedOutput = {
1132
- ...output,
1133
- body: await parseErrorBody(output.body, context),
1134
- };
1135
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1136
- switch (errorCode) {
1137
- case "AccessDeniedException":
1138
- case "com.amazonaws.tnb#AccessDeniedException":
1139
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1140
- case "InternalServerException":
1141
- case "com.amazonaws.tnb#InternalServerException":
1142
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1143
- case "ResourceNotFoundException":
1144
- case "com.amazonaws.tnb#ResourceNotFoundException":
1145
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1146
- case "ThrottlingException":
1147
- case "com.amazonaws.tnb#ThrottlingException":
1148
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1149
- case "ValidationException":
1150
- case "com.amazonaws.tnb#ValidationException":
1151
- throw await de_ValidationExceptionRes(parsedOutput, context);
1152
- default:
1153
- const parsedBody = parsedOutput.body;
1154
- return throwDefaultError({
1155
- output,
1156
- parsedBody,
1157
- errorCode,
1158
- });
1159
- }
1160
- };
1161
662
  export const de_InstantiateSolNetworkInstanceCommand = async (output, context) => {
1162
663
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1163
- return de_InstantiateSolNetworkInstanceCommandError(output, context);
664
+ return de_CommandError(output, context);
1164
665
  }
1165
666
  const contents = map({
1166
667
  $metadata: deserializeMetadata(output),
@@ -1173,43 +674,9 @@ export const de_InstantiateSolNetworkInstanceCommand = async (output, context) =
1173
674
  Object.assign(contents, doc);
1174
675
  return contents;
1175
676
  };
1176
- const de_InstantiateSolNetworkInstanceCommandError = async (output, context) => {
1177
- const parsedOutput = {
1178
- ...output,
1179
- body: await parseErrorBody(output.body, context),
1180
- };
1181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1182
- switch (errorCode) {
1183
- case "AccessDeniedException":
1184
- case "com.amazonaws.tnb#AccessDeniedException":
1185
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1186
- case "InternalServerException":
1187
- case "com.amazonaws.tnb#InternalServerException":
1188
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1189
- case "ResourceNotFoundException":
1190
- case "com.amazonaws.tnb#ResourceNotFoundException":
1191
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1192
- case "ServiceQuotaExceededException":
1193
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
1194
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1195
- case "ThrottlingException":
1196
- case "com.amazonaws.tnb#ThrottlingException":
1197
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1198
- case "ValidationException":
1199
- case "com.amazonaws.tnb#ValidationException":
1200
- throw await de_ValidationExceptionRes(parsedOutput, context);
1201
- default:
1202
- const parsedBody = parsedOutput.body;
1203
- return throwDefaultError({
1204
- output,
1205
- parsedBody,
1206
- errorCode,
1207
- });
1208
- }
1209
- };
1210
677
  export const de_ListSolFunctionInstancesCommand = async (output, context) => {
1211
678
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1212
- return de_ListSolFunctionInstancesCommandError(output, context);
679
+ return de_CommandError(output, context);
1213
680
  }
1214
681
  const contents = map({
1215
682
  $metadata: deserializeMetadata(output),
@@ -1222,37 +689,9 @@ export const de_ListSolFunctionInstancesCommand = async (output, context) => {
1222
689
  Object.assign(contents, doc);
1223
690
  return contents;
1224
691
  };
1225
- const de_ListSolFunctionInstancesCommandError = async (output, context) => {
1226
- const parsedOutput = {
1227
- ...output,
1228
- body: await parseErrorBody(output.body, context),
1229
- };
1230
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1231
- switch (errorCode) {
1232
- case "AccessDeniedException":
1233
- case "com.amazonaws.tnb#AccessDeniedException":
1234
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1235
- case "InternalServerException":
1236
- case "com.amazonaws.tnb#InternalServerException":
1237
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1238
- case "ThrottlingException":
1239
- case "com.amazonaws.tnb#ThrottlingException":
1240
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1241
- case "ValidationException":
1242
- case "com.amazonaws.tnb#ValidationException":
1243
- throw await de_ValidationExceptionRes(parsedOutput, context);
1244
- default:
1245
- const parsedBody = parsedOutput.body;
1246
- return throwDefaultError({
1247
- output,
1248
- parsedBody,
1249
- errorCode,
1250
- });
1251
- }
1252
- };
1253
692
  export const de_ListSolFunctionPackagesCommand = async (output, context) => {
1254
693
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1255
- return de_ListSolFunctionPackagesCommandError(output, context);
694
+ return de_CommandError(output, context);
1256
695
  }
1257
696
  const contents = map({
1258
697
  $metadata: deserializeMetadata(output),
@@ -1265,37 +704,9 @@ export const de_ListSolFunctionPackagesCommand = async (output, context) => {
1265
704
  Object.assign(contents, doc);
1266
705
  return contents;
1267
706
  };
1268
- const de_ListSolFunctionPackagesCommandError = async (output, context) => {
1269
- const parsedOutput = {
1270
- ...output,
1271
- body: await parseErrorBody(output.body, context),
1272
- };
1273
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1274
- switch (errorCode) {
1275
- case "AccessDeniedException":
1276
- case "com.amazonaws.tnb#AccessDeniedException":
1277
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1278
- case "InternalServerException":
1279
- case "com.amazonaws.tnb#InternalServerException":
1280
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1281
- case "ThrottlingException":
1282
- case "com.amazonaws.tnb#ThrottlingException":
1283
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1284
- case "ValidationException":
1285
- case "com.amazonaws.tnb#ValidationException":
1286
- throw await de_ValidationExceptionRes(parsedOutput, context);
1287
- default:
1288
- const parsedBody = parsedOutput.body;
1289
- return throwDefaultError({
1290
- output,
1291
- parsedBody,
1292
- errorCode,
1293
- });
1294
- }
1295
- };
1296
707
  export const de_ListSolNetworkInstancesCommand = async (output, context) => {
1297
708
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1298
- return de_ListSolNetworkInstancesCommandError(output, context);
709
+ return de_CommandError(output, context);
1299
710
  }
1300
711
  const contents = map({
1301
712
  $metadata: deserializeMetadata(output),
@@ -1308,37 +719,9 @@ export const de_ListSolNetworkInstancesCommand = async (output, context) => {
1308
719
  Object.assign(contents, doc);
1309
720
  return contents;
1310
721
  };
1311
- const de_ListSolNetworkInstancesCommandError = async (output, context) => {
1312
- const parsedOutput = {
1313
- ...output,
1314
- body: await parseErrorBody(output.body, context),
1315
- };
1316
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1317
- switch (errorCode) {
1318
- case "AccessDeniedException":
1319
- case "com.amazonaws.tnb#AccessDeniedException":
1320
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1321
- case "InternalServerException":
1322
- case "com.amazonaws.tnb#InternalServerException":
1323
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1324
- case "ThrottlingException":
1325
- case "com.amazonaws.tnb#ThrottlingException":
1326
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1327
- case "ValidationException":
1328
- case "com.amazonaws.tnb#ValidationException":
1329
- throw await de_ValidationExceptionRes(parsedOutput, context);
1330
- default:
1331
- const parsedBody = parsedOutput.body;
1332
- return throwDefaultError({
1333
- output,
1334
- parsedBody,
1335
- errorCode,
1336
- });
1337
- }
1338
- };
1339
722
  export const de_ListSolNetworkOperationsCommand = async (output, context) => {
1340
723
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1341
- return de_ListSolNetworkOperationsCommandError(output, context);
724
+ return de_CommandError(output, context);
1342
725
  }
1343
726
  const contents = map({
1344
727
  $metadata: deserializeMetadata(output),
@@ -1351,37 +734,9 @@ export const de_ListSolNetworkOperationsCommand = async (output, context) => {
1351
734
  Object.assign(contents, doc);
1352
735
  return contents;
1353
736
  };
1354
- const de_ListSolNetworkOperationsCommandError = async (output, context) => {
1355
- const parsedOutput = {
1356
- ...output,
1357
- body: await parseErrorBody(output.body, context),
1358
- };
1359
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1360
- switch (errorCode) {
1361
- case "AccessDeniedException":
1362
- case "com.amazonaws.tnb#AccessDeniedException":
1363
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1364
- case "InternalServerException":
1365
- case "com.amazonaws.tnb#InternalServerException":
1366
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1367
- case "ThrottlingException":
1368
- case "com.amazonaws.tnb#ThrottlingException":
1369
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1370
- case "ValidationException":
1371
- case "com.amazonaws.tnb#ValidationException":
1372
- throw await de_ValidationExceptionRes(parsedOutput, context);
1373
- default:
1374
- const parsedBody = parsedOutput.body;
1375
- return throwDefaultError({
1376
- output,
1377
- parsedBody,
1378
- errorCode,
1379
- });
1380
- }
1381
- };
1382
737
  export const de_ListSolNetworkPackagesCommand = async (output, context) => {
1383
738
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1384
- return de_ListSolNetworkPackagesCommandError(output, context);
739
+ return de_CommandError(output, context);
1385
740
  }
1386
741
  const contents = map({
1387
742
  $metadata: deserializeMetadata(output),
@@ -1394,37 +749,9 @@ export const de_ListSolNetworkPackagesCommand = async (output, context) => {
1394
749
  Object.assign(contents, doc);
1395
750
  return contents;
1396
751
  };
1397
- const de_ListSolNetworkPackagesCommandError = async (output, context) => {
1398
- const parsedOutput = {
1399
- ...output,
1400
- body: await parseErrorBody(output.body, context),
1401
- };
1402
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1403
- switch (errorCode) {
1404
- case "AccessDeniedException":
1405
- case "com.amazonaws.tnb#AccessDeniedException":
1406
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1407
- case "InternalServerException":
1408
- case "com.amazonaws.tnb#InternalServerException":
1409
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1410
- case "ThrottlingException":
1411
- case "com.amazonaws.tnb#ThrottlingException":
1412
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1413
- case "ValidationException":
1414
- case "com.amazonaws.tnb#ValidationException":
1415
- throw await de_ValidationExceptionRes(parsedOutput, context);
1416
- default:
1417
- const parsedBody = parsedOutput.body;
1418
- return throwDefaultError({
1419
- output,
1420
- parsedBody,
1421
- errorCode,
1422
- });
1423
- }
1424
- };
1425
752
  export const de_ListTagsForResourceCommand = async (output, context) => {
1426
753
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1427
- return de_ListTagsForResourceCommandError(output, context);
754
+ return de_CommandError(output, context);
1428
755
  }
1429
756
  const contents = map({
1430
757
  $metadata: deserializeMetadata(output),
@@ -1436,40 +763,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1436
763
  Object.assign(contents, doc);
1437
764
  return contents;
1438
765
  };
1439
- const de_ListTagsForResourceCommandError = async (output, context) => {
1440
- const parsedOutput = {
1441
- ...output,
1442
- body: await parseErrorBody(output.body, context),
1443
- };
1444
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1445
- switch (errorCode) {
1446
- case "AccessDeniedException":
1447
- case "com.amazonaws.tnb#AccessDeniedException":
1448
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1449
- case "InternalServerException":
1450
- case "com.amazonaws.tnb#InternalServerException":
1451
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1452
- case "ResourceNotFoundException":
1453
- case "com.amazonaws.tnb#ResourceNotFoundException":
1454
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1455
- case "ThrottlingException":
1456
- case "com.amazonaws.tnb#ThrottlingException":
1457
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1458
- case "ValidationException":
1459
- case "com.amazonaws.tnb#ValidationException":
1460
- throw await de_ValidationExceptionRes(parsedOutput, context);
1461
- default:
1462
- const parsedBody = parsedOutput.body;
1463
- return throwDefaultError({
1464
- output,
1465
- parsedBody,
1466
- errorCode,
1467
- });
1468
- }
1469
- };
1470
766
  export const de_PutSolFunctionPackageContentCommand = async (output, context) => {
1471
767
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1472
- return de_PutSolFunctionPackageContentCommandError(output, context);
768
+ return de_CommandError(output, context);
1473
769
  }
1474
770
  const contents = map({
1475
771
  $metadata: deserializeMetadata(output),
@@ -1478,48 +774,17 @@ export const de_PutSolFunctionPackageContentCommand = async (output, context) =>
1478
774
  const doc = take(data, {
1479
775
  id: __expectString,
1480
776
  metadata: _json,
1481
- vnfProductName: __expectString,
1482
- vnfProvider: __expectString,
1483
- vnfdId: __expectString,
1484
- vnfdVersion: __expectString,
1485
- });
1486
- Object.assign(contents, doc);
1487
- return contents;
1488
- };
1489
- const de_PutSolFunctionPackageContentCommandError = async (output, context) => {
1490
- const parsedOutput = {
1491
- ...output,
1492
- body: await parseErrorBody(output.body, context),
1493
- };
1494
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1495
- switch (errorCode) {
1496
- case "AccessDeniedException":
1497
- case "com.amazonaws.tnb#AccessDeniedException":
1498
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1499
- case "InternalServerException":
1500
- case "com.amazonaws.tnb#InternalServerException":
1501
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1502
- case "ResourceNotFoundException":
1503
- case "com.amazonaws.tnb#ResourceNotFoundException":
1504
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1505
- case "ThrottlingException":
1506
- case "com.amazonaws.tnb#ThrottlingException":
1507
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1508
- case "ValidationException":
1509
- case "com.amazonaws.tnb#ValidationException":
1510
- throw await de_ValidationExceptionRes(parsedOutput, context);
1511
- default:
1512
- const parsedBody = parsedOutput.body;
1513
- return throwDefaultError({
1514
- output,
1515
- parsedBody,
1516
- errorCode,
1517
- });
1518
- }
777
+ vnfProductName: __expectString,
778
+ vnfProvider: __expectString,
779
+ vnfdId: __expectString,
780
+ vnfdVersion: __expectString,
781
+ });
782
+ Object.assign(contents, doc);
783
+ return contents;
1519
784
  };
1520
785
  export const de_PutSolNetworkPackageContentCommand = async (output, context) => {
1521
786
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1522
- return de_PutSolNetworkPackageContentCommandError(output, context);
787
+ return de_CommandError(output, context);
1523
788
  }
1524
789
  const contents = map({
1525
790
  $metadata: deserializeMetadata(output),
@@ -1537,40 +802,9 @@ export const de_PutSolNetworkPackageContentCommand = async (output, context) =>
1537
802
  Object.assign(contents, doc);
1538
803
  return contents;
1539
804
  };
1540
- const de_PutSolNetworkPackageContentCommandError = async (output, context) => {
1541
- const parsedOutput = {
1542
- ...output,
1543
- body: await parseErrorBody(output.body, context),
1544
- };
1545
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1546
- switch (errorCode) {
1547
- case "AccessDeniedException":
1548
- case "com.amazonaws.tnb#AccessDeniedException":
1549
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1550
- case "InternalServerException":
1551
- case "com.amazonaws.tnb#InternalServerException":
1552
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1553
- case "ResourceNotFoundException":
1554
- case "com.amazonaws.tnb#ResourceNotFoundException":
1555
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1556
- case "ThrottlingException":
1557
- case "com.amazonaws.tnb#ThrottlingException":
1558
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1559
- case "ValidationException":
1560
- case "com.amazonaws.tnb#ValidationException":
1561
- throw await de_ValidationExceptionRes(parsedOutput, context);
1562
- default:
1563
- const parsedBody = parsedOutput.body;
1564
- return throwDefaultError({
1565
- output,
1566
- parsedBody,
1567
- errorCode,
1568
- });
1569
- }
1570
- };
1571
805
  export const de_TagResourceCommand = async (output, context) => {
1572
806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1573
- return de_TagResourceCommandError(output, context);
807
+ return de_CommandError(output, context);
1574
808
  }
1575
809
  const contents = map({
1576
810
  $metadata: deserializeMetadata(output),
@@ -1578,40 +812,9 @@ export const de_TagResourceCommand = async (output, context) => {
1578
812
  await collectBody(output.body, context);
1579
813
  return contents;
1580
814
  };
1581
- const de_TagResourceCommandError = async (output, context) => {
1582
- const parsedOutput = {
1583
- ...output,
1584
- body: await parseErrorBody(output.body, context),
1585
- };
1586
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1587
- switch (errorCode) {
1588
- case "AccessDeniedException":
1589
- case "com.amazonaws.tnb#AccessDeniedException":
1590
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1591
- case "InternalServerException":
1592
- case "com.amazonaws.tnb#InternalServerException":
1593
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1594
- case "ResourceNotFoundException":
1595
- case "com.amazonaws.tnb#ResourceNotFoundException":
1596
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1597
- case "ThrottlingException":
1598
- case "com.amazonaws.tnb#ThrottlingException":
1599
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1600
- case "ValidationException":
1601
- case "com.amazonaws.tnb#ValidationException":
1602
- throw await de_ValidationExceptionRes(parsedOutput, context);
1603
- default:
1604
- const parsedBody = parsedOutput.body;
1605
- return throwDefaultError({
1606
- output,
1607
- parsedBody,
1608
- errorCode,
1609
- });
1610
- }
1611
- };
1612
815
  export const de_TerminateSolNetworkInstanceCommand = async (output, context) => {
1613
816
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1614
- return de_TerminateSolNetworkInstanceCommandError(output, context);
817
+ return de_CommandError(output, context);
1615
818
  }
1616
819
  const contents = map({
1617
820
  $metadata: deserializeMetadata(output),
@@ -1624,43 +827,9 @@ export const de_TerminateSolNetworkInstanceCommand = async (output, context) =>
1624
827
  Object.assign(contents, doc);
1625
828
  return contents;
1626
829
  };
1627
- const de_TerminateSolNetworkInstanceCommandError = async (output, context) => {
1628
- const parsedOutput = {
1629
- ...output,
1630
- body: await parseErrorBody(output.body, context),
1631
- };
1632
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1633
- switch (errorCode) {
1634
- case "AccessDeniedException":
1635
- case "com.amazonaws.tnb#AccessDeniedException":
1636
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1637
- case "InternalServerException":
1638
- case "com.amazonaws.tnb#InternalServerException":
1639
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1640
- case "ResourceNotFoundException":
1641
- case "com.amazonaws.tnb#ResourceNotFoundException":
1642
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1643
- case "ServiceQuotaExceededException":
1644
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
1645
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1646
- case "ThrottlingException":
1647
- case "com.amazonaws.tnb#ThrottlingException":
1648
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1649
- case "ValidationException":
1650
- case "com.amazonaws.tnb#ValidationException":
1651
- throw await de_ValidationExceptionRes(parsedOutput, context);
1652
- default:
1653
- const parsedBody = parsedOutput.body;
1654
- return throwDefaultError({
1655
- output,
1656
- parsedBody,
1657
- errorCode,
1658
- });
1659
- }
1660
- };
1661
830
  export const de_UntagResourceCommand = async (output, context) => {
1662
831
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1663
- return de_UntagResourceCommandError(output, context);
832
+ return de_CommandError(output, context);
1664
833
  }
1665
834
  const contents = map({
1666
835
  $metadata: deserializeMetadata(output),
@@ -1668,40 +837,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1668
837
  await collectBody(output.body, context);
1669
838
  return contents;
1670
839
  };
1671
- const de_UntagResourceCommandError = async (output, context) => {
1672
- const parsedOutput = {
1673
- ...output,
1674
- body: await parseErrorBody(output.body, context),
1675
- };
1676
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1677
- switch (errorCode) {
1678
- case "AccessDeniedException":
1679
- case "com.amazonaws.tnb#AccessDeniedException":
1680
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1681
- case "InternalServerException":
1682
- case "com.amazonaws.tnb#InternalServerException":
1683
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1684
- case "ResourceNotFoundException":
1685
- case "com.amazonaws.tnb#ResourceNotFoundException":
1686
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1687
- case "ThrottlingException":
1688
- case "com.amazonaws.tnb#ThrottlingException":
1689
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1690
- case "ValidationException":
1691
- case "com.amazonaws.tnb#ValidationException":
1692
- throw await de_ValidationExceptionRes(parsedOutput, context);
1693
- default:
1694
- const parsedBody = parsedOutput.body;
1695
- return throwDefaultError({
1696
- output,
1697
- parsedBody,
1698
- errorCode,
1699
- });
1700
- }
1701
- };
1702
840
  export const de_UpdateSolFunctionPackageCommand = async (output, context) => {
1703
841
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1704
- return de_UpdateSolFunctionPackageCommandError(output, context);
842
+ return de_CommandError(output, context);
1705
843
  }
1706
844
  const contents = map({
1707
845
  $metadata: deserializeMetadata(output),
@@ -1713,40 +851,9 @@ export const de_UpdateSolFunctionPackageCommand = async (output, context) => {
1713
851
  Object.assign(contents, doc);
1714
852
  return contents;
1715
853
  };
1716
- const de_UpdateSolFunctionPackageCommandError = async (output, context) => {
1717
- const parsedOutput = {
1718
- ...output,
1719
- body: await parseErrorBody(output.body, context),
1720
- };
1721
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1722
- switch (errorCode) {
1723
- case "AccessDeniedException":
1724
- case "com.amazonaws.tnb#AccessDeniedException":
1725
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1726
- case "InternalServerException":
1727
- case "com.amazonaws.tnb#InternalServerException":
1728
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1729
- case "ResourceNotFoundException":
1730
- case "com.amazonaws.tnb#ResourceNotFoundException":
1731
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1732
- case "ThrottlingException":
1733
- case "com.amazonaws.tnb#ThrottlingException":
1734
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1735
- case "ValidationException":
1736
- case "com.amazonaws.tnb#ValidationException":
1737
- throw await de_ValidationExceptionRes(parsedOutput, context);
1738
- default:
1739
- const parsedBody = parsedOutput.body;
1740
- return throwDefaultError({
1741
- output,
1742
- parsedBody,
1743
- errorCode,
1744
- });
1745
- }
1746
- };
1747
854
  export const de_UpdateSolNetworkInstanceCommand = async (output, context) => {
1748
855
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1749
- return de_UpdateSolNetworkInstanceCommandError(output, context);
856
+ return de_CommandError(output, context);
1750
857
  }
1751
858
  const contents = map({
1752
859
  $metadata: deserializeMetadata(output),
@@ -1759,43 +866,9 @@ export const de_UpdateSolNetworkInstanceCommand = async (output, context) => {
1759
866
  Object.assign(contents, doc);
1760
867
  return contents;
1761
868
  };
1762
- const de_UpdateSolNetworkInstanceCommandError = async (output, context) => {
1763
- const parsedOutput = {
1764
- ...output,
1765
- body: await parseErrorBody(output.body, context),
1766
- };
1767
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1768
- switch (errorCode) {
1769
- case "AccessDeniedException":
1770
- case "com.amazonaws.tnb#AccessDeniedException":
1771
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1772
- case "InternalServerException":
1773
- case "com.amazonaws.tnb#InternalServerException":
1774
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1775
- case "ResourceNotFoundException":
1776
- case "com.amazonaws.tnb#ResourceNotFoundException":
1777
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1778
- case "ServiceQuotaExceededException":
1779
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
1780
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1781
- case "ThrottlingException":
1782
- case "com.amazonaws.tnb#ThrottlingException":
1783
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1784
- case "ValidationException":
1785
- case "com.amazonaws.tnb#ValidationException":
1786
- throw await de_ValidationExceptionRes(parsedOutput, context);
1787
- default:
1788
- const parsedBody = parsedOutput.body;
1789
- return throwDefaultError({
1790
- output,
1791
- parsedBody,
1792
- errorCode,
1793
- });
1794
- }
1795
- };
1796
869
  export const de_UpdateSolNetworkPackageCommand = async (output, context) => {
1797
870
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1798
- return de_UpdateSolNetworkPackageCommandError(output, context);
871
+ return de_CommandError(output, context);
1799
872
  }
1800
873
  const contents = map({
1801
874
  $metadata: deserializeMetadata(output),
@@ -1807,40 +880,9 @@ export const de_UpdateSolNetworkPackageCommand = async (output, context) => {
1807
880
  Object.assign(contents, doc);
1808
881
  return contents;
1809
882
  };
1810
- const de_UpdateSolNetworkPackageCommandError = async (output, context) => {
1811
- const parsedOutput = {
1812
- ...output,
1813
- body: await parseErrorBody(output.body, context),
1814
- };
1815
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1816
- switch (errorCode) {
1817
- case "AccessDeniedException":
1818
- case "com.amazonaws.tnb#AccessDeniedException":
1819
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1820
- case "InternalServerException":
1821
- case "com.amazonaws.tnb#InternalServerException":
1822
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1823
- case "ResourceNotFoundException":
1824
- case "com.amazonaws.tnb#ResourceNotFoundException":
1825
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1826
- case "ThrottlingException":
1827
- case "com.amazonaws.tnb#ThrottlingException":
1828
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1829
- case "ValidationException":
1830
- case "com.amazonaws.tnb#ValidationException":
1831
- throw await de_ValidationExceptionRes(parsedOutput, context);
1832
- default:
1833
- const parsedBody = parsedOutput.body;
1834
- return throwDefaultError({
1835
- output,
1836
- parsedBody,
1837
- errorCode,
1838
- });
1839
- }
1840
- };
1841
883
  export const de_ValidateSolFunctionPackageContentCommand = async (output, context) => {
1842
884
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1843
- return de_ValidateSolFunctionPackageContentCommandError(output, context);
885
+ return de_CommandError(output, context);
1844
886
  }
1845
887
  const contents = map({
1846
888
  $metadata: deserializeMetadata(output),
@@ -1857,40 +899,9 @@ export const de_ValidateSolFunctionPackageContentCommand = async (output, contex
1857
899
  Object.assign(contents, doc);
1858
900
  return contents;
1859
901
  };
1860
- const de_ValidateSolFunctionPackageContentCommandError = async (output, context) => {
1861
- const parsedOutput = {
1862
- ...output,
1863
- body: await parseErrorBody(output.body, context),
1864
- };
1865
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1866
- switch (errorCode) {
1867
- case "AccessDeniedException":
1868
- case "com.amazonaws.tnb#AccessDeniedException":
1869
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1870
- case "InternalServerException":
1871
- case "com.amazonaws.tnb#InternalServerException":
1872
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1873
- case "ResourceNotFoundException":
1874
- case "com.amazonaws.tnb#ResourceNotFoundException":
1875
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1876
- case "ThrottlingException":
1877
- case "com.amazonaws.tnb#ThrottlingException":
1878
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1879
- case "ValidationException":
1880
- case "com.amazonaws.tnb#ValidationException":
1881
- throw await de_ValidationExceptionRes(parsedOutput, context);
1882
- default:
1883
- const parsedBody = parsedOutput.body;
1884
- return throwDefaultError({
1885
- output,
1886
- parsedBody,
1887
- errorCode,
1888
- });
1889
- }
1890
- };
1891
902
  export const de_ValidateSolNetworkPackageContentCommand = async (output, context) => {
1892
903
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1893
- return de_ValidateSolNetworkPackageContentCommandError(output, context);
904
+ return de_CommandError(output, context);
1894
905
  }
1895
906
  const contents = map({
1896
907
  $metadata: deserializeMetadata(output),
@@ -1908,7 +919,7 @@ export const de_ValidateSolNetworkPackageContentCommand = async (output, context
1908
919
  Object.assign(contents, doc);
1909
920
  return contents;
1910
921
  };
1911
- const de_ValidateSolNetworkPackageContentCommandError = async (output, context) => {
922
+ const de_CommandError = async (output, context) => {
1912
923
  const parsedOutput = {
1913
924
  ...output,
1914
925
  body: await parseErrorBody(output.body, context),
@@ -1930,6 +941,9 @@ const de_ValidateSolNetworkPackageContentCommandError = async (output, context)
1930
941
  case "ValidationException":
1931
942
  case "com.amazonaws.tnb#ValidationException":
1932
943
  throw await de_ValidationExceptionRes(parsedOutput, context);
944
+ case "ServiceQuotaExceededException":
945
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
946
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1933
947
  default:
1934
948
  const parsedBody = parsedOutput.body;
1935
949
  return throwDefaultError({