@aws-sdk/client-iotfleetwise 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.
@@ -317,7 +317,7 @@ export const se_UpdateVehicleCommand = async (input, context) => {
317
317
  };
318
318
  export const de_AssociateVehicleFleetCommand = async (output, context) => {
319
319
  if (output.statusCode >= 300) {
320
- return de_AssociateVehicleFleetCommandError(output, context);
320
+ return de_CommandError(output, context);
321
321
  }
322
322
  const data = await parseBody(output.body, context);
323
323
  let contents = {};
@@ -328,43 +328,9 @@ export const de_AssociateVehicleFleetCommand = async (output, context) => {
328
328
  };
329
329
  return response;
330
330
  };
331
- const de_AssociateVehicleFleetCommandError = async (output, context) => {
332
- const parsedOutput = {
333
- ...output,
334
- body: await parseErrorBody(output.body, context),
335
- };
336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
337
- switch (errorCode) {
338
- case "AccessDeniedException":
339
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
340
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
341
- case "InternalServerException":
342
- case "com.amazonaws.iotfleetwise#InternalServerException":
343
- throw await de_InternalServerExceptionRes(parsedOutput, context);
344
- case "LimitExceededException":
345
- case "com.amazonaws.iotfleetwise#LimitExceededException":
346
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
347
- case "ResourceNotFoundException":
348
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
349
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
350
- case "ThrottlingException":
351
- case "com.amazonaws.iotfleetwise#ThrottlingException":
352
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
353
- case "ValidationException":
354
- case "com.amazonaws.iotfleetwise#ValidationException":
355
- throw await de_ValidationExceptionRes(parsedOutput, context);
356
- default:
357
- const parsedBody = parsedOutput.body;
358
- return throwDefaultError({
359
- output,
360
- parsedBody,
361
- errorCode,
362
- });
363
- }
364
- };
365
331
  export const de_BatchCreateVehicleCommand = async (output, context) => {
366
332
  if (output.statusCode >= 300) {
367
- return de_BatchCreateVehicleCommandError(output, context);
333
+ return de_CommandError(output, context);
368
334
  }
369
335
  const data = await parseBody(output.body, context);
370
336
  let contents = {};
@@ -375,40 +341,9 @@ export const de_BatchCreateVehicleCommand = async (output, context) => {
375
341
  };
376
342
  return response;
377
343
  };
378
- const de_BatchCreateVehicleCommandError = async (output, context) => {
379
- const parsedOutput = {
380
- ...output,
381
- body: await parseErrorBody(output.body, context),
382
- };
383
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
384
- switch (errorCode) {
385
- case "AccessDeniedException":
386
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
387
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
388
- case "InternalServerException":
389
- case "com.amazonaws.iotfleetwise#InternalServerException":
390
- throw await de_InternalServerExceptionRes(parsedOutput, context);
391
- case "LimitExceededException":
392
- case "com.amazonaws.iotfleetwise#LimitExceededException":
393
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
394
- case "ThrottlingException":
395
- case "com.amazonaws.iotfleetwise#ThrottlingException":
396
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
397
- case "ValidationException":
398
- case "com.amazonaws.iotfleetwise#ValidationException":
399
- throw await de_ValidationExceptionRes(parsedOutput, context);
400
- default:
401
- const parsedBody = parsedOutput.body;
402
- return throwDefaultError({
403
- output,
404
- parsedBody,
405
- errorCode,
406
- });
407
- }
408
- };
409
344
  export const de_BatchUpdateVehicleCommand = async (output, context) => {
410
345
  if (output.statusCode >= 300) {
411
- return de_BatchUpdateVehicleCommandError(output, context);
346
+ return de_CommandError(output, context);
412
347
  }
413
348
  const data = await parseBody(output.body, context);
414
349
  let contents = {};
@@ -419,37 +354,9 @@ export const de_BatchUpdateVehicleCommand = async (output, context) => {
419
354
  };
420
355
  return response;
421
356
  };
422
- const de_BatchUpdateVehicleCommandError = async (output, context) => {
423
- const parsedOutput = {
424
- ...output,
425
- body: await parseErrorBody(output.body, context),
426
- };
427
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
428
- switch (errorCode) {
429
- case "AccessDeniedException":
430
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
431
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
432
- case "InternalServerException":
433
- case "com.amazonaws.iotfleetwise#InternalServerException":
434
- throw await de_InternalServerExceptionRes(parsedOutput, context);
435
- case "ThrottlingException":
436
- case "com.amazonaws.iotfleetwise#ThrottlingException":
437
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
438
- case "ValidationException":
439
- case "com.amazonaws.iotfleetwise#ValidationException":
440
- throw await de_ValidationExceptionRes(parsedOutput, context);
441
- default:
442
- const parsedBody = parsedOutput.body;
443
- return throwDefaultError({
444
- output,
445
- parsedBody,
446
- errorCode,
447
- });
448
- }
449
- };
450
357
  export const de_CreateCampaignCommand = async (output, context) => {
451
358
  if (output.statusCode >= 300) {
452
- return de_CreateCampaignCommandError(output, context);
359
+ return de_CommandError(output, context);
453
360
  }
454
361
  const data = await parseBody(output.body, context);
455
362
  let contents = {};
@@ -460,46 +367,9 @@ export const de_CreateCampaignCommand = async (output, context) => {
460
367
  };
461
368
  return response;
462
369
  };
463
- const de_CreateCampaignCommandError = async (output, context) => {
464
- const parsedOutput = {
465
- ...output,
466
- body: await parseErrorBody(output.body, context),
467
- };
468
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
469
- switch (errorCode) {
470
- case "AccessDeniedException":
471
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
472
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
473
- case "ConflictException":
474
- case "com.amazonaws.iotfleetwise#ConflictException":
475
- throw await de_ConflictExceptionRes(parsedOutput, context);
476
- case "InternalServerException":
477
- case "com.amazonaws.iotfleetwise#InternalServerException":
478
- throw await de_InternalServerExceptionRes(parsedOutput, context);
479
- case "LimitExceededException":
480
- case "com.amazonaws.iotfleetwise#LimitExceededException":
481
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
482
- case "ResourceNotFoundException":
483
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
484
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
485
- case "ThrottlingException":
486
- case "com.amazonaws.iotfleetwise#ThrottlingException":
487
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
488
- case "ValidationException":
489
- case "com.amazonaws.iotfleetwise#ValidationException":
490
- throw await de_ValidationExceptionRes(parsedOutput, context);
491
- default:
492
- const parsedBody = parsedOutput.body;
493
- return throwDefaultError({
494
- output,
495
- parsedBody,
496
- errorCode,
497
- });
498
- }
499
- };
500
370
  export const de_CreateDecoderManifestCommand = async (output, context) => {
501
371
  if (output.statusCode >= 300) {
502
- return de_CreateDecoderManifestCommandError(output, context);
372
+ return de_CommandError(output, context);
503
373
  }
504
374
  const data = await parseBody(output.body, context);
505
375
  let contents = {};
@@ -510,49 +380,9 @@ export const de_CreateDecoderManifestCommand = async (output, context) => {
510
380
  };
511
381
  return response;
512
382
  };
513
- const de_CreateDecoderManifestCommandError = async (output, context) => {
514
- const parsedOutput = {
515
- ...output,
516
- body: await parseErrorBody(output.body, context),
517
- };
518
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
519
- switch (errorCode) {
520
- case "AccessDeniedException":
521
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
522
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
523
- case "ConflictException":
524
- case "com.amazonaws.iotfleetwise#ConflictException":
525
- throw await de_ConflictExceptionRes(parsedOutput, context);
526
- case "DecoderManifestValidationException":
527
- case "com.amazonaws.iotfleetwise#DecoderManifestValidationException":
528
- throw await de_DecoderManifestValidationExceptionRes(parsedOutput, context);
529
- case "InternalServerException":
530
- case "com.amazonaws.iotfleetwise#InternalServerException":
531
- throw await de_InternalServerExceptionRes(parsedOutput, context);
532
- case "LimitExceededException":
533
- case "com.amazonaws.iotfleetwise#LimitExceededException":
534
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
535
- case "ResourceNotFoundException":
536
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
537
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
538
- case "ThrottlingException":
539
- case "com.amazonaws.iotfleetwise#ThrottlingException":
540
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
541
- case "ValidationException":
542
- case "com.amazonaws.iotfleetwise#ValidationException":
543
- throw await de_ValidationExceptionRes(parsedOutput, context);
544
- default:
545
- const parsedBody = parsedOutput.body;
546
- return throwDefaultError({
547
- output,
548
- parsedBody,
549
- errorCode,
550
- });
551
- }
552
- };
553
383
  export const de_CreateFleetCommand = async (output, context) => {
554
384
  if (output.statusCode >= 300) {
555
- return de_CreateFleetCommandError(output, context);
385
+ return de_CommandError(output, context);
556
386
  }
557
387
  const data = await parseBody(output.body, context);
558
388
  let contents = {};
@@ -563,46 +393,9 @@ export const de_CreateFleetCommand = async (output, context) => {
563
393
  };
564
394
  return response;
565
395
  };
566
- const de_CreateFleetCommandError = async (output, context) => {
567
- const parsedOutput = {
568
- ...output,
569
- body: await parseErrorBody(output.body, context),
570
- };
571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
572
- switch (errorCode) {
573
- case "AccessDeniedException":
574
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
575
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
576
- case "ConflictException":
577
- case "com.amazonaws.iotfleetwise#ConflictException":
578
- throw await de_ConflictExceptionRes(parsedOutput, context);
579
- case "InternalServerException":
580
- case "com.amazonaws.iotfleetwise#InternalServerException":
581
- throw await de_InternalServerExceptionRes(parsedOutput, context);
582
- case "LimitExceededException":
583
- case "com.amazonaws.iotfleetwise#LimitExceededException":
584
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
585
- case "ResourceNotFoundException":
586
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
587
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
588
- case "ThrottlingException":
589
- case "com.amazonaws.iotfleetwise#ThrottlingException":
590
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
591
- case "ValidationException":
592
- case "com.amazonaws.iotfleetwise#ValidationException":
593
- throw await de_ValidationExceptionRes(parsedOutput, context);
594
- default:
595
- const parsedBody = parsedOutput.body;
596
- return throwDefaultError({
597
- output,
598
- parsedBody,
599
- errorCode,
600
- });
601
- }
602
- };
603
396
  export const de_CreateModelManifestCommand = async (output, context) => {
604
397
  if (output.statusCode >= 300) {
605
- return de_CreateModelManifestCommandError(output, context);
398
+ return de_CommandError(output, context);
606
399
  }
607
400
  const data = await parseBody(output.body, context);
608
401
  let contents = {};
@@ -613,49 +406,9 @@ export const de_CreateModelManifestCommand = async (output, context) => {
613
406
  };
614
407
  return response;
615
408
  };
