@aws-sdk/client-global-accelerator 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_WithdrawByoipCidrCommand = async (input, context) => {
341
341
  };
342
342
  export const de_AddCustomRoutingEndpointsCommand = async (output, context) => {
343
343
  if (output.statusCode >= 300) {
344
- return de_AddCustomRoutingEndpointsCommandError(output, context);
344
+ return de_CommandError(output, context);
345
345
  }
346
346
  const data = await parseBody(output.body, context);
347
347
  let contents = {};
@@ -352,46 +352,9 @@ export const de_AddCustomRoutingEndpointsCommand = async (output, context) => {
352
352
  };
353
353
  return response;
354
354
  };
355
- const de_AddCustomRoutingEndpointsCommandError = async (output, context) => {
356
- const parsedOutput = {
357
- ...output,
358
- body: await parseErrorBody(output.body, context),
359
- };
360
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
361
- switch (errorCode) {
362
- case "AccessDeniedException":
363
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
364
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
365
- case "ConflictException":
366
- case "com.amazonaws.globalaccelerator#ConflictException":
367
- throw await de_ConflictExceptionRes(parsedOutput, context);
368
- case "EndpointAlreadyExistsException":
369
- case "com.amazonaws.globalaccelerator#EndpointAlreadyExistsException":
370
- throw await de_EndpointAlreadyExistsExceptionRes(parsedOutput, context);
371
- case "EndpointGroupNotFoundException":
372
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
373
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
374
- case "InternalServiceErrorException":
375
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
376
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
377
- case "InvalidArgumentException":
378
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
379
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
380
- case "LimitExceededException":
381
- case "com.amazonaws.globalaccelerator#LimitExceededException":
382
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
383
- default:
384
- const parsedBody = parsedOutput.body;
385
- return throwDefaultError({
386
- output,
387
- parsedBody,
388
- errorCode,
389
- });
390
- }
391
- };
392
355
  export const de_AddEndpointsCommand = async (output, context) => {
393
356
  if (output.statusCode >= 300) {
394
- return de_AddEndpointsCommandError(output, context);
357
+ return de_CommandError(output, context);
395
358
  }
396
359
  const data = await parseBody(output.body, context);
397
360
  let contents = {};
@@ -402,43 +365,9 @@ export const de_AddEndpointsCommand = async (output, context) => {
402
365
  };
403
366
  return response;
404
367
  };
405
- const de_AddEndpointsCommandError = async (output, context) => {
406
- const parsedOutput = {
407
- ...output,
408
- body: await parseErrorBody(output.body, context),
409
- };
410
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
411
- switch (errorCode) {
412
- case "AccessDeniedException":
413
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
414
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
415
- case "EndpointGroupNotFoundException":
416
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
417
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
418
- case "InternalServiceErrorException":
419
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
420
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
421
- case "InvalidArgumentException":
422
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
423
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
424
- case "LimitExceededException":
425
- case "com.amazonaws.globalaccelerator#LimitExceededException":
426
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
427
- case "TransactionInProgressException":
428
- case "com.amazonaws.globalaccelerator#TransactionInProgressException":
429
- throw await de_TransactionInProgressExceptionRes(parsedOutput, context);
430
- default:
431
- const parsedBody = parsedOutput.body;
432
- return throwDefaultError({
433
- output,
434
- parsedBody,
435
- errorCode,
436
- });
437
- }
438
- };
439
368
  export const de_AdvertiseByoipCidrCommand = async (output, context) => {
440
369
  if (output.statusCode >= 300) {
441
- return de_AdvertiseByoipCidrCommandError(output, context);
370
+ return de_CommandError(output, context);
442
371
  }
443
372
  const data = await parseBody(output.body, context);
444
373
  let contents = {};
@@ -449,40 +378,9 @@ export const de_AdvertiseByoipCidrCommand = async (output, context) => {
449
378
  };
450
379
  return response;
451
380
  };
452
- const de_AdvertiseByoipCidrCommandError = async (output, context) => {
453
- const parsedOutput = {
454
- ...output,
455
- body: await parseErrorBody(output.body, context),
456
- };
457
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
458
- switch (errorCode) {
459
- case "AccessDeniedException":
460
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
461
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
462
- case "ByoipCidrNotFoundException":
463
- case "com.amazonaws.globalaccelerator#ByoipCidrNotFoundException":
464
- throw await de_ByoipCidrNotFoundExceptionRes(parsedOutput, context);
465
- case "IncorrectCidrStateException":
466
- case "com.amazonaws.globalaccelerator#IncorrectCidrStateException":
467
- throw await de_IncorrectCidrStateExceptionRes(parsedOutput, context);
468
- case "InternalServiceErrorException":
469
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
470
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
471
- case "InvalidArgumentException":
472
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
473
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
474
- default:
475
- const parsedBody = parsedOutput.body;
476
- return throwDefaultError({
477
- output,
478
- parsedBody,
479
- errorCode,
480
- });
481
- }
482
- };
483
381
  export const de_AllowCustomRoutingTrafficCommand = async (output, context) => {
484
382
  if (output.statusCode >= 300) {
485
- return de_AllowCustomRoutingTrafficCommandError(output, context);
383
+ return de_CommandError(output, context);
486
384
  }
487
385
  await collectBody(output.body, context);
488
386
  const response = {
@@ -490,34 +388,9 @@ export const de_AllowCustomRoutingTrafficCommand = async (output, context) => {
490
388
  };
491
389
  return response;
492
390
  };
493
- const de_AllowCustomRoutingTrafficCommandError = async (output, context) => {
494
- const parsedOutput = {
495
- ...output,
496
- body: await parseErrorBody(output.body, context),
497
- };
498
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
499
- switch (errorCode) {
500
- case "EndpointGroupNotFoundException":
501
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
502
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
503
- case "InternalServiceErrorException":
504
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
505
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
506
- case "InvalidArgumentException":
507
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
508
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
509
- default:
510
- const parsedBody = parsedOutput.body;
511
- return throwDefaultError({
512
- output,
513
- parsedBody,
514
- errorCode,
515
- });
516
- }
517
- };
518
391
  export const de_CreateAcceleratorCommand = async (output, context) => {
519
392
  if (output.statusCode >= 300) {
520
- return de_CreateAcceleratorCommandError(output, context);
393
+ return de_CommandError(output, context);
521
394
  }
522
395
  const data = await parseBody(output.body, context);
523
396
  let contents = {};
@@ -528,34 +401,9 @@ export const de_CreateAcceleratorCommand = async (output, context) => {
528
401
  };
529
402
  return response;
530
403
  };
531
- const de_CreateAcceleratorCommandError = async (output, context) => {
532
- const parsedOutput = {
533
- ...output,
534
- body: await parseErrorBody(output.body, context),
535
- };
536
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
537
- switch (errorCode) {
538
- case "InternalServiceErrorException":
539
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
540
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
541
- case "InvalidArgumentException":
542
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
543
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
544
- case "LimitExceededException":
545
- case "com.amazonaws.globalaccelerator#LimitExceededException":
546
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
547
- default:
548
- const parsedBody = parsedOutput.body;
549
- return throwDefaultError({
550
- output,
551
- parsedBody,
552
- errorCode,
553
- });
554
- }
555
- };
556
404
  export const de_CreateCrossAccountAttachmentCommand = async (output, context) => {
557
405
  if (output.statusCode >= 300) {
558
- return de_CreateCrossAccountAttachmentCommandError(output, context);
406
+ return de_CommandError(output, context);
559
407
  }
560
408
  const data = await parseBody(output.body, context);
561
409
  let contents = {};
@@ -566,40 +414,9 @@ export const de_CreateCrossAccountAttachmentCommand = async (output, context) =>
566
414
  };
567
415
  return response;
568
416
  };
569
- const de_CreateCrossAccountAttachmentCommandError = async (output, context) => {
570
- const parsedOutput = {
571
- ...output,
572
- body: await parseErrorBody(output.body, context),
573
- };
574
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
575
- switch (errorCode) {
576
- case "AccessDeniedException":
577
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
578
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
579
- case "InternalServiceErrorException":
580
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
581
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
582
- case "InvalidArgumentException":
583
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
584
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
585
- case "LimitExceededException":
586
- case "com.amazonaws.globalaccelerator#LimitExceededException":
587
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
588
- case "TransactionInProgressException":
589
- case "com.amazonaws.globalaccelerator#TransactionInProgressException":
590
- throw await de_TransactionInProgressExceptionRes(parsedOutput, context);
591
- default:
592
- const parsedBody = parsedOutput.body;
593
- return throwDefaultError({
594
- output,
595
- parsedBody,
596
- errorCode,
597
- });
598
- }
599
- };
600
417
  export const de_CreateCustomRoutingAcceleratorCommand = async (output, context) => {
601
418
  if (output.statusCode >= 300) {
602
- return de_CreateCustomRoutingAcceleratorCommandError(output, context);
419
+ return de_CommandError(output, context);
603
420
  }
604
421
  const data = await parseBody(output.body, context);
605
422
  let contents = {};
@@ -610,37 +427,9 @@ export const de_CreateCustomRoutingAcceleratorCommand = async (output, context)
610
427
  };
611
428
  return response;
612
429
  };
613
- const de_CreateCustomRoutingAcceleratorCommandError = 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 "AccessDeniedException":
621
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
622
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
623
- case "InternalServiceErrorException":
624
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
625
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
626
- case "InvalidArgumentException":
627
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
628
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
629
- case "LimitExceededException":
630
- case "com.amazonaws.globalaccelerator#LimitExceededException":
631
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
632
- default:
633
- const parsedBody = parsedOutput.body;
634
- return throwDefaultError({
635
- output,
636
- parsedBody,
637
- errorCode,
638
- });
639
- }
640
- };
641
430
  export const de_CreateCustomRoutingEndpointGroupCommand = async (output, context) => {
642
431
  if (output.statusCode >= 300) {
643
- return de_CreateCustomRoutingEndpointGroupCommandError(output, context);
432
+ return de_CommandError(output, context);
644
433
  }
645
434
  const data = await parseBody(output.body, context);
646
435
  let contents = {};
@@ -651,49 +440,9 @@ export const de_CreateCustomRoutingEndpointGroupCommand = async (output, context
651
440
  };
652
441
  return response;
653
442
  };
654
- const de_CreateCustomRoutingEndpointGroupCommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "AcceleratorNotFoundException":
662
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
663
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
664
- case "AccessDeniedException":
665
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
666
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
667
- case "EndpointGroupAlreadyExistsException":
668
- case "com.amazonaws.globalaccelerator#EndpointGroupAlreadyExistsException":
669
- throw await de_EndpointGroupAlreadyExistsExceptionRes(parsedOutput, context);
670
- case "InternalServiceErrorException":
671
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
672
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
673
- case "InvalidArgumentException":
674
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
675
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
676
- case "InvalidPortRangeException":
677
- case "com.amazonaws.globalaccelerator#InvalidPortRangeException":
678
- throw await de_InvalidPortRangeExceptionRes(parsedOutput, context);
679
- case "LimitExceededException":
680
- case "com.amazonaws.globalaccelerator#LimitExceededException":
681
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
682
- case "ListenerNotFoundException":
683
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
684
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
685
- default:
686
- const parsedBody = parsedOutput.body;
687
- return throwDefaultError({
688
- output,
689
- parsedBody,
690
- errorCode,
691
- });
692
- }
693
- };
694
443
  export const de_CreateCustomRoutingListenerCommand = async (output, context) => {
695
444
  if (output.statusCode >= 300) {
696
- return de_CreateCustomRoutingListenerCommandError(output, context);
445
+ return de_CommandError(output, context);
697
446
  }
698
447
  const data = await parseBody(output.body, context);
699
448
  let contents = {};
@@ -704,947 +453,141 @@ export const de_CreateCustomRoutingListenerCommand = async (output, context) =>
704
453
  };
