@aws-sdk/client-codeguruprofiler 3.503.1 → 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.
@@ -341,7 +341,7 @@ export const se_UpdateProfilingGroupCommand = async (input, context) => {
341
341
  };
342
342
  export const de_AddNotificationChannelsCommand = async (output, context) => {
343
343
  if (output.statusCode !== 200 && output.statusCode >= 300) {
344
- return de_AddNotificationChannelsCommandError(output, context);
344
+ return de_CommandError(output, context);
345
345
  }
346
346
  const contents = map({
347
347
  $metadata: deserializeMetadata(output),
@@ -353,43 +353,9 @@ export const de_AddNotificationChannelsCommand = async (output, context) => {
353
353
  Object.assign(contents, doc);
354
354
  return contents;
355
355
  };
356
- const de_AddNotificationChannelsCommandError = async (output, context) => {
357
- const parsedOutput = {
358
- ...output,
359
- body: await parseErrorBody(output.body, context),
360
- };
361
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
362
- switch (errorCode) {
363
- case "ConflictException":
364
- case "com.amazonaws.codeguruprofiler#ConflictException":
365
- throw await de_ConflictExceptionRes(parsedOutput, context);
366
- case "InternalServerException":
367
- case "com.amazonaws.codeguruprofiler#InternalServerException":
368
- throw await de_InternalServerExceptionRes(parsedOutput, context);
369
- case "ResourceNotFoundException":
370
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
371
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
372
- case "ServiceQuotaExceededException":
373
- case "com.amazonaws.codeguruprofiler#ServiceQuotaExceededException":
374
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
375
- case "ThrottlingException":
376
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
377
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
378
- case "ValidationException":
379
- case "com.amazonaws.codeguruprofiler#ValidationException":
380
- throw await de_ValidationExceptionRes(parsedOutput, context);
381
- default:
382
- const parsedBody = parsedOutput.body;
383
- return throwDefaultError({
384
- output,
385
- parsedBody,
386
- errorCode,
387
- });
388
- }
389
- };
390
356
  export const de_BatchGetFrameMetricDataCommand = async (output, context) => {
391
357
  if (output.statusCode !== 200 && output.statusCode >= 300) {
392
- return de_BatchGetFrameMetricDataCommandError(output, context);
358
+ return de_CommandError(output, context);
393
359
  }
394
360
  const contents = map({
395
361
  $metadata: deserializeMetadata(output),
@@ -406,37 +372,9 @@ export const de_BatchGetFrameMetricDataCommand = async (output, context) => {
406
372
  Object.assign(contents, doc);
407
373
  return contents;
408
374
  };
409
- const de_BatchGetFrameMetricDataCommandError = async (output, context) => {
410
- const parsedOutput = {
411
- ...output,
412
- body: await parseErrorBody(output.body, context),
413
- };
414
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
415
- switch (errorCode) {
416
- case "InternalServerException":
417
- case "com.amazonaws.codeguruprofiler#InternalServerException":
418
- throw await de_InternalServerExceptionRes(parsedOutput, context);
419
- case "ResourceNotFoundException":
420
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
421
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
422
- case "ThrottlingException":
423
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
424
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
425
- case "ValidationException":
426
- case "com.amazonaws.codeguruprofiler#ValidationException":
427
- throw await de_ValidationExceptionRes(parsedOutput, context);
428
- default:
429
- const parsedBody = parsedOutput.body;
430
- return throwDefaultError({
431
- output,
432
- parsedBody,
433
- errorCode,
434
- });
435
- }
436
- };
437
375
  export const de_ConfigureAgentCommand = async (output, context) => {
438
376
  if (output.statusCode !== 200 && output.statusCode >= 300) {
439
- return de_ConfigureAgentCommandError(output, context);
377
+ return de_CommandError(output, context);
440
378
  }
441
379
  const contents = map({
442
380
  $metadata: deserializeMetadata(output),
@@ -445,37 +383,9 @@ export const de_ConfigureAgentCommand = async (output, context) => {
445
383
  contents.configuration = _json(data);
446
384
  return contents;
447
385
  };
448
- const de_ConfigureAgentCommandError = async (output, context) => {
449
- const parsedOutput = {
450
- ...output,
451
- body: await parseErrorBody(output.body, context),
452
- };
453
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
454
- switch (errorCode) {
455
- case "InternalServerException":
456
- case "com.amazonaws.codeguruprofiler#InternalServerException":
457
- throw await de_InternalServerExceptionRes(parsedOutput, context);
458
- case "ResourceNotFoundException":
459
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
460
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
461
- case "ThrottlingException":
462
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
463
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
464
- case "ValidationException":
465
- case "com.amazonaws.codeguruprofiler#ValidationException":
466
- throw await de_ValidationExceptionRes(parsedOutput, context);
467
- default:
468
- const parsedBody = parsedOutput.body;
469
- return throwDefaultError({
470
- output,
471
- parsedBody,
472
- errorCode,
473
- });
474
- }
475
- };
476
386
  export const de_CreateProfilingGroupCommand = async (output, context) => {
477
387
  if (output.statusCode !== 201 && output.statusCode >= 300) {
478
- return de_CreateProfilingGroupCommandError(output, context);
388
+ return de_CommandError(output, context);
479
389
  }
480
390
  const contents = map({
481
391
  $metadata: deserializeMetadata(output),
@@ -484,40 +394,9 @@ export const de_CreateProfilingGroupCommand = async (output, context) => {
484
394
  contents.profilingGroup = de_ProfilingGroupDescription(data, context);
485
395
  return contents;
486
396
  };
487
- const de_CreateProfilingGroupCommandError = async (output, context) => {
488
- const parsedOutput = {
489
- ...output,
490
- body: await parseErrorBody(output.body, context),
491
- };
492
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
493
- switch (errorCode) {
494
- case "ConflictException":
495
- case "com.amazonaws.codeguruprofiler#ConflictException":
496
- throw await de_ConflictExceptionRes(parsedOutput, context);
497
- case "InternalServerException":
498
- case "com.amazonaws.codeguruprofiler#InternalServerException":
499
- throw await de_InternalServerExceptionRes(parsedOutput, context);
500
- case "ServiceQuotaExceededException":
501
- case "com.amazonaws.codeguruprofiler#ServiceQuotaExceededException":
502
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
503
- case "ThrottlingException":
504
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
505
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
506
- case "ValidationException":
507
- case "com.amazonaws.codeguruprofiler#ValidationException":
508
- throw await de_ValidationExceptionRes(parsedOutput, context);
509
- default:
510
- const parsedBody = parsedOutput.body;
511
- return throwDefaultError({
512
- output,
513
- parsedBody,
514
- errorCode,
515
- });
516
- }
517
- };
518
397
  export const de_DeleteProfilingGroupCommand = async (output, context) => {
519
398
  if (output.statusCode !== 204 && output.statusCode >= 300) {
520
- return de_DeleteProfilingGroupCommandError(output, context);
399
+ return de_CommandError(output, context);
521
400
  }
522
401
  const contents = map({
523
402
  $metadata: deserializeMetadata(output),
@@ -525,40 +404,9 @@ export const de_DeleteProfilingGroupCommand = async (output, context) => {
525
404
  await collectBody(output.body, context);
526
405
  return contents;
527
406
  };
528
- const de_DeleteProfilingGroupCommandError = async (output, context) => {
529
- const parsedOutput = {
530
- ...output,
531
- body: await parseErrorBody(output.body, context),
532
- };
533
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
534
- switch (errorCode) {
535
- case "ConflictException":
536
- case "com.amazonaws.codeguruprofiler#ConflictException":
537
- throw await de_ConflictExceptionRes(parsedOutput, context);
538
- case "InternalServerException":
539
- case "com.amazonaws.codeguruprofiler#InternalServerException":
540
- throw await de_InternalServerExceptionRes(parsedOutput, context);
541
- case "ResourceNotFoundException":
542
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
543
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
544
- case "ThrottlingException":
545
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
546
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
547
- case "ValidationException":
548
- case "com.amazonaws.codeguruprofiler#ValidationException":
549
- throw await de_ValidationExceptionRes(parsedOutput, context);
550
- default:
551
- const parsedBody = parsedOutput.body;
552
- return throwDefaultError({
553
- output,
554
- parsedBody,
555
- errorCode,
556
- });
557
- }
558
- };
559
407
  export const de_DescribeProfilingGroupCommand = async (output, context) => {
560
408
  if (output.statusCode !== 200 && output.statusCode >= 300) {
561
- return de_DescribeProfilingGroupCommandError(output, context);
409
+ return de_CommandError(output, context);
562
410
  }
563
411
  const contents = map({
564
412
  $metadata: deserializeMetadata(output),
@@ -567,37 +415,9 @@ export const de_DescribeProfilingGroupCommand = async (output, context) => {
567
415
  contents.profilingGroup = de_ProfilingGroupDescription(data, context);
568
416
  return contents;
569
417
  };
570
- const de_DescribeProfilingGroupCommandError = async (output, context) => {
571
- const parsedOutput = {
572
- ...output,
573
- body: await parseErrorBody(output.body, context),
574
- };
575
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
576
- switch (errorCode) {
577
- case "InternalServerException":
578
- case "com.amazonaws.codeguruprofiler#InternalServerException":
579
- throw await de_InternalServerExceptionRes(parsedOutput, context);
580
- case "ResourceNotFoundException":
581
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
582
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
583
- case "ThrottlingException":
584
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
585
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
586
- case "ValidationException":
587
- case "com.amazonaws.codeguruprofiler#ValidationException":
588
- throw await de_ValidationExceptionRes(parsedOutput, context);
589
- default:
590
- const parsedBody = parsedOutput.body;
591
- return throwDefaultError({
592
- output,
593
- parsedBody,
594
- errorCode,
595
- });
596
- }
597
- };
598
418
  export const de_GetFindingsReportAccountSummaryCommand = async (output, context) => {
599
419
  if (output.statusCode !== 200 && output.statusCode >= 300) {
600
- return de_GetFindingsReportAccountSummaryCommandError(output, context);
420
+ return de_CommandError(output, context);
601
421
  }
602
422
  const contents = map({
603
423
  $metadata: deserializeMetadata(output),
@@ -610,34 +430,9 @@ export const de_GetFindingsReportAccountSummaryCommand = async (output, context)
610
430
  Object.assign(contents, doc);
611
431
  return contents;
612
432
  };
613
- const de_GetFindingsReportAccountSummaryCommandError = async (output, context) => {
614
- const parsedOutput = {
615
- ...output,
616
- body: await parseErrorBody(output.body, context),
617
- };
618
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
619
- switch (errorCode) {
620
- case "InternalServerException":
621
- case "com.amazonaws.codeguruprofiler#InternalServerException":
622
- throw await de_InternalServerExceptionRes(parsedOutput, context);
623
- case "ThrottlingException":
624
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
625
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
626
- case "ValidationException":
627
- case "com.amazonaws.codeguruprofiler#ValidationException":
628
- throw await de_ValidationExceptionRes(parsedOutput, context);
629
- default:
630
- const parsedBody = parsedOutput.body;
631
- return throwDefaultError({
632
- output,
633
- parsedBody,
634
- errorCode,
635
- });
636
- }
637
- };
638
433
  export const de_GetNotificationConfigurationCommand = async (output, context) => {
639
434
  if (output.statusCode !== 200 && output.statusCode >= 300) {
640
- return de_GetNotificationConfigurationCommandError(output, context);
435
+ return de_CommandError(output, context);
641
436
  }
642
437
  const contents = map({
643
438
  $metadata: deserializeMetadata(output),
@@ -649,37 +444,9 @@ export const de_GetNotificationConfigurationCommand = async (output, context) =>
649
444
  Object.assign(contents, doc);
650
445
  return contents;
651
446
  };
652
- const de_GetNotificationConfigurationCommandError = async (output, context) => {
653
- const parsedOutput = {
654
- ...output,
655
- body: await parseErrorBody(output.body, context),
656
- };
657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
658
- switch (errorCode) {
659
- case "InternalServerException":
660
- case "com.amazonaws.codeguruprofiler#InternalServerException":
661
- throw await de_InternalServerExceptionRes(parsedOutput, context);
662
- case "ResourceNotFoundException":
663
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
664
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
665
- case "ThrottlingException":
666
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
667
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
668
- case "ValidationException":
669
- case "com.amazonaws.codeguruprofiler#ValidationException":
670
- throw await de_ValidationExceptionRes(parsedOutput, context);
671
- default:
672
- const parsedBody = parsedOutput.body;
673
- return throwDefaultError({
674
- output,
675
- parsedBody,
676
- errorCode,
677
- });
678
- }
679
- };
680
447
  export const de_GetPolicyCommand = async (output, context) => {
681
448
  if (output.statusCode !== 200 && output.statusCode >= 300) {
682
- return de_GetPolicyCommandError(output, context);
449
+ return de_CommandError(output, context);
683
450
  }
684
451
  const contents = map({
685
452
  $metadata: deserializeMetadata(output),
@@ -692,34 +459,9 @@ export const de_GetPolicyCommand = async (output, context) => {
692
459
  Object.assign(contents, doc);
693
460
  return contents;
694
461
  };
695
- const de_GetPolicyCommandError = async (output, context) => {
696
- const parsedOutput = {
697
- ...output,
698
- body: await parseErrorBody(output.body, context),
699
- };
700
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
701
- switch (errorCode) {
702
- case "InternalServerException":
703
- case "com.amazonaws.codeguruprofiler#InternalServerException":
704
- throw await de_InternalServerExceptionRes(parsedOutput, context);
705
- case "ResourceNotFoundException":
706
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
707
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
708
- case "ThrottlingException":
709
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
710
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
711
- default:
712
- const parsedBody = parsedOutput.body;
713
- return throwDefaultError({
714
- output,
715
- parsedBody,
716
- errorCode,
717
- });
718
- }
719
- };
720
462
  export const de_GetProfileCommand = async (output, context) => {
721
463
  if (output.statusCode !== 200 && output.statusCode >= 300) {
722
- return de_GetProfileCommandError(output, context);
464
+ return de_CommandError(output, context);
723
465
  }
724
466
  const contents = map({
725
467
  $metadata: deserializeMetadata(output),
@@ -730,37 +472,9 @@ export const de_GetProfileCommand = async (output, context) => {
730
472
  contents.profile = data;
731
473
  return contents;
732
474
  };
733
- const de_GetProfileCommandError = async (output, context) => {
734
- const parsedOutput = {
735
- ...output,
736
- body: await parseErrorBody(output.body, context),
737
- };
738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
739
- switch (errorCode) {
740
- case "InternalServerException":
741
- case "com.amazonaws.codeguruprofiler#InternalServerException":
742
- throw await de_InternalServerExceptionRes(parsedOutput, context);
743
- case "ResourceNotFoundException":
744
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
745
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
746
- case "ThrottlingException":
747
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
748
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
749
- case "ValidationException":
750
- case "com.amazonaws.codeguruprofiler#ValidationException":
751
- throw await de_ValidationExceptionRes(parsedOutput, context);
752
- default:
753
- const parsedBody = parsedOutput.body;
754
- return throwDefaultError({
755
- output,
756
- parsedBody,
757
- errorCode,
758
- });
759
- }
760
- };
761
475
  export const de_GetRecommendationsCommand = async (output, context) => {
762
476
  if (output.statusCode !== 200 && output.statusCode >= 300) {
763
- return de_GetRecommendationsCommandError(output, context);
477
+ return de_CommandError(output, context);
764
478
  }
765
479
  const contents = map({
766
480
  $metadata: deserializeMetadata(output),
@@ -776,123 +490,39 @@ export const de_GetRecommendationsCommand = async (output, context) => {
776
490
  Object.assign(contents, doc);
777
491
  return contents;
778
492
  };
779
- const de_GetRecommendationsCommandError = async (output, context) => {
780
- const parsedOutput = {
781
- ...output,
782
- body: await parseErrorBody(output.body, context),
783
- };
784
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
785
- switch (errorCode) {
786
- case "InternalServerException":
787
- case "com.amazonaws.codeguruprofiler#InternalServerException":
788
- throw await de_InternalServerExceptionRes(parsedOutput, context);
789
- case "ResourceNotFoundException":
790
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
791
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
792
- case "ThrottlingException":
793
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
794
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
795
- case "ValidationException":
796
- case "com.amazonaws.codeguruprofiler#ValidationException":
797
- throw await de_ValidationExceptionRes(parsedOutput, context);
798
- default:
799
- const parsedBody = parsedOutput.body;
800
- return throwDefaultError({
801
- output,
802
- parsedBody,
803
- errorCode,
804
- });
805
- }
806
- };
807
493
  export const de_ListFindingsReportsCommand = async (output, context) => {
808
494
  if (output.statusCode !== 200 && output.statusCode >= 300) {
809
- return de_ListFindingsReportsCommandError(output, context);
810
- }
811
- const contents = map({
812
- $metadata: deserializeMetadata(output),
813
- });
814
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
815
- const doc = take(data, {
816
- findingsReportSummaries: (_) => de_FindingsReportSummaries(_, context),
817
- nextToken: __expectString,
818
- });
819
- Object.assign(contents, doc);
820
- return contents;
821
- };
822
- const de_ListFindingsReportsCommandError = async (output, context) => {
823
- const parsedOutput = {
824
- ...output,
825
- body: await parseErrorBody(output.body, context),
826
- };
827
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
828
- switch (errorCode) {
829
- case "InternalServerException":
830
- case "com.amazonaws.codeguruprofiler#InternalServerException":
831
- throw await de_InternalServerExceptionRes(parsedOutput, context);
832
- case "ResourceNotFoundException":
833
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
834
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
835
- case "ThrottlingException":
836
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
837
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
838
- case "ValidationException":
839
- case "com.amazonaws.codeguruprofiler#ValidationException":
840
- throw await de_ValidationExceptionRes(parsedOutput, context);
841
- default:
842
- const parsedBody = parsedOutput.body;
843
- return throwDefaultError({
844
- output,
845
- parsedBody,
846
- errorCode,
847
- });
848
- }
849
- };
850
- export const de_ListProfileTimesCommand = async (output, context) => {
851
- if (output.statusCode !== 200 && output.statusCode >= 300) {
852
- return de_ListProfileTimesCommandError(output, context);
495
+ return de_CommandError(output, context);
853
496
  }
854
497
  const contents = map({
855
498
  $metadata: deserializeMetadata(output),
856
499
  });
857
500
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
858
- const doc = take(data, {
859
- nextToken: __expectString,
860
- profileTimes: (_) => de_ProfileTimes(_, context),
861
- });
862
- Object.assign(contents, doc);
863
- return contents;
864
- };
865
- const de_ListProfileTimesCommandError = async (output, context) => {
866
- const parsedOutput = {
867
- ...output,
868
- body: await parseErrorBody(output.body, context),
869
- };
870
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
871
- switch (errorCode) {
872
- case "InternalServerException":
873
- case "com.amazonaws.codeguruprofiler#InternalServerException":
874
- throw await de_InternalServerExceptionRes(parsedOutput, context);
875
- case "ResourceNotFoundException":
876
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
877
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
878
- case "ThrottlingException":
879
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
880
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
881
- case "ValidationException":
882
- case "com.amazonaws.codeguruprofiler#ValidationException":
883
- throw await de_ValidationExceptionRes(parsedOutput, context);
884
- default:
885
- const parsedBody = parsedOutput.body;
886
- return throwDefaultError({
887
- output,
888
- parsedBody,
889
- errorCode,
890
- });
501
+ const doc = take(data, {
502
+ findingsReportSummaries: (_) => de_FindingsReportSummaries(_, context),
503
+ nextToken: __expectString,
504
+ });
505
+ Object.assign(contents, doc);
506
+ return contents;
507
+ };
508
+ export const de_ListProfileTimesCommand = async (output, context) => {
509
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
510
+ return de_CommandError(output, context);
891
511
  }
512
+ const contents = map({
513
+ $metadata: deserializeMetadata(output),
514
+ });
515
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
516
+ const doc = take(data, {
517
+ nextToken: __expectString,
518
+ profileTimes: (_) => de_ProfileTimes(_, context),
519
+ });
520
+ Object.assign(contents, doc);
521
+ return contents;
892
522
  };
893
523
  export const de_ListProfilingGroupsCommand = async (output, context) => {
894
524
  if (output.statusCode !== 200 && output.statusCode >= 300) {
895
- return de_ListProfilingGroupsCommandError(output, context);
525
+ return de_CommandError(output, context);
896
526
  }
897
527
  const contents = map({
898
528
  $metadata: deserializeMetadata(output),
@@ -906,31 +536,9 @@ export const de_ListProfilingGroupsCommand = async (output, context) => {
906
536
  Object.assign(contents, doc);
907
537
  return contents;
908
538
  };
909
- const de_ListProfilingGroupsCommandError = async (output, context) => {
910
- const parsedOutput = {
911
- ...output,
912
- body: await parseErrorBody(output.body, context),
913
- };
914
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
915
- switch (errorCode) {
916
- case "InternalServerException":
917
- case "com.amazonaws.codeguruprofiler#InternalServerException":
918
- throw await de_InternalServerExceptionRes(parsedOutput, context);
919
- case "ThrottlingException":
920
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
921
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
922
- default:
923
- const parsedBody = parsedOutput.body;
924
- return throwDefaultError({
925
- output,
926
- parsedBody,
927
- errorCode,
928
- });
929
- }
930
- };
931
539
  export const de_ListTagsForResourceCommand = async (output, context) => {
932
540
  if (output.statusCode !== 200 && output.statusCode >= 300) {
933
- return de_ListTagsForResourceCommandError(output, context);
541
+ return de_CommandError(output, context);
934
542
  }
935
543
  const contents = map({
936
544
  $metadata: deserializeMetadata(output),
@@ -942,34 +550,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
942
550
  Object.assign(contents, doc);
943
551
  return contents;
944
552
  };
945
- const de_ListTagsForResourceCommandError = async (output, context) => {
946
- const parsedOutput = {
947
- ...output,
948
- body: await parseErrorBody(output.body, context),
949
- };
950
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
- switch (errorCode) {
952
- case "InternalServerException":
953
- case "com.amazonaws.codeguruprofiler#InternalServerException":
954
- throw await de_InternalServerExceptionRes(parsedOutput, context);
955
- case "ResourceNotFoundException":
956
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
957
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
958
- case "ValidationException":
959
- case "com.amazonaws.codeguruprofiler#ValidationException":
960
- throw await de_ValidationExceptionRes(parsedOutput, context);
961
- default:
962
- const parsedBody = parsedOutput.body;
963
- return throwDefaultError({
964
- output,
965
- parsedBody,
966
- errorCode,
967
- });
968
- }
969
- };
970
553
  export const de_PostAgentProfileCommand = async (output, context) => {
971
554
  if (output.statusCode !== 204 && output.statusCode >= 300) {
972
- return de_PostAgentProfileCommandError(output, context);
555
+ return de_CommandError(output, context);
973
556
  }
974
557
  const contents = map({
975
558
  $metadata: deserializeMetadata(output),
@@ -977,37 +560,9 @@ export const de_PostAgentProfileCommand = async (output, context) => {
977
560
  await collectBody(output.body, context);
978
561
  return contents;
979
562
  };
980
- const de_PostAgentProfileCommandError = async (output, context) => {
981
- const parsedOutput = {
982
- ...output,
983
- body: await parseErrorBody(output.body, context),
984
- };
985
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
986
- switch (errorCode) {
987
- case "InternalServerException":
988
- case "com.amazonaws.codeguruprofiler#InternalServerException":
989
- throw await de_InternalServerExceptionRes(parsedOutput, context);
990
- case "ResourceNotFoundException":
991
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
992
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
993
- case "ThrottlingException":
994
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
995
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
996
- case "ValidationException":
997
- case "com.amazonaws.codeguruprofiler#ValidationException":
998
- throw await de_ValidationExceptionRes(parsedOutput, context);
999
- default:
1000
- const parsedBody = parsedOutput.body;
1001
- return throwDefaultError({
1002
- output,
1003
- parsedBody,
1004
- errorCode,
1005
- });
1006
- }
1007
- };
1008
563
  export const de_PutPermissionCommand = async (output, context) => {
1009
564
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1010
- return de_PutPermissionCommandError(output, context);
565
+ return de_CommandError(output, context);
1011
566
  }
1012
567
  const contents = map({
1013
568
  $metadata: deserializeMetadata(output),
@@ -1020,40 +575,9 @@ export const de_PutPermissionCommand = async (output, context) => {
1020
575
  Object.assign(contents, doc);
1021
576
  return contents;
1022
577
  };
1023
- const de_PutPermissionCommandError = async (output, context) => {
1024
- const parsedOutput = {
1025
- ...output,
1026
- body: await parseErrorBody(output.body, context),
1027
- };
1028
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1029
- switch (errorCode) {
1030
- case "ConflictException":
1031
- case "com.amazonaws.codeguruprofiler#ConflictException":
1032
- throw await de_ConflictExceptionRes(parsedOutput, context);
1033
- case "InternalServerException":
1034
- case "com.amazonaws.codeguruprofiler#InternalServerException":
1035
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1036
- case "ResourceNotFoundException":
1037
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1038
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1039
- case "ThrottlingException":
1040
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
1041
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1042
- case "ValidationException":
1043
- case "com.amazonaws.codeguruprofiler#ValidationException":
1044
- throw await de_ValidationExceptionRes(parsedOutput, context);
1045
- default:
1046
- const parsedBody = parsedOutput.body;
1047
- return throwDefaultError({
1048
- output,
1049
- parsedBody,
1050
- errorCode,
1051
- });
1052
- }
1053
- };
1054
578
  export const de_RemoveNotificationChannelCommand = async (output, context) => {
1055
579
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1056
- return de_RemoveNotificationChannelCommandError(output, context);
580
+ return de_CommandError(output, context);
1057
581
  }
1058
582
  const contents = map({
1059
583
  $metadata: deserializeMetadata(output),
@@ -1065,37 +589,9 @@ export const de_RemoveNotificationChannelCommand = async (output, context) => {
1065
589
  Object.assign(contents, doc);
1066
590
  return contents;
1067
591
  };
1068
- const de_RemoveNotificationChannelCommandError = async (output, context) => {
1069
- const parsedOutput = {
1070
- ...output,
1071
- body: await parseErrorBody(output.body, context),
1072
- };
1073
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1074
- switch (errorCode) {
1075
- case "InternalServerException":
1076
- case "com.amazonaws.codeguruprofiler#InternalServerException":
1077
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1078
- case "ResourceNotFoundException":
1079
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1080
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1081
- case "ThrottlingException":
1082
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
1083
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1084
- case "ValidationException":
1085
- case "com.amazonaws.codeguruprofiler#ValidationException":
1086
- throw await de_ValidationExceptionRes(parsedOutput, context);
1087
- default:
1088
- const parsedBody = parsedOutput.body;
1089
- return throwDefaultError({
1090
- output,
1091
- parsedBody,
1092
- errorCode,
1093
- });
1094
- }
1095
- };
1096
592
  export const de_RemovePermissionCommand = async (output, context) => {
1097
593
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1098
- return de_RemovePermissionCommandError(output, context);
594
+ return de_CommandError(output, context);
1099
595
  }
1100
596
  const contents = map({
1101
597
  $metadata: deserializeMetadata(output),
@@ -1108,40 +604,9 @@ export const de_RemovePermissionCommand = async (output, context) => {
1108
604
  Object.assign(contents, doc);
1109
605
  return contents;
1110
606
  };
1111
- const de_RemovePermissionCommandError = async (output, context) => {
1112
- const parsedOutput = {
1113
- ...output,
1114
- body: await parseErrorBody(output.body, context),
1115
- };
1116
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1117
- switch (errorCode) {
1118
- case "ConflictException":
1119
- case "com.amazonaws.codeguruprofiler#ConflictException":
1120
- throw await de_ConflictExceptionRes(parsedOutput, context);
1121
- case "InternalServerException":
1122
- case "com.amazonaws.codeguruprofiler#InternalServerException":
1123
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1124
- case "ResourceNotFoundException":
1125
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1126
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1127
- case "ThrottlingException":
1128
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
1129
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1130
- case "ValidationException":
1131
- case "com.amazonaws.codeguruprofiler#ValidationException":
1132
- throw await de_ValidationExceptionRes(parsedOutput, context);
1133
- default:
1134
- const parsedBody = parsedOutput.body;
1135
- return throwDefaultError({
1136
- output,
1137
- parsedBody,
1138
- errorCode,
1139
- });
1140
- }
1141
- };
1142
607
  export const de_SubmitFeedbackCommand = async (output, context) => {
1143
608
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1144
- return de_SubmitFeedbackCommandError(output, context);
609
+ return de_CommandError(output, context);
1145
610
  }
1146
611
  const contents = map({
1147
612
  $metadata: deserializeMetadata(output),
@@ -1149,37 +614,9 @@ export const de_SubmitFeedbackCommand = async (output, context) => {
1149
614
  await collectBody(output.body, context);
1150
615
  return contents;
1151
616
  };
1152
- const de_SubmitFeedbackCommandError = async (output, context) => {
1153
- const parsedOutput = {
1154
- ...output,
1155
- body: await parseErrorBody(output.body, context),
1156
- };
1157
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1158
- switch (errorCode) {
1159
- case "InternalServerException":
1160
- case "com.amazonaws.codeguruprofiler#InternalServerException":
1161
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1162
- case "ResourceNotFoundException":
1163
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1164
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1165
- case "ThrottlingException":
1166
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
1167
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1168
- case "ValidationException":
1169
- case "com.amazonaws.codeguruprofiler#ValidationException":
1170
- throw await de_ValidationExceptionRes(parsedOutput, context);
1171
- default:
1172
- const parsedBody = parsedOutput.body;
1173
- return throwDefaultError({
1174
- output,
1175
- parsedBody,
1176
- errorCode,
1177
- });
1178
- }
1179
- };
1180
617
  export const de_TagResourceCommand = async (output, context) => {
1181
618
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1182
- return de_TagResourceCommandError(output, context);
619
+ return de_CommandError(output, context);
1183
620
  }
1184
621
  const contents = map({
1185
622
  $metadata: deserializeMetadata(output),
@@ -1187,34 +624,9 @@ export const de_TagResourceCommand = async (output, context) => {
1187
624
  await collectBody(output.body, context);
1188
625
  return contents;
1189
626
  };
1190
- const de_TagResourceCommandError = async (output, context) => {
1191
- const parsedOutput = {
1192
- ...output,
1193
- body: await parseErrorBody(output.body, context),
1194
- };
1195
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1196
- switch (errorCode) {
1197
- case "InternalServerException":
1198
- case "com.amazonaws.codeguruprofiler#InternalServerException":
1199
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1200
- case "ResourceNotFoundException":
1201
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1202
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1203
- case "ValidationException":
1204
- case "com.amazonaws.codeguruprofiler#ValidationException":
1205
- throw await de_ValidationExceptionRes(parsedOutput, context);
1206
- default:
1207
- const parsedBody = parsedOutput.body;
1208
- return throwDefaultError({
1209
- output,
1210
- parsedBody,
1211
- errorCode,
1212
- });
1213
- }
1214
- };
1215
627
  export const de_UntagResourceCommand = async (output, context) => {
1216
628
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1217
- return de_UntagResourceCommandError(output, context);
629
+ return de_CommandError(output, context);
1218
630
  }
1219
631
  const contents = map({
1220
632
  $metadata: deserializeMetadata(output),
@@ -1222,34 +634,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1222
634
  await collectBody(output.body, context);
1223
635
  return contents;
1224
636
  };
1225
- const de_UntagResourceCommandError = 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 "InternalServerException":
1233
- case "com.amazonaws.codeguruprofiler#InternalServerException":
1234
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1235
- case "ResourceNotFoundException":
1236
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1237
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1238
- case "ValidationException":
1239
- case "com.amazonaws.codeguruprofiler#ValidationException":
1240
- throw await de_ValidationExceptionRes(parsedOutput, context);
1241
- default:
1242
- const parsedBody = parsedOutput.body;
1243
- return throwDefaultError({
1244
- output,
1245
- parsedBody,
1246
- errorCode,
1247
- });
1248
- }
1249
- };
1250
637
  export const de_UpdateProfilingGroupCommand = async (output, context) => {
1251
638
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1252
- return de_UpdateProfilingGroupCommandError(output, context);
639
+ return de_CommandError(output, context);
1253
640
  }
1254
641
  const contents = map({
1255
642
  $metadata: deserializeMetadata(output),
@@ -1258,7 +645,7 @@ export const de_UpdateProfilingGroupCommand = async (output, context) => {
1258
645
  contents.profilingGroup = de_ProfilingGroupDescription(data, context);
1259
646
  return contents;
1260
647
  };
1261
- const de_UpdateProfilingGroupCommandError = async (output, context) => {
648
+ const de_CommandError = async (output, context) => {
1262
649
  const parsedOutput = {
1263
650
  ...output,
1264
651
  body: await parseErrorBody(output.body, context),
@@ -1274,6 +661,9 @@ const de_UpdateProfilingGroupCommandError = async (output, context) => {
1274
661
  case "ResourceNotFoundException":
1275
662
  case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
1276
663
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
664
+ case "ServiceQuotaExceededException":
665
+ case "com.amazonaws.codeguruprofiler#ServiceQuotaExceededException":
666
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1277
667
  case "ThrottlingException":
1278
668
  case "com.amazonaws.codeguruprofiler#ThrottlingException":
1279
669
  throw await de_ThrottlingExceptionRes(parsedOutput, context);