616
- const de_CreateModelManifestCommandError = async (output, context) => {
617
- const parsedOutput = {
618
- ...output,
619
- body: await parseErrorBody(output.body, context),
620
- };
621
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
622
- switch (errorCode) {
623
- case "AccessDeniedException":
624
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
625
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
626
- case "ConflictException":
627
- case "com.amazonaws.iotfleetwise#ConflictException":
628
- throw await de_ConflictExceptionRes(parsedOutput, context);
629
- case "InternalServerException":
630
- case "com.amazonaws.iotfleetwise#InternalServerException":
631
- throw await de_InternalServerExceptionRes(parsedOutput, context);
632
- case "InvalidSignalsException":
633
- case "com.amazonaws.iotfleetwise#InvalidSignalsException":
634
- throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
635
- case "LimitExceededException":
636
- case "com.amazonaws.iotfleetwise#LimitExceededException":
637
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
638
- case "ResourceNotFoundException":
639
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
640
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
641
- case "ThrottlingException":
642
- case "com.amazonaws.iotfleetwise#ThrottlingException":
643
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
644
- case "ValidationException":
645
- case "com.amazonaws.iotfleetwise#ValidationException":
646
- throw await de_ValidationExceptionRes(parsedOutput, context);
647
- default:
648
- const parsedBody = parsedOutput.body;
649
- return throwDefaultError({
650
- output,
651
- parsedBody,
652
- errorCode,
653
- });
654
- }
655
- };
656
409
  export const de_CreateSignalCatalogCommand = async (output, context) => {
657
410
  if (output.statusCode >= 300) {
658
- return de_CreateSignalCatalogCommandError(output, context);
411
+ return de_CommandError(output, context);
659
412
  }
660
413
  const data = await parseBody(output.body, context);
661
414
  let contents = {};
@@ -666,99 +419,22 @@ export const de_CreateSignalCatalogCommand = async (output, context) => {
666
419
  };
667
420
  return response;
668
421
  };
669
- const de_CreateSignalCatalogCommandError = async (output, context) => {
670
- const parsedOutput = {
671
- ...output,
672
- body: await parseErrorBody(output.body, context),
673
- };
674
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
675
- switch (errorCode) {
676
- case "AccessDeniedException":
677
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
678
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
679
- case "ConflictException":
680
- case "com.amazonaws.iotfleetwise#ConflictException":
681
- throw await de_ConflictExceptionRes(parsedOutput, context);
682
- case "InternalServerException":
683
- case "com.amazonaws.iotfleetwise#InternalServerException":
684
- throw await de_InternalServerExceptionRes(parsedOutput, context);
685
- case "InvalidNodeException":
686
- case "com.amazonaws.iotfleetwise#InvalidNodeException":
687
- throw await de_InvalidNodeExceptionRes(parsedOutput, context);
688
- case "InvalidSignalsException":
689
- case "com.amazonaws.iotfleetwise#InvalidSignalsException":
690
- throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
691
- case "LimitExceededException":
692
- case "com.amazonaws.iotfleetwise#LimitExceededException":
693
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
694
- case "ThrottlingException":
695
- case "com.amazonaws.iotfleetwise#ThrottlingException":
696
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
697
- case "ValidationException":
698
- case "com.amazonaws.iotfleetwise#ValidationException":
699
- throw await de_ValidationExceptionRes(parsedOutput, context);
700
- default:
701
- const parsedBody = parsedOutput.body;
702
- return throwDefaultError({
703
- output,
704
- parsedBody,
705
- errorCode,
706
- });
707
- }
708
- };
709
- export const de_CreateVehicleCommand = async (output, context) => {
710
- if (output.statusCode >= 300) {
711
- return de_CreateVehicleCommandError(output, context);
712
- }
713
- const data = await parseBody(output.body, context);
714
- let contents = {};
715
- contents = _json(data);
716
- const response = {
717
- $metadata: deserializeMetadata(output),
718
- ...contents,
422
+ export const de_CreateVehicleCommand = async (output, context) => {
423
+ if (output.statusCode >= 300) {
424
+ return de_CommandError(output, context);
425
+ }
426
+ const data = await parseBody(output.body, context);
427
+ let contents = {};
428
+ contents = _json(data);
429
+ const response = {
430
+ $metadata: deserializeMetadata(output),
431
+ ...contents,
719
432
  };
720
433
  return response;
721
434
  };
722
- const de_CreateVehicleCommandError = 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.iotfleetwise#AccessDeniedException":
731
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
732
- case "ConflictException":
733
- case "com.amazonaws.iotfleetwise#ConflictException":
734
- throw await de_ConflictExceptionRes(parsedOutput, context);
735
- case "InternalServerException":
736
- case "com.amazonaws.iotfleetwise#InternalServerException":
737
- throw await de_InternalServerExceptionRes(parsedOutput, context);
738
- case "LimitExceededException":
739
- case "com.amazonaws.iotfleetwise#LimitExceededException":
740
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
741
- case "ResourceNotFoundException":
742
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
743
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
744
- case "ThrottlingException":
745
- case "com.amazonaws.iotfleetwise#ThrottlingException":
746
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
747
- case "ValidationException":
748
- case "com.amazonaws.iotfleetwise#ValidationException":
749
- throw await de_ValidationExceptionRes(parsedOutput, context);
750
- default:
751
- const parsedBody = parsedOutput.body;
752
- return throwDefaultError({
753
- output,
754
- parsedBody,
755
- errorCode,
756
- });
757
- }
758
- };
759
435
  export const de_DeleteCampaignCommand = async (output, context) => {
760
436
  if (output.statusCode >= 300) {
761
- return de_DeleteCampaignCommandError(output, context);
437
+ return de_CommandError(output, context);
762
438
  }
763
439
  const data = await parseBody(output.body, context);
764
440
  let contents = {};
@@ -769,40 +445,9 @@ export const de_DeleteCampaignCommand = async (output, context) => {
769
445
  };
770
446
  return response;
771
447
  };
772
- const de_DeleteCampaignCommandError = async (output, context) => {
773
- const parsedOutput = {
774
- ...output,
775
- body: await parseErrorBody(output.body, context),
776
- };
777
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
778
- switch (errorCode) {
779
- case "AccessDeniedException":
780
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
781
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
782
- case "InternalServerException":
783
- case "com.amazonaws.iotfleetwise#InternalServerException":
784
- throw await de_InternalServerExceptionRes(parsedOutput, context);
785
- case "ResourceNotFoundException":
786
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
787
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
788
- case "ThrottlingException":
789
- case "com.amazonaws.iotfleetwise#ThrottlingException":
790
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
791
- case "ValidationException":
792
- case "com.amazonaws.iotfleetwise#ValidationException":
793
- throw await de_ValidationExceptionRes(parsedOutput, context);
794
- default:
795
- const parsedBody = parsedOutput.body;
796
- return throwDefaultError({
797
- output,
798
- parsedBody,
799
- errorCode,
800
- });
801
- }
802
- };
803
448
  export const de_DeleteDecoderManifestCommand = async (output, context) => {
804
449
  if (output.statusCode >= 300) {
805
- return de_DeleteDecoderManifestCommandError(output, context);
450
+ return de_CommandError(output, context);
806
451
  }
807
452
  const data = await parseBody(output.body, context);
808
453
  let contents = {};
@@ -813,40 +458,9 @@ export const de_DeleteDecoderManifestCommand = async (output, context) => {
813
458
  };
814
459
  return response;
815
460
  };
816
- const de_DeleteDecoderManifestCommandError = async (output, context) => {
817
- const parsedOutput = {
818
- ...output,
819
- body: await parseErrorBody(output.body, context),
820
- };
821
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
822
- switch (errorCode) {
823
- case "AccessDeniedException":
824
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
825
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
826
- case "ConflictException":
827
- case "com.amazonaws.iotfleetwise#ConflictException":
828
- throw await de_ConflictExceptionRes(parsedOutput, context);
829
- case "InternalServerException":
830
- case "com.amazonaws.iotfleetwise#InternalServerException":
831
- throw await de_InternalServerExceptionRes(parsedOutput, context);
832
- case "ThrottlingException":
833
- case "com.amazonaws.iotfleetwise#ThrottlingException":
834
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
835
- case "ValidationException":
836
- case "com.amazonaws.iotfleetwise#ValidationException":
837
- throw await de_ValidationExceptionRes(parsedOutput, context);
838
- default:
839
- const parsedBody = parsedOutput.body;
840
- return throwDefaultError({
841
- output,
842
- parsedBody,
843
- errorCode,
844
- });
845
- }
846
- };
847
461
  export const de_DeleteFleetCommand = async (output, context) => {
848
462
  if (output.statusCode >= 300) {
849
- return de_DeleteFleetCommandError(output, context);
463
+ return de_CommandError(output, context);
850
464
  }
851
465
  const data = await parseBody(output.body, context);
852
466
  let contents = {};
@@ -857,37 +471,9 @@ export const de_DeleteFleetCommand = async (output, context) => {
857
471
  };
858
472
  return response;
859
473
  };
860
- const de_DeleteFleetCommandError = 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.iotfleetwise#AccessDeniedException":
869
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
870
- case "InternalServerException":
871
- case "com.amazonaws.iotfleetwise#InternalServerException":
872
- throw await de_InternalServerExceptionRes(parsedOutput, context);
873
- case "ThrottlingException":
874
- case "com.amazonaws.iotfleetwise#ThrottlingException":
875
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
876
- case "ValidationException":
877
- case "com.amazonaws.iotfleetwise#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
- });
886
- }
887
- };
888
474
  export const de_DeleteModelManifestCommand = async (output, context) => {
889
475
  if (output.statusCode >= 300) {
890
- return de_DeleteModelManifestCommandError(output, context);
476
+ return de_CommandError(output, context);
891
477
  }
892
478
  const data = await parseBody(output.body, context);
893
479
  let contents = {};
@@ -898,40 +484,9 @@ export const de_DeleteModelManifestCommand = async (output, context) => {
898
484
  };
899
485
  return response;
900
486
  };
