@aws-sdk/client-resource-explorer-2 3.504.0 → 3.509.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -288,7 +288,7 @@ export const se_UpdateViewCommand = async (input, context) => {
288
288
  };
289
289
  export const de_AssociateDefaultViewCommand = async (output, context) => {
290
290
  if (output.statusCode !== 200 && output.statusCode >= 300) {
291
- return de_AssociateDefaultViewCommandError(output, context);
291
+ return de_CommandError(output, context);
292
292
  }
293
293
  const contents = map({
294
294
  $metadata: deserializeMetadata(output),
@@ -300,40 +300,9 @@ export const de_AssociateDefaultViewCommand = async (output, context) => {
300
300
  Object.assign(contents, doc);
301
301
  return contents;
302
302
  };
303
- const de_AssociateDefaultViewCommandError = async (output, context) => {
304
- const parsedOutput = {
305
- ...output,
306
- body: await parseErrorBody(output.body, context),
307
- };
308
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
309
- switch (errorCode) {
310
- case "AccessDeniedException":
311
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
312
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
313
- case "InternalServerException":
314
- case "com.amazonaws.resourceexplorer2#InternalServerException":
315
- throw await de_InternalServerExceptionRes(parsedOutput, context);
316
- case "ResourceNotFoundException":
317
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
318
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
319
- case "ThrottlingException":
320
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
321
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
322
- case "ValidationException":
323
- case "com.amazonaws.resourceexplorer2#ValidationException":
324
- throw await de_ValidationExceptionRes(parsedOutput, context);
325
- default:
326
- const parsedBody = parsedOutput.body;
327
- return throwDefaultError({
328
- output,
329
- parsedBody,
330
- errorCode,
331
- });
332
- }
333
- };
334
303
  export const de_BatchGetViewCommand = async (output, context) => {
335
304
  if (output.statusCode !== 200 && output.statusCode >= 300) {
336
- return de_BatchGetViewCommandError(output, context);
305
+ return de_CommandError(output, context);
337
306
  }
338
307
  const contents = map({
339
308
  $metadata: deserializeMetadata(output),
@@ -346,40 +315,9 @@ export const de_BatchGetViewCommand = async (output, context) => {
346
315
  Object.assign(contents, doc);
347
316
  return contents;
348
317
  };
349
- const de_BatchGetViewCommandError = async (output, context) => {
350
- const parsedOutput = {
351
- ...output,
352
- body: await parseErrorBody(output.body, context),
353
- };
354
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
355
- switch (errorCode) {
356
- case "AccessDeniedException":
357
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
358
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
359
- case "InternalServerException":
360
- case "com.amazonaws.resourceexplorer2#InternalServerException":
361
- throw await de_InternalServerExceptionRes(parsedOutput, context);
362
- case "ThrottlingException":
363
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
364
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
365
- case "UnauthorizedException":
366
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
367
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
368
- case "ValidationException":
369
- case "com.amazonaws.resourceexplorer2#ValidationException":
370
- throw await de_ValidationExceptionRes(parsedOutput, context);
371
- default:
372
- const parsedBody = parsedOutput.body;
373
- return throwDefaultError({
374
- output,
375
- parsedBody,
376
- errorCode,
377
- });
378
- }
379
- };
380
318
  export const de_CreateIndexCommand = async (output, context) => {
381
319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
382
- return de_CreateIndexCommandError(output, context);
320
+ return de_CommandError(output, context);
383
321
  }
384
322
  const contents = map({
385
323
  $metadata: deserializeMetadata(output),
@@ -393,40 +331,9 @@ export const de_CreateIndexCommand = async (output, context) => {
393
331
  Object.assign(contents, doc);
394
332
  return contents;
395
333
  };
396
- const de_CreateIndexCommandError = async (output, context) => {
397
- const parsedOutput = {
398
- ...output,
399
- body: await parseErrorBody(output.body, context),
400
- };
401
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
- switch (errorCode) {
403
- case "AccessDeniedException":
404
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
405
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
406
- case "ConflictException":
407
- case "com.amazonaws.resourceexplorer2#ConflictException":
408
- throw await de_ConflictExceptionRes(parsedOutput, context);
409
- case "InternalServerException":
410
- case "com.amazonaws.resourceexplorer2#InternalServerException":
411
- throw await de_InternalServerExceptionRes(parsedOutput, context);
412
- case "ThrottlingException":
413
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
414
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
415
- case "ValidationException":
416
- case "com.amazonaws.resourceexplorer2#ValidationException":
417
- throw await de_ValidationExceptionRes(parsedOutput, context);
418
- default:
419
- const parsedBody = parsedOutput.body;
420
- return throwDefaultError({
421
- output,
422
- parsedBody,
423
- errorCode,
424
- });
425
- }
426
- };
427
334
  export const de_CreateViewCommand = async (output, context) => {
428
335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
429
- return de_CreateViewCommandError(output, context);
336
+ return de_CommandError(output, context);
430
337
  }
431
338
  const contents = map({
432
339
  $metadata: deserializeMetadata(output),
@@ -438,46 +345,9 @@ export const de_CreateViewCommand = async (output, context) => {
438
345
  Object.assign(contents, doc);
439
346
  return contents;
440
347
  };
441
- const de_CreateViewCommandError = async (output, context) => {
442
- const parsedOutput = {
443
- ...output,
444
- body: await parseErrorBody(output.body, context),
445
- };
446
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
447
- switch (errorCode) {
448
- case "AccessDeniedException":
449
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
450
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
451
- case "ConflictException":
452
- case "com.amazonaws.resourceexplorer2#ConflictException":
453
- throw await de_ConflictExceptionRes(parsedOutput, context);
454
- case "InternalServerException":
455
- case "com.amazonaws.resourceexplorer2#InternalServerException":
456
- throw await de_InternalServerExceptionRes(parsedOutput, context);
457
- case "ServiceQuotaExceededException":
458
- case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
459
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
460
- case "ThrottlingException":
461
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
462
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
463
- case "UnauthorizedException":
464
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
465
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
466
- case "ValidationException":
467
- case "com.amazonaws.resourceexplorer2#ValidationException":
468
- throw await de_ValidationExceptionRes(parsedOutput, context);
469
- default:
470
- const parsedBody = parsedOutput.body;
471
- return throwDefaultError({
472
- output,
473
- parsedBody,
474
- errorCode,
475
- });
476
- }
477
- };
478
348
  export const de_DeleteIndexCommand = async (output, context) => {
479
349
  if (output.statusCode !== 200 && output.statusCode >= 300) {
480
- return de_DeleteIndexCommandError(output, context);
350
+ return de_CommandError(output, context);
481
351
  }
482
352
  const contents = map({
483
353
  $metadata: deserializeMetadata(output),
@@ -491,40 +361,9 @@ export const de_DeleteIndexCommand = async (output, context) => {
491
361
  Object.assign(contents, doc);
492
362
  return contents;
493
363
  };
494
- const de_DeleteIndexCommandError = async (output, context) => {
495
- const parsedOutput = {
496
- ...output,
497
- body: await parseErrorBody(output.body, context),
498
- };
499
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
500
- switch (errorCode) {
501
- case "AccessDeniedException":
502
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
503
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
504
- case "InternalServerException":
505
- case "com.amazonaws.resourceexplorer2#InternalServerException":
506
- throw await de_InternalServerExceptionRes(parsedOutput, context);
507
- case "ResourceNotFoundException":
508
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
509
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
510
- case "ThrottlingException":
511
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
512
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
513
- case "ValidationException":
514
- case "com.amazonaws.resourceexplorer2#ValidationException":
515
- throw await de_ValidationExceptionRes(parsedOutput, context);
516
- default:
517
- const parsedBody = parsedOutput.body;
518
- return throwDefaultError({
519
- output,
520
- parsedBody,
521
- errorCode,
522
- });
523
- }
524
- };
525
364
  export const de_DeleteViewCommand = async (output, context) => {
526
365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
527
- return de_DeleteViewCommandError(output, context);
366
+ return de_CommandError(output, context);
528
367
  }
529
368
  const contents = map({
530
369
  $metadata: deserializeMetadata(output),
@@ -536,43 +375,9 @@ export const de_DeleteViewCommand = async (output, context) => {
536
375
  Object.assign(contents, doc);
537
376
  return contents;
538
377
  };
539
- const de_DeleteViewCommandError = async (output, context) => {
540
- const parsedOutput = {
541
- ...output,
542
- body: await parseErrorBody(output.body, context),
543
- };
544
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
545
- switch (errorCode) {
546
- case "AccessDeniedException":
547
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
548
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
549
- case "InternalServerException":
550
- case "com.amazonaws.resourceexplorer2#InternalServerException":
551
- throw await de_InternalServerExceptionRes(parsedOutput, context);
552
- case "ResourceNotFoundException":
553
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
554
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
555
- case "ThrottlingException":
556
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
557
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
558
- case "UnauthorizedException":
559
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
560
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
561
- case "ValidationException":
562
- case "com.amazonaws.resourceexplorer2#ValidationException":
563
- throw await de_ValidationExceptionRes(parsedOutput, context);
564
- default:
565
- const parsedBody = parsedOutput.body;
566
- return throwDefaultError({
567
- output,
568
- parsedBody,
569
- errorCode,
570
- });
571
- }
572
- };
573
378
  export const de_DisassociateDefaultViewCommand = async (output, context) => {
574
379
  if (output.statusCode !== 200 && output.statusCode >= 300) {
575
- return de_DisassociateDefaultViewCommandError(output, context);
380
+ return de_CommandError(output, context);
576
381
  }
577
382
  const contents = map({
578
383
  $metadata: deserializeMetadata(output),
@@ -580,40 +385,9 @@ export const de_DisassociateDefaultViewCommand = async (output, context) => {
580
385
  await collectBody(output.body, context);
581
386
  return contents;
582
387
  };
583
- const de_DisassociateDefaultViewCommandError = async (output, context) => {
584
- const parsedOutput = {
585
- ...output,
586
- body: await parseErrorBody(output.body, context),
587
- };
588
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
589
- switch (errorCode) {
590
- case "AccessDeniedException":
591
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
592
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
593
- case "InternalServerException":
594
- case "com.amazonaws.resourceexplorer2#InternalServerException":
595
- throw await de_InternalServerExceptionRes(parsedOutput, context);
596
- case "ResourceNotFoundException":
597
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
598
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
599
- case "ThrottlingException":
600
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
601
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
602
- case "ValidationException":
603
- case "com.amazonaws.resourceexplorer2#ValidationException":
604
- throw await de_ValidationExceptionRes(parsedOutput, context);
605
- default:
606
- const parsedBody = parsedOutput.body;
607
- return throwDefaultError({
608
- output,
609
- parsedBody,
610
- errorCode,
611
- });
612
- }
613
- };
614
388
  export const de_GetAccountLevelServiceConfigurationCommand = async (output, context) => {
615
389
  if (output.statusCode !== 200 && output.statusCode >= 300) {
616
- return de_GetAccountLevelServiceConfigurationCommandError(output, context);
390
+ return de_CommandError(output, context);
617
391
  }
618
392
  const contents = map({
619
393
  $metadata: deserializeMetadata(output),
@@ -625,37 +399,9 @@ export const de_GetAccountLevelServiceConfigurationCommand = async (output, cont
625
399
  Object.assign(contents, doc);
626
400
  return contents;
627
401
  };
628
- const de_GetAccountLevelServiceConfigurationCommandError = async (output, context) => {
629
- const parsedOutput = {
630
- ...output,
631
- body: await parseErrorBody(output.body, context),
632
- };
633
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
634
- switch (errorCode) {
635
- case "AccessDeniedException":
636
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
637
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
638
- case "InternalServerException":
639
- case "com.amazonaws.resourceexplorer2#InternalServerException":
640
- throw await de_InternalServerExceptionRes(parsedOutput, context);
641
- case "ResourceNotFoundException":
642
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
643
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
644
- case "ThrottlingException":
645
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
646
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
647
- default:
648
- const parsedBody = parsedOutput.body;
649
- return throwDefaultError({
650
- output,
651
- parsedBody,
652
- errorCode,
653
- });
654
- }
655
- };
656
402
  export const de_GetDefaultViewCommand = async (output, context) => {
657
403
  if (output.statusCode !== 200 && output.statusCode >= 300) {
658
- return de_GetDefaultViewCommandError(output, context);
404
+ return de_CommandError(output, context);
659
405
  }
660
406
  const contents = map({
661
407
  $metadata: deserializeMetadata(output),
@@ -667,40 +413,9 @@ export const de_GetDefaultViewCommand = async (output, context) => {
667
413
  Object.assign(contents, doc);
668
414
  return contents;
669
415
  };
670
- const de_GetDefaultViewCommandError = async (output, context) => {
671
- const parsedOutput = {
672
- ...output,
673
- body: await parseErrorBody(output.body, context),
674
- };
675
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
676
- switch (errorCode) {
677
- case "AccessDeniedException":
678
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
679
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
680
- case "InternalServerException":
681
- case "com.amazonaws.resourceexplorer2#InternalServerException":
682
- throw await de_InternalServerExceptionRes(parsedOutput, context);
683
- case "ResourceNotFoundException":
684
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
685
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
686
- case "ThrottlingException":
687
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
688
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
689
- case "ValidationException":
690
- case "com.amazonaws.resourceexplorer2#ValidationException":
691
- throw await de_ValidationExceptionRes(parsedOutput, context);
692
- default:
693
- const parsedBody = parsedOutput.body;
694
- return throwDefaultError({
695
- output,
696
- parsedBody,
697
- errorCode,
698
- });
699
- }
700
- };
701
416
  export const de_GetIndexCommand = async (output, context) => {
702
417
  if (output.statusCode !== 200 && output.statusCode >= 300) {
703
- return de_GetIndexCommandError(output, context);
418
+ return de_CommandError(output, context);
704
419
  }
705
420
  const contents = map({
706
421
  $metadata: deserializeMetadata(output),
@@ -719,40 +434,9 @@ export const de_GetIndexCommand = async (output, context) => {
719
434
  Object.assign(contents, doc);
720
435
  return contents;
721
436
  };
722
- const de_GetIndexCommandError = async (output, context) => {
723
- const parsedOutput = {
724
- ...output,
725
- body: await parseErrorBody(output.body, context),
726
- };
727
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
728
- switch (errorCode) {
729
- case "AccessDeniedException":
730
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
731
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
732
- case "InternalServerException":
733
- case "com.amazonaws.resourceexplorer2#InternalServerException":
734
- throw await de_InternalServerExceptionRes(parsedOutput, context);
735
- case "ResourceNotFoundException":
736
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
737
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
738
- case "ThrottlingException":
739
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
740
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
741
- case "ValidationException":
742
- case "com.amazonaws.resourceexplorer2#ValidationException":
743
- throw await de_ValidationExceptionRes(parsedOutput, context);
744
- default:
745
- const parsedBody = parsedOutput.body;
746
- return throwDefaultError({
747
- output,
748
- parsedBody,
749
- errorCode,
750
- });
751
- }
752
- };
753
437
  export const de_GetViewCommand = async (output, context) => {
754
438
  if (output.statusCode !== 200 && output.statusCode >= 300) {
755
- return de_GetViewCommandError(output, context);
439
+ return de_CommandError(output, context);
756
440
  }
757
441
  const contents = map({
758
442
  $metadata: deserializeMetadata(output),
@@ -765,86 +449,9 @@ export const de_GetViewCommand = async (output, context) => {
765
449
  Object.assign(contents, doc);
766
450
  return contents;
767
451
  };
768
- const de_GetViewCommandError = async (output, context) => {
769
- const parsedOutput = {
770
- ...output,
771
- body: await parseErrorBody(output.body, context),
772
- };
773
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
774
- switch (errorCode) {
775
- case "AccessDeniedException":
776
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
777
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
778
- case "InternalServerException":
779
- case "com.amazonaws.resourceexplorer2#InternalServerException":
780
- throw await de_InternalServerExceptionRes(parsedOutput, context);
781
- case "ResourceNotFoundException":
782
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
783
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
784
- case "ThrottlingException":
785
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
786
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
787
- case "UnauthorizedException":
788
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
789
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
790
- case "ValidationException":
791
- case "com.amazonaws.resourceexplorer2#ValidationException":
792
- throw await de_ValidationExceptionRes(parsedOutput, context);
793
- default:
794
- const parsedBody = parsedOutput.body;
795
- return throwDefaultError({
796
- output,
797
- parsedBody,
798
- errorCode,
799
- });
800
- }
801
- };
802
452
  export const de_ListIndexesCommand = async (output, context) => {
803
453
  if (output.statusCode !== 200 && output.statusCode >= 300) {
804
- return de_ListIndexesCommandError(output, context);
805
- }
806
- const contents = map({
807
- $metadata: deserializeMetadata(output),
808
- });
809
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
810
- const doc = take(data, {
811
- Indexes: _json,
812
- NextToken: __expectString,
813
- });
814
- Object.assign(contents, doc);
815
- return contents;
816
- };
817
- const de_ListIndexesCommandError = async (output, context) => {
818
- const parsedOutput = {
819
- ...output,
820
- body: await parseErrorBody(output.body, context),
821
- };
822
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
823
- switch (errorCode) {
824
- case "AccessDeniedException":
825
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
826
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
827
- case "InternalServerException":
828
- case "com.amazonaws.resourceexplorer2#InternalServerException":
829
- throw await de_InternalServerExceptionRes(parsedOutput, context);
830
- case "ThrottlingException":
831
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
832
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
833
- case "ValidationException":
834
- case "com.amazonaws.resourceexplorer2#ValidationException":
835
- throw await de_ValidationExceptionRes(parsedOutput, context);
836
- default:
837
- const parsedBody = parsedOutput.body;
838
- return throwDefaultError({
839
- output,
840
- parsedBody,
841
- errorCode,
842
- });
843
- }
844
- };
845
- export const de_ListIndexesForMembersCommand = async (output, context) => {
846
- if (output.statusCode !== 200 && output.statusCode >= 300) {
847
- return de_ListIndexesForMembersCommandError(output, context);
454
+ return de_CommandError(output, context);
848
455
  }
849
456
  const contents = map({
850
457
  $metadata: deserializeMetadata(output),
@@ -853,41 +460,28 @@ export const de_ListIndexesForMembersCommand = async (output, context) => {
853
460
  const doc = take(data, {
854
461
  Indexes: _json,
855
462
  NextToken: __expectString,
856
- });
857
- Object.assign(contents, doc);
858
- return contents;
859
- };
860
- const de_ListIndexesForMembersCommandError = async (output, context) => {
861
- const parsedOutput = {
862
- ...output,
863
- body: await parseErrorBody(output.body, context),
864
- };
865
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
- switch (errorCode) {
867
- case "AccessDeniedException":
868
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
869
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
870
- case "InternalServerException":
871
- case "com.amazonaws.resourceexplorer2#InternalServerException":
872
- throw await de_InternalServerExceptionRes(parsedOutput, context);
873
- case "ThrottlingException":
874
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
875
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
876
- case "ValidationException":
877
- case "com.amazonaws.resourceexplorer2#ValidationException":
878
- throw await de_ValidationExceptionRes(parsedOutput, context);
879
- default:
880
- const parsedBody = parsedOutput.body;
881
- return throwDefaultError({
882
- output,
883
- parsedBody,
884
- errorCode,
885
- });
463
+ });
464
+ Object.assign(contents, doc);
465
+ return contents;
466
+ };
467
+ export const de_ListIndexesForMembersCommand = async (output, context) => {
468
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
469
+ return de_CommandError(output, context);
886
470
  }
471
+ const contents = map({
472
+ $metadata: deserializeMetadata(output),
473
+ });
474
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
475
+ const doc = take(data, {
476
+ Indexes: _json,
477
+ NextToken: __expectString,
478
+ });
479
+ Object.assign(contents, doc);
480
+ return contents;
887
481
  };
888
482
  export const de_ListSupportedResourceTypesCommand = async (output, context) => {
889
483
  if (output.statusCode !== 200 && output.statusCode >= 300) {
890
- return de_ListSupportedResourceTypesCommandError(output, context);
484
+ return de_CommandError(output, context);
891
485
  }
892
486
  const contents = map({
893
487
  $metadata: deserializeMetadata(output),
@@ -900,37 +494,9 @@ export const de_ListSupportedResourceTypesCommand = async (output, context) => {
900
494
  Object.assign(contents, doc);
901
495
  return contents;
902
496
  };
903
- const de_ListSupportedResourceTypesCommandError = async (output, context) => {
904
- const parsedOutput = {
905
- ...output,
906
- body: await parseErrorBody(output.body, context),
907
- };
908
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
909
- switch (errorCode) {
910
- case "AccessDeniedException":
911
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
912
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
913
- case "InternalServerException":
914
- case "com.amazonaws.resourceexplorer2#InternalServerException":
915
- throw await de_InternalServerExceptionRes(parsedOutput, context);
916
- case "ThrottlingException":
917
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
918
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
919
- case "ValidationException":
920
- case "com.amazonaws.resourceexplorer2#ValidationException":
921
- throw await de_ValidationExceptionRes(parsedOutput, context);
922
- default:
923
- const parsedBody = parsedOutput.body;
924
- return throwDefaultError({
925
- output,
926
- parsedBody,
927
- errorCode,
928
- });
929
- }
930
- };
931
497
  export const de_ListTagsForResourceCommand = async (output, context) => {
932
498
  if (output.statusCode !== 200 && output.statusCode >= 300) {
933
- return de_ListTagsForResourceCommandError(output, context);
499
+ return de_CommandError(output, context);
934
500
  }
935
501
  const contents = map({
936
502
  $metadata: deserializeMetadata(output),
@@ -942,43 +508,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
942
508
  Object.assign(contents, doc);
943
509
  return contents;
944
510
  };
945
- const de_ListTagsForResourceCommandError = async (output, context) => {
946
- const parsedOutput = {
947
- ...output,
948
- body: await parseErrorBody(output.body, context),
949
- };
950
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
- switch (errorCode) {
952
- case "AccessDeniedException":
953
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
954
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
955
- case "InternalServerException":
956
- case "com.amazonaws.resourceexplorer2#InternalServerException":
957
- throw await de_InternalServerExceptionRes(parsedOutput, context);
958
- case "ResourceNotFoundException":
959
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
960
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
961
- case "ThrottlingException":
962
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
963
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
964
- case "UnauthorizedException":
965
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
966
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
967
- case "ValidationException":
968
- case "com.amazonaws.resourceexplorer2#ValidationException":
969
- throw await de_ValidationExceptionRes(parsedOutput, context);
970
- default:
971
- const parsedBody = parsedOutput.body;
972
- return throwDefaultError({
973
- output,
974
- parsedBody,
975
- errorCode,
976
- });
977
- }
978
- };
979
511
  export const de_ListViewsCommand = async (output, context) => {
980
512
  if (output.statusCode !== 200 && output.statusCode >= 300) {
981
- return de_ListViewsCommandError(output, context);
513
+ return de_CommandError(output, context);
982
514
  }
983
515
  const contents = map({
984
516
  $metadata: deserializeMetadata(output),
@@ -991,37 +523,9 @@ export const de_ListViewsCommand = async (output, context) => {
991
523
  Object.assign(contents, doc);
992
524
  return contents;
993
525
  };
994
- const de_ListViewsCommandError = async (output, context) => {
995
- const parsedOutput = {
996
- ...output,
997
- body: await parseErrorBody(output.body, context),
998
- };
999
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1000
- switch (errorCode) {
1001
- case "AccessDeniedException":
1002
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
1003
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1004
- case "InternalServerException":
1005
- case "com.amazonaws.resourceexplorer2#InternalServerException":
1006
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1007
- case "ThrottlingException":
1008
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
1009
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1010
- case "ValidationException":
1011
- case "com.amazonaws.resourceexplorer2#ValidationException":
1012
- throw await de_ValidationExceptionRes(parsedOutput, context);
1013
- default:
1014
- const parsedBody = parsedOutput.body;
1015
- return throwDefaultError({
1016
- output,
1017
- parsedBody,
1018
- errorCode,
1019
- });
1020
- }
1021
- };
1022
526
  export const de_SearchCommand = async (output, context) => {
1023
527
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1024
- return de_SearchCommandError(output, context);
528
+ return de_CommandError(output, context);
1025
529
  }
1026
530
  const contents = map({
1027
531
  $metadata: deserializeMetadata(output),
@@ -1036,43 +540,9 @@ export const de_SearchCommand = async (output, context) => {
1036
540
  Object.assign(contents, doc);
1037
541
  return contents;
1038
542
  };
1039
- const de_SearchCommandError = async (output, context) => {
1040
- const parsedOutput = {
1041
- ...output,
1042
- body: await parseErrorBody(output.body, context),
1043
- };
1044
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1045
- switch (errorCode) {
1046
- case "AccessDeniedException":
1047
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
1048
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1049
- case "InternalServerException":
1050
- case "com.amazonaws.resourceexplorer2#InternalServerException":
1051
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1052
- case "ResourceNotFoundException":
1053
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
1054
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1055
- case "ThrottlingException":
1056
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
1057
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1058
- case "UnauthorizedException":
1059
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
1060
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1061
- case "ValidationException":
1062
- case "com.amazonaws.resourceexplorer2#ValidationException":
1063
- throw await de_ValidationExceptionRes(parsedOutput, context);
1064
- default:
1065
- const parsedBody = parsedOutput.body;
1066
- return throwDefaultError({
1067
- output,
1068
- parsedBody,
1069
- errorCode,
1070
- });
1071
- }
1072
- };
1073
543
  export const de_TagResourceCommand = async (output, context) => {
1074
544
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1075
- return de_TagResourceCommandError(output, context);
545
+ return de_CommandError(output, context);
1076
546
  }
1077
547
  const contents = map({
1078
548
  $metadata: deserializeMetadata(output),
@@ -1080,43 +550,9 @@ export const de_TagResourceCommand = async (output, context) => {
1080
550
  await collectBody(output.body, context);
1081
551
  return contents;
1082
552
  };
1083
- const de_TagResourceCommandError = async (output, context) => {
1084
- const parsedOutput = {
1085
- ...output,
1086
- body: await parseErrorBody(output.body, context),
1087
- };
1088
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1089
- switch (errorCode) {
1090
- case "AccessDeniedException":
1091
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
1092
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1093
- case "ConflictException":
1094
- case "com.amazonaws.resourceexplorer2#ConflictException":
1095
- throw await de_ConflictExceptionRes(parsedOutput, context);
1096
- case "InternalServerException":
1097
- case "com.amazonaws.resourceexplorer2#InternalServerException":
1098
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1099
- case "ThrottlingException":
1100
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
1101
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1102
- case "UnauthorizedException":
1103
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
1104
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1105
- case "ValidationException":
1106
- case "com.amazonaws.resourceexplorer2#ValidationException":
1107
- throw await de_ValidationExceptionRes(parsedOutput, context);
1108
- default:
1109
- const parsedBody = parsedOutput.body;
1110
- return throwDefaultError({
1111
- output,
1112
- parsedBody,
1113
- errorCode,
1114
- });
1115
- }
1116
- };
1117
553
  export const de_UntagResourceCommand = async (output, context) => {
1118
554
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_UntagResourceCommandError(output, context);
555
+ return de_CommandError(output, context);
1120
556
  }
1121
557
  const contents = map({
1122
558
  $metadata: deserializeMetadata(output),
@@ -1124,43 +560,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1124
560
  await collectBody(output.body, context);
1125
561
  return contents;
1126
562
  };
1127
- const de_UntagResourceCommandError = async (output, context) => {
1128
- const parsedOutput = {
1129
- ...output,
1130
- body: await parseErrorBody(output.body, context),
1131
- };
1132
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1133
- switch (errorCode) {
1134
- case "AccessDeniedException":
1135
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
1136
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1137
- case "InternalServerException":
1138
- case "com.amazonaws.resourceexplorer2#InternalServerException":
1139
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1140
- case "ResourceNotFoundException":
1141
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
1142
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1143
- case "ThrottlingException":
1144
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
1145
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1146
- case "UnauthorizedException":
1147
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
1148
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1149
- case "ValidationException":
1150
- case "com.amazonaws.resourceexplorer2#ValidationException":
1151
- throw await de_ValidationExceptionRes(parsedOutput, context);
1152
- default:
1153
- const parsedBody = parsedOutput.body;
1154
- return throwDefaultError({
1155
- output,
1156
- parsedBody,
1157
- errorCode,
1158
- });
1159
- }
1160
- };
1161
563
  export const de_UpdateIndexTypeCommand = async (output, context) => {
1162
564
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1163
- return de_UpdateIndexTypeCommandError(output, context);
565
+ return de_CommandError(output, context);
1164
566
  }
1165
567
  const contents = map({
1166
568
  $metadata: deserializeMetadata(output),
@@ -1175,46 +577,9 @@ export const de_UpdateIndexTypeCommand = async (output, context) => {
1175
577
  Object.assign(contents, doc);
1176
578
  return contents;
1177
579
  };
1178
- const de_UpdateIndexTypeCommandError = async (output, context) => {
1179
- const parsedOutput = {
1180
- ...output,
1181
- body: await parseErrorBody(output.body, context),
1182
- };
1183
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1184
- switch (errorCode) {
1185
- case "AccessDeniedException":
1186
- case "com.amazonaws.resourceexplorer2#AccessDeniedException":
1187
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1188
- case "ConflictException":
1189
- case "com.amazonaws.resourceexplorer2#ConflictException":
1190
- throw await de_ConflictExceptionRes(parsedOutput, context);
1191
- case "InternalServerException":
1192
- case "com.amazonaws.resourceexplorer2#InternalServerException":
1193
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1194
- case "ResourceNotFoundException":
1195
- case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
1196
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1197
- case "ServiceQuotaExceededException":
1198
- case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
1199
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1200
- case "ThrottlingException":
1201
- case "com.amazonaws.resourceexplorer2#ThrottlingException":
1202
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1203
- case "ValidationException":
1204
- case "com.amazonaws.resourceexplorer2#ValidationException":
1205
- throw await de_ValidationExceptionRes(parsedOutput, context);
1206
- default:
1207
- const parsedBody = parsedOutput.body;
1208
- return throwDefaultError({
1209
- output,
1210
- parsedBody,
1211
- errorCode,
1212
- });
1213
- }
1214
- };
1215
580
  export const de_UpdateViewCommand = async (output, context) => {
1216
581
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1217
- return de_UpdateViewCommandError(output, context);
582
+ return de_CommandError(output, context);
1218
583
  }
1219
584
  const contents = map({
1220
585
  $metadata: deserializeMetadata(output),
@@ -1226,7 +591,7 @@ export const de_UpdateViewCommand = async (output, context) => {
1226
591
  Object.assign(contents, doc);
1227
592
  return contents;
1228
593
  };
1229
- const de_UpdateViewCommandError = async (output, context) => {
594
+ const de_CommandError = async (output, context) => {
1230
595
  const parsedOutput = {
1231
596
  ...output,
1232
597
  body: await parseErrorBody(output.body, context),
@@ -1239,18 +604,24 @@ const de_UpdateViewCommandError = async (output, context) => {
1239
604
  case "InternalServerException":
1240
605
  case "com.amazonaws.resourceexplorer2#InternalServerException":
1241
606
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1242
- case "ServiceQuotaExceededException":
1243
- case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
1244
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
607
+ case "ResourceNotFoundException":
608
+ case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
609
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1245
610
  case "ThrottlingException":
1246
611
  case "com.amazonaws.resourceexplorer2#ThrottlingException":
1247
612
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1248
- case "UnauthorizedException":
1249
- case "com.amazonaws.resourceexplorer2#UnauthorizedException":
1250
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1251
613
  case "ValidationException":
1252
614
  case "com.amazonaws.resourceexplorer2#ValidationException":
1253
615
  throw await de_ValidationExceptionRes(parsedOutput, context);
616
+ case "UnauthorizedException":
617
+ case "com.amazonaws.resourceexplorer2#UnauthorizedException":
618
+ throw await de_UnauthorizedExceptionRes(parsedOutput, context);
619
+ case "ConflictException":
620
+ case "com.amazonaws.resourceexplorer2#ConflictException":
621
+ throw await de_ConflictExceptionRes(parsedOutput, context);
622
+ case "ServiceQuotaExceededException":
623
+ case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
624
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1254
625
  default:
1255
626
  const parsedBody = parsedOutput.body;
1256
627
  return throwDefaultError({