705
454
  return response;
706
455
  };
707
- const de_CreateCustomRoutingListenerCommandError = async (output, context) => {
708
- const parsedOutput = {
709
- ...output,
710
- body: await parseErrorBody(output.body, context),
711
- };
712
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
713
- switch (errorCode) {
714
- case "AcceleratorNotFoundException":
715
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
716
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
717
- case "InternalServiceErrorException":
718
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
719
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
720
- case "InvalidArgumentException":
721
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
722
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
723
- case "InvalidPortRangeException":
724
- case "com.amazonaws.globalaccelerator#InvalidPortRangeException":
725
- throw await de_InvalidPortRangeExceptionRes(parsedOutput, context);
726
- case "LimitExceededException":
727
- case "com.amazonaws.globalaccelerator#LimitExceededException":
728
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
729
- default:
730
- const parsedBody = parsedOutput.body;
731
- return throwDefaultError({
732
- output,
733
- parsedBody,
734
- errorCode,
735
- });
736
- }
737
- };
738
- export const de_CreateEndpointGroupCommand = async (output, context) => {
739
- if (output.statusCode >= 300) {
740
- return de_CreateEndpointGroupCommandError(output, context);
741
- }
742
- const data = await parseBody(output.body, context);
743
- let contents = {};
744
- contents = de_CreateEndpointGroupResponse(data, context);
745
- const response = {
746
- $metadata: deserializeMetadata(output),
747
- ...contents,
456
+ export const de_CreateEndpointGroupCommand = async (output, context) => {
457
+ if (output.statusCode >= 300) {
458
+ return de_CommandError(output, context);
459
+ }
460
+ const data = await parseBody(output.body, context);
461
+ let contents = {};
462
+ contents = de_CreateEndpointGroupResponse(data, context);
463
+ const response = {
464
+ $metadata: deserializeMetadata(output),
465
+ ...contents,
748
466
  };
749
467
  return response;
750
468
  };
751
- const de_CreateEndpointGroupCommandError = async (output, context) => {
752
- const parsedOutput = {
753
- ...output,
754
- body: await parseErrorBody(output.body, context),
755
- };
756
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
757
- switch (errorCode) {
758
- case "AcceleratorNotFoundException":
759
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
760
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
761
- case "AccessDeniedException":
762
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
763
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
764
- case "EndpointGroupAlreadyExistsException":
765
- case "com.amazonaws.globalaccelerator#EndpointGroupAlreadyExistsException":
766
- throw await de_EndpointGroupAlreadyExistsExceptionRes(parsedOutput, context);
767
- case "InternalServiceErrorException":
768
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
769
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
770
- case "InvalidArgumentException":
771
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
772
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
773
- case "LimitExceededException":
774
- case "com.amazonaws.globalaccelerator#LimitExceededException":
775
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
776
- case "ListenerNotFoundException":
777
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
778
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
779
- default:
780
- const parsedBody = parsedOutput.body;
781
- return throwDefaultError({
782
- output,
783
- parsedBody,
784
- errorCode,
785
- });
786
- }
787
- };
788
469
  export const de_CreateListenerCommand = async (output, context) => {
789
470
  if (output.statusCode >= 300) {
790
- return de_CreateListenerCommandError(output, context);
791
- }
792
- const data = await parseBody(output.body, context);
793
- let contents = {};
794
- contents = _json(data);
795
- const response = {
796
- $metadata: deserializeMetadata(output),
797
- ...contents,
798
- };
799
- return response;
800
- };
801
- const de_CreateListenerCommandError = async (output, context) => {
802
- const parsedOutput = {
803
- ...output,
804
- body: await parseErrorBody(output.body, context),
805
- };
806
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
807
- switch (errorCode) {
808
- case "AcceleratorNotFoundException":
809
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
810
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
811
- case "InternalServiceErrorException":
812
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
813
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
814
- case "InvalidArgumentException":
815
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
816
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
817
- case "InvalidPortRangeException":
818
- case "com.amazonaws.globalaccelerator#InvalidPortRangeException":
819
- throw await de_InvalidPortRangeExceptionRes(parsedOutput, context);
820
- case "LimitExceededException":
821
- case "com.amazonaws.globalaccelerator#LimitExceededException":
822
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- return throwDefaultError({
826
- output,
827
- parsedBody,
828
- errorCode,
829
- });
830
- }
831
- };
832
- export const de_DeleteAcceleratorCommand = async (output, context) => {
833
- if (output.statusCode >= 300) {
834
- return de_DeleteAcceleratorCommandError(output, context);
835
- }
836
- await collectBody(output.body, context);
837
- const response = {
838
- $metadata: deserializeMetadata(output),
839
- };
840
- return response;
841
- };
842
- const de_DeleteAcceleratorCommandError = async (output, context) => {
843
- const parsedOutput = {
844
- ...output,
845
- body: await parseErrorBody(output.body, context),
846
- };
847
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
848
- switch (errorCode) {
849
- case "AcceleratorNotDisabledException":
850
- case "com.amazonaws.globalaccelerator#AcceleratorNotDisabledException":
851
- throw await de_AcceleratorNotDisabledExceptionRes(parsedOutput, context);
852
- case "AcceleratorNotFoundException":
853
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
854
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
855
- case "AssociatedListenerFoundException":
856
- case "com.amazonaws.globalaccelerator#AssociatedListenerFoundException":
857
- throw await de_AssociatedListenerFoundExceptionRes(parsedOutput, context);
858
- case "InternalServiceErrorException":
859
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
860
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
861
- case "InvalidArgumentException":
862
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
863
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
864
- default:
865
- const parsedBody = parsedOutput.body;
866
- return throwDefaultError({
867
- output,
868
- parsedBody,
869
- errorCode,
870
- });
871
- }
872
- };
873
- export const de_DeleteCrossAccountAttachmentCommand = async (output, context) => {
874
- if (output.statusCode >= 300) {
875
- return de_DeleteCrossAccountAttachmentCommandError(output, context);
876
- }
877
- await collectBody(output.body, context);
878
- const response = {
879
- $metadata: deserializeMetadata(output),
880
- };
881
- return response;
882
- };
883
- const de_DeleteCrossAccountAttachmentCommandError = async (output, context) => {
884
- const parsedOutput = {
885
- ...output,
886
- body: await parseErrorBody(output.body, context),
887
- };
888
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
889
- switch (errorCode) {
890
- case "AccessDeniedException":
891
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
892
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
893
- case "AttachmentNotFoundException":
894
- case "com.amazonaws.globalaccelerator#AttachmentNotFoundException":
895
- throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context);
896
- case "InternalServiceErrorException":
897
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
898
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
899
- case "InvalidArgumentException":
900
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
901
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
902
- case "TransactionInProgressException":
903
- case "com.amazonaws.globalaccelerator#TransactionInProgressException":
904
- throw await de_TransactionInProgressExceptionRes(parsedOutput, context);
905
- default:
906
- const parsedBody = parsedOutput.body;
907
- return throwDefaultError({
908
- output,
909
- parsedBody,
910
- errorCode,
911
- });
912
- }
913
- };
914
- export const de_DeleteCustomRoutingAcceleratorCommand = async (output, context) => {
915
- if (output.statusCode >= 300) {
916
- return de_DeleteCustomRoutingAcceleratorCommandError(output, context);
917
- }
918
- await collectBody(output.body, context);
919
- const response = {
920
- $metadata: deserializeMetadata(output),
921
- };
922
- return response;
923
- };
924
- const de_DeleteCustomRoutingAcceleratorCommandError = async (output, context) => {
925
- const parsedOutput = {
926
- ...output,
927
- body: await parseErrorBody(output.body, context),
928
- };
929
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
930
- switch (errorCode) {
931
- case "AcceleratorNotDisabledException":
932
- case "com.amazonaws.globalaccelerator#AcceleratorNotDisabledException":
933
- throw await de_AcceleratorNotDisabledExceptionRes(parsedOutput, context);
934
- case "AcceleratorNotFoundException":
935
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
936
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
937
- case "AssociatedListenerFoundException":
938
- case "com.amazonaws.globalaccelerator#AssociatedListenerFoundException":
939
- throw await de_AssociatedListenerFoundExceptionRes(parsedOutput, context);
940
- case "InternalServiceErrorException":
941
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
942
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
943
- case "InvalidArgumentException":
944
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
945
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
946
- default:
947
- const parsedBody = parsedOutput.body;
948
- return throwDefaultError({
949
- output,
950
- parsedBody,
951
- errorCode,
952
- });
953
- }
954
- };
955
- export const de_DeleteCustomRoutingEndpointGroupCommand = async (output, context) => {
956
- if (output.statusCode >= 300) {
957
- return de_DeleteCustomRoutingEndpointGroupCommandError(output, context);
958
- }
959
- await collectBody(output.body, context);
960
- const response = {
961
- $metadata: deserializeMetadata(output),
962
- };
963
- return response;
964
- };
965
- const de_DeleteCustomRoutingEndpointGroupCommandError = async (output, context) => {
966
- const parsedOutput = {
967
- ...output,
968
- body: await parseErrorBody(output.body, context),
969
- };
970
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
971
- switch (errorCode) {
972
- case "EndpointGroupNotFoundException":
973
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
974
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
975
- case "InternalServiceErrorException":
976
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
977
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
978
- case "InvalidArgumentException":
979
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
980
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
981
- default:
982
- const parsedBody = parsedOutput.body;
983
- return throwDefaultError({
984
- output,
985
- parsedBody,
986
- errorCode,
987
- });
988
- }
989
- };
990
- export const de_DeleteCustomRoutingListenerCommand = async (output, context) => {
991
- if (output.statusCode >= 300) {
992
- return de_DeleteCustomRoutingListenerCommandError(output, context);
993
- }
994
- await collectBody(output.body, context);
995
- const response = {
996
- $metadata: deserializeMetadata(output),
997
- };
998
- return response;
999
- };
1000
- const de_DeleteCustomRoutingListenerCommandError = async (output, context) => {
1001
- const parsedOutput = {
1002
- ...output,
1003
- body: await parseErrorBody(output.body, context),
1004
- };
1005
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1006
- switch (errorCode) {
1007
- case "AssociatedEndpointGroupFoundException":
1008
- case "com.amazonaws.globalaccelerator#AssociatedEndpointGroupFoundException":
1009
- throw await de_AssociatedEndpointGroupFoundExceptionRes(parsedOutput, context);
1010
- case "InternalServiceErrorException":
1011
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1012
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1013
- case "InvalidArgumentException":
1014
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1015
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1016
- case "ListenerNotFoundException":
1017
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1018
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1019
- default:
1020
- const parsedBody = parsedOutput.body;
1021
- return throwDefaultError({
1022
- output,
1023
- parsedBody,
1024
- errorCode,
1025
- });
1026
- }
1027
- };
1028
- export const de_DeleteEndpointGroupCommand = async (output, context) => {
1029
- if (output.statusCode >= 300) {
1030
- return de_DeleteEndpointGroupCommandError(output, context);
1031
- }
1032
- await collectBody(output.body, context);
1033
- const response = {
1034
- $metadata: deserializeMetadata(output),
1035
- };
1036
- return response;
1037
- };
1038
- const de_DeleteEndpointGroupCommandError = async (output, context) => {
1039
- const parsedOutput = {
1040
- ...output,
1041
- body: await parseErrorBody(output.body, context),
1042
- };
1043
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
- switch (errorCode) {
1045
- case "EndpointGroupNotFoundException":
1046
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
1047
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
1048
- case "InternalServiceErrorException":
1049
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1050
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1051
- case "InvalidArgumentException":
1052
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1053
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1054
- default:
1055
- const parsedBody = parsedOutput.body;
1056
- return throwDefaultError({
1057
- output,
1058
- parsedBody,
1059
- errorCode,
1060
- });
1061
- }
1062
- };
1063
- export const de_DeleteListenerCommand = async (output, context) => {
1064
- if (output.statusCode >= 300) {
1065
- return de_DeleteListenerCommandError(output, context);
1066
- }
1067
- await collectBody(output.body, context);
1068
- const response = {
1069
- $metadata: deserializeMetadata(output),
1070
- };
1071
- return response;
1072
- };
1073
- const de_DeleteListenerCommandError = async (output, context) => {
1074
- const parsedOutput = {
1075
- ...output,
1076
- body: await parseErrorBody(output.body, context),
1077
- };
1078
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1079
- switch (errorCode) {
1080
- case "AssociatedEndpointGroupFoundException":
1081
- case "com.amazonaws.globalaccelerator#AssociatedEndpointGroupFoundException":
1082
- throw await de_AssociatedEndpointGroupFoundExceptionRes(parsedOutput, context);
1083
- case "InternalServiceErrorException":
1084
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1085
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1086
- case "InvalidArgumentException":
1087
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1088
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1089
- case "ListenerNotFoundException":
1090
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1091
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1092
- default:
1093
- const parsedBody = parsedOutput.body;
1094
- return throwDefaultError({
1095
- output,
1096
- parsedBody,
1097
- errorCode,
1098
- });
1099
- }
1100
- };
1101
- export const de_DenyCustomRoutingTrafficCommand = async (output, context) => {
1102
- if (output.statusCode >= 300) {
1103
- return de_DenyCustomRoutingTrafficCommandError(output, context);
1104
- }
1105
- await collectBody(output.body, context);
1106
- const response = {
1107
- $metadata: deserializeMetadata(output),
1108
- };
1109
- return response;
1110
- };
1111
- const de_DenyCustomRoutingTrafficCommandError = 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 "EndpointGroupNotFoundException":
1119
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
1120
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
1121
- case "InternalServiceErrorException":
1122
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1123
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1124
- case "InvalidArgumentException":
1125
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1126
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1127
- default:
1128
- const parsedBody = parsedOutput.body;
1129
- return throwDefaultError({
1130
- output,
1131
- parsedBody,
1132
- errorCode,
1133
- });
1134
- }
1135
- };
1136
- export const de_DeprovisionByoipCidrCommand = async (output, context) => {
1137
- if (output.statusCode >= 300) {
1138
- return de_DeprovisionByoipCidrCommandError(output, context);
1139
- }
1140
- const data = await parseBody(output.body, context);
1141
- let contents = {};
1142
- contents = de_DeprovisionByoipCidrResponse(data, context);
1143
- const response = {
1144
- $metadata: deserializeMetadata(output),
1145
- ...contents,
1146
- };
1147
- return response;
1148
- };
1149
- const de_DeprovisionByoipCidrCommandError = async (output, context) => {
1150
- const parsedOutput = {
1151
- ...output,
1152
- body: await parseErrorBody(output.body, context),
1153
- };
1154
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1155
- switch (errorCode) {
1156
- case "AccessDeniedException":
1157
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
1158
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1159
- case "ByoipCidrNotFoundException":
1160
- case "com.amazonaws.globalaccelerator#ByoipCidrNotFoundException":
1161
- throw await de_ByoipCidrNotFoundExceptionRes(parsedOutput, context);
1162
- case "IncorrectCidrStateException":
1163
- case "com.amazonaws.globalaccelerator#IncorrectCidrStateException":
1164
- throw await de_IncorrectCidrStateExceptionRes(parsedOutput, context);
1165
- case "InternalServiceErrorException":
1166
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1167
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1168
- case "InvalidArgumentException":
1169
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1170
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1171
- default:
1172
- const parsedBody = parsedOutput.body;
1173
- return throwDefaultError({
1174
- output,
1175
- parsedBody,
1176
- errorCode,
1177
- });
1178
- }
1179
- };
1180
- export const de_DescribeAcceleratorCommand = async (output, context) => {
1181
- if (output.statusCode >= 300) {
1182
- return de_DescribeAcceleratorCommandError(output, context);
1183
- }
1184
- const data = await parseBody(output.body, context);
1185
- let contents = {};
1186
- contents = de_DescribeAcceleratorResponse(data, context);
1187
- const response = {
1188
- $metadata: deserializeMetadata(output),
1189
- ...contents,
1190
- };
1191
- return response;
1192
- };
1193
- const de_DescribeAcceleratorCommandError = async (output, context) => {
1194
- const parsedOutput = {
1195
- ...output,
1196
- body: await parseErrorBody(output.body, context),
1197
- };
1198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1199
- switch (errorCode) {
1200
- case "AcceleratorNotFoundException":
1201
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1202
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1203
- case "InternalServiceErrorException":
1204
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1205
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1206
- case "InvalidArgumentException":
1207
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1208
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1209
- default:
1210
- const parsedBody = parsedOutput.body;
1211
- return throwDefaultError({
1212
- output,
1213
- parsedBody,
1214
- errorCode,
1215
- });
1216
- }
1217
- };
1218
- export const de_DescribeAcceleratorAttributesCommand = async (output, context) => {
1219
- if (output.statusCode >= 300) {
1220
- return de_DescribeAcceleratorAttributesCommandError(output, context);
1221
- }
1222
- const data = await parseBody(output.body, context);
1223
- let contents = {};
1224
- contents = _json(data);
1225
- const response = {
1226
- $metadata: deserializeMetadata(output),
1227
- ...contents,
1228
- };
1229
- return response;
1230
- };
1231
- const de_DescribeAcceleratorAttributesCommandError = async (output, context) => {
1232
- const parsedOutput = {
1233
- ...output,
1234
- body: await parseErrorBody(output.body, context),
1235
- };
1236
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1237
- switch (errorCode) {
1238
- case "AcceleratorNotFoundException":
1239
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1240
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1241
- case "InternalServiceErrorException":
1242
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1243
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1244
- case "InvalidArgumentException":
1245
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1246
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1247
- default:
1248
- const parsedBody = parsedOutput.body;
1249
- return throwDefaultError({
1250
- output,
1251
- parsedBody,
1252
- errorCode,
1253
- });
1254
- }
1255
- };
1256
- export const de_DescribeCrossAccountAttachmentCommand = async (output, context) => {
1257
- if (output.statusCode >= 300) {
1258
- return de_DescribeCrossAccountAttachmentCommandError(output, context);
1259
- }
1260
- const data = await parseBody(output.body, context);
1261
- let contents = {};
1262
- contents = de_DescribeCrossAccountAttachmentResponse(data, context);
1263
- const response = {
1264
- $metadata: deserializeMetadata(output),
1265
- ...contents,
1266
- };
1267
- return response;
1268
- };
1269
- const de_DescribeCrossAccountAttachmentCommandError = async (output, context) => {
1270
- const parsedOutput = {
1271
- ...output,
1272
- body: await parseErrorBody(output.body, context),
1273
- };
1274
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1275
- switch (errorCode) {
1276
- case "AccessDeniedException":
1277
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
1278
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1279
- case "AttachmentNotFoundException":
1280
- case "com.amazonaws.globalaccelerator#AttachmentNotFoundException":
1281
- throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context);
1282
- case "InternalServiceErrorException":
1283
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1284
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1285
- case "InvalidArgumentException":
1286
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1287
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1288
- default:
1289
- const parsedBody = parsedOutput.body;
1290
- return throwDefaultError({
1291
- output,
1292
- parsedBody,
1293
- errorCode,
1294
- });
1295
- }
1296
- };
1297
- export const de_DescribeCustomRoutingAcceleratorCommand = async (output, context) => {
1298
- if (output.statusCode >= 300) {
1299
- return de_DescribeCustomRoutingAcceleratorCommandError(output, context);
1300
- }
1301
- const data = await parseBody(output.body, context);
1302
- let contents = {};
1303
- contents = de_DescribeCustomRoutingAcceleratorResponse(data, context);
1304
- const response = {
1305
- $metadata: deserializeMetadata(output),
1306
- ...contents,
1307
- };
1308
- return response;
1309
- };
1310
- const de_DescribeCustomRoutingAcceleratorCommandError = async (output, context) => {
1311
- const parsedOutput = {
1312
- ...output,
1313
- body: await parseErrorBody(output.body, context),
1314
- };
1315
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1316
- switch (errorCode) {
1317
- case "AcceleratorNotFoundException":
1318
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1319
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1320
- case "InternalServiceErrorException":
1321
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1322
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1323
- case "InvalidArgumentException":
1324
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1325
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1326
- default:
1327
- const parsedBody = parsedOutput.body;
1328
- return throwDefaultError({
1329
- output,
1330
- parsedBody,
1331
- errorCode,
1332
- });
1333
- }
1334
- };
1335
- export const de_DescribeCustomRoutingAcceleratorAttributesCommand = async (output, context) => {
1336
- if (output.statusCode >= 300) {
1337
- return de_DescribeCustomRoutingAcceleratorAttributesCommandError(output, context);
1338
- }
1339
- const data = await parseBody(output.body, context);
1340
- let contents = {};
1341
- contents = _json(data);
1342
- const response = {
1343
- $metadata: deserializeMetadata(output),
1344
- ...contents,
1345
- };
1346
- return response;
1347
- };
1348
- const de_DescribeCustomRoutingAcceleratorAttributesCommandError = async (output, context) => {
1349
- const parsedOutput = {
1350
- ...output,
1351
- body: await parseErrorBody(output.body, context),
1352
- };
1353
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1354
- switch (errorCode) {
1355
- case "AcceleratorNotFoundException":
1356
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1357
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1358
- case "InternalServiceErrorException":
1359
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1360
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1361
- case "InvalidArgumentException":
1362
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1363
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1364
- default:
1365
- const parsedBody = parsedOutput.body;
1366
- return throwDefaultError({
1367
- output,
1368
- parsedBody,
1369
- errorCode,
1370
- });
1371
- }
1372
- };
1373
- export const de_DescribeCustomRoutingEndpointGroupCommand = async (output, context) => {
1374
- if (output.statusCode >= 300) {
1375
- return de_DescribeCustomRoutingEndpointGroupCommandError(output, context);
1376
- }
1377
- const data = await parseBody(output.body, context);
1378
- let contents = {};
1379
- contents = _json(data);
1380
- const response = {
1381
- $metadata: deserializeMetadata(output),
1382
- ...contents,
1383
- };
1384
- return response;
1385
- };
1386
- const de_DescribeCustomRoutingEndpointGroupCommandError = async (output, context) => {
1387
- const parsedOutput = {
1388
- ...output,
1389
- body: await parseErrorBody(output.body, context),
1390
- };
1391
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1392
- switch (errorCode) {
1393
- case "EndpointGroupNotFoundException":
1394
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
1395
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
1396
- case "InternalServiceErrorException":
1397
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1398
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1399
- case "InvalidArgumentException":
1400
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1401
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1402
- default:
1403
- const parsedBody = parsedOutput.body;
1404
- return throwDefaultError({
1405
- output,
1406
- parsedBody,
1407
- errorCode,
1408
- });
1409
- }
1410
- };
1411
- export const de_DescribeCustomRoutingListenerCommand = async (output, context) => {
1412
- if (output.statusCode >= 300) {
1413
- return de_DescribeCustomRoutingListenerCommandError(output, context);
1414
- }
1415
- const data = await parseBody(output.body, context);
1416
- let contents = {};
1417
- contents = _json(data);
1418
- const response = {
1419
- $metadata: deserializeMetadata(output),
1420
- ...contents,
1421
- };
1422
- return response;
1423
- };
1424
- const de_DescribeCustomRoutingListenerCommandError = async (output, context) => {
1425
- const parsedOutput = {
1426
- ...output,
1427
- body: await parseErrorBody(output.body, context),
1428
- };
1429
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1430
- switch (errorCode) {
1431
- case "InternalServiceErrorException":
1432
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1433
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1434
- case "InvalidArgumentException":
1435
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1436
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1437
- case "ListenerNotFoundException":
1438
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1439
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1440
- default:
1441
- const parsedBody = parsedOutput.body;
1442
- return throwDefaultError({
1443
- output,
1444
- parsedBody,
1445
- errorCode,
1446
- });
1447
- }
1448
- };
1449
- export const de_DescribeEndpointGroupCommand = async (output, context) => {
1450
- if (output.statusCode >= 300) {
1451
- return de_DescribeEndpointGroupCommandError(output, context);
471
+ return de_CommandError(output, context);
1452
472
  }
1453
473
  const data = await parseBody(output.body, context);
1454
474
  let contents = {};
1455
- contents = de_DescribeEndpointGroupResponse(data, context);
475
+ contents = _json(data);
1456
476
  const response = {
1457
477
  $metadata: deserializeMetadata(output),
1458
478
  ...contents,
1459
479
  };
1460
480
  return response;
1461
481
  };