901
- const de_DeleteModelManifestCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "AccessDeniedException":
909
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
- case "ConflictException":
912
- case "com.amazonaws.iotfleetwise#ConflictException":
913
- throw await de_ConflictExceptionRes(parsedOutput, context);
914
- case "InternalServerException":
915
- case "com.amazonaws.iotfleetwise#InternalServerException":
916
- throw await de_InternalServerExceptionRes(parsedOutput, context);
917
- case "ThrottlingException":
918
- case "com.amazonaws.iotfleetwise#ThrottlingException":
919
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
920
- case "ValidationException":
921
- case "com.amazonaws.iotfleetwise#ValidationException":
922
- throw await de_ValidationExceptionRes(parsedOutput, context);
923
- default:
924
- const parsedBody = parsedOutput.body;
925
- return throwDefaultError({
926
- output,
927
- parsedBody,
928
- errorCode,
929
- });
930
- }
931
- };
932
487
  export const de_DeleteSignalCatalogCommand = async (output, context) => {
933
488
  if (output.statusCode >= 300) {
934
- return de_DeleteSignalCatalogCommandError(output, context);
489
+ return de_CommandError(output, context);
935
490
  }
936
491
  const data = await parseBody(output.body, context);
937
492
  let contents = {};
@@ -942,40 +497,9 @@ export const de_DeleteSignalCatalogCommand = async (output, context) => {
942
497
  };
943
498
  return response;
944
499
  };
945
- const de_DeleteSignalCatalogCommandError = 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.iotfleetwise#AccessDeniedException":
954
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
955
- case "ConflictException":
956
- case "com.amazonaws.iotfleetwise#ConflictException":
957
- throw await de_ConflictExceptionRes(parsedOutput, context);
958
- case "InternalServerException":
959
- case "com.amazonaws.iotfleetwise#InternalServerException":
960
- throw await de_InternalServerExceptionRes(parsedOutput, context);
961
- case "ThrottlingException":
962
- case "com.amazonaws.iotfleetwise#ThrottlingException":
963
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
964
- case "ValidationException":
965
- case "com.amazonaws.iotfleetwise#ValidationException":
966
- throw await de_ValidationExceptionRes(parsedOutput, context);
967
- default:
968
- const parsedBody = parsedOutput.body;
969
- return throwDefaultError({
970
- output,
971
- parsedBody,
972
- errorCode,
973
- });
974
- }
975
- };
976
500
  export const de_DeleteVehicleCommand = async (output, context) => {
977
501
  if (output.statusCode >= 300) {
978
- return de_DeleteVehicleCommandError(output, context);
502
+ return de_CommandError(output, context);
979
503
  }
980
504
  const data = await parseBody(output.body, context);
981
505
  let contents = {};
@@ -986,37 +510,9 @@ export const de_DeleteVehicleCommand = async (output, context) => {
986
510
  };
987
511
  return response;
988
512
  };
989
- const de_DeleteVehicleCommandError = async (output, context) => {
990
- const parsedOutput = {
991
- ...output,
992
- body: await parseErrorBody(output.body, context),
993
- };
994
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
995
- switch (errorCode) {
996
- case "AccessDeniedException":
997
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
998
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
999
- case "InternalServerException":
1000
- case "com.amazonaws.iotfleetwise#InternalServerException":
1001
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1002
- case "ThrottlingException":
1003
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1004
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1005
- case "ValidationException":
1006
- case "com.amazonaws.iotfleetwise#ValidationException":
1007
- throw await de_ValidationExceptionRes(parsedOutput, context);
1008
- default:
1009
- const parsedBody = parsedOutput.body;
1010
- return throwDefaultError({
1011
- output,
1012
- parsedBody,
1013
- errorCode,
1014
- });
1015
- }
1016
- };
1017
513
  export const de_DisassociateVehicleFleetCommand = async (output, context) => {
1018
514
  if (output.statusCode >= 300) {
1019
- return de_DisassociateVehicleFleetCommandError(output, context);
515
+ return de_CommandError(output, context);
1020
516
  }
1021
517
  const data = await parseBody(output.body, context);
1022
518
  let contents = {};
@@ -1027,40 +523,9 @@ export const de_DisassociateVehicleFleetCommand = async (output, context) => {
1027
523
  };
1028
524
  return response;
1029
525
  };
1030
- const de_DisassociateVehicleFleetCommandError = async (output, context) => {
1031
- const parsedOutput = {
1032
- ...output,
1033
- body: await parseErrorBody(output.body, context),
1034
- };
1035
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1036
- switch (errorCode) {
1037
- case "AccessDeniedException":
1038
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1039
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1040
- case "InternalServerException":
1041
- case "com.amazonaws.iotfleetwise#InternalServerException":
1042
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1043
- case "ResourceNotFoundException":
1044
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1045
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1046
- case "ThrottlingException":
1047
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1048
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1049
- case "ValidationException":
1050
- case "com.amazonaws.iotfleetwise#ValidationException":
1051
- throw await de_ValidationExceptionRes(parsedOutput, context);
1052
- default:
1053
- const parsedBody = parsedOutput.body;
1054
- return throwDefaultError({
1055
- output,
1056
- parsedBody,
1057
- errorCode,
1058
- });
1059
- }
1060
- };
1061
526
  export const de_GetCampaignCommand = async (output, context) => {
1062
527
  if (output.statusCode >= 300) {
1063
- return de_GetCampaignCommandError(output, context);
528
+ return de_CommandError(output, context);
1064
529
  }
1065
530
  const data = await parseBody(output.body, context);
1066
531
  let contents = {};
@@ -1071,40 +536,9 @@ export const de_GetCampaignCommand = async (output, context) => {
1071
536
  };
1072
537
  return response;
1073
538
  };
1074
- const de_GetCampaignCommandError = async (output, context) => {
1075
- const parsedOutput = {
1076
- ...output,
1077
- body: await parseErrorBody(output.body, context),
1078
- };
1079
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
- switch (errorCode) {
1081
- case "AccessDeniedException":
1082
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1083
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1084
- case "InternalServerException":
1085
- case "com.amazonaws.iotfleetwise#InternalServerException":
1086
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1087
- case "ResourceNotFoundException":
1088
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1089
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1090
- case "ThrottlingException":
1091
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1092
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1093
- case "ValidationException":
1094
- case "com.amazonaws.iotfleetwise#ValidationException":
1095
- throw await de_ValidationExceptionRes(parsedOutput, context);
1096
- default:
1097
- const parsedBody = parsedOutput.body;
1098
- return throwDefaultError({
1099
- output,
1100
- parsedBody,
1101
- errorCode,
1102
- });
1103
- }
1104
- };
1105
539
  export const de_GetDecoderManifestCommand = async (output, context) => {
1106
540
  if (output.statusCode >= 300) {
1107
- return de_GetDecoderManifestCommandError(output, context);
541
+ return de_CommandError(output, context);
1108
542
  }
1109
543
  const data = await parseBody(output.body, context);
1110
544
  let contents = {};
@@ -1115,40 +549,9 @@ export const de_GetDecoderManifestCommand = async (output, context) => {
1115
549
  };
1116
550
  return response;
1117
551
  };
1118
- const de_GetDecoderManifestCommandError = async (output, context) => {
1119
- const parsedOutput = {
1120
- ...output,
1121
- body: await parseErrorBody(output.body, context),
1122
- };
1123
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1124
- switch (errorCode) {
1125
- case "AccessDeniedException":
1126
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1127
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1128
- case "InternalServerException":
1129
- case "com.amazonaws.iotfleetwise#InternalServerException":
1130
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1131
- case "ResourceNotFoundException":
1132
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1133
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1134
- case "ThrottlingException":
1135
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1136
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1137
- case "ValidationException":
1138
- case "com.amazonaws.iotfleetwise#ValidationException":
1139
- throw await de_ValidationExceptionRes(parsedOutput, context);
1140
- default:
1141
- const parsedBody = parsedOutput.body;
1142
- return throwDefaultError({
1143
- output,
1144
- parsedBody,
1145
- errorCode,
1146
- });
1147
- }
1148
- };
1149
552
  export const de_GetEncryptionConfigurationCommand = async (output, context) => {
1150
553
  if (output.statusCode >= 300) {
1151
- return de_GetEncryptionConfigurationCommandError(output, context);
554
+ return de_CommandError(output, context);
1152
555
  }
1153
556
  const data = await parseBody(output.body, context);
1154
557
  let contents = {};
@@ -1159,40 +562,9 @@ export const de_GetEncryptionConfigurationCommand = async (output, context) => {
1159
562
  };
1160
563
  return response;
1161
564
  };
1162
- const de_GetEncryptionConfigurationCommandError = async (output, context) => {
1163
- const parsedOutput = {
1164
- ...output,
1165
- body: await parseErrorBody(output.body, context),
1166
- };
1167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
- switch (errorCode) {
1169
- case "AccessDeniedException":
1170
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1171
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1172
- case "InternalServerException":
1173
- case "com.amazonaws.iotfleetwise#InternalServerException":
1174
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1175
- case "ResourceNotFoundException":
1176
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1177
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1178
- case "ThrottlingException":
1179
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1180
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1181
- case "ValidationException":
1182
- case "com.amazonaws.iotfleetwise#ValidationException":
1183
- throw await de_ValidationExceptionRes(parsedOutput, context);
1184
- default:
1185
- const parsedBody = parsedOutput.body;
1186
- return throwDefaultError({
1187
- output,
1188
- parsedBody,
1189
- errorCode,
1190
- });
1191
- }
1192
- };
1193
565
  export const de_GetFleetCommand = async (output, context) => {
1194
566
  if (output.statusCode >= 300) {
1195
- return de_GetFleetCommandError(output, context);
567
+ return de_CommandError(output, context);
1196
568
  }
1197
569
  const data = await parseBody(output.body, context);
1198
570
  let contents = {};
@@ -1203,40 +575,9 @@ export const de_GetFleetCommand = async (output, context) => {
1203
575
  };
1204
576
  return response;
1205
577
  };
1206
- const de_GetFleetCommandError = async (output, context) => {
1207
- const parsedOutput = {
1208
- ...output,
1209
- body: await parseErrorBody(output.body, context),
1210
- };
1211
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1212
- switch (errorCode) {
1213
- case "AccessDeniedException":
1214
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1215
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1216
- case "InternalServerException":
1217
- case "com.amazonaws.iotfleetwise#InternalServerException":
1218
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1219
- case "ResourceNotFoundException":
1220
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1221
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1222
- case "ThrottlingException":
1223
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1224
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1225
- case "ValidationException":
1226
- case "com.amazonaws.iotfleetwise#ValidationException":
1227
- throw await de_ValidationExceptionRes(parsedOutput, context);
1228
- default:
1229
- const parsedBody = parsedOutput.body;
1230
- return throwDefaultError({
1231
- output,
1232
- parsedBody,
1233
- errorCode,
1234
- });
1235
- }
1236
- };
1237
578
  export const de_GetLoggingOptionsCommand = async (output, context) => {
1238
579
  if (output.statusCode >= 300) {
1239
- return de_GetLoggingOptionsCommandError(output, context);
580
+ return de_CommandError(output, context);
1240
581
  }
1241
582
  const data = await parseBody(output.body, context);
1242
583
  let contents = {};
@@ -1247,34 +588,9 @@ export const de_GetLoggingOptionsCommand = async (output, context) => {
1247
588
  };
1248
589
  return response;
1249
590
  };
1250
- const de_GetLoggingOptionsCommandError = async (output, context) => {
1251
- const parsedOutput = {
1252
- ...output,
1253
- body: await parseErrorBody(output.body, context),
1254
- };
1255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
- switch (errorCode) {
1257
- case "AccessDeniedException":
1258
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1259
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1260
- case "InternalServerException":
1261
- case "com.amazonaws.iotfleetwise#InternalServerException":
1262
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1263
- case "ThrottlingException":
1264
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1265
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1266
- default:
1267
- const parsedBody = parsedOutput.body;
1268
- return throwDefaultError({
1269
- output,
1270
- parsedBody,
1271
- errorCode,
1272
- });
1273
- }
1274
- };
1275
591
  export const de_GetModelManifestCommand = async (output, context) => {
1276
592
  if (output.statusCode >= 300) {
1277
- return de_GetModelManifestCommandError(output, context);
593
+ return de_CommandError(output, context);
1278
594
  }
1279
595
  const data = await parseBody(output.body, context);
1280
596
  let contents = {};
@@ -1285,40 +601,9 @@ export const de_GetModelManifestCommand = async (output, context) => {
1285
601
  };
1286
602
  return response;
1287
603
  };
1288
- const de_GetModelManifestCommandError = async (output, context) => {
1289
- const parsedOutput = {
1290
- ...output,
1291
- body: await parseErrorBody(output.body, context),
1292
- };
1293
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1294
- switch (errorCode) {
1295
- case "AccessDeniedException":
1296
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1297
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1298
- case "InternalServerException":
1299
- case "com.amazonaws.iotfleetwise#InternalServerException":
1300
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1301
- case "ResourceNotFoundException":
1302
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1303
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1304
- case "ThrottlingException":
1305
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1306
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1307
- case "ValidationException":
1308
- case "com.amazonaws.iotfleetwise#ValidationException":
1309
- throw await de_ValidationExceptionRes(parsedOutput, context);
1310
- default:
1311
- const parsedBody = parsedOutput.body;
1312
- return throwDefaultError({
1313
- output,
1314
- parsedBody,
1315
- errorCode,
1316
- });
1317
- }
1318
- };
1319
604
  export const de_GetRegisterAccountStatusCommand = async (output, context) => {
1320
605
  if (output.statusCode >= 300) {
1321
- return de_GetRegisterAccountStatusCommandError(output, context);
606
+ return de_CommandError(output, context);
1322
607
  }
1323
608
  const data = await parseBody(output.body, context);
1324
609
  let contents = {};
@@ -1329,40 +614,9 @@ export const de_GetRegisterAccountStatusCommand = async (output, context) => {
1329
614
  };
1330
615
  return response;
1331
616
  };
1332
- const de_GetRegisterAccountStatusCommandError = async (output, context) => {
1333
- const parsedOutput = {
1334
- ...output,
1335
- body: await parseErrorBody(output.body, context),
1336
- };
1337
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1338
- switch (errorCode) {
1339
- case "AccessDeniedException":
1340
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1341
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1342
- case "InternalServerException":
1343
- case "com.amazonaws.iotfleetwise#InternalServerException":
1344
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1345
- case "ResourceNotFoundException":
1346
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1347
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1348
- case "ThrottlingException":
1349
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1350
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1351
- case "ValidationException":
1352
- case "com.amazonaws.iotfleetwise#ValidationException":
1353
- throw await de_ValidationExceptionRes(parsedOutput, context);
1354
- default:
1355
- const parsedBody = parsedOutput.body;
1356
- return throwDefaultError({
1357
- output,
1358
- parsedBody,
1359
- errorCode,
1360
- });
1361
- }
1362
- };
1363
617
  export const de_GetSignalCatalogCommand = async (output, context) => {
1364
618
  if (output.statusCode >= 300) {
1365
- return de_GetSignalCatalogCommandError(output, context);
619
+ return de_CommandError(output, context);
1366
620
  }
1367
621
  const data = await parseBody(output.body, context);
1368
622
  let contents = {};
@@ -1373,84 +627,22 @@ export const de_GetSignalCatalogCommand = async (output, context) => {
1373
627
  };
1374
628
  return response;
1375
629
  };