1462
- const de_DescribeEndpointGroupCommandError = async (output, context) => {
1463
- const parsedOutput = {
1464
- ...output,
1465
- body: await parseErrorBody(output.body, context),
482
+ export const de_DeleteAcceleratorCommand = async (output, context) => {
483
+ if (output.statusCode >= 300) {
484
+ return de_CommandError(output, context);
485
+ }
486
+ await collectBody(output.body, context);
487
+ const response = {
488
+ $metadata: deserializeMetadata(output),
1466
489
  };
1467
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1468
- switch (errorCode) {
1469
- case "EndpointGroupNotFoundException":
1470
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
1471
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
1472
- case "InternalServiceErrorException":
1473
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1474
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1475
- case "InvalidArgumentException":
1476
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1477
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1478
- default:
1479
- const parsedBody = parsedOutput.body;
1480
- return throwDefaultError({
1481
- output,
1482
- parsedBody,
1483
- errorCode,
1484
- });
490
+ return response;
491
+ };
492
+ export const de_DeleteCrossAccountAttachmentCommand = async (output, context) => {
493
+ if (output.statusCode >= 300) {
494
+ return de_CommandError(output, context);
1485
495
  }
496
+ await collectBody(output.body, context);
497
+ const response = {
498
+ $metadata: deserializeMetadata(output),
499
+ };
500
+ return response;
1486
501
  };
1487
- export const de_DescribeListenerCommand = async (output, context) => {
502
+ export const de_DeleteCustomRoutingAcceleratorCommand = async (output, context) => {
1488
503
  if (output.statusCode >= 300) {
1489
- return de_DescribeListenerCommandError(output, context);
504
+ return de_CommandError(output, context);
1490
505
  }
1491
- const data = await parseBody(output.body, context);
1492
- let contents = {};
1493
- contents = _json(data);
506
+ await collectBody(output.body, context);
1494
507
  const response = {
1495
508
  $metadata: deserializeMetadata(output),
1496
- ...contents,
1497
509
  };
1498
510
  return response;
1499
511
  };
1500
- const de_DescribeListenerCommandError = async (output, context) => {
1501
- const parsedOutput = {
1502
- ...output,
1503
- body: await parseErrorBody(output.body, context),
512
+ export const de_DeleteCustomRoutingEndpointGroupCommand = async (output, context) => {
513
+ if (output.statusCode >= 300) {
514
+ return de_CommandError(output, context);
515
+ }
516
+ await collectBody(output.body, context);
517
+ const response = {
518
+ $metadata: deserializeMetadata(output),
1504
519
  };
1505
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1506
- switch (errorCode) {
1507
- case "InternalServiceErrorException":
1508
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1509
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1510
- case "InvalidArgumentException":
1511
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1512
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1513
- case "ListenerNotFoundException":
1514
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1515
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1516
- default:
1517
- const parsedBody = parsedOutput.body;
1518
- return throwDefaultError({
1519
- output,
1520
- parsedBody,
1521
- errorCode,
1522
- });
520
+ return response;
521
+ };
522
+ export const de_DeleteCustomRoutingListenerCommand = async (output, context) => {
523
+ if (output.statusCode >= 300) {
524
+ return de_CommandError(output, context);
1523
525
  }
526
+ await collectBody(output.body, context);
527
+ const response = {
528
+ $metadata: deserializeMetadata(output),
529
+ };
530
+ return response;
1524
531
  };
1525
- export const de_ListAcceleratorsCommand = async (output, context) => {
532
+ export const de_DeleteEndpointGroupCommand = async (output, context) => {
1526
533
  if (output.statusCode >= 300) {
1527
- return de_ListAcceleratorsCommandError(output, context);
534
+ return de_CommandError(output, context);
1528
535
  }
1529
- const data = await parseBody(output.body, context);
1530
- let contents = {};
1531
- contents = de_ListAcceleratorsResponse(data, context);
536
+ await collectBody(output.body, context);
1532
537
  const response = {
1533
538
  $metadata: deserializeMetadata(output),
1534
- ...contents,
1535
539
  };
1536
540
  return response;
1537
541
  };
1538
- const de_ListAcceleratorsCommandError = async (output, context) => {
1539
- const parsedOutput = {
1540
- ...output,
1541
- body: await parseErrorBody(output.body, context),
542
+ export const de_DeleteListenerCommand = async (output, context) => {
543
+ if (output.statusCode >= 300) {
544
+ return de_CommandError(output, context);
545
+ }
546
+ await collectBody(output.body, context);
547
+ const response = {
548
+ $metadata: deserializeMetadata(output),
1542
549
  };
1543
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1544
- switch (errorCode) {
1545
- case "InternalServiceErrorException":
1546
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1547
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1548
- case "InvalidArgumentException":
1549
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1550
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1551
- case "InvalidNextTokenException":
1552
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1553
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1554
- default:
1555
- const parsedBody = parsedOutput.body;
1556
- return throwDefaultError({
1557
- output,
1558
- parsedBody,
1559
- errorCode,
1560
- });
550
+ return response;
551
+ };
552
+ export const de_DenyCustomRoutingTrafficCommand = async (output, context) => {
553
+ if (output.statusCode >= 300) {
554
+ return de_CommandError(output, context);
1561
555
  }
556
+ await collectBody(output.body, context);
557
+ const response = {
558
+ $metadata: deserializeMetadata(output),
559
+ };
560
+ return response;
1562
561
  };
1563
- export const de_ListByoipCidrsCommand = async (output, context) => {
562
+ export const de_DeprovisionByoipCidrCommand = async (output, context) => {
1564
563
  if (output.statusCode >= 300) {
1565
- return de_ListByoipCidrsCommandError(output, context);
564
+ return de_CommandError(output, context);
1566
565
  }
1567
566
  const data = await parseBody(output.body, context);
1568
567
  let contents = {};
1569
- contents = de_ListByoipCidrsResponse(data, context);
568
+ contents = de_DeprovisionByoipCidrResponse(data, context);
1570
569
  const response = {
1571
570
  $metadata: deserializeMetadata(output),
1572
571
  ...contents,
1573
572
  };
1574
573
  return response;
1575
574
  };
1576
- const de_ListByoipCidrsCommandError = async (output, context) => {
1577
- const parsedOutput = {
1578
- ...output,
1579
- body: await parseErrorBody(output.body, context),
1580
- };
1581
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1582
- switch (errorCode) {
1583
- case "AccessDeniedException":
1584
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
1585
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1586
- case "InternalServiceErrorException":
1587
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1588
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1589
- case "InvalidArgumentException":
1590
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1591
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1592
- case "InvalidNextTokenException":
1593
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1594
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1595
- default:
1596
- const parsedBody = parsedOutput.body;
1597
- return throwDefaultError({
1598
- output,
1599
- parsedBody,
1600
- errorCode,
1601
- });
1602
- }
1603
- };
1604
- export const de_ListCrossAccountAttachmentsCommand = async (output, context) => {
575
+ export const de_DescribeAcceleratorCommand = async (output, context) => {
1605
576
  if (output.statusCode >= 300) {
1606
- return de_ListCrossAccountAttachmentsCommandError(output, context);
577
+ return de_CommandError(output, context);
1607
578
  }
1608
579
  const data = await parseBody(output.body, context);
1609
580
  let contents = {};
1610
- contents = de_ListCrossAccountAttachmentsResponse(data, context);
581
+ contents = de_DescribeAcceleratorResponse(data, context);
1611
582
  const response = {
1612
583
  $metadata: deserializeMetadata(output),
1613
584
  ...contents,
1614
585
  };
1615
586
  return response;
1616
587
  };
1617
- const de_ListCrossAccountAttachmentsCommandError = async (output, context) => {
1618
- const parsedOutput = {
1619
- ...output,
1620
- body: await parseErrorBody(output.body, context),
1621
- };
1622
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1623
- switch (errorCode) {
1624
- case "AccessDeniedException":
1625
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
1626
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1627
- case "InternalServiceErrorException":
1628
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1629
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1630
- case "InvalidArgumentException":
1631
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1632
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1633
- case "InvalidNextTokenException":
1634
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1635
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1636
- default:
1637
- const parsedBody = parsedOutput.body;
1638
- return throwDefaultError({
1639
- output,
1640
- parsedBody,
1641
- errorCode,
1642
- });
1643
- }
1644
- };
1645
- export const de_ListCrossAccountResourceAccountsCommand = async (output, context) => {
588
+ export const de_DescribeAcceleratorAttributesCommand = async (output, context) => {
1646
589
  if (output.statusCode >= 300) {
1647
- return de_ListCrossAccountResourceAccountsCommandError(output, context);
590
+ return de_CommandError(output, context);
1648
591
  }
1649
592
  const data = await parseBody(output.body, context);
1650
593
  let contents = {};
@@ -1655,113 +598,61 @@ export const de_ListCrossAccountResourceAccountsCommand = async (output, context
1655
598
  };
1656
599
  return response;
1657
600
  };
1658
- const de_ListCrossAccountResourceAccountsCommandError = async (output, context) => {
1659
- const parsedOutput = {
1660
- ...output,
1661
- body: await parseErrorBody(output.body, context),
1662
- };
1663
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1664
- switch (errorCode) {
1665
- case "AccessDeniedException":
1666
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
1667
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1668
- case "InternalServiceErrorException":
1669
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1670
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1671
- default:
1672
- const parsedBody = parsedOutput.body;
1673
- return throwDefaultError({
1674
- output,
1675
- parsedBody,
1676
- errorCode,
1677
- });
601
+ export const de_DescribeCrossAccountAttachmentCommand = async (output, context) => {
602
+ if (output.statusCode >= 300) {
603
+ return de_CommandError(output, context);
1678
604
  }
605
+ const data = await parseBody(output.body, context);
606
+ let contents = {};
607
+ contents = de_DescribeCrossAccountAttachmentResponse(data, context);
608
+ const response = {
609
+ $metadata: deserializeMetadata(output),
610
+ ...contents,
611
+ };
612
+ return response;
1679
613
  };
1680
- export const de_ListCrossAccountResourcesCommand = async (output, context) => {
614
+ export const de_DescribeCustomRoutingAcceleratorCommand = async (output, context) => {
1681
615
  if (output.statusCode >= 300) {
1682
- return de_ListCrossAccountResourcesCommandError(output, context);
616
+ return de_CommandError(output, context);
1683
617
  }
1684
618
  const data = await parseBody(output.body, context);
1685
619
  let contents = {};
1686
- contents = _json(data);
620
+ contents = de_DescribeCustomRoutingAcceleratorResponse(data, context);
1687
621
  const response = {
1688
622
  $metadata: deserializeMetadata(output),
1689
623
  ...contents,
1690
624
  };
1691
625
  return response;
1692
626
  };
1693
- const de_ListCrossAccountResourcesCommandError = async (output, context) => {
1694
- const parsedOutput = {
1695
- ...output,
1696
- body: await parseErrorBody(output.body, context),
1697
- };
1698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1699
- switch (errorCode) {
1700
- case "AcceleratorNotFoundException":
1701
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1702
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1703
- case "AccessDeniedException":
1704
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
1705
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1706
- case "InternalServiceErrorException":
1707
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1708
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1709
- case "InvalidArgumentException":
1710
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1711
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1712
- case "InvalidNextTokenException":
1713
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1714
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1715
- default:
1716
- const parsedBody = parsedOutput.body;
1717
- return throwDefaultError({
1718
- output,
1719
- parsedBody,
1720
- errorCode,
1721
- });
627
+ export const de_DescribeCustomRoutingAcceleratorAttributesCommand = async (output, context) => {
628
+ if (output.statusCode >= 300) {
629
+ return de_CommandError(output, context);
1722
630
  }
631
+ const data = await parseBody(output.body, context);
632
+ let contents = {};
633
+ contents = _json(data);
634
+ const response = {
635
+ $metadata: deserializeMetadata(output),
636
+ ...contents,
637
+ };
638
+ return response;
1723
639
  };
1724
- export const de_ListCustomRoutingAcceleratorsCommand = async (output, context) => {
640
+ export const de_DescribeCustomRoutingEndpointGroupCommand = async (output, context) => {
1725
641
  if (output.statusCode >= 300) {
1726
- return de_ListCustomRoutingAcceleratorsCommandError(output, context);
642
+ return de_CommandError(output, context);
1727
643
  }
1728
644
  const data = await parseBody(output.body, context);
1729
645
  let contents = {};
1730
- contents = de_ListCustomRoutingAcceleratorsResponse(data, context);
646
+ contents = _json(data);
1731
647
  const response = {
1732
648
  $metadata: deserializeMetadata(output),
1733
649
  ...contents,
1734
650
  };
1735
651
  return response;
1736
652
  };
1737
- const de_ListCustomRoutingAcceleratorsCommandError = async (output, context) => {
1738
- const parsedOutput = {
1739
- ...output,
1740
- body: await parseErrorBody(output.body, context),
1741
- };
1742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1743
- switch (errorCode) {
1744
- case "InternalServiceErrorException":
1745
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1746
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1747
- case "InvalidArgumentException":
1748
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1749
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1750
- case "InvalidNextTokenException":
1751
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1752
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1753
- default:
1754
- const parsedBody = parsedOutput.body;
1755
- return throwDefaultError({
1756
- output,
1757
- parsedBody,
1758
- errorCode,
1759
- });
1760
- }
1761
- };
1762
- export const de_ListCustomRoutingEndpointGroupsCommand = async (output, context) => {
653
+ export const de_DescribeCustomRoutingListenerCommand = async (output, context) => {
1763
654
  if (output.statusCode >= 300) {
1764
- return de_ListCustomRoutingEndpointGroupsCommandError(output, context);
655
+ return de_CommandError(output, context);
1765
656
  }
1766
657
  const data = await parseBody(output.body, context);
1767
658
  let contents = {};
@@ -1772,78 +663,22 @@ export const de_ListCustomRoutingEndpointGroupsCommand = async (output, context)
1772
663
  };
1773
664
  return response;
1774
665
  };
1775
- const de_ListCustomRoutingEndpointGroupsCommandError = async (output, context) => {
1776
- const parsedOutput = {
1777
- ...output,
1778
- body: await parseErrorBody(output.body, context),
1779
- };
1780
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1781
- switch (errorCode) {
1782
- case "InternalServiceErrorException":
1783
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1784
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1785
- case "InvalidArgumentException":
1786
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1787
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1788
- case "InvalidNextTokenException":
1789
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1790
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1791
- case "ListenerNotFoundException":
1792
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1793
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1794
- default:
1795
- const parsedBody = parsedOutput.body;
1796
- return throwDefaultError({
1797
- output,
1798
- parsedBody,
1799
- errorCode,
1800
- });
1801
- }
1802
- };
1803
- export const de_ListCustomRoutingListenersCommand = async (output, context) => {
666
+ export const de_DescribeEndpointGroupCommand = async (output, context) => {
1804
667
  if (output.statusCode >= 300) {
1805
- return de_ListCustomRoutingListenersCommandError(output, context);
668
+ return de_CommandError(output, context);
1806
669
  }
1807
670
  const data = await parseBody(output.body, context);
1808
671
  let contents = {};
1809
- contents = _json(data);
672
+ contents = de_DescribeEndpointGroupResponse(data, context);
1810
673
  const response = {
1811
674
  $metadata: deserializeMetadata(output),
1812
675
  ...contents,
1813
676
  };
1814
677
  return response;
1815
678
  };
1816
- const de_ListCustomRoutingListenersCommandError = async (output, context) => {
1817
- const parsedOutput = {
1818
- ...output,
1819
- body: await parseErrorBody(output.body, context),
1820
- };
1821
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1822
- switch (errorCode) {
1823
- case "AcceleratorNotFoundException":
1824
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1825
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1826
- case "InternalServiceErrorException":
1827
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1828
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1829
- case "InvalidArgumentException":
1830
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1831
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1832
- case "InvalidNextTokenException":
1833
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1834
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1835
- default:
1836
- const parsedBody = parsedOutput.body;
1837
- return throwDefaultError({
1838
- output,
1839
- parsedBody,
1840
- errorCode,
1841
- });
1842
- }
1843
- };
1844
- export const de_ListCustomRoutingPortMappingsCommand = async (output, context) => {
679
+ export const de_DescribeListenerCommand = async (output, context) => {
1845
680
  if (output.statusCode >= 300) {
1846
- return de_ListCustomRoutingPortMappingsCommandError(output, context);
681
+ return de_CommandError(output, context);
1847
682
  }
1848
683
  const data = await parseBody(output.body, context);
1849
684
  let contents = {};
@@ -1854,122 +689,48 @@ export const de_ListCustomRoutingPortMappingsCommand = async (output, context) =
1854
689
  };
1855
690
  return response;
1856
691
  };
1857
- const de_ListCustomRoutingPortMappingsCommandError = async (output, context) => {
1858
- const parsedOutput = {
1859
- ...output,
1860
- body: await parseErrorBody(output.body, context),
1861
- };
1862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1863
- switch (errorCode) {
1864
- case "AcceleratorNotFoundException":
1865
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1866
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1867
- case "EndpointGroupNotFoundException":
1868
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
1869
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
1870
- case "InternalServiceErrorException":
1871
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1872
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1873
- case "InvalidArgumentException":
1874
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1875
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1876
- case "InvalidNextTokenException":
1877
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1878
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1879
- default:
1880
- const parsedBody = parsedOutput.body;
1881
- return throwDefaultError({
1882
- output,
1883
- parsedBody,
1884
- errorCode,
1885
- });
1886
- }
1887
- };
1888
- export const de_ListCustomRoutingPortMappingsByDestinationCommand = async (output, context) => {
692
+ export const de_ListAcceleratorsCommand = async (output, context) => {
1889
693
  if (output.statusCode >= 300) {
1890
- return de_ListCustomRoutingPortMappingsByDestinationCommandError(output, context);
694
+ return de_CommandError(output, context);
1891
695
  }
1892
696
  const data = await parseBody(output.body, context);
1893
697
  let contents = {};
1894
- contents = _json(data);
698
+ contents = de_ListAcceleratorsResponse(data, context);
1895
699
  const response = {
1896
700
  $metadata: deserializeMetadata(output),
1897
701
  ...contents,
1898
702
  };
1899
703
  return response;
1900
704
  };
1901
- const de_ListCustomRoutingPortMappingsByDestinationCommandError = async (output, context) => {
1902
- const parsedOutput = {
1903
- ...output,
1904
- body: await parseErrorBody(output.body, context),
1905
- };
1906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1907
- switch (errorCode) {
1908
- case "EndpointNotFoundException":
1909
- case "com.amazonaws.globalaccelerator#EndpointNotFoundException":
1910
- throw await de_EndpointNotFoundExceptionRes(parsedOutput, context);
1911
- case "InternalServiceErrorException":
1912
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1913
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1914
- case "InvalidArgumentException":
1915
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1916
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1917
- case "InvalidNextTokenException":
1918
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1919
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1920
- default:
1921
- const parsedBody = parsedOutput.body;
1922
- return throwDefaultError({
1923
- output,
1924
- parsedBody,
1925
- errorCode,
1926
- });
1927
- }
1928
- };
1929
- export const de_ListEndpointGroupsCommand = async (output, context) => {
705
+ export const de_ListByoipCidrsCommand = async (output, context) => {
1930
706
  if (output.statusCode >= 300) {
1931
- return de_ListEndpointGroupsCommandError(output, context);
707
+ return de_CommandError(output, context);
1932
708
  }
1933
709
  const data = await parseBody(output.body, context);
1934
710
  let contents = {};
1935
- contents = de_ListEndpointGroupsResponse(data, context);
711
+ contents = de_ListByoipCidrsResponse(data, context);
1936
712
  const response = {
1937
713
  $metadata: deserializeMetadata(output),
1938
714
  ...contents,
1939
715
  };
1940
716
  return response;
1941
717
  };
1942
- const de_ListEndpointGroupsCommandError = async (output, context) => {
1943
- const parsedOutput = {
1944
- ...output,
1945
- body: await parseErrorBody(output.body, context),
1946
- };
1947
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1948
- switch (errorCode) {
1949
- case "InternalServiceErrorException":
1950
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1951
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1952
- case "InvalidArgumentException":
1953
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1954
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1955
- case "InvalidNextTokenException":
1956
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1957
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1958
- case "ListenerNotFoundException":
1959
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1960
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1961
- default:
1962
- const parsedBody = parsedOutput.body;
1963
- return throwDefaultError({
1964
- output,
1965
- parsedBody,
1966
- errorCode,
1967
- });
718
+ export const de_ListCrossAccountAttachmentsCommand = async (output, context) => {
719
+ if (output.statusCode >= 300) {
720
+ return de_CommandError(output, context);
1968
721
  }
722
+ const data = await parseBody(output.body, context);
723
+ let contents = {};
724
+ contents = de_ListCrossAccountAttachmentsResponse(data, context);
725
+ const response = {
726
+ $metadata: deserializeMetadata(output),
727
+ ...contents,
728
+ };
729
+ return response;
1969
730
  };
1970
- export const de_ListListenersCommand = async (output, context) => {
731
+ export const de_ListCrossAccountResourceAccountsCommand = async (output, context) => {
1971
732
  if (output.statusCode >= 300) {
1972
- return de_ListListenersCommandError(output, context);
733
+ return de_CommandError(output, context);
1973
734
  }
1974
735
  const data = await parseBody(output.body, context);
1975
736
  let contents = {};
@@ -1980,37 +741,9 @@ export const de_ListListenersCommand = async (output, context) => {
1980
741
  };
1981
742
  return response;
1982
743
  };
1983
- const de_ListListenersCommandError = async (output, context) => {
1984
- const parsedOutput = {
1985
- ...output,
1986
- body: await parseErrorBody(output.body, context),
1987
- };
1988
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1989
- switch (errorCode) {
1990
- case "AcceleratorNotFoundException":
1991
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1992
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1993
- case "InternalServiceErrorException":
1994
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
1995
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1996
- case "InvalidArgumentException":
1997
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
1998
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1999
- case "InvalidNextTokenException":
2000
- case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
2001
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2002
- default:
2003
- const parsedBody = parsedOutput.body;
2004
- return throwDefaultError({
2005
- output,
2006
- parsedBody,
2007
- errorCode,
2008
- });
2009
- }
2010
- };
2011
- export const de_ListTagsForResourceCommand = async (output, context) => {
744
+ export const de_ListCrossAccountResourcesCommand = async (output, context) => {
2012
745
  if (output.statusCode >= 300) {
2013
- return de_ListTagsForResourceCommandError(output, context);
746
+ return de_CommandError(output, context);
2014
747
  }
2015
748
  const data = await parseBody(output.body, context);
2016
749
  let contents = {};
@@ -2021,163 +754,61 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2021
754
  };
2022
755
  return response;
2023
756
  };
2024
- const de_ListTagsForResourceCommandError = async (output, context) => {
2025
- const parsedOutput = {
2026
- ...output,
2027
- body: await parseErrorBody(output.body, context),
2028
- };
2029
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2030
- switch (errorCode) {
2031
- case "AcceleratorNotFoundException":
2032
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2033
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2034
- case "InternalServiceErrorException":
2035
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2036
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2037
- case "InvalidArgumentException":
2038
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2039
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2040
- default:
2041
- const parsedBody = parsedOutput.body;
2042
- return throwDefaultError({
2043
- output,
2044
- parsedBody,
2045
- errorCode,
2046
- });
757
+ export const de_ListCustomRoutingAcceleratorsCommand = async (output, context) => {
758
+ if (output.statusCode >= 300) {
759
+ return de_CommandError(output, context);
2047
760
  }
761
+ const data = await parseBody(output.body, context);
762
+ let contents = {};
763
+ contents = de_ListCustomRoutingAcceleratorsResponse(data, context);
764
+ const response = {
765
+ $metadata: deserializeMetadata(output),
766
+ ...contents,
767
+ };
768
+ return response;
2048
769
  };
2049
- export const de_ProvisionByoipCidrCommand = async (output, context) => {
770
+ export const de_ListCustomRoutingEndpointGroupsCommand = async (output, context) => {
2050
771
  if (output.statusCode >= 300) {
2051
- return de_ProvisionByoipCidrCommandError(output, context);
772
+ return de_CommandError(output, context);
2052
773
  }
2053
774
  const data = await parseBody(output.body, context);
2054
775
  let contents = {};
2055
- contents = de_ProvisionByoipCidrResponse(data, context);
776
+ contents = _json(data);
2056
777
  const response = {
2057
778
  $metadata: deserializeMetadata(output),
2058
779
  ...contents,
2059
780
  };
2060
781
  return response;
2061
782
  };
2062
- const de_ProvisionByoipCidrCommandError = async (output, context) => {
2063
- const parsedOutput = {
2064
- ...output,
2065
- body: await parseErrorBody(output.body, context),
2066
- };
2067
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2068
- switch (errorCode) {
2069
- case "AccessDeniedException":
2070
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2071
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2072
- case "IncorrectCidrStateException":
2073
- case "com.amazonaws.globalaccelerator#IncorrectCidrStateException":
2074
- throw await de_IncorrectCidrStateExceptionRes(parsedOutput, context);
2075
- case "InternalServiceErrorException":
2076
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2077
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2078
- case "InvalidArgumentException":
2079
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2080
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2081
- case "LimitExceededException":
2082
- case "com.amazonaws.globalaccelerator#LimitExceededException":
2083
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2084
- default:
2085
- const parsedBody = parsedOutput.body;
2086
- return throwDefaultError({
2087
- output,
2088
- parsedBody,
2089
- errorCode,
2090
- });
2091
- }
2092
- };
2093
- export const de_RemoveCustomRoutingEndpointsCommand = async (output, context) => {
783
+ export const de_ListCustomRoutingListenersCommand = async (output, context) => {
2094
784
  if (output.statusCode >= 300) {
2095
- return de_RemoveCustomRoutingEndpointsCommandError(output, context);
785
+ return de_CommandError(output, context);
2096
786
  }
2097
- await collectBody(output.body, context);
787
+ const data = await parseBody(output.body, context);
788
+ let contents = {};
789
+ contents = _json(data);
2098
790
  const response = {
2099
791
  $metadata: deserializeMetadata(output),
792
+ ...contents,
2100
793
  };
2101
794
  return response;
2102
795
  };
2103
- const de_RemoveCustomRoutingEndpointsCommandError = async (output, context) => {
2104
- const parsedOutput = {
2105
- ...output,
2106
- body: await parseErrorBody(output.body, context),
2107
- };
2108
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2109
- switch (errorCode) {
2110
- case "AccessDeniedException":
2111
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2112
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2113
- case "ConflictException":
2114
- case "com.amazonaws.globalaccelerator#ConflictException":
2115
- throw await de_ConflictExceptionRes(parsedOutput, context);
2116
- case "EndpointGroupNotFoundException":
2117
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
2118
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
2119
- case "EndpointNotFoundException":
2120
- case "com.amazonaws.globalaccelerator#EndpointNotFoundException":
2121
- throw await de_EndpointNotFoundExceptionRes(parsedOutput, context);
2122
- case "InternalServiceErrorException":
2123
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2124
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2125
- case "InvalidArgumentException":
2126
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2127
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2128
- default:
2129
- const parsedBody = parsedOutput.body;
2130
- return throwDefaultError({
2131
- output,
2132
- parsedBody,
2133
- errorCode,
2134
- });
2135
- }
2136
- };
2137
- export const de_RemoveEndpointsCommand = async (output, context) => {
796
+ export const de_ListCustomRoutingPortMappingsCommand = async (output, context) => {
2138
797
  if (output.statusCode >= 300) {
2139
- return de_RemoveEndpointsCommandError(output, context);
798
+ return de_CommandError(output, context);
2140
799
  }
2141
- await collectBody(output.body, context);
800
+ const data = await parseBody(output.body, context);
801
+ let contents = {};
802
+ contents = _json(data);
2142
803
  const response = {
2143
804
  $metadata: deserializeMetadata(output),
805
+ ...contents,
2144
806
  };
2145
807
  return response;
2146
808
  };
2147
- const de_RemoveEndpointsCommandError = async (output, context) => {
2148
- const parsedOutput = {
2149
- ...output,
2150
- body: await parseErrorBody(output.body, context),
2151
- };
2152
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2153
- switch (errorCode) {
2154
- case "AccessDeniedException":
2155
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2156
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2157
- case "EndpointGroupNotFoundException":
2158
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
2159
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
2160
- case "InternalServiceErrorException":
2161
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2162
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2163
- case "InvalidArgumentException":
2164
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2165
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2166
- case "TransactionInProgressException":
2167
- case "com.amazonaws.globalaccelerator#TransactionInProgressException":
2168
- throw await de_TransactionInProgressExceptionRes(parsedOutput, context);
2169
- default:
2170
- const parsedBody = parsedOutput.body;
2171
- return throwDefaultError({
2172
- output,
2173
- parsedBody,
2174
- errorCode,
2175
- });
2176
- }
2177
- };
2178
- export const de_TagResourceCommand = async (output, context) => {
809
+ export const de_ListCustomRoutingPortMappingsByDestinationCommand = async (output, context) => {
2179
810
  if (output.statusCode >= 300) {
2180
- return de_TagResourceCommandError(output, context);
811
+ return de_CommandError(output, context);
2181
812
  }
2182
813
  const data = await parseBody(output.body, context);
2183
814
  let contents = {};
@@ -2188,34 +819,22 @@ export const de_TagResourceCommand = async (output, context) => {
2188
819
  };
2189
820
  return response;
2190
821
  };
2191
- const de_TagResourceCommandError = async (output, context) => {
2192
- const parsedOutput = {
2193
- ...output,
2194
- body: await parseErrorBody(output.body, context),
2195
- };
2196
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2197
- switch (errorCode) {
2198
- case "AcceleratorNotFoundException":
2199
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2200
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2201
- case "InternalServiceErrorException":
2202
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2203
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2204
- case "InvalidArgumentException":
2205
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2206
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2207
- default:
2208
- const parsedBody = parsedOutput.body;
2209
- return throwDefaultError({
2210
- output,
2211
- parsedBody,
2212
- errorCode,
2213
- });
822
+ export const de_ListEndpointGroupsCommand = async (output, context) => {
823
+ if (output.statusCode >= 300) {
824
+ return de_CommandError(output, context);
2214
825
  }
826
+ const data = await parseBody(output.body, context);
827
+ let contents = {};
828
+ contents = de_ListEndpointGroupsResponse(data, context);
829
+ const response = {
830
+ $metadata: deserializeMetadata(output),
831
+ ...contents,
832
+ };
833
+ return response;
2215
834
  };
2216
- export const de_UntagResourceCommand = async (output, context) => {
835
+ export const de_ListListenersCommand = async (output, context) => {
2217
836
  if (output.statusCode >= 300) {
2218
- return de_UntagResourceCommandError(output, context);
837
+ return de_CommandError(output, context);
2219
838
  }
2220
839
  const data = await parseBody(output.body, context);
2221
840
  let contents = {};
@@ -2226,75 +845,55 @@ export const de_UntagResourceCommand = async (output, context) => {
2226
845
  };
2227
846
  return response;
2228
847
  };
2229
- const de_UntagResourceCommandError = async (output, context) => {
2230
- const parsedOutput = {
2231
- ...output,
2232
- body: await parseErrorBody(output.body, context),
2233
- };
2234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2235
- switch (errorCode) {
2236
- case "AcceleratorNotFoundException":
2237
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2238
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2239
- case "InternalServiceErrorException":
2240
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2241
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2242
- case "InvalidArgumentException":
2243
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2244
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2245
- default:
2246
- const parsedBody = parsedOutput.body;
2247
- return throwDefaultError({
2248
- output,
2249
- parsedBody,
2250
- errorCode,
2251
- });
848
+ export const de_ListTagsForResourceCommand = async (output, context) => {
849
+ if (output.statusCode >= 300) {
850
+ return de_CommandError(output, context);
2252
851
  }
852
+ const data = await parseBody(output.body, context);
853
+ let contents = {};
854
+ contents = _json(data);
855
+ const response = {
856
+ $metadata: deserializeMetadata(output),
857
+ ...contents,
858
+ };
859
+ return response;
2253
860
  };
2254
- export const de_UpdateAcceleratorCommand = async (output, context) => {
861
+ export const de_ProvisionByoipCidrCommand = async (output, context) => {
2255
862
  if (output.statusCode >= 300) {
2256
- return de_UpdateAcceleratorCommandError(output, context);
863
+ return de_CommandError(output, context);
2257
864
  }
2258
865
  const data = await parseBody(output.body, context);
2259
866
  let contents = {};
2260
- contents = de_UpdateAcceleratorResponse(data, context);
867
+ contents = de_ProvisionByoipCidrResponse(data, context);
2261
868
  const response = {
2262
869
  $metadata: deserializeMetadata(output),
2263
870
  ...contents,
2264
871
  };
2265
872
  return response;
2266
873
  };
2267
- const de_UpdateAcceleratorCommandError = async (output, context) => {
2268
- const parsedOutput = {
2269
- ...output,
2270
- body: await parseErrorBody(output.body, context),
874
+ export const de_RemoveCustomRoutingEndpointsCommand = async (output, context) => {
875
+ if (output.statusCode >= 300) {
876
+ return de_CommandError(output, context);
877
+ }
878
+ await collectBody(output.body, context);
879
+ const response = {
880
+ $metadata: deserializeMetadata(output),
2271
881
  };
2272
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2273
- switch (errorCode) {
2274
- case "AcceleratorNotFoundException":
2275
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2276
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2277
- case "AccessDeniedException":
2278
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2279
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2280
- case "InternalServiceErrorException":
2281
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2282
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2283
- case "InvalidArgumentException":
2284
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2285
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2286
- default:
2287
- const parsedBody = parsedOutput.body;
2288
- return throwDefaultError({
2289
- output,
2290
- parsedBody,
2291
- errorCode,
2292
- });
882
+ return response;
883
+ };
884
+ export const de_RemoveEndpointsCommand = async (output, context) => {
885
+ if (output.statusCode >= 300) {
886
+ return de_CommandError(output, context);
2293
887
  }
888
+ await collectBody(output.body, context);
889
+ const response = {
890
+ $metadata: deserializeMetadata(output),
891
+ };
892
+ return response;
2294
893
  };
2295
- export const de_UpdateAcceleratorAttributesCommand = async (output, context) => {
894
+ export const de_TagResourceCommand = async (output, context) => {
2296
895
  if (output.statusCode >= 300) {
2297
- return de_UpdateAcceleratorAttributesCommandError(output, context);
896
+ return de_CommandError(output, context);
2298
897
  }
2299
898
  const data = await parseBody(output.body, context);
2300
899
  let contents = {};
@@ -2305,84 +904,61 @@ export const de_UpdateAcceleratorAttributesCommand = async (output, context) =>
2305
904
  };
2306
905
  return response;
2307
906
  };
2308
- const de_UpdateAcceleratorAttributesCommandError = async (output, context) => {
2309
- const parsedOutput = {
2310
- ...output,
2311
- body: await parseErrorBody(output.body, context),
2312
- };
2313
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2314
- switch (errorCode) {
2315
- case "AcceleratorNotFoundException":
2316
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2317
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2318
- case "AccessDeniedException":
2319
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2320
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2321
- case "InternalServiceErrorException":
2322
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2323
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2324
- case "InvalidArgumentException":
2325
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2326
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2327
- default:
2328
- const parsedBody = parsedOutput.body;
2329
- return throwDefaultError({
2330
- output,
2331
- parsedBody,
2332
- errorCode,
2333
- });
907
+ export const de_UntagResourceCommand = async (output, context) => {
908
+ if (output.statusCode >= 300) {
909
+ return de_CommandError(output, context);
2334
910
  }
911
+ const data = await parseBody(output.body, context);
912
+ let contents = {};
913
+ contents = _json(data);
914
+ const response = {
915
+ $metadata: deserializeMetadata(output),
916
+ ...contents,
917
+ };
918
+ return response;
2335
919
  };
2336
- export const de_UpdateCrossAccountAttachmentCommand = async (output, context) => {
920
+ export const de_UpdateAcceleratorCommand = async (output, context) => {
2337
921
  if (output.statusCode >= 300) {
2338
- return de_UpdateCrossAccountAttachmentCommandError(output, context);
922
+ return de_CommandError(output, context);
2339
923
  }
2340
924
  const data = await parseBody(output.body, context);
2341
925
  let contents = {};
2342
- contents = de_UpdateCrossAccountAttachmentResponse(data, context);
926
+ contents = de_UpdateAcceleratorResponse(data, context);
2343
927
  const response = {
2344
928
  $metadata: deserializeMetadata(output),
2345
929
  ...contents,
2346
930
  };
2347
931
  return response;
2348
932
  };
2349
- const de_UpdateCrossAccountAttachmentCommandError = async (output, context) => {
2350
- const parsedOutput = {
2351
- ...output,
2352
- body: await parseErrorBody(output.body, context),
933
+ export const de_UpdateAcceleratorAttributesCommand = async (output, context) => {
934
+ if (output.statusCode >= 300) {
935
+ return de_CommandError(output, context);
936
+ }
937
+ const data = await parseBody(output.body, context);
938
+ let contents = {};
939
+ contents = _json(data);
940
+ const response = {
941
+ $metadata: deserializeMetadata(output),
942
+ ...contents,
2353
943
  };
2354
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2355
- switch (errorCode) {
2356
- case "AccessDeniedException":
2357
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2358
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2359
- case "AttachmentNotFoundException":
2360
- case "com.amazonaws.globalaccelerator#AttachmentNotFoundException":
2361
- throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context);
2362
- case "InternalServiceErrorException":
2363
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2364
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2365
- case "InvalidArgumentException":
2366
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2367
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2368
- case "LimitExceededException":
2369
- case "com.amazonaws.globalaccelerator#LimitExceededException":
2370
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2371
- case "TransactionInProgressException":
2372
- case "com.amazonaws.globalaccelerator#TransactionInProgressException":
2373
- throw await de_TransactionInProgressExceptionRes(parsedOutput, context);
2374
- default:
2375
- const parsedBody = parsedOutput.body;
2376
- return throwDefaultError({
2377
- output,
2378
- parsedBody,
2379
- errorCode,
2380
- });
944
+ return response;
945
+ };
946
+ export const de_UpdateCrossAccountAttachmentCommand = async (output, context) => {
947
+ if (output.statusCode >= 300) {
948
+ return de_CommandError(output, context);
2381
949
  }
950
+ const data = await parseBody(output.body, context);
951
+ let contents = {};
952
+ contents = de_UpdateCrossAccountAttachmentResponse(data, context);
953
+ const response = {
954
+ $metadata: deserializeMetadata(output),
955
+ ...contents,
956
+ };
957
+ return response;
2382
958
  };
2383
959
  export const de_UpdateCustomRoutingAcceleratorCommand = async (output, context) => {
2384
960
  if (output.statusCode >= 300) {
2385
- return de_UpdateCustomRoutingAcceleratorCommandError(output, context);
961
+ return de_CommandError(output, context);
2386
962
  }
2387
963
  const data = await parseBody(output.body, context);
2388
964
  let contents = {};
@@ -2393,34 +969,9 @@ export const de_UpdateCustomRoutingAcceleratorCommand = async (output, context)
2393
969
  };
2394
970
  return response;
2395
971
  };
2396
- const de_UpdateCustomRoutingAcceleratorCommandError = async (output, context) => {
2397
- const parsedOutput = {
2398
- ...output,
2399
- body: await parseErrorBody(output.body, context),
2400
- };
2401
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2402
- switch (errorCode) {
2403
- case "AcceleratorNotFoundException":
2404
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2405
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2406
- case "InternalServiceErrorException":
2407
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2408
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2409
- case "InvalidArgumentException":
2410
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2411
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2412
- default:
2413
- const parsedBody = parsedOutput.body;
2414
- return throwDefaultError({
2415
- output,
2416
- parsedBody,
2417
- errorCode,
2418
- });
2419
- }
2420
- };
2421
972
  export const de_UpdateCustomRoutingAcceleratorAttributesCommand = async (output, context) => {
2422
973
  if (output.statusCode >= 300) {
2423
- return de_UpdateCustomRoutingAcceleratorAttributesCommandError(output, context);
974
+ return de_CommandError(output, context);
2424
975
  }
2425
976
  const data = await parseBody(output.body, context);
2426
977
  let contents = {};
@@ -2431,37 +982,9 @@ export const de_UpdateCustomRoutingAcceleratorAttributesCommand = async (output,
2431
982
  };
2432
983
  return response;
2433
984
  };
2434
- const de_UpdateCustomRoutingAcceleratorAttributesCommandError = async (output, context) => {
2435
- const parsedOutput = {
2436
- ...output,
2437
- body: await parseErrorBody(output.body, context),
2438
- };
2439
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2440
- switch (errorCode) {
2441
- case "AcceleratorNotFoundException":
2442
- case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
2443
- throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
2444
- case "AccessDeniedException":
2445
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2446
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2447
- case "InternalServiceErrorException":
2448
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2449
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2450
- case "InvalidArgumentException":
2451
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2452
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2453
- default:
2454
- const parsedBody = parsedOutput.body;
2455
- return throwDefaultError({
2456
- output,
2457
- parsedBody,
2458
- errorCode,
2459
- });
2460
- }
2461
- };
2462
985
  export const de_UpdateCustomRoutingListenerCommand = async (output, context) => {
2463
986
  if (output.statusCode >= 300) {
2464
- return de_UpdateCustomRoutingListenerCommandError(output, context);
987
+ return de_CommandError(output, context);
2465
988
  }
2466
989
  const data = await parseBody(output.body, context);
2467
990
  let contents = {};
@@ -2472,40 +995,9 @@ export const de_UpdateCustomRoutingListenerCommand = async (output, context) =>
2472
995
  };
2473
996
  return response;
2474
997
  };
2475
- const de_UpdateCustomRoutingListenerCommandError = async (output, context) => {
2476
- const parsedOutput = {
2477
- ...output,
2478
- body: await parseErrorBody(output.body, context),
2479
- };
2480
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2481
- switch (errorCode) {
2482
- case "InternalServiceErrorException":
2483
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2484
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2485
- case "InvalidArgumentException":
2486
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2487
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2488
- case "InvalidPortRangeException":
2489
- case "com.amazonaws.globalaccelerator#InvalidPortRangeException":
2490
- throw await de_InvalidPortRangeExceptionRes(parsedOutput, context);
2491
- case "LimitExceededException":
2492
- case "com.amazonaws.globalaccelerator#LimitExceededException":
2493
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2494
- case "ListenerNotFoundException":
2495
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
2496
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
2497
- default:
2498
- const parsedBody = parsedOutput.body;
2499
- return throwDefaultError({
2500
- output,
2501
- parsedBody,
2502
- errorCode,
2503
- });
2504
- }
2505
- };
2506
998
  export const de_UpdateEndpointGroupCommand = async (output, context) => {
2507
999
  if (output.statusCode >= 300) {
2508
- return de_UpdateEndpointGroupCommandError(output, context);
1000
+ return de_CommandError(output, context);
2509
1001
  }
2510
1002
  const data = await parseBody(output.body, context);
2511
1003
  let contents = {};
@@ -2516,40 +1008,9 @@ export const de_UpdateEndpointGroupCommand = async (output, context) => {
2516
1008
  };
2517
1009
  return response;
2518
1010
  };
2519
- const de_UpdateEndpointGroupCommandError = async (output, context) => {
2520
- const parsedOutput = {
2521
- ...output,
2522
- body: await parseErrorBody(output.body, context),
2523
- };
2524
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2525
- switch (errorCode) {
2526
- case "AccessDeniedException":
2527
- case "com.amazonaws.globalaccelerator#AccessDeniedException":
2528
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2529
- case "EndpointGroupNotFoundException":
2530
- case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
2531
- throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
2532
- case "InternalServiceErrorException":
2533
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2534
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2535
- case "InvalidArgumentException":
2536
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2537
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2538
- case "LimitExceededException":
2539
- case "com.amazonaws.globalaccelerator#LimitExceededException":
2540
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2541
- default:
2542
- const parsedBody = parsedOutput.body;
2543
- return throwDefaultError({
2544
- output,
2545
- parsedBody,
2546
- errorCode,
2547
- });
2548
- }
2549
- };
2550
1011
  export const de_UpdateListenerCommand = async (output, context) => {
2551
1012
  if (output.statusCode >= 300) {
2552
- return de_UpdateListenerCommandError(output, context);
1013
+ return de_CommandError(output, context);
2553
1014
  }
2554
1015
  const data = await parseBody(output.body, context);
2555
1016
  let contents = {};
@@ -2560,40 +1021,9 @@ export const de_UpdateListenerCommand = async (output, context) => {
2560
1021
  };
2561
1022
  return response;
2562
1023
  };
2563
- const de_UpdateListenerCommandError = async (output, context) => {
2564
- const parsedOutput = {
2565
- ...output,
2566
- body: await parseErrorBody(output.body, context),
2567
- };
2568
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2569
- switch (errorCode) {
2570
- case "InternalServiceErrorException":
2571
- case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2572
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2573
- case "InvalidArgumentException":
2574
- case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2575
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
2576
- case "InvalidPortRangeException":
2577
- case "com.amazonaws.globalaccelerator#InvalidPortRangeException":
2578
- throw await de_InvalidPortRangeExceptionRes(parsedOutput, context);
2579
- case "LimitExceededException":
2580
- case "com.amazonaws.globalaccelerator#LimitExceededException":
2581
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2582
- case "ListenerNotFoundException":
2583
- case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
2584
- throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
2585
- default:
2586
- const parsedBody = parsedOutput.body;
2587
- return throwDefaultError({
2588
- output,
2589
- parsedBody,
2590
- errorCode,
2591
- });
2592
- }
2593
- };
2594
1024
  export const de_WithdrawByoipCidrCommand = async (output, context) => {
2595
1025
  if (output.statusCode >= 300) {
2596
- return de_WithdrawByoipCidrCommandError(output, context);
1026
+ return de_CommandError(output, context);
2597
1027
  }
2598
1028
  const data = await parseBody(output.body, context);
2599
1029
  let contents = {};
@@ -2604,7 +1034,7 @@ export const de_WithdrawByoipCidrCommand = async (output, context) => {
2604
1034
  };
2605
1035
  return response;
2606
1036
  };
2607
- const de_WithdrawByoipCidrCommandError = async (output, context) => {
1037
+ const de_CommandError = async (output, context) => {
2608
1038
  const parsedOutput = {
2609
1039
  ...output,
2610
1040
  body: await parseErrorBody(output.body, context),
@@ -2614,18 +1044,63 @@ const de_WithdrawByoipCidrCommandError = async (output, context) => {
2614
1044
  case "AccessDeniedException":
2615
1045
  case "com.amazonaws.globalaccelerator#AccessDeniedException":
2616
1046
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2617
- case "ByoipCidrNotFoundException":
2618
- case "com.amazonaws.globalaccelerator#ByoipCidrNotFoundException":
2619
- throw await de_ByoipCidrNotFoundExceptionRes(parsedOutput, context);
2620
- case "IncorrectCidrStateException":
2621
- case "com.amazonaws.globalaccelerator#IncorrectCidrStateException":
2622
- throw await de_IncorrectCidrStateExceptionRes(parsedOutput, context);
1047
+ case "ConflictException":
1048
+ case "com.amazonaws.globalaccelerator#ConflictException":
1049
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1050
+ case "EndpointAlreadyExistsException":
1051
+ case "com.amazonaws.globalaccelerator#EndpointAlreadyExistsException":
1052
+ throw await de_EndpointAlreadyExistsExceptionRes(parsedOutput, context);
1053
+ case "EndpointGroupNotFoundException":
1054
+ case "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException":
1055
+ throw await de_EndpointGroupNotFoundExceptionRes(parsedOutput, context);
2623
1056
  case "InternalServiceErrorException":
2624
1057
  case "com.amazonaws.globalaccelerator#InternalServiceErrorException":
2625
1058
  throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
2626
1059
  case "InvalidArgumentException":
2627
1060
  case "com.amazonaws.globalaccelerator#InvalidArgumentException":
2628
1061
  throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1062
+ case "LimitExceededException":
1063
+ case "com.amazonaws.globalaccelerator#LimitExceededException":
1064
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1065
+ case "TransactionInProgressException":
1066
+ case "com.amazonaws.globalaccelerator#TransactionInProgressException":
1067
+ throw await de_TransactionInProgressExceptionRes(parsedOutput, context);
1068
+ case "ByoipCidrNotFoundException":
1069
+ case "com.amazonaws.globalaccelerator#ByoipCidrNotFoundException":
1070
+ throw await de_ByoipCidrNotFoundExceptionRes(parsedOutput, context);
1071
+ case "IncorrectCidrStateException":
1072
+ case "com.amazonaws.globalaccelerator#IncorrectCidrStateException":
1073
+ throw await de_IncorrectCidrStateExceptionRes(parsedOutput, context);
1074
+ case "AcceleratorNotFoundException":
1075
+ case "com.amazonaws.globalaccelerator#AcceleratorNotFoundException":
1076
+ throw await de_AcceleratorNotFoundExceptionRes(parsedOutput, context);
1077
+ case "EndpointGroupAlreadyExistsException":
1078
+ case "com.amazonaws.globalaccelerator#EndpointGroupAlreadyExistsException":
1079
+ throw await de_EndpointGroupAlreadyExistsExceptionRes(parsedOutput, context);
1080
+ case "InvalidPortRangeException":
1081
+ case "com.amazonaws.globalaccelerator#InvalidPortRangeException":
1082
+ throw await de_InvalidPortRangeExceptionRes(parsedOutput, context);
1083
+ case "ListenerNotFoundException":
1084
+ case "com.amazonaws.globalaccelerator#ListenerNotFoundException":
1085
+ throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
1086
+ case "AcceleratorNotDisabledException":
1087
+ case "com.amazonaws.globalaccelerator#AcceleratorNotDisabledException":
1088
+ throw await de_AcceleratorNotDisabledExceptionRes(parsedOutput, context);
1089
+ case "AssociatedListenerFoundException":
1090
+ case "com.amazonaws.globalaccelerator#AssociatedListenerFoundException":
1091
+ throw await de_AssociatedListenerFoundExceptionRes(parsedOutput, context);
1092
+ case "AttachmentNotFoundException":
1093
+ case "com.amazonaws.globalaccelerator#AttachmentNotFoundException":
1094
+ throw await de_AttachmentNotFoundExceptionRes(parsedOutput, context);
1095
+ case "AssociatedEndpointGroupFoundException":
1096
+ case "com.amazonaws.globalaccelerator#AssociatedEndpointGroupFoundException":
1097
+ throw await de_AssociatedEndpointGroupFoundExceptionRes(parsedOutput, context);
1098
+ case "InvalidNextTokenException":
1099
+ case "com.amazonaws.globalaccelerator#InvalidNextTokenException":
1100
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1101
+ case "EndpointNotFoundException":
1102
+ case "com.amazonaws.globalaccelerator#EndpointNotFoundException":
1103
+ throw await de_EndpointNotFoundExceptionRes(parsedOutput, context);
2629
1104
  default:
2630
1105
  const parsedBody = parsedOutput.body;
2631
1106
  return throwDefaultError({