1376
- const de_GetSignalCatalogCommandError = async (output, context) => {
1377
- const parsedOutput = {
1378
- ...output,
1379
- body: await parseErrorBody(output.body, context),
1380
- };
1381
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1382
- switch (errorCode) {
1383
- case "AccessDeniedException":
1384
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1385
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1386
- case "InternalServerException":
1387
- case "com.amazonaws.iotfleetwise#InternalServerException":
1388
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1389
- case "ResourceNotFoundException":
1390
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1391
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1392
- case "ThrottlingException":
1393
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1394
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1395
- case "ValidationException":
1396
- case "com.amazonaws.iotfleetwise#ValidationException":
1397
- throw await de_ValidationExceptionRes(parsedOutput, context);
1398
- default:
1399
- const parsedBody = parsedOutput.body;
1400
- return throwDefaultError({
1401
- output,
1402
- parsedBody,
1403
- errorCode,
1404
- });
1405
- }
1406
- };
1407
- export const de_GetVehicleCommand = async (output, context) => {
1408
- if (output.statusCode >= 300) {
1409
- return de_GetVehicleCommandError(output, context);
1410
- }
1411
- const data = await parseBody(output.body, context);
1412
- let contents = {};
1413
- contents = de_GetVehicleResponse(data, context);
1414
- const response = {
1415
- $metadata: deserializeMetadata(output),
1416
- ...contents,
630
+ export const de_GetVehicleCommand = async (output, context) => {
631
+ if (output.statusCode >= 300) {
632
+ return de_CommandError(output, context);
633
+ }
634
+ const data = await parseBody(output.body, context);
635
+ let contents = {};
636
+ contents = de_GetVehicleResponse(data, context);
637
+ const response = {
638
+ $metadata: deserializeMetadata(output),
639
+ ...contents,
1417
640
  };
1418
641
  return response;
1419
642
  };
1420
- const de_GetVehicleCommandError = async (output, context) => {
1421
- const parsedOutput = {
1422
- ...output,
1423
- body: await parseErrorBody(output.body, context),
1424
- };
1425
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1426
- switch (errorCode) {
1427
- case "AccessDeniedException":
1428
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1429
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1430
- case "InternalServerException":
1431
- case "com.amazonaws.iotfleetwise#InternalServerException":
1432
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1433
- case "ResourceNotFoundException":
1434
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1435
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1436
- case "ThrottlingException":
1437
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1438
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1439
- case "ValidationException":
1440
- case "com.amazonaws.iotfleetwise#ValidationException":
1441
- throw await de_ValidationExceptionRes(parsedOutput, context);
1442
- default:
1443
- const parsedBody = parsedOutput.body;
1444
- return throwDefaultError({
1445
- output,
1446
- parsedBody,
1447
- errorCode,
1448
- });
1449
- }
1450
- };
1451
643
  export const de_GetVehicleStatusCommand = async (output, context) => {
1452
644
  if (output.statusCode >= 300) {
1453
- return de_GetVehicleStatusCommandError(output, context);
645
+ return de_CommandError(output, context);
1454
646
  }
1455
647
  const data = await parseBody(output.body, context);
1456
648
  let contents = {};
@@ -1461,40 +653,9 @@ export const de_GetVehicleStatusCommand = async (output, context) => {
1461
653
  };
1462
654
  return response;
1463
655
  };
1464
- const de_GetVehicleStatusCommandError = async (output, context) => {
1465
- const parsedOutput = {
1466
- ...output,
1467
- body: await parseErrorBody(output.body, context),
1468
- };
1469
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1470
- switch (errorCode) {
1471
- case "AccessDeniedException":
1472
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1473
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1474
- case "InternalServerException":
1475
- case "com.amazonaws.iotfleetwise#InternalServerException":
1476
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1477
- case "ResourceNotFoundException":
1478
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1479
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1480
- case "ThrottlingException":
1481
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1482
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1483
- case "ValidationException":
1484
- case "com.amazonaws.iotfleetwise#ValidationException":
1485
- throw await de_ValidationExceptionRes(parsedOutput, context);
1486
- default:
1487
- const parsedBody = parsedOutput.body;
1488
- return throwDefaultError({
1489
- output,
1490
- parsedBody,
1491
- errorCode,
1492
- });
1493
- }
1494
- };
1495
656
  export const de_ImportDecoderManifestCommand = async (output, context) => {
1496
657
  if (output.statusCode >= 300) {
1497
- return de_ImportDecoderManifestCommandError(output, context);
658
+ return de_CommandError(output, context);
1498
659
  }
1499
660
  const data = await parseBody(output.body, context);
1500
661
  let contents = {};
@@ -1505,49 +666,9 @@ export const de_ImportDecoderManifestCommand = async (output, context) => {
1505
666
  };
1506
667
  return response;
1507
668
  };
1508
- const de_ImportDecoderManifestCommandError = async (output, context) => {
1509
- const parsedOutput = {
1510
- ...output,
1511
- body: await parseErrorBody(output.body, context),
1512
- };
1513
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1514
- switch (errorCode) {
1515
- case "AccessDeniedException":
1516
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1517
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1518
- case "ConflictException":
1519
- case "com.amazonaws.iotfleetwise#ConflictException":
1520
- throw await de_ConflictExceptionRes(parsedOutput, context);
1521
- case "DecoderManifestValidationException":
1522
- case "com.amazonaws.iotfleetwise#DecoderManifestValidationException":
1523
- throw await de_DecoderManifestValidationExceptionRes(parsedOutput, context);
1524
- case "InternalServerException":
1525
- case "com.amazonaws.iotfleetwise#InternalServerException":
1526
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1527
- case "InvalidSignalsException":
1528
- case "com.amazonaws.iotfleetwise#InvalidSignalsException":
1529
- throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
1530
- case "ResourceNotFoundException":
1531
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1532
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1533
- case "ThrottlingException":
1534
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1535
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1536
- case "ValidationException":
1537
- case "com.amazonaws.iotfleetwise#ValidationException":
1538
- throw await de_ValidationExceptionRes(parsedOutput, context);
1539
- default:
1540
- const parsedBody = parsedOutput.body;
1541
- return throwDefaultError({
1542
- output,
1543
- parsedBody,
1544
- errorCode,
1545
- });
1546
- }
1547
- };
1548
669
  export const de_ImportSignalCatalogCommand = async (output, context) => {
1549
670
  if (output.statusCode >= 300) {
1550
- return de_ImportSignalCatalogCommandError(output, context);
671
+ return de_CommandError(output, context);
1551
672
  }
1552
673
  const data = await parseBody(output.body, context);
1553
674
  let contents = {};
@@ -1558,49 +679,9 @@ export const de_ImportSignalCatalogCommand = async (output, context) => {
1558
679
  };
1559
680
  return response;
1560
681
  };
1561
- const de_ImportSignalCatalogCommandError = async (output, context) => {
1562
- const parsedOutput = {
1563
- ...output,
1564
- body: await parseErrorBody(output.body, context),
1565
- };
1566
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1567
- switch (errorCode) {
1568
- case "AccessDeniedException":
1569
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1570
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1571
- case "ConflictException":
1572
- case "com.amazonaws.iotfleetwise#ConflictException":
1573
- throw await de_ConflictExceptionRes(parsedOutput, context);
1574
- case "InternalServerException":
1575
- case "com.amazonaws.iotfleetwise#InternalServerException":
1576
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1577
- case "InvalidSignalsException":
1578
- case "com.amazonaws.iotfleetwise#InvalidSignalsException":
1579
- throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
1580
- case "LimitExceededException":
1581
- case "com.amazonaws.iotfleetwise#LimitExceededException":
1582
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1583
- case "ResourceNotFoundException":
1584
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1585
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1586
- case "ThrottlingException":
1587
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1588
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1589
- case "ValidationException":
1590
- case "com.amazonaws.iotfleetwise#ValidationException":
1591
- throw await de_ValidationExceptionRes(parsedOutput, context);
1592
- default:
1593
- const parsedBody = parsedOutput.body;
1594
- return throwDefaultError({
1595
- output,
1596
- parsedBody,
1597
- errorCode,
1598
- });
1599
- }
1600
- };
1601
682
  export const de_ListCampaignsCommand = async (output, context) => {
1602
683
  if (output.statusCode >= 300) {
1603
- return de_ListCampaignsCommandError(output, context);
684
+ return de_CommandError(output, context);
1604
685
  }
1605
686
  const data = await parseBody(output.body, context);
1606
687
  let contents = {};
@@ -1611,37 +692,9 @@ export const de_ListCampaignsCommand = async (output, context) => {
1611
692
  };
1612
693
  return response;
1613
694
  };
1614
- const de_ListCampaignsCommandError = async (output, context) => {
1615
- const parsedOutput = {
1616
- ...output,
1617
- body: await parseErrorBody(output.body, context),
1618
- };
1619
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1620
- switch (errorCode) {
1621
- case "AccessDeniedException":
1622
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1623
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1624
- case "InternalServerException":
1625
- case "com.amazonaws.iotfleetwise#InternalServerException":
1626
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1627
- case "ThrottlingException":
1628
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1629
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1630
- case "ValidationException":
1631
- case "com.amazonaws.iotfleetwise#ValidationException":
1632
- throw await de_ValidationExceptionRes(parsedOutput, context);
1633
- default:
1634
- const parsedBody = parsedOutput.body;
1635
- return throwDefaultError({
1636
- output,
1637
- parsedBody,
1638
- errorCode,
1639
- });
1640
- }
1641
- };
1642
695
  export const de_ListDecoderManifestNetworkInterfacesCommand = async (output, context) => {
1643
696
  if (output.statusCode >= 300) {
1644
- return de_ListDecoderManifestNetworkInterfacesCommandError(output, context);
697
+ return de_CommandError(output, context);
1645
698
  }
1646
699
  const data = await parseBody(output.body, context);
1647
700
  let contents = {};
@@ -1652,40 +705,9 @@ export const de_ListDecoderManifestNetworkInterfacesCommand = async (output, con
1652
705
  };
1653
706
  return response;
1654
707
  };
1655
- const de_ListDecoderManifestNetworkInterfacesCommandError = async (output, context) => {
1656
- const parsedOutput = {
1657
- ...output,
1658
- body: await parseErrorBody(output.body, context),
1659
- };
1660
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1661
- switch (errorCode) {
1662
- case "AccessDeniedException":
1663
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1664
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1665
- case "InternalServerException":
1666
- case "com.amazonaws.iotfleetwise#InternalServerException":
1667
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1668
- case "ResourceNotFoundException":
1669
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1670
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1671
- case "ThrottlingException":
1672
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1673
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1674
- case "ValidationException":
1675
- case "com.amazonaws.iotfleetwise#ValidationException":
1676
- throw await de_ValidationExceptionRes(parsedOutput, context);
1677
- default:
1678
- const parsedBody = parsedOutput.body;
1679
- return throwDefaultError({
1680
- output,
1681
- parsedBody,
1682
- errorCode,
1683
- });
1684
- }
1685
- };
1686
708
  export const de_ListDecoderManifestsCommand = async (output, context) => {
1687
709
  if (output.statusCode >= 300) {
1688
- return de_ListDecoderManifestsCommandError(output, context);
710
+ return de_CommandError(output, context);
1689
711
  }
1690
712
  const data = await parseBody(output.body, context);
1691
713
  let contents = {};
@@ -1696,37 +718,9 @@ export const de_ListDecoderManifestsCommand = async (output, context) => {
1696
718
  };
1697
719
  return response;
1698
720
  };
1699
- const de_ListDecoderManifestsCommandError = async (output, context) => {
1700
- const parsedOutput = {
1701
- ...output,
1702
- body: await parseErrorBody(output.body, context),
1703
- };
1704
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1705
- switch (errorCode) {
1706
- case "AccessDeniedException":
1707
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1708
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1709
- case "InternalServerException":
1710
- case "com.amazonaws.iotfleetwise#InternalServerException":
1711
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1712
- case "ThrottlingException":
1713
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1714
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1715
- case "ValidationException":
1716
- case "com.amazonaws.iotfleetwise#ValidationException":
1717
- throw await de_ValidationExceptionRes(parsedOutput, context);
1718
- default:
1719
- const parsedBody = parsedOutput.body;
1720
- return throwDefaultError({
1721
- output,
1722
- parsedBody,
1723
- errorCode,
1724
- });
1725
- }
1726
- };
1727
721
  export const de_ListDecoderManifestSignalsCommand = async (output, context) => {
1728
722
  if (output.statusCode >= 300) {
1729
- return de_ListDecoderManifestSignalsCommandError(output, context);
723
+ return de_CommandError(output, context);
1730
724
  }
1731
725
  const data = await parseBody(output.body, context);
1732
726
  let contents = {};
@@ -1737,84 +731,22 @@ export const de_ListDecoderManifestSignalsCommand = async (output, context) => {
1737
731
  };
1738
732
  return response;
1739
733
  };
1740
- const de_ListDecoderManifestSignalsCommandError = async (output, context) => {
1741
- const parsedOutput = {
1742
- ...output,
1743
- body: await parseErrorBody(output.body, context),
1744
- };
1745
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1746
- switch (errorCode) {
1747
- case "AccessDeniedException":
1748
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1749
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1750
- case "InternalServerException":
1751
- case "com.amazonaws.iotfleetwise#InternalServerException":
1752
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1753
- case "ResourceNotFoundException":
1754
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1755
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1756
- case "ThrottlingException":
1757
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1758
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1759
- case "ValidationException":
1760
- case "com.amazonaws.iotfleetwise#ValidationException":
1761
- throw await de_ValidationExceptionRes(parsedOutput, context);
1762
- default:
1763
- const parsedBody = parsedOutput.body;
1764
- return throwDefaultError({
1765
- output,
1766
- parsedBody,
1767
- errorCode,
1768
- });
1769
- }
1770
- };
1771
- export const de_ListFleetsCommand = async (output, context) => {
1772
- if (output.statusCode >= 300) {
1773
- return de_ListFleetsCommandError(output, context);
1774
- }
1775
- const data = await parseBody(output.body, context);
1776
- let contents = {};
1777
- contents = de_ListFleetsResponse(data, context);
1778
- const response = {
1779
- $metadata: deserializeMetadata(output),
1780
- ...contents,
734
+ export const de_ListFleetsCommand = async (output, context) => {
735
+ if (output.statusCode >= 300) {
736
+ return de_CommandError(output, context);
737
+ }
738
+ const data = await parseBody(output.body, context);
739
+ let contents = {};
740
+ contents = de_ListFleetsResponse(data, context);
741
+ const response = {
742
+ $metadata: deserializeMetadata(output),
743
+ ...contents,
1781
744
  };
1782
745
  return response;
1783
746
  };
1784
- const de_ListFleetsCommandError = async (output, context) => {
1785
- const parsedOutput = {
1786
- ...output,
1787
- body: await parseErrorBody(output.body, context),
1788
- };
1789
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1790
- switch (errorCode) {
1791
- case "AccessDeniedException":
1792
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1793
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1794
- case "InternalServerException":
1795
- case "com.amazonaws.iotfleetwise#InternalServerException":
1796
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1797
- case "ResourceNotFoundException":
1798
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1799
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1800
- case "ThrottlingException":
1801
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1802
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1803
- case "ValidationException":
1804
- case "com.amazonaws.iotfleetwise#ValidationException":
1805
- throw await de_ValidationExceptionRes(parsedOutput, context);
1806
- default:
1807
- const parsedBody = parsedOutput.body;
1808
- return throwDefaultError({
1809
- output,
1810
- parsedBody,
1811
- errorCode,
1812
- });
1813
- }
1814
- };
1815
747
  export const de_ListFleetsForVehicleCommand = async (output, context) => {
1816
748
  if (output.statusCode >= 300) {
1817
- return de_ListFleetsForVehicleCommandError(output, context);
749
+ return de_CommandError(output, context);
1818
750
  }
1819
751
  const data = await parseBody(output.body, context);
1820
752
  let contents = {};
@@ -1825,40 +757,9 @@ export const de_ListFleetsForVehicleCommand = async (output, context) => {
1825
757
  };
1826
758
  return response;
1827
759
  };
1828
- const de_ListFleetsForVehicleCommandError = async (output, context) => {
1829
- const parsedOutput = {
1830
- ...output,
1831
- body: await parseErrorBody(output.body, context),
1832
- };
1833
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1834
- switch (errorCode) {
1835
- case "AccessDeniedException":
1836
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1837
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1838
- case "InternalServerException":
1839
- case "com.amazonaws.iotfleetwise#InternalServerException":
1840
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1841
- case "ResourceNotFoundException":
1842
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1843
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1844
- case "ThrottlingException":
1845
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1846
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1847
- case "ValidationException":
1848
- case "com.amazonaws.iotfleetwise#ValidationException":
1849
- throw await de_ValidationExceptionRes(parsedOutput, context);
1850
- default:
1851
- const parsedBody = parsedOutput.body;
1852
- return throwDefaultError({
1853
- output,
1854
- parsedBody,
1855
- errorCode,
1856
- });
1857
- }
1858
- };
1859
760
  export const de_ListModelManifestNodesCommand = async (output, context) => {
1860
761
  if (output.statusCode >= 300) {
1861
- return de_ListModelManifestNodesCommandError(output, context);
762
+ return de_CommandError(output, context);
1862
763
  }
1863
764
  const data = await parseBody(output.body, context);
1864
765
  let contents = {};
@@ -1869,43 +770,9 @@ export const de_ListModelManifestNodesCommand = async (output, context) => {
1869
770
  };
1870
771
  return response;
1871
772
  };
1872
- const de_ListModelManifestNodesCommandError = async (output, context) => {
1873
- const parsedOutput = {
1874
- ...output,
1875
- body: await parseErrorBody(output.body, context),
1876
- };
1877
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1878
- switch (errorCode) {
1879
- case "AccessDeniedException":
1880
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1881
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1882
- case "InternalServerException":
1883
- case "com.amazonaws.iotfleetwise#InternalServerException":
1884
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1885
- case "LimitExceededException":
1886
- case "com.amazonaws.iotfleetwise#LimitExceededException":
1887
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1888
- case "ResourceNotFoundException":
1889
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1890
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1891
- case "ThrottlingException":
1892
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1893
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1894
- case "ValidationException":
1895
- case "com.amazonaws.iotfleetwise#ValidationException":
1896
- throw await de_ValidationExceptionRes(parsedOutput, context);
1897
- default:
1898
- const parsedBody = parsedOutput.body;
1899
- return throwDefaultError({
1900
- output,
1901
- parsedBody,
1902
- errorCode,
1903
- });
1904
- }
1905
- };
1906
773
  export const de_ListModelManifestsCommand = async (output, context) => {
1907
774
  if (output.statusCode >= 300) {
1908
- return de_ListModelManifestsCommandError(output, context);
775
+ return de_CommandError(output, context);
1909
776
  }
1910
777
  const data = await parseBody(output.body, context);
1911
778
  let contents = {};
@@ -1916,37 +783,9 @@ export const de_ListModelManifestsCommand = async (output, context) => {
1916
783
  };
1917
784
  return response;
1918
785
  };
1919
- const de_ListModelManifestsCommandError = async (output, context) => {
1920
- const parsedOutput = {
1921
- ...output,
1922
- body: await parseErrorBody(output.body, context),
1923
- };
1924
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1925
- switch (errorCode) {
1926
- case "AccessDeniedException":
1927
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1928
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1929
- case "InternalServerException":
1930
- case "com.amazonaws.iotfleetwise#InternalServerException":
1931
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1932
- case "ThrottlingException":
1933
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1934
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1935
- case "ValidationException":
1936
- case "com.amazonaws.iotfleetwise#ValidationException":
1937
- throw await de_ValidationExceptionRes(parsedOutput, context);
1938
- default:
1939
- const parsedBody = parsedOutput.body;
1940
- return throwDefaultError({
1941
- output,
1942
- parsedBody,
1943
- errorCode,
1944
- });
1945
- }
1946
- };
1947
786
  export const de_ListSignalCatalogNodesCommand = async (output, context) => {
1948
787
  if (output.statusCode >= 300) {
1949
- return de_ListSignalCatalogNodesCommandError(output, context);
788
+ return de_CommandError(output, context);
1950
789
  }
1951
790
  const data = await parseBody(output.body, context);
1952
791
  let contents = {};
@@ -1957,43 +796,9 @@ export const de_ListSignalCatalogNodesCommand = async (output, context) => {
1957
796
  };
1958
797
  return response;
1959
798
  };
1960
- const de_ListSignalCatalogNodesCommandError = async (output, context) => {
1961
- const parsedOutput = {
1962
- ...output,
1963
- body: await parseErrorBody(output.body, context),
1964
- };
1965
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1966
- switch (errorCode) {
1967
- case "AccessDeniedException":
1968
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
1969
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1970
- case "InternalServerException":
1971
- case "com.amazonaws.iotfleetwise#InternalServerException":
1972
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1973
- case "LimitExceededException":
1974
- case "com.amazonaws.iotfleetwise#LimitExceededException":
1975
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1976
- case "ResourceNotFoundException":
1977
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
1978
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1979
- case "ThrottlingException":
1980
- case "com.amazonaws.iotfleetwise#ThrottlingException":
1981
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1982
- case "ValidationException":
1983
- case "com.amazonaws.iotfleetwise#ValidationException":
1984
- throw await de_ValidationExceptionRes(parsedOutput, context);
1985
- default:
1986
- const parsedBody = parsedOutput.body;
1987
- return throwDefaultError({
1988
- output,
1989
- parsedBody,
1990
- errorCode,
1991
- });
1992
- }
1993
- };
1994
799
  export const de_ListSignalCatalogsCommand = async (output, context) => {
1995
800
  if (output.statusCode >= 300) {
1996
- return de_ListSignalCatalogsCommandError(output, context);
801
+ return de_CommandError(output, context);
1997
802
  }
1998
803
  const data = await parseBody(output.body, context);
1999
804
  let contents = {};
@@ -2004,37 +809,9 @@ export const de_ListSignalCatalogsCommand = async (output, context) => {
2004
809
  };
2005
810
  return response;
2006
811
  };
2007
- const de_ListSignalCatalogsCommandError = async (output, context) => {
2008
- const parsedOutput = {
2009
- ...output,
2010
- body: await parseErrorBody(output.body, context),
2011
- };
2012
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2013
- switch (errorCode) {
2014
- case "AccessDeniedException":
2015
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2016
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2017
- case "InternalServerException":
2018
- case "com.amazonaws.iotfleetwise#InternalServerException":
2019
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2020
- case "ThrottlingException":
2021
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2022
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2023
- case "ValidationException":
2024
- case "com.amazonaws.iotfleetwise#ValidationException":
2025
- throw await de_ValidationExceptionRes(parsedOutput, context);
2026
- default:
2027
- const parsedBody = parsedOutput.body;
2028
- return throwDefaultError({
2029
- output,
2030
- parsedBody,
2031
- errorCode,
2032
- });
2033
- }
2034
- };
2035
812
  export const de_ListTagsForResourceCommand = async (output, context) => {
2036
813
  if (output.statusCode >= 300) {
2037
- return de_ListTagsForResourceCommandError(output, context);
814
+ return de_CommandError(output, context);
2038
815
  }
2039
816
  const data = await parseBody(output.body, context);
2040
817
  let contents = {};
@@ -2045,40 +822,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2045
822
  };
2046
823
  return response;
2047
824
  };
2048
- const de_ListTagsForResourceCommandError = async (output, context) => {
2049
- const parsedOutput = {
2050
- ...output,
2051
- body: await parseErrorBody(output.body, context),
2052
- };
2053
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2054
- switch (errorCode) {
2055
- case "AccessDeniedException":
2056
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2057
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2058
- case "InternalServerException":
2059
- case "com.amazonaws.iotfleetwise#InternalServerException":
2060
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2061
- case "ResourceNotFoundException":
2062
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2063
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2064
- case "ThrottlingException":
2065
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2066
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2067
- case "ValidationException":
2068
- case "com.amazonaws.iotfleetwise#ValidationException":
2069
- throw await de_ValidationExceptionRes(parsedOutput, context);
2070
- default:
2071
- const parsedBody = parsedOutput.body;
2072
- return throwDefaultError({
2073
- output,
2074
- parsedBody,
2075
- errorCode,
2076
- });
2077
- }
2078
- };
2079
825
  export const de_ListVehiclesCommand = async (output, context) => {
2080
826
  if (output.statusCode >= 300) {
2081
- return de_ListVehiclesCommandError(output, context);
827
+ return de_CommandError(output, context);
2082
828
  }
2083
829
  const data = await parseBody(output.body, context);
2084
830
  let contents = {};
@@ -2089,37 +835,9 @@ export const de_ListVehiclesCommand = async (output, context) => {
2089
835
  };
2090
836
  return response;
2091
837
  };
2092
- const de_ListVehiclesCommandError = async (output, context) => {
2093
- const parsedOutput = {
2094
- ...output,
2095
- body: await parseErrorBody(output.body, context),
2096
- };
2097
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2098
- switch (errorCode) {
2099
- case "AccessDeniedException":
2100
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2101
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2102
- case "InternalServerException":
2103
- case "com.amazonaws.iotfleetwise#InternalServerException":
2104
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2105
- case "ThrottlingException":
2106
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2107
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2108
- case "ValidationException":
2109
- case "com.amazonaws.iotfleetwise#ValidationException":
2110
- throw await de_ValidationExceptionRes(parsedOutput, context);
2111
- default:
2112
- const parsedBody = parsedOutput.body;
2113
- return throwDefaultError({
2114
- output,
2115
- parsedBody,
2116
- errorCode,
2117
- });
2118
- }
2119
- };
2120
838
  export const de_ListVehiclesInFleetCommand = async (output, context) => {
2121
839
  if (output.statusCode >= 300) {
2122
- return de_ListVehiclesInFleetCommandError(output, context);
840
+ return de_CommandError(output, context);
2123
841
  }
2124
842
  const data = await parseBody(output.body, context);
2125
843
  let contents = {};
@@ -2130,40 +848,9 @@ export const de_ListVehiclesInFleetCommand = async (output, context) => {
2130
848
  };
2131
849
  return response;
2132
850
  };
2133
- const de_ListVehiclesInFleetCommandError = async (output, context) => {
2134
- const parsedOutput = {
2135
- ...output,
2136
- body: await parseErrorBody(output.body, context),
2137
- };
2138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2139
- switch (errorCode) {
2140
- case "AccessDeniedException":
2141
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2142
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2143
- case "InternalServerException":
2144
- case "com.amazonaws.iotfleetwise#InternalServerException":
2145
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2146
- case "ResourceNotFoundException":
2147
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2148
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2149
- case "ThrottlingException":
2150
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2151
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2152
- case "ValidationException":
2153
- case "com.amazonaws.iotfleetwise#ValidationException":
2154
- throw await de_ValidationExceptionRes(parsedOutput, context);
2155
- default:
2156
- const parsedBody = parsedOutput.body;
2157
- return throwDefaultError({
2158
- output,
2159
- parsedBody,
2160
- errorCode,
2161
- });
2162
- }
2163
- };
2164
851
  export const de_PutEncryptionConfigurationCommand = async (output, context) => {
2165
852
  if (output.statusCode >= 300) {
2166
- return de_PutEncryptionConfigurationCommandError(output, context);
853
+ return de_CommandError(output, context);
2167
854
  }
2168
855
  const data = await parseBody(output.body, context);
2169
856
  let contents = {};
@@ -2174,181 +861,35 @@ export const de_PutEncryptionConfigurationCommand = async (output, context) => {
2174
861
  };
2175
862
  return response;
2176
863
  };
2177
- const de_PutEncryptionConfigurationCommandError = async (output, context) => {
2178
- const parsedOutput = {
2179
- ...output,
2180
- body: await parseErrorBody(output.body, context),
2181
- };
2182
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2183
- switch (errorCode) {
2184
- case "AccessDeniedException":
2185
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2186
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2187
- case "ConflictException":
2188
- case "com.amazonaws.iotfleetwise#ConflictException":
2189
- throw await de_ConflictExceptionRes(parsedOutput, context);
2190
- case "InternalServerException":
2191
- case "com.amazonaws.iotfleetwise#InternalServerException":
2192
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2193
- case "ResourceNotFoundException":
2194
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2195
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2196
- case "ThrottlingException":
2197
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2198
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2199
- case "ValidationException":
2200
- case "com.amazonaws.iotfleetwise#ValidationException":
2201
- throw await de_ValidationExceptionRes(parsedOutput, context);
2202
- default:
2203
- const parsedBody = parsedOutput.body;
2204
- return throwDefaultError({
2205
- output,
2206
- parsedBody,
2207
- errorCode,
2208
- });
2209
- }
2210
- };
2211
864
  export const de_PutLoggingOptionsCommand = async (output, context) => {
2212
865
  if (output.statusCode >= 300) {
2213
- return de_PutLoggingOptionsCommandError(output, context);
866
+ return de_CommandError(output, context);
2214
867
  }
2215
868
  const data = await parseBody(output.body, context);
2216
869
  let contents = {};
2217
870
  contents = _json(data);
2218
871
  const response = {
2219
- $metadata: deserializeMetadata(output),
2220
- ...contents,
2221
- };
2222
- return response;
2223
- };
2224
- const de_PutLoggingOptionsCommandError = async (output, context) => {
2225
- const parsedOutput = {
2226
- ...output,
2227
- body: await parseErrorBody(output.body, context),
2228
- };
2229
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2230
- switch (errorCode) {
2231
- case "AccessDeniedException":
2232
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2233
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2234
- case "ConflictException":
2235
- case "com.amazonaws.iotfleetwise#ConflictException":
2236
- throw await de_ConflictExceptionRes(parsedOutput, context);
2237
- case "InternalServerException":
2238
- case "com.amazonaws.iotfleetwise#InternalServerException":
2239
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2240
- case "ResourceNotFoundException":
2241
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2242
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2243
- case "ThrottlingException":
2244
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2245
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2246
- case "ValidationException":
2247
- case "com.amazonaws.iotfleetwise#ValidationException":
2248
- throw await de_ValidationExceptionRes(parsedOutput, context);
2249
- default:
2250
- const parsedBody = parsedOutput.body;
2251
- return throwDefaultError({
2252
- output,
2253
- parsedBody,
2254
- errorCode,
2255
- });
2256
- }
2257
- };
2258
- export const de_RegisterAccountCommand = async (output, context) => {
2259
- if (output.statusCode >= 300) {
2260
- return de_RegisterAccountCommandError(output, context);
2261
- }
2262
- const data = await parseBody(output.body, context);
2263
- let contents = {};
2264
- contents = de_RegisterAccountResponse(data, context);
2265
- const response = {
2266
- $metadata: deserializeMetadata(output),
2267
- ...contents,
2268
- };
2269
- return response;
2270
- };
2271
- const de_RegisterAccountCommandError = async (output, context) => {
2272
- const parsedOutput = {
2273
- ...output,
2274
- body: await parseErrorBody(output.body, context),
2275
- };
2276
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2277
- switch (errorCode) {
2278
- case "AccessDeniedException":
2279
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2280
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2281
- case "ConflictException":
2282
- case "com.amazonaws.iotfleetwise#ConflictException":
2283
- throw await de_ConflictExceptionRes(parsedOutput, context);
2284
- case "InternalServerException":
2285
- case "com.amazonaws.iotfleetwise#InternalServerException":
2286
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2287
- case "ResourceNotFoundException":
2288
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2289
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2290
- case "ThrottlingException":
2291
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2292
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2293
- case "ValidationException":
2294
- case "com.amazonaws.iotfleetwise#ValidationException":
2295
- throw await de_ValidationExceptionRes(parsedOutput, context);
2296
- default:
2297
- const parsedBody = parsedOutput.body;
2298
- return throwDefaultError({
2299
- output,
2300
- parsedBody,
2301
- errorCode,
2302
- });
2303
- }
2304
- };
2305
- export const de_TagResourceCommand = async (output, context) => {
2306
- if (output.statusCode >= 300) {
2307
- return de_TagResourceCommandError(output, context);
2308
- }
2309
- const data = await parseBody(output.body, context);
2310
- let contents = {};
2311
- contents = _json(data);
2312
- const response = {
2313
- $metadata: deserializeMetadata(output),
2314
- ...contents,
2315
- };
2316
- return response;
2317
- };
2318
- const de_TagResourceCommandError = async (output, context) => {
2319
- const parsedOutput = {
2320
- ...output,
2321
- body: await parseErrorBody(output.body, context),
2322
- };
2323
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2324
- switch (errorCode) {
2325
- case "AccessDeniedException":
2326
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2327
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2328
- case "InternalServerException":
2329
- case "com.amazonaws.iotfleetwise#InternalServerException":
2330
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2331
- case "ResourceNotFoundException":
2332
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2333
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2334
- case "ThrottlingException":
2335
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2336
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2337
- case "ValidationException":
2338
- case "com.amazonaws.iotfleetwise#ValidationException":
2339
- throw await de_ValidationExceptionRes(parsedOutput, context);
2340
- default:
2341
- const parsedBody = parsedOutput.body;
2342
- return throwDefaultError({
2343
- output,
2344
- parsedBody,
2345
- errorCode,
2346
- });
872
+ $metadata: deserializeMetadata(output),
873
+ ...contents,
874
+ };
875
+ return response;
876
+ };
877
+ export const de_RegisterAccountCommand = async (output, context) => {
878
+ if (output.statusCode >= 300) {
879
+ return de_CommandError(output, context);
2347
880
  }
881
+ const data = await parseBody(output.body, context);
882
+ let contents = {};
883
+ contents = de_RegisterAccountResponse(data, context);
884
+ const response = {
885
+ $metadata: deserializeMetadata(output),
886
+ ...contents,
887
+ };
888
+ return response;
2348
889
  };
2349
- export const de_UntagResourceCommand = async (output, context) => {
890
+ export const de_TagResourceCommand = async (output, context) => {
2350
891
  if (output.statusCode >= 300) {
2351
- return de_UntagResourceCommandError(output, context);
892
+ return de_CommandError(output, context);
2352
893
  }
2353
894
  const data = await parseBody(output.body, context);
2354
895
  let contents = {};
@@ -2359,40 +900,22 @@ export const de_UntagResourceCommand = async (output, context) => {
2359
900
  };
2360
901
  return response;
2361
902
  };
2362
- const de_UntagResourceCommandError = async (output, context) => {
2363
- const parsedOutput = {
2364
- ...output,
2365
- body: await parseErrorBody(output.body, context),
2366
- };
2367
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2368
- switch (errorCode) {
2369
- case "AccessDeniedException":
2370
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2371
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2372
- case "InternalServerException":
2373
- case "com.amazonaws.iotfleetwise#InternalServerException":
2374
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2375
- case "ResourceNotFoundException":
2376
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2377
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2378
- case "ThrottlingException":
2379
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2380
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2381
- case "ValidationException":
2382
- case "com.amazonaws.iotfleetwise#ValidationException":
2383
- throw await de_ValidationExceptionRes(parsedOutput, context);
2384
- default:
2385
- const parsedBody = parsedOutput.body;
2386
- return throwDefaultError({
2387
- output,
2388
- parsedBody,
2389
- errorCode,
2390
- });
903
+ export const de_UntagResourceCommand = async (output, context) => {
904
+ if (output.statusCode >= 300) {
905
+ return de_CommandError(output, context);
2391
906
  }
907
+ const data = await parseBody(output.body, context);
908
+ let contents = {};
909
+ contents = _json(data);
910
+ const response = {
911
+ $metadata: deserializeMetadata(output),
912
+ ...contents,
913
+ };
914
+ return response;
2392
915
  };
2393
916
  export const de_UpdateCampaignCommand = async (output, context) => {
2394
917
  if (output.statusCode >= 300) {
2395
- return de_UpdateCampaignCommandError(output, context);
918
+ return de_CommandError(output, context);
2396
919
  }
2397
920
  const data = await parseBody(output.body, context);
2398
921
  let contents = {};
@@ -2403,43 +926,9 @@ export const de_UpdateCampaignCommand = async (output, context) => {
2403
926
  };
2404
927
  return response;
2405
928
  };
2406
- const de_UpdateCampaignCommandError = async (output, context) => {
2407
- const parsedOutput = {
2408
- ...output,
2409
- body: await parseErrorBody(output.body, context),
2410
- };
2411
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2412
- switch (errorCode) {
2413
- case "AccessDeniedException":
2414
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2415
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2416
- case "ConflictException":
2417
- case "com.amazonaws.iotfleetwise#ConflictException":
2418
- throw await de_ConflictExceptionRes(parsedOutput, context);
2419
- case "InternalServerException":
2420
- case "com.amazonaws.iotfleetwise#InternalServerException":
2421
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2422
- case "ResourceNotFoundException":
2423
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2424
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2425
- case "ThrottlingException":
2426
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2427
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2428
- case "ValidationException":
2429
- case "com.amazonaws.iotfleetwise#ValidationException":
2430
- throw await de_ValidationExceptionRes(parsedOutput, context);
2431
- default:
2432
- const parsedBody = parsedOutput.body;
2433
- return throwDefaultError({
2434
- output,
2435
- parsedBody,
2436
- errorCode,
2437
- });
2438
- }
2439
- };
2440
929
  export const de_UpdateDecoderManifestCommand = async (output, context) => {
2441
930
  if (output.statusCode >= 300) {
2442
- return de_UpdateDecoderManifestCommandError(output, context);
931
+ return de_CommandError(output, context);
2443
932
  }
2444
933
  const data = await parseBody(output.body, context);
2445
934
  let contents = {};
@@ -2450,49 +939,9 @@ export const de_UpdateDecoderManifestCommand = async (output, context) => {
2450
939
  };
2451
940
  return response;
2452
941
  };
2453
- const de_UpdateDecoderManifestCommandError = async (output, context) => {
2454
- const parsedOutput = {
2455
- ...output,
2456
- body: await parseErrorBody(output.body, context),
2457
- };
2458
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2459
- switch (errorCode) {
2460
- case "AccessDeniedException":
2461
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2462
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2463
- case "ConflictException":
2464
- case "com.amazonaws.iotfleetwise#ConflictException":
2465
- throw await de_ConflictExceptionRes(parsedOutput, context);
2466
- case "DecoderManifestValidationException":
2467
- case "com.amazonaws.iotfleetwise#DecoderManifestValidationException":
2468
- throw await de_DecoderManifestValidationExceptionRes(parsedOutput, context);
2469
- case "InternalServerException":
2470
- case "com.amazonaws.iotfleetwise#InternalServerException":
2471
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2472
- case "LimitExceededException":
2473
- case "com.amazonaws.iotfleetwise#LimitExceededException":
2474
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2475
- case "ResourceNotFoundException":
2476
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2477
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2478
- case "ThrottlingException":
2479
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2480
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2481
- case "ValidationException":
2482
- case "com.amazonaws.iotfleetwise#ValidationException":
2483
- throw await de_ValidationExceptionRes(parsedOutput, context);
2484
- default:
2485
- const parsedBody = parsedOutput.body;
2486
- return throwDefaultError({
2487
- output,
2488
- parsedBody,
2489
- errorCode,
2490
- });
2491
- }
2492
- };
2493
942
  export const de_UpdateFleetCommand = async (output, context) => {
2494
943
  if (output.statusCode >= 300) {
2495
- return de_UpdateFleetCommandError(output, context);
944
+ return de_CommandError(output, context);
2496
945
  }
2497
946
  const data = await parseBody(output.body, context);
2498
947
  let contents = {};
@@ -2503,43 +952,9 @@ export const de_UpdateFleetCommand = async (output, context) => {
2503
952
  };
2504
953
  return response;
2505
954
  };
2506
- const de_UpdateFleetCommandError = async (output, context) => {
2507
- const parsedOutput = {
2508
- ...output,
2509
- body: await parseErrorBody(output.body, context),
2510
- };
2511
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2512
- switch (errorCode) {
2513
- case "AccessDeniedException":
2514
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2515
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2516
- case "ConflictException":
2517
- case "com.amazonaws.iotfleetwise#ConflictException":
2518
- throw await de_ConflictExceptionRes(parsedOutput, context);
2519
- case "InternalServerException":
2520
- case "com.amazonaws.iotfleetwise#InternalServerException":
2521
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2522
- case "ResourceNotFoundException":
2523
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2524
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2525
- case "ThrottlingException":
2526
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2527
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2528
- case "ValidationException":
2529
- case "com.amazonaws.iotfleetwise#ValidationException":
2530
- throw await de_ValidationExceptionRes(parsedOutput, context);
2531
- default:
2532
- const parsedBody = parsedOutput.body;
2533
- return throwDefaultError({
2534
- output,
2535
- parsedBody,
2536
- errorCode,
2537
- });
2538
- }
2539
- };
2540
955
  export const de_UpdateModelManifestCommand = async (output, context) => {
2541
956
  if (output.statusCode >= 300) {
2542
- return de_UpdateModelManifestCommandError(output, context);
957
+ return de_CommandError(output, context);
2543
958
  }
2544
959
  const data = await parseBody(output.body, context);
2545
960
  let contents = {};
@@ -2550,46 +965,9 @@ export const de_UpdateModelManifestCommand = async (output, context) => {
2550
965
  };
2551
966
  return response;
2552
967
  };
2553
- const de_UpdateModelManifestCommandError = async (output, context) => {
2554
- const parsedOutput = {
2555
- ...output,
2556
- body: await parseErrorBody(output.body, context),
2557
- };
2558
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2559
- switch (errorCode) {
2560
- case "AccessDeniedException":
2561
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2562
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2563
- case "ConflictException":
2564
- case "com.amazonaws.iotfleetwise#ConflictException":
2565
- throw await de_ConflictExceptionRes(parsedOutput, context);
2566
- case "InternalServerException":
2567
- case "com.amazonaws.iotfleetwise#InternalServerException":
2568
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2569
- case "InvalidSignalsException":
2570
- case "com.amazonaws.iotfleetwise#InvalidSignalsException":
2571
- throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
2572
- case "ResourceNotFoundException":
2573
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2574
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2575
- case "ThrottlingException":
2576
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2577
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2578
- case "ValidationException":
2579
- case "com.amazonaws.iotfleetwise#ValidationException":
2580
- throw await de_ValidationExceptionRes(parsedOutput, context);
2581
- default:
2582
- const parsedBody = parsedOutput.body;
2583
- return throwDefaultError({
2584
- output,
2585
- parsedBody,
2586
- errorCode,
2587
- });
2588
- }
2589
- };
2590
968
  export const de_UpdateSignalCatalogCommand = async (output, context) => {
2591
969
  if (output.statusCode >= 300) {
2592
- return de_UpdateSignalCatalogCommandError(output, context);
970
+ return de_CommandError(output, context);
2593
971
  }
2594
972
  const data = await parseBody(output.body, context);
2595
973
  let contents = {};
@@ -2600,52 +978,9 @@ export const de_UpdateSignalCatalogCommand = async (output, context) => {
2600
978
  };
2601
979
  return response;
2602
980
  };
2603
- const de_UpdateSignalCatalogCommandError = async (output, context) => {
2604
- const parsedOutput = {
2605
- ...output,
2606
- body: await parseErrorBody(output.body, context),
2607
- };
2608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2609
- switch (errorCode) {
2610
- case "AccessDeniedException":
2611
- case "com.amazonaws.iotfleetwise#AccessDeniedException":
2612
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2613
- case "ConflictException":
2614
- case "com.amazonaws.iotfleetwise#ConflictException":
2615
- throw await de_ConflictExceptionRes(parsedOutput, context);
2616
- case "InternalServerException":
2617
- case "com.amazonaws.iotfleetwise#InternalServerException":
2618
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2619
- case "InvalidNodeException":
2620
- case "com.amazonaws.iotfleetwise#InvalidNodeException":
2621
- throw await de_InvalidNodeExceptionRes(parsedOutput, context);
2622
- case "InvalidSignalsException":
2623
- case "com.amazonaws.iotfleetwise#InvalidSignalsException":
2624
- throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
2625
- case "LimitExceededException":
2626
- case "com.amazonaws.iotfleetwise#LimitExceededException":
2627
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2628
- case "ResourceNotFoundException":
2629
- case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2630
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2631
- case "ThrottlingException":
2632
- case "com.amazonaws.iotfleetwise#ThrottlingException":
2633
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2634
- case "ValidationException":
2635
- case "com.amazonaws.iotfleetwise#ValidationException":
2636
- throw await de_ValidationExceptionRes(parsedOutput, context);
2637
- default:
2638
- const parsedBody = parsedOutput.body;
2639
- return throwDefaultError({
2640
- output,
2641
- parsedBody,
2642
- errorCode,
2643
- });
2644
- }
2645
- };
2646
981
  export const de_UpdateVehicleCommand = async (output, context) => {
2647
982
  if (output.statusCode >= 300) {
2648
- return de_UpdateVehicleCommandError(output, context);
983
+ return de_CommandError(output, context);
2649
984
  }
2650
985
  const data = await parseBody(output.body, context);
2651
986
  let contents = {};
@@ -2656,7 +991,7 @@ export const de_UpdateVehicleCommand = async (output, context) => {
2656
991
  };
2657
992
  return response;
2658
993
  };
2659
- const de_UpdateVehicleCommandError = async (output, context) => {
994
+ const de_CommandError = async (output, context) => {
2660
995
  const parsedOutput = {
2661
996
  ...output,
2662
997
  body: await parseErrorBody(output.body, context),
@@ -2666,12 +1001,12 @@ const de_UpdateVehicleCommandError = async (output, context) => {
2666
1001
  case "AccessDeniedException":
2667
1002
  case "com.amazonaws.iotfleetwise#AccessDeniedException":
2668
1003
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2669
- case "ConflictException":
2670
- case "com.amazonaws.iotfleetwise#ConflictException":
2671
- throw await de_ConflictExceptionRes(parsedOutput, context);
2672
1004
  case "InternalServerException":
2673
1005
  case "com.amazonaws.iotfleetwise#InternalServerException":
2674
1006
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1007
+ case "LimitExceededException":
1008
+ case "com.amazonaws.iotfleetwise#LimitExceededException":
1009
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
2675
1010
  case "ResourceNotFoundException":
2676
1011
  case "com.amazonaws.iotfleetwise#ResourceNotFoundException":
2677
1012
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -2681,6 +1016,18 @@ const de_UpdateVehicleCommandError = async (output, context) => {
2681
1016
  case "ValidationException":
2682
1017
  case "com.amazonaws.iotfleetwise#ValidationException":
2683
1018
  throw await de_ValidationExceptionRes(parsedOutput, context);
1019
+ case "ConflictException":
1020
+ case "com.amazonaws.iotfleetwise#ConflictException":
1021
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1022
+ case "DecoderManifestValidationException":
1023
+ case "com.amazonaws.iotfleetwise#DecoderManifestValidationException":
1024
+ throw await de_DecoderManifestValidationExceptionRes(parsedOutput, context);
1025
+ case "InvalidSignalsException":
1026
+ case "com.amazonaws.iotfleetwise#InvalidSignalsException":
1027
+ throw await de_InvalidSignalsExceptionRes(parsedOutput, context);
1028
+ case "InvalidNodeException":
1029
+ case "com.amazonaws.iotfleetwise#InvalidNodeException":
1030
+ throw await de_InvalidNodeExceptionRes(parsedOutput, context);
2684
1031
  default:
2685
1032
  const parsedBody = parsedOutput.body;
2686
1033
  return throwDefaultError({