@aws-sdk/client-lex-models-v2 3.504.0 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -2478,7 +2478,7 @@ var se_UpdateTestSetCommand = /* @__PURE__ */ __name(async (input, context) => {
2478
2478
  }, "se_UpdateTestSetCommand");
2479
2479
  var de_BatchCreateCustomVocabularyItemCommand = /* @__PURE__ */ __name(async (output, context) => {
2480
2480
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2481
- return de_BatchCreateCustomVocabularyItemCommandError(output, context);
2481
+ return de_CommandError(output, context);
2482
2482
  }
2483
2483
  const contents = (0, import_smithy_client.map)({
2484
2484
  $metadata: deserializeMetadata(output)
@@ -2494,40 +2494,9 @@ var de_BatchCreateCustomVocabularyItemCommand = /* @__PURE__ */ __name(async (ou
2494
2494
  Object.assign(contents, doc);
2495
2495
  return contents;
2496
2496
  }, "de_BatchCreateCustomVocabularyItemCommand");
2497
- var de_BatchCreateCustomVocabularyItemCommandError = /* @__PURE__ */ __name(async (output, context) => {
2498
- const parsedOutput = {
2499
- ...output,
2500
- body: await parseErrorBody(output.body, context)
2501
- };
2502
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2503
- switch (errorCode) {
2504
- case "InternalServerException":
2505
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2506
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2507
- case "ResourceNotFoundException":
2508
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
2509
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2510
- case "ServiceQuotaExceededException":
2511
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2512
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2513
- case "ThrottlingException":
2514
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2515
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2516
- case "ValidationException":
2517
- case "com.amazonaws.lexmodelsv2#ValidationException":
2518
- throw await de_ValidationExceptionRes(parsedOutput, context);
2519
- default:
2520
- const parsedBody = parsedOutput.body;
2521
- return throwDefaultError({
2522
- output,
2523
- parsedBody,
2524
- errorCode
2525
- });
2526
- }
2527
- }, "de_BatchCreateCustomVocabularyItemCommandError");
2528
2497
  var de_BatchDeleteCustomVocabularyItemCommand = /* @__PURE__ */ __name(async (output, context) => {
2529
2498
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2530
- return de_BatchDeleteCustomVocabularyItemCommandError(output, context);
2499
+ return de_CommandError(output, context);
2531
2500
  }
2532
2501
  const contents = (0, import_smithy_client.map)({
2533
2502
  $metadata: deserializeMetadata(output)
@@ -2543,40 +2512,9 @@ var de_BatchDeleteCustomVocabularyItemCommand = /* @__PURE__ */ __name(async (ou
2543
2512
  Object.assign(contents, doc);
2544
2513
  return contents;
2545
2514
  }, "de_BatchDeleteCustomVocabularyItemCommand");
2546
- var de_BatchDeleteCustomVocabularyItemCommandError = /* @__PURE__ */ __name(async (output, context) => {
2547
- const parsedOutput = {
2548
- ...output,
2549
- body: await parseErrorBody(output.body, context)
2550
- };
2551
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2552
- switch (errorCode) {
2553
- case "InternalServerException":
2554
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2555
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2556
- case "ResourceNotFoundException":
2557
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
2558
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2559
- case "ServiceQuotaExceededException":
2560
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2561
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2562
- case "ThrottlingException":
2563
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2564
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2565
- case "ValidationException":
2566
- case "com.amazonaws.lexmodelsv2#ValidationException":
2567
- throw await de_ValidationExceptionRes(parsedOutput, context);
2568
- default:
2569
- const parsedBody = parsedOutput.body;
2570
- return throwDefaultError({
2571
- output,
2572
- parsedBody,
2573
- errorCode
2574
- });
2575
- }
2576
- }, "de_BatchDeleteCustomVocabularyItemCommandError");
2577
2515
  var de_BatchUpdateCustomVocabularyItemCommand = /* @__PURE__ */ __name(async (output, context) => {
2578
2516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2579
- return de_BatchUpdateCustomVocabularyItemCommandError(output, context);
2517
+ return de_CommandError(output, context);
2580
2518
  }
2581
2519
  const contents = (0, import_smithy_client.map)({
2582
2520
  $metadata: deserializeMetadata(output)
@@ -2592,40 +2530,9 @@ var de_BatchUpdateCustomVocabularyItemCommand = /* @__PURE__ */ __name(async (ou
2592
2530
  Object.assign(contents, doc);
2593
2531
  return contents;
2594
2532
  }, "de_BatchUpdateCustomVocabularyItemCommand");
2595
- var de_BatchUpdateCustomVocabularyItemCommandError = /* @__PURE__ */ __name(async (output, context) => {
2596
- const parsedOutput = {
2597
- ...output,
2598
- body: await parseErrorBody(output.body, context)
2599
- };
2600
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2601
- switch (errorCode) {
2602
- case "InternalServerException":
2603
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2604
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2605
- case "ResourceNotFoundException":
2606
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
2607
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2608
- case "ServiceQuotaExceededException":
2609
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2610
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2611
- case "ThrottlingException":
2612
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2613
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2614
- case "ValidationException":
2615
- case "com.amazonaws.lexmodelsv2#ValidationException":
2616
- throw await de_ValidationExceptionRes(parsedOutput, context);
2617
- default:
2618
- const parsedBody = parsedOutput.body;
2619
- return throwDefaultError({
2620
- output,
2621
- parsedBody,
2622
- errorCode
2623
- });
2624
- }
2625
- }, "de_BatchUpdateCustomVocabularyItemCommandError");
2626
2533
  var de_BuildBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) => {
2627
2534
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2628
- return de_BuildBotLocaleCommandError(output, context);
2535
+ return de_CommandError(output, context);
2629
2536
  }
2630
2537
  const contents = (0, import_smithy_client.map)({
2631
2538
  $metadata: deserializeMetadata(output)
@@ -2641,43 +2548,9 @@ var de_BuildBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) =>
2641
2548
  Object.assign(contents, doc);
2642
2549
  return contents;
2643
2550
  }, "de_BuildBotLocaleCommand");
2644
- var de_BuildBotLocaleCommandError = /* @__PURE__ */ __name(async (output, context) => {
2645
- const parsedOutput = {
2646
- ...output,
2647
- body: await parseErrorBody(output.body, context)
2648
- };
2649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2650
- switch (errorCode) {
2651
- case "ConflictException":
2652
- case "com.amazonaws.lexmodelsv2#ConflictException":
2653
- throw await de_ConflictExceptionRes(parsedOutput, context);
2654
- case "InternalServerException":
2655
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2656
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2657
- case "PreconditionFailedException":
2658
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
2659
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
2660
- case "ServiceQuotaExceededException":
2661
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2662
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2663
- case "ThrottlingException":
2664
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2665
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2666
- case "ValidationException":
2667
- case "com.amazonaws.lexmodelsv2#ValidationException":
2668
- throw await de_ValidationExceptionRes(parsedOutput, context);
2669
- default:
2670
- const parsedBody = parsedOutput.body;
2671
- return throwDefaultError({
2672
- output,
2673
- parsedBody,
2674
- errorCode
2675
- });
2676
- }
2677
- }, "de_BuildBotLocaleCommandError");
2678
2551
  var de_CreateBotCommand = /* @__PURE__ */ __name(async (output, context) => {
2679
2552
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2680
- return de_CreateBotCommandError(output, context);
2553
+ return de_CommandError(output, context);
2681
2554
  }
2682
2555
  const contents = (0, import_smithy_client.map)({
2683
2556
  $metadata: deserializeMetadata(output)
@@ -2700,43 +2573,9 @@ var de_CreateBotCommand = /* @__PURE__ */ __name(async (output, context) => {
2700
2573
  Object.assign(contents, doc);
2701
2574
  return contents;
2702
2575
  }, "de_CreateBotCommand");
2703
- var de_CreateBotCommandError = /* @__PURE__ */ __name(async (output, context) => {
2704
- const parsedOutput = {
2705
- ...output,
2706
- body: await parseErrorBody(output.body, context)
2707
- };
2708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2709
- switch (errorCode) {
2710
- case "ConflictException":
2711
- case "com.amazonaws.lexmodelsv2#ConflictException":
2712
- throw await de_ConflictExceptionRes(parsedOutput, context);
2713
- case "InternalServerException":
2714
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2715
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2716
- case "PreconditionFailedException":
2717
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
2718
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
2719
- case "ServiceQuotaExceededException":
2720
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2721
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2722
- case "ThrottlingException":
2723
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2724
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2725
- case "ValidationException":
2726
- case "com.amazonaws.lexmodelsv2#ValidationException":
2727
- throw await de_ValidationExceptionRes(parsedOutput, context);
2728
- default:
2729
- const parsedBody = parsedOutput.body;
2730
- return throwDefaultError({
2731
- output,
2732
- parsedBody,
2733
- errorCode
2734
- });
2735
- }
2736
- }, "de_CreateBotCommandError");
2737
2576
  var de_CreateBotAliasCommand = /* @__PURE__ */ __name(async (output, context) => {
2738
2577
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2739
- return de_CreateBotAliasCommandError(output, context);
2578
+ return de_CommandError(output, context);
2740
2579
  }
2741
2580
  const contents = (0, import_smithy_client.map)({
2742
2581
  $metadata: deserializeMetadata(output)
@@ -2758,43 +2597,9 @@ var de_CreateBotAliasCommand = /* @__PURE__ */ __name(async (output, context) =>
2758
2597
  Object.assign(contents, doc);
2759
2598
  return contents;
2760
2599
  }, "de_CreateBotAliasCommand");
2761
- var de_CreateBotAliasCommandError = /* @__PURE__ */ __name(async (output, context) => {
2762
- const parsedOutput = {
2763
- ...output,
2764
- body: await parseErrorBody(output.body, context)
2765
- };
2766
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2767
- switch (errorCode) {
2768
- case "ConflictException":
2769
- case "com.amazonaws.lexmodelsv2#ConflictException":
2770
- throw await de_ConflictExceptionRes(parsedOutput, context);
2771
- case "InternalServerException":
2772
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2773
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2774
- case "PreconditionFailedException":
2775
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
2776
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
2777
- case "ServiceQuotaExceededException":
2778
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2779
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2780
- case "ThrottlingException":
2781
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2782
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2783
- case "ValidationException":
2784
- case "com.amazonaws.lexmodelsv2#ValidationException":
2785
- throw await de_ValidationExceptionRes(parsedOutput, context);
2786
- default:
2787
- const parsedBody = parsedOutput.body;
2788
- return throwDefaultError({
2789
- output,
2790
- parsedBody,
2791
- errorCode
2792
- });
2793
- }
2794
- }, "de_CreateBotAliasCommandError");
2795
2600
  var de_CreateBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) => {
2796
2601
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2797
- return de_CreateBotLocaleCommandError(output, context);
2602
+ return de_CommandError(output, context);
2798
2603
  }
2799
2604
  const contents = (0, import_smithy_client.map)({
2800
2605
  $metadata: deserializeMetadata(output)
@@ -2815,43 +2620,9 @@ var de_CreateBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) =
2815
2620
  Object.assign(contents, doc);
2816
2621
  return contents;
2817
2622
  }, "de_CreateBotLocaleCommand");
2818
- var de_CreateBotLocaleCommandError = /* @__PURE__ */ __name(async (output, context) => {
2819
- const parsedOutput = {
2820
- ...output,
2821
- body: await parseErrorBody(output.body, context)
2822
- };
2823
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2824
- switch (errorCode) {
2825
- case "ConflictException":
2826
- case "com.amazonaws.lexmodelsv2#ConflictException":
2827
- throw await de_ConflictExceptionRes(parsedOutput, context);
2828
- case "InternalServerException":
2829
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2830
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2831
- case "PreconditionFailedException":
2832
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
2833
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
2834
- case "ServiceQuotaExceededException":
2835
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2836
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2837
- case "ThrottlingException":
2838
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2839
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2840
- case "ValidationException":
2841
- case "com.amazonaws.lexmodelsv2#ValidationException":
2842
- throw await de_ValidationExceptionRes(parsedOutput, context);
2843
- default:
2844
- const parsedBody = parsedOutput.body;
2845
- return throwDefaultError({
2846
- output,
2847
- parsedBody,
2848
- errorCode
2849
- });
2850
- }
2851
- }, "de_CreateBotLocaleCommandError");
2852
2623
  var de_CreateBotVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
2853
2624
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2854
- return de_CreateBotVersionCommandError(output, context);
2625
+ return de_CommandError(output, context);
2855
2626
  }
2856
2627
  const contents = (0, import_smithy_client.map)({
2857
2628
  $metadata: deserializeMetadata(output)
@@ -2868,43 +2639,9 @@ var de_CreateBotVersionCommand = /* @__PURE__ */ __name(async (output, context)
2868
2639
  Object.assign(contents, doc);
2869
2640
  return contents;
2870
2641
  }, "de_CreateBotVersionCommand");
2871
- var de_CreateBotVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
2872
- const parsedOutput = {
2873
- ...output,
2874
- body: await parseErrorBody(output.body, context)
2875
- };
2876
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2877
- switch (errorCode) {
2878
- case "ConflictException":
2879
- case "com.amazonaws.lexmodelsv2#ConflictException":
2880
- throw await de_ConflictExceptionRes(parsedOutput, context);
2881
- case "InternalServerException":
2882
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2883
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2884
- case "PreconditionFailedException":
2885
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
2886
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
2887
- case "ServiceQuotaExceededException":
2888
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2889
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2890
- case "ThrottlingException":
2891
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2892
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2893
- case "ValidationException":
2894
- case "com.amazonaws.lexmodelsv2#ValidationException":
2895
- throw await de_ValidationExceptionRes(parsedOutput, context);
2896
- default:
2897
- const parsedBody = parsedOutput.body;
2898
- return throwDefaultError({
2899
- output,
2900
- parsedBody,
2901
- errorCode
2902
- });
2903
- }
2904
- }, "de_CreateBotVersionCommandError");
2905
2642
  var de_CreateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
2906
2643
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2907
- return de_CreateExportCommandError(output, context);
2644
+ return de_CommandError(output, context);
2908
2645
  }
2909
2646
  const contents = (0, import_smithy_client.map)({
2910
2647
  $metadata: deserializeMetadata(output)
@@ -2920,43 +2657,9 @@ var de_CreateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
2920
2657
  Object.assign(contents, doc);
2921
2658
  return contents;
2922
2659
  }, "de_CreateExportCommand");
2923
- var de_CreateExportCommandError = /* @__PURE__ */ __name(async (output, context) => {
2924
- const parsedOutput = {
2925
- ...output,
2926
- body: await parseErrorBody(output.body, context)
2927
- };
2928
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2929
- switch (errorCode) {
2930
- case "ConflictException":
2931
- case "com.amazonaws.lexmodelsv2#ConflictException":
2932
- throw await de_ConflictExceptionRes(parsedOutput, context);
2933
- case "InternalServerException":
2934
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2935
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2936
- case "ResourceNotFoundException":
2937
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
2938
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2939
- case "ServiceQuotaExceededException":
2940
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
2941
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2942
- case "ThrottlingException":
2943
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
2944
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2945
- case "ValidationException":
2946
- case "com.amazonaws.lexmodelsv2#ValidationException":
2947
- throw await de_ValidationExceptionRes(parsedOutput, context);
2948
- default:
2949
- const parsedBody = parsedOutput.body;
2950
- return throwDefaultError({
2951
- output,
2952
- parsedBody,
2953
- errorCode
2954
- });
2955
- }
2956
- }, "de_CreateExportCommandError");
2957
2660
  var de_CreateIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
2958
2661
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2959
- return de_CreateIntentCommandError(output, context);
2662
+ return de_CommandError(output, context);
2960
2663
  }
2961
2664
  const contents = (0, import_smithy_client.map)({
2962
2665
  $metadata: deserializeMetadata(output)
@@ -2984,43 +2687,9 @@ var de_CreateIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
2984
2687
  Object.assign(contents, doc);
2985
2688
  return contents;
2986
2689
  }, "de_CreateIntentCommand");
2987
- var de_CreateIntentCommandError = /* @__PURE__ */ __name(async (output, context) => {
2988
- const parsedOutput = {
2989
- ...output,
2990
- body: await parseErrorBody(output.body, context)
2991
- };
2992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2993
- switch (errorCode) {
2994
- case "ConflictException":
2995
- case "com.amazonaws.lexmodelsv2#ConflictException":
2996
- throw await de_ConflictExceptionRes(parsedOutput, context);
2997
- case "InternalServerException":
2998
- case "com.amazonaws.lexmodelsv2#InternalServerException":
2999
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3000
- case "PreconditionFailedException":
3001
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3002
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3003
- case "ServiceQuotaExceededException":
3004
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3005
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3006
- case "ThrottlingException":
3007
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3008
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3009
- case "ValidationException":
3010
- case "com.amazonaws.lexmodelsv2#ValidationException":
3011
- throw await de_ValidationExceptionRes(parsedOutput, context);
3012
- default:
3013
- const parsedBody = parsedOutput.body;
3014
- return throwDefaultError({
3015
- output,
3016
- parsedBody,
3017
- errorCode
3018
- });
3019
- }
3020
- }, "de_CreateIntentCommandError");
3021
2690
  var de_CreateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
3022
2691
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3023
- return de_CreateResourcePolicyCommandError(output, context);
2692
+ return de_CommandError(output, context);
3024
2693
  }
3025
2694
  const contents = (0, import_smithy_client.map)({
3026
2695
  $metadata: deserializeMetadata(output)
@@ -3033,43 +2702,9 @@ var de_CreateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, conte
3033
2702
  Object.assign(contents, doc);
3034
2703
  return contents;
3035
2704
  }, "de_CreateResourcePolicyCommand");
3036
- var de_CreateResourcePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
3037
- const parsedOutput = {
3038
- ...output,
3039
- body: await parseErrorBody(output.body, context)
3040
- };
3041
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3042
- switch (errorCode) {
3043
- case "InternalServerException":
3044
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3045
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3046
- case "PreconditionFailedException":
3047
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3048
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3049
- case "ResourceNotFoundException":
3050
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3051
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3052
- case "ServiceQuotaExceededException":
3053
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3054
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3055
- case "ThrottlingException":
3056
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3057
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3058
- case "ValidationException":
3059
- case "com.amazonaws.lexmodelsv2#ValidationException":
3060
- throw await de_ValidationExceptionRes(parsedOutput, context);
3061
- default:
3062
- const parsedBody = parsedOutput.body;
3063
- return throwDefaultError({
3064
- output,
3065
- parsedBody,
3066
- errorCode
3067
- });
3068
- }
3069
- }, "de_CreateResourcePolicyCommandError");
3070
2705
  var de_CreateResourcePolicyStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
3071
2706
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3072
- return de_CreateResourcePolicyStatementCommandError(output, context);
2707
+ return de_CommandError(output, context);
3073
2708
  }
3074
2709
  const contents = (0, import_smithy_client.map)({
3075
2710
  $metadata: deserializeMetadata(output)
@@ -3082,46 +2717,9 @@ var de_CreateResourcePolicyStatementCommand = /* @__PURE__ */ __name(async (outp
3082
2717
  Object.assign(contents, doc);
3083
2718
  return contents;
3084
2719
  }, "de_CreateResourcePolicyStatementCommand");
3085
- var de_CreateResourcePolicyStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
3086
- const parsedOutput = {
3087
- ...output,
3088
- body: await parseErrorBody(output.body, context)
3089
- };
3090
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3091
- switch (errorCode) {
3092
- case "ConflictException":
3093
- case "com.amazonaws.lexmodelsv2#ConflictException":
3094
- throw await de_ConflictExceptionRes(parsedOutput, context);
3095
- case "InternalServerException":
3096
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3097
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3098
- case "PreconditionFailedException":
3099
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3100
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3101
- case "ResourceNotFoundException":
3102
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3103
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3104
- case "ServiceQuotaExceededException":
3105
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3106
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3107
- case "ThrottlingException":
3108
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3109
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3110
- case "ValidationException":
3111
- case "com.amazonaws.lexmodelsv2#ValidationException":
3112
- throw await de_ValidationExceptionRes(parsedOutput, context);
3113
- default:
3114
- const parsedBody = parsedOutput.body;
3115
- return throwDefaultError({
3116
- output,
3117
- parsedBody,
3118
- errorCode
3119
- });
3120
- }
3121
- }, "de_CreateResourcePolicyStatementCommandError");
3122
2720
  var de_CreateSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
3123
2721
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3124
- return de_CreateSlotCommandError(output, context);
2722
+ return de_CommandError(output, context);
3125
2723
  }
3126
2724
  const contents = (0, import_smithy_client.map)({
3127
2725
  $metadata: deserializeMetadata(output)
@@ -3145,43 +2743,9 @@ var de_CreateSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
3145
2743
  Object.assign(contents, doc);
3146
2744
  return contents;
3147
2745
  }, "de_CreateSlotCommand");
3148
- var de_CreateSlotCommandError = /* @__PURE__ */ __name(async (output, context) => {
3149
- const parsedOutput = {
3150
- ...output,
3151
- body: await parseErrorBody(output.body, context)
3152
- };
3153
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3154
- switch (errorCode) {
3155
- case "ConflictException":
3156
- case "com.amazonaws.lexmodelsv2#ConflictException":
3157
- throw await de_ConflictExceptionRes(parsedOutput, context);
3158
- case "InternalServerException":
3159
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3160
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3161
- case "PreconditionFailedException":
3162
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3163
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3164
- case "ServiceQuotaExceededException":
3165
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3166
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3167
- case "ThrottlingException":
3168
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3170
- case "ValidationException":
3171
- case "com.amazonaws.lexmodelsv2#ValidationException":
3172
- throw await de_ValidationExceptionRes(parsedOutput, context);
3173
- default:
3174
- const parsedBody = parsedOutput.body;
3175
- return throwDefaultError({
3176
- output,
3177
- parsedBody,
3178
- errorCode
3179
- });
3180
- }
3181
- }, "de_CreateSlotCommandError");
3182
2746
  var de_CreateSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
3183
2747
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3184
- return de_CreateSlotTypeCommandError(output, context);
2748
+ return de_CommandError(output, context);
3185
2749
  }
3186
2750
  const contents = (0, import_smithy_client.map)({
3187
2751
  $metadata: deserializeMetadata(output)
@@ -3204,43 +2768,9 @@ var de_CreateSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) =>
3204
2768
  Object.assign(contents, doc);
3205
2769
  return contents;
3206
2770
  }, "de_CreateSlotTypeCommand");
3207
- var de_CreateSlotTypeCommandError = /* @__PURE__ */ __name(async (output, context) => {
3208
- const parsedOutput = {
3209
- ...output,
3210
- body: await parseErrorBody(output.body, context)
3211
- };
3212
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3213
- switch (errorCode) {
3214
- case "ConflictException":
3215
- case "com.amazonaws.lexmodelsv2#ConflictException":
3216
- throw await de_ConflictExceptionRes(parsedOutput, context);
3217
- case "InternalServerException":
3218
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3219
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3220
- case "PreconditionFailedException":
3221
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3222
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3223
- case "ServiceQuotaExceededException":
3224
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3225
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3226
- case "ThrottlingException":
3227
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3228
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3229
- case "ValidationException":
3230
- case "com.amazonaws.lexmodelsv2#ValidationException":
3231
- throw await de_ValidationExceptionRes(parsedOutput, context);
3232
- default:
3233
- const parsedBody = parsedOutput.body;
3234
- return throwDefaultError({
3235
- output,
3236
- parsedBody,
3237
- errorCode
3238
- });
3239
- }
3240
- }, "de_CreateSlotTypeCommandError");
3241
2771
  var de_CreateTestSetDiscrepancyReportCommand = /* @__PURE__ */ __name(async (output, context) => {
3242
2772
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3243
- return de_CreateTestSetDiscrepancyReportCommandError(output, context);
2773
+ return de_CommandError(output, context);
3244
2774
  }
3245
2775
  const contents = (0, import_smithy_client.map)({
3246
2776
  $metadata: deserializeMetadata(output)
@@ -3255,43 +2785,9 @@ var de_CreateTestSetDiscrepancyReportCommand = /* @__PURE__ */ __name(async (out
3255
2785
  Object.assign(contents, doc);
3256
2786
  return contents;
3257
2787
  }, "de_CreateTestSetDiscrepancyReportCommand");
3258
- var de_CreateTestSetDiscrepancyReportCommandError = /* @__PURE__ */ __name(async (output, context) => {
3259
- const parsedOutput = {
3260
- ...output,
3261
- body: await parseErrorBody(output.body, context)
3262
- };
3263
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3264
- switch (errorCode) {
3265
- case "ConflictException":
3266
- case "com.amazonaws.lexmodelsv2#ConflictException":
3267
- throw await de_ConflictExceptionRes(parsedOutput, context);
3268
- case "InternalServerException":
3269
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3270
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3271
- case "ResourceNotFoundException":
3272
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3273
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3274
- case "ServiceQuotaExceededException":
3275
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3276
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3277
- case "ThrottlingException":
3278
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3279
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3280
- case "ValidationException":
3281
- case "com.amazonaws.lexmodelsv2#ValidationException":
3282
- throw await de_ValidationExceptionRes(parsedOutput, context);
3283
- default:
3284
- const parsedBody = parsedOutput.body;
3285
- return throwDefaultError({
3286
- output,
3287
- parsedBody,
3288
- errorCode
3289
- });
3290
- }
3291
- }, "de_CreateTestSetDiscrepancyReportCommandError");
3292
2788
  var de_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (output, context) => {
3293
2789
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3294
- return de_CreateUploadUrlCommandError(output, context);
2790
+ return de_CommandError(output, context);
3295
2791
  }
3296
2792
  const contents = (0, import_smithy_client.map)({
3297
2793
  $metadata: deserializeMetadata(output)
@@ -3304,40 +2800,9 @@ var de_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (output, context) =
3304
2800
  Object.assign(contents, doc);
3305
2801
  return contents;
3306
2802
  }, "de_CreateUploadUrlCommand");
3307
- var de_CreateUploadUrlCommandError = /* @__PURE__ */ __name(async (output, context) => {
3308
- const parsedOutput = {
3309
- ...output,
3310
- body: await parseErrorBody(output.body, context)
3311
- };
3312
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3313
- switch (errorCode) {
3314
- case "ConflictException":
3315
- case "com.amazonaws.lexmodelsv2#ConflictException":
3316
- throw await de_ConflictExceptionRes(parsedOutput, context);
3317
- case "InternalServerException":
3318
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3319
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3320
- case "ResourceNotFoundException":
3321
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3322
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3323
- case "ThrottlingException":
3324
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3325
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3326
- case "ValidationException":
3327
- case "com.amazonaws.lexmodelsv2#ValidationException":
3328
- throw await de_ValidationExceptionRes(parsedOutput, context);
3329
- default:
3330
- const parsedBody = parsedOutput.body;
3331
- return throwDefaultError({
3332
- output,
3333
- parsedBody,
3334
- errorCode
3335
- });
3336
- }
3337
- }, "de_CreateUploadUrlCommandError");
3338
2803
  var de_DeleteBotCommand = /* @__PURE__ */ __name(async (output, context) => {
3339
2804
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3340
- return de_DeleteBotCommandError(output, context);
2805
+ return de_CommandError(output, context);
3341
2806
  }
3342
2807
  const contents = (0, import_smithy_client.map)({
3343
2808
  $metadata: deserializeMetadata(output)
@@ -3350,43 +2815,9 @@ var de_DeleteBotCommand = /* @__PURE__ */ __name(async (output, context) => {
3350
2815
  Object.assign(contents, doc);
3351
2816
  return contents;
3352
2817
  }, "de_DeleteBotCommand");
3353
- var de_DeleteBotCommandError = /* @__PURE__ */ __name(async (output, context) => {
3354
- const parsedOutput = {
3355
- ...output,
3356
- body: await parseErrorBody(output.body, context)
3357
- };
3358
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3359
- switch (errorCode) {
3360
- case "ConflictException":
3361
- case "com.amazonaws.lexmodelsv2#ConflictException":
3362
- throw await de_ConflictExceptionRes(parsedOutput, context);
3363
- case "InternalServerException":
3364
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3365
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3366
- case "PreconditionFailedException":
3367
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3368
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3369
- case "ServiceQuotaExceededException":
3370
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3371
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3372
- case "ThrottlingException":
3373
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3374
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3375
- case "ValidationException":
3376
- case "com.amazonaws.lexmodelsv2#ValidationException":
3377
- throw await de_ValidationExceptionRes(parsedOutput, context);
3378
- default:
3379
- const parsedBody = parsedOutput.body;
3380
- return throwDefaultError({
3381
- output,
3382
- parsedBody,
3383
- errorCode
3384
- });
3385
- }
3386
- }, "de_DeleteBotCommandError");
3387
2818
  var de_DeleteBotAliasCommand = /* @__PURE__ */ __name(async (output, context) => {
3388
2819
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3389
- return de_DeleteBotAliasCommandError(output, context);
2820
+ return de_CommandError(output, context);
3390
2821
  }
3391
2822
  const contents = (0, import_smithy_client.map)({
3392
2823
  $metadata: deserializeMetadata(output)
@@ -3400,43 +2831,9 @@ var de_DeleteBotAliasCommand = /* @__PURE__ */ __name(async (output, context) =>
3400
2831
  Object.assign(contents, doc);
3401
2832
  return contents;
3402
2833
  }, "de_DeleteBotAliasCommand");
3403
- var de_DeleteBotAliasCommandError = /* @__PURE__ */ __name(async (output, context) => {
3404
- const parsedOutput = {
3405
- ...output,
3406
- body: await parseErrorBody(output.body, context)
3407
- };
3408
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3409
- switch (errorCode) {
3410
- case "ConflictException":
3411
- case "com.amazonaws.lexmodelsv2#ConflictException":
3412
- throw await de_ConflictExceptionRes(parsedOutput, context);
3413
- case "InternalServerException":
3414
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3415
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3416
- case "PreconditionFailedException":
3417
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3418
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3419
- case "ServiceQuotaExceededException":
3420
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3421
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3422
- case "ThrottlingException":
3423
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3424
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3425
- case "ValidationException":
3426
- case "com.amazonaws.lexmodelsv2#ValidationException":
3427
- throw await de_ValidationExceptionRes(parsedOutput, context);
3428
- default:
3429
- const parsedBody = parsedOutput.body;
3430
- return throwDefaultError({
3431
- output,
3432
- parsedBody,
3433
- errorCode
3434
- });
3435
- }
3436
- }, "de_DeleteBotAliasCommandError");
3437
2834
  var de_DeleteBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) => {
3438
2835
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3439
- return de_DeleteBotLocaleCommandError(output, context);
2836
+ return de_CommandError(output, context);
3440
2837
  }
3441
2838
  const contents = (0, import_smithy_client.map)({
3442
2839
  $metadata: deserializeMetadata(output)
@@ -3451,43 +2848,9 @@ var de_DeleteBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) =
3451
2848
  Object.assign(contents, doc);
3452
2849
  return contents;
3453
2850
  }, "de_DeleteBotLocaleCommand");
3454
- var de_DeleteBotLocaleCommandError = /* @__PURE__ */ __name(async (output, context) => {
3455
- const parsedOutput = {
3456
- ...output,
3457
- body: await parseErrorBody(output.body, context)
3458
- };
3459
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3460
- switch (errorCode) {
3461
- case "ConflictException":
3462
- case "com.amazonaws.lexmodelsv2#ConflictException":
3463
- throw await de_ConflictExceptionRes(parsedOutput, context);
3464
- case "InternalServerException":
3465
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3466
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3467
- case "PreconditionFailedException":
3468
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3469
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3470
- case "ServiceQuotaExceededException":
3471
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3472
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3473
- case "ThrottlingException":
3474
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3475
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3476
- case "ValidationException":
3477
- case "com.amazonaws.lexmodelsv2#ValidationException":
3478
- throw await de_ValidationExceptionRes(parsedOutput, context);
3479
- default:
3480
- const parsedBody = parsedOutput.body;
3481
- return throwDefaultError({
3482
- output,
3483
- parsedBody,
3484
- errorCode
3485
- });
3486
- }
3487
- }, "de_DeleteBotLocaleCommandError");
3488
2851
  var de_DeleteBotVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
3489
2852
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3490
- return de_DeleteBotVersionCommandError(output, context);
2853
+ return de_CommandError(output, context);
3491
2854
  }
3492
2855
  const contents = (0, import_smithy_client.map)({
3493
2856
  $metadata: deserializeMetadata(output)
@@ -3501,43 +2864,9 @@ var de_DeleteBotVersionCommand = /* @__PURE__ */ __name(async (output, context)
3501
2864
  Object.assign(contents, doc);
3502
2865
  return contents;
3503
2866
  }, "de_DeleteBotVersionCommand");
3504
- var de_DeleteBotVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3505
- const parsedOutput = {
3506
- ...output,
3507
- body: await parseErrorBody(output.body, context)
3508
- };
3509
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3510
- switch (errorCode) {
3511
- case "ConflictException":
3512
- case "com.amazonaws.lexmodelsv2#ConflictException":
3513
- throw await de_ConflictExceptionRes(parsedOutput, context);
3514
- case "InternalServerException":
3515
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3516
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3517
- case "PreconditionFailedException":
3518
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3519
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3520
- case "ServiceQuotaExceededException":
3521
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3522
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3523
- case "ThrottlingException":
3524
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3525
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3526
- case "ValidationException":
3527
- case "com.amazonaws.lexmodelsv2#ValidationException":
3528
- throw await de_ValidationExceptionRes(parsedOutput, context);
3529
- default:
3530
- const parsedBody = parsedOutput.body;
3531
- return throwDefaultError({
3532
- output,
3533
- parsedBody,
3534
- errorCode
3535
- });
3536
- }
3537
- }, "de_DeleteBotVersionCommandError");
3538
2867
  var de_DeleteCustomVocabularyCommand = /* @__PURE__ */ __name(async (output, context) => {
3539
2868
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3540
- return de_DeleteCustomVocabularyCommandError(output, context);
2869
+ return de_CommandError(output, context);
3541
2870
  }
3542
2871
  const contents = (0, import_smithy_client.map)({
3543
2872
  $metadata: deserializeMetadata(output)
@@ -3552,43 +2881,9 @@ var de_DeleteCustomVocabularyCommand = /* @__PURE__ */ __name(async (output, con
3552
2881
  Object.assign(contents, doc);
3553
2882
  return contents;
3554
2883
  }, "de_DeleteCustomVocabularyCommand");
3555
- var de_DeleteCustomVocabularyCommandError = /* @__PURE__ */ __name(async (output, context) => {
3556
- const parsedOutput = {
3557
- ...output,
3558
- body: await parseErrorBody(output.body, context)
3559
- };
3560
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3561
- switch (errorCode) {
3562
- case "ConflictException":
3563
- case "com.amazonaws.lexmodelsv2#ConflictException":
3564
- throw await de_ConflictExceptionRes(parsedOutput, context);
3565
- case "InternalServerException":
3566
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3567
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3568
- case "PreconditionFailedException":
3569
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3570
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3571
- case "ServiceQuotaExceededException":
3572
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3573
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3574
- case "ThrottlingException":
3575
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3576
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3577
- case "ValidationException":
3578
- case "com.amazonaws.lexmodelsv2#ValidationException":
3579
- throw await de_ValidationExceptionRes(parsedOutput, context);
3580
- default:
3581
- const parsedBody = parsedOutput.body;
3582
- return throwDefaultError({
3583
- output,
3584
- parsedBody,
3585
- errorCode
3586
- });
3587
- }
3588
- }, "de_DeleteCustomVocabularyCommandError");
3589
2884
  var de_DeleteExportCommand = /* @__PURE__ */ __name(async (output, context) => {
3590
2885
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3591
- return de_DeleteExportCommandError(output, context);
2886
+ return de_CommandError(output, context);
3592
2887
  }
3593
2888
  const contents = (0, import_smithy_client.map)({
3594
2889
  $metadata: deserializeMetadata(output)
@@ -3601,40 +2896,9 @@ var de_DeleteExportCommand = /* @__PURE__ */ __name(async (output, context) => {
3601
2896
  Object.assign(contents, doc);
3602
2897
  return contents;
3603
2898
  }, "de_DeleteExportCommand");
3604
- var de_DeleteExportCommandError = /* @__PURE__ */ __name(async (output, context) => {
3605
- const parsedOutput = {
3606
- ...output,
3607
- body: await parseErrorBody(output.body, context)
3608
- };
3609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3610
- switch (errorCode) {
3611
- case "InternalServerException":
3612
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3613
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3614
- case "PreconditionFailedException":
3615
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3616
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3617
- case "ServiceQuotaExceededException":
3618
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3619
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3620
- case "ThrottlingException":
3621
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3622
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3623
- case "ValidationException":
3624
- case "com.amazonaws.lexmodelsv2#ValidationException":
3625
- throw await de_ValidationExceptionRes(parsedOutput, context);
3626
- default:
3627
- const parsedBody = parsedOutput.body;
3628
- return throwDefaultError({
3629
- output,
3630
- parsedBody,
3631
- errorCode
3632
- });
3633
- }
3634
- }, "de_DeleteExportCommandError");
3635
2899
  var de_DeleteImportCommand = /* @__PURE__ */ __name(async (output, context) => {
3636
2900
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3637
- return de_DeleteImportCommandError(output, context);
2901
+ return de_CommandError(output, context);
3638
2902
  }
3639
2903
  const contents = (0, import_smithy_client.map)({
3640
2904
  $metadata: deserializeMetadata(output)
@@ -3647,40 +2911,9 @@ var de_DeleteImportCommand = /* @__PURE__ */ __name(async (output, context) => {
3647
2911
  Object.assign(contents, doc);
3648
2912
  return contents;
3649
2913
  }, "de_DeleteImportCommand");
3650
- var de_DeleteImportCommandError = /* @__PURE__ */ __name(async (output, context) => {
3651
- const parsedOutput = {
3652
- ...output,
3653
- body: await parseErrorBody(output.body, context)
3654
- };
3655
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3656
- switch (errorCode) {
3657
- case "InternalServerException":
3658
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3659
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3660
- case "PreconditionFailedException":
3661
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3662
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3663
- case "ServiceQuotaExceededException":
3664
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3665
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3666
- case "ThrottlingException":
3667
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3668
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3669
- case "ValidationException":
3670
- case "com.amazonaws.lexmodelsv2#ValidationException":
3671
- throw await de_ValidationExceptionRes(parsedOutput, context);
3672
- default:
3673
- const parsedBody = parsedOutput.body;
3674
- return throwDefaultError({
3675
- output,
3676
- parsedBody,
3677
- errorCode
3678
- });
3679
- }
3680
- }, "de_DeleteImportCommandError");
3681
2914
  var de_DeleteIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
3682
2915
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3683
- return de_DeleteIntentCommandError(output, context);
2916
+ return de_CommandError(output, context);
3684
2917
  }
3685
2918
  const contents = (0, import_smithy_client.map)({
3686
2919
  $metadata: deserializeMetadata(output)
@@ -3688,43 +2921,9 @@ var de_DeleteIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
3688
2921
  await (0, import_smithy_client.collectBody)(output.body, context);
3689
2922
  return contents;
3690
2923
  }, "de_DeleteIntentCommand");
3691
- var de_DeleteIntentCommandError = /* @__PURE__ */ __name(async (output, context) => {
3692
- const parsedOutput = {
3693
- ...output,
3694
- body: await parseErrorBody(output.body, context)
3695
- };
3696
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3697
- switch (errorCode) {
3698
- case "ConflictException":
3699
- case "com.amazonaws.lexmodelsv2#ConflictException":
3700
- throw await de_ConflictExceptionRes(parsedOutput, context);
3701
- case "InternalServerException":
3702
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3703
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3704
- case "PreconditionFailedException":
3705
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3706
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3707
- case "ServiceQuotaExceededException":
3708
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3709
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3710
- case "ThrottlingException":
3711
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3712
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3713
- case "ValidationException":
3714
- case "com.amazonaws.lexmodelsv2#ValidationException":
3715
- throw await de_ValidationExceptionRes(parsedOutput, context);
3716
- default:
3717
- const parsedBody = parsedOutput.body;
3718
- return throwDefaultError({
3719
- output,
3720
- parsedBody,
3721
- errorCode
3722
- });
3723
- }
3724
- }, "de_DeleteIntentCommandError");
3725
2924
  var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
3726
2925
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3727
- return de_DeleteResourcePolicyCommandError(output, context);
2926
+ return de_CommandError(output, context);
3728
2927
  }
3729
2928
  const contents = (0, import_smithy_client.map)({
3730
2929
  $metadata: deserializeMetadata(output)
@@ -3737,37 +2936,9 @@ var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, conte
3737
2936
  Object.assign(contents, doc);
3738
2937
  return contents;
3739
2938
  }, "de_DeleteResourcePolicyCommand");
3740
- var de_DeleteResourcePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
3741
- const parsedOutput = {
3742
- ...output,
3743
- body: await parseErrorBody(output.body, context)
3744
- };
3745
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3746
- switch (errorCode) {
3747
- case "InternalServerException":
3748
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3749
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3750
- case "PreconditionFailedException":
3751
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3752
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3753
- case "ResourceNotFoundException":
3754
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3755
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3756
- case "ThrottlingException":
3757
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3758
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3759
- default:
3760
- const parsedBody = parsedOutput.body;
3761
- return throwDefaultError({
3762
- output,
3763
- parsedBody,
3764
- errorCode
3765
- });
3766
- }
3767
- }, "de_DeleteResourcePolicyCommandError");
3768
2939
  var de_DeleteResourcePolicyStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
3769
2940
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3770
- return de_DeleteResourcePolicyStatementCommandError(output, context);
2941
+ return de_CommandError(output, context);
3771
2942
  }
3772
2943
  const contents = (0, import_smithy_client.map)({
3773
2944
  $metadata: deserializeMetadata(output)
@@ -3780,37 +2951,9 @@ var de_DeleteResourcePolicyStatementCommand = /* @__PURE__ */ __name(async (outp
3780
2951
  Object.assign(contents, doc);
3781
2952
  return contents;
3782
2953
  }, "de_DeleteResourcePolicyStatementCommand");
3783
- var de_DeleteResourcePolicyStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
3784
- const parsedOutput = {
3785
- ...output,
3786
- body: await parseErrorBody(output.body, context)
3787
- };
3788
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3789
- switch (errorCode) {
3790
- case "InternalServerException":
3791
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3792
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3793
- case "PreconditionFailedException":
3794
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3795
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3796
- case "ResourceNotFoundException":
3797
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
3798
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3799
- case "ThrottlingException":
3800
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3801
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3802
- default:
3803
- const parsedBody = parsedOutput.body;
3804
- return throwDefaultError({
3805
- output,
3806
- parsedBody,
3807
- errorCode
3808
- });
3809
- }
3810
- }, "de_DeleteResourcePolicyStatementCommandError");
3811
2954
  var de_DeleteSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
3812
2955
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3813
- return de_DeleteSlotCommandError(output, context);
2956
+ return de_CommandError(output, context);
3814
2957
  }
3815
2958
  const contents = (0, import_smithy_client.map)({
3816
2959
  $metadata: deserializeMetadata(output)
@@ -3818,43 +2961,9 @@ var de_DeleteSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
3818
2961
  await (0, import_smithy_client.collectBody)(output.body, context);
3819
2962
  return contents;
3820
2963
  }, "de_DeleteSlotCommand");
3821
- var de_DeleteSlotCommandError = /* @__PURE__ */ __name(async (output, context) => {
3822
- const parsedOutput = {
3823
- ...output,
3824
- body: await parseErrorBody(output.body, context)
3825
- };
3826
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3827
- switch (errorCode) {
3828
- case "ConflictException":
3829
- case "com.amazonaws.lexmodelsv2#ConflictException":
3830
- throw await de_ConflictExceptionRes(parsedOutput, context);
3831
- case "InternalServerException":
3832
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3833
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3834
- case "PreconditionFailedException":
3835
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3836
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3837
- case "ServiceQuotaExceededException":
3838
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3839
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3840
- case "ThrottlingException":
3841
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3842
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3843
- case "ValidationException":
3844
- case "com.amazonaws.lexmodelsv2#ValidationException":
3845
- throw await de_ValidationExceptionRes(parsedOutput, context);
3846
- default:
3847
- const parsedBody = parsedOutput.body;
3848
- return throwDefaultError({
3849
- output,
3850
- parsedBody,
3851
- errorCode
3852
- });
3853
- }
3854
- }, "de_DeleteSlotCommandError");
3855
2964
  var de_DeleteSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
3856
2965
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3857
- return de_DeleteSlotTypeCommandError(output, context);
2966
+ return de_CommandError(output, context);
3858
2967
  }
3859
2968
  const contents = (0, import_smithy_client.map)({
3860
2969
  $metadata: deserializeMetadata(output)
@@ -3862,43 +2971,9 @@ var de_DeleteSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) =>
3862
2971
  await (0, import_smithy_client.collectBody)(output.body, context);
3863
2972
  return contents;
3864
2973
  }, "de_DeleteSlotTypeCommand");
3865
- var de_DeleteSlotTypeCommandError = /* @__PURE__ */ __name(async (output, context) => {
3866
- const parsedOutput = {
3867
- ...output,
3868
- body: await parseErrorBody(output.body, context)
3869
- };
3870
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3871
- switch (errorCode) {
3872
- case "ConflictException":
3873
- case "com.amazonaws.lexmodelsv2#ConflictException":
3874
- throw await de_ConflictExceptionRes(parsedOutput, context);
3875
- case "InternalServerException":
3876
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3877
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3878
- case "PreconditionFailedException":
3879
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3880
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3881
- case "ServiceQuotaExceededException":
3882
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3883
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3884
- case "ThrottlingException":
3885
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3886
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3887
- case "ValidationException":
3888
- case "com.amazonaws.lexmodelsv2#ValidationException":
3889
- throw await de_ValidationExceptionRes(parsedOutput, context);
3890
- default:
3891
- const parsedBody = parsedOutput.body;
3892
- return throwDefaultError({
3893
- output,
3894
- parsedBody,
3895
- errorCode
3896
- });
3897
- }
3898
- }, "de_DeleteSlotTypeCommandError");
3899
2974
  var de_DeleteTestSetCommand = /* @__PURE__ */ __name(async (output, context) => {
3900
2975
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3901
- return de_DeleteTestSetCommandError(output, context);
2976
+ return de_CommandError(output, context);
3902
2977
  }
3903
2978
  const contents = (0, import_smithy_client.map)({
3904
2979
  $metadata: deserializeMetadata(output)
@@ -3906,43 +2981,9 @@ var de_DeleteTestSetCommand = /* @__PURE__ */ __name(async (output, context) =>
3906
2981
  await (0, import_smithy_client.collectBody)(output.body, context);
3907
2982
  return contents;
3908
2983
  }, "de_DeleteTestSetCommand");
3909
- var de_DeleteTestSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
3910
- const parsedOutput = {
3911
- ...output,
3912
- body: await parseErrorBody(output.body, context)
3913
- };
3914
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3915
- switch (errorCode) {
3916
- case "ConflictException":
3917
- case "com.amazonaws.lexmodelsv2#ConflictException":
3918
- throw await de_ConflictExceptionRes(parsedOutput, context);
3919
- case "InternalServerException":
3920
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3921
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3922
- case "PreconditionFailedException":
3923
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
3924
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3925
- case "ServiceQuotaExceededException":
3926
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
3927
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3928
- case "ThrottlingException":
3929
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3930
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3931
- case "ValidationException":
3932
- case "com.amazonaws.lexmodelsv2#ValidationException":
3933
- throw await de_ValidationExceptionRes(parsedOutput, context);
3934
- default:
3935
- const parsedBody = parsedOutput.body;
3936
- return throwDefaultError({
3937
- output,
3938
- parsedBody,
3939
- errorCode
3940
- });
3941
- }
3942
- }, "de_DeleteTestSetCommandError");
3943
2984
  var de_DeleteUtterancesCommand = /* @__PURE__ */ __name(async (output, context) => {
3944
2985
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3945
- return de_DeleteUtterancesCommandError(output, context);
2986
+ return de_CommandError(output, context);
3946
2987
  }
3947
2988
  const contents = (0, import_smithy_client.map)({
3948
2989
  $metadata: deserializeMetadata(output)
@@ -3950,34 +2991,9 @@ var de_DeleteUtterancesCommand = /* @__PURE__ */ __name(async (output, context)
3950
2991
  await (0, import_smithy_client.collectBody)(output.body, context);
3951
2992
  return contents;
3952
2993
  }, "de_DeleteUtterancesCommand");
3953
- var de_DeleteUtterancesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3954
- const parsedOutput = {
3955
- ...output,
3956
- body: await parseErrorBody(output.body, context)
3957
- };
3958
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3959
- switch (errorCode) {
3960
- case "InternalServerException":
3961
- case "com.amazonaws.lexmodelsv2#InternalServerException":
3962
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3963
- case "ThrottlingException":
3964
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
3965
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3966
- case "ValidationException":
3967
- case "com.amazonaws.lexmodelsv2#ValidationException":
3968
- throw await de_ValidationExceptionRes(parsedOutput, context);
3969
- default:
3970
- const parsedBody = parsedOutput.body;
3971
- return throwDefaultError({
3972
- output,
3973
- parsedBody,
3974
- errorCode
3975
- });
3976
- }
3977
- }, "de_DeleteUtterancesCommandError");
3978
2994
  var de_DescribeBotCommand = /* @__PURE__ */ __name(async (output, context) => {
3979
2995
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3980
- return de_DescribeBotCommandError(output, context);
2996
+ return de_CommandError(output, context);
3981
2997
  }
3982
2998
  const contents = (0, import_smithy_client.map)({
3983
2999
  $metadata: deserializeMetadata(output)
@@ -4000,40 +3016,9 @@ var de_DescribeBotCommand = /* @__PURE__ */ __name(async (output, context) => {
4000
3016
  Object.assign(contents, doc);
4001
3017
  return contents;
4002
3018
  }, "de_DescribeBotCommand");
4003
- var de_DescribeBotCommandError = /* @__PURE__ */ __name(async (output, context) => {
4004
- const parsedOutput = {
4005
- ...output,
4006
- body: await parseErrorBody(output.body, context)
4007
- };
4008
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4009
- switch (errorCode) {
4010
- case "InternalServerException":
4011
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4012
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4013
- case "ResourceNotFoundException":
4014
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4015
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4016
- case "ServiceQuotaExceededException":
4017
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4018
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4019
- case "ThrottlingException":
4020
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4021
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4022
- case "ValidationException":
4023
- case "com.amazonaws.lexmodelsv2#ValidationException":
4024
- throw await de_ValidationExceptionRes(parsedOutput, context);
4025
- default:
4026
- const parsedBody = parsedOutput.body;
4027
- return throwDefaultError({
4028
- output,
4029
- parsedBody,
4030
- errorCode
4031
- });
4032
- }
4033
- }, "de_DescribeBotCommandError");
4034
3019
  var de_DescribeBotAliasCommand = /* @__PURE__ */ __name(async (output, context) => {
4035
3020
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4036
- return de_DescribeBotAliasCommandError(output, context);
3021
+ return de_CommandError(output, context);
4037
3022
  }
4038
3023
  const contents = (0, import_smithy_client.map)({
4039
3024
  $metadata: deserializeMetadata(output)
@@ -4057,40 +3042,9 @@ var de_DescribeBotAliasCommand = /* @__PURE__ */ __name(async (output, context)
4057
3042
  Object.assign(contents, doc);
4058
3043
  return contents;
4059
3044
  }, "de_DescribeBotAliasCommand");
4060
- var de_DescribeBotAliasCommandError = /* @__PURE__ */ __name(async (output, context) => {
4061
- const parsedOutput = {
4062
- ...output,
4063
- body: await parseErrorBody(output.body, context)
4064
- };
4065
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4066
- switch (errorCode) {
4067
- case "InternalServerException":
4068
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4069
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4070
- case "ResourceNotFoundException":
4071
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4072
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4073
- case "ServiceQuotaExceededException":
4074
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4075
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4076
- case "ThrottlingException":
4077
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4078
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4079
- case "ValidationException":
4080
- case "com.amazonaws.lexmodelsv2#ValidationException":
4081
- throw await de_ValidationExceptionRes(parsedOutput, context);
4082
- default:
4083
- const parsedBody = parsedOutput.body;
4084
- return throwDefaultError({
4085
- output,
4086
- parsedBody,
4087
- errorCode
4088
- });
4089
- }
4090
- }, "de_DescribeBotAliasCommandError");
4091
3045
  var de_DescribeBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) => {
4092
3046
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4093
- return de_DescribeBotLocaleCommandError(output, context);
3047
+ return de_CommandError(output, context);
4094
3048
  }
4095
3049
  const contents = (0, import_smithy_client.map)({
4096
3050
  $metadata: deserializeMetadata(output)
@@ -4118,40 +3072,9 @@ var de_DescribeBotLocaleCommand = /* @__PURE__ */ __name(async (output, context)
4118
3072
  Object.assign(contents, doc);
4119
3073
  return contents;
4120
3074
  }, "de_DescribeBotLocaleCommand");
4121
- var de_DescribeBotLocaleCommandError = /* @__PURE__ */ __name(async (output, context) => {
4122
- const parsedOutput = {
4123
- ...output,
4124
- body: await parseErrorBody(output.body, context)
4125
- };
4126
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4127
- switch (errorCode) {
4128
- case "InternalServerException":
4129
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4130
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4131
- case "ResourceNotFoundException":
4132
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4133
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4134
- case "ServiceQuotaExceededException":
4135
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4136
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4137
- case "ThrottlingException":
4138
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4139
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4140
- case "ValidationException":
4141
- case "com.amazonaws.lexmodelsv2#ValidationException":
4142
- throw await de_ValidationExceptionRes(parsedOutput, context);
4143
- default:
4144
- const parsedBody = parsedOutput.body;
4145
- return throwDefaultError({
4146
- output,
4147
- parsedBody,
4148
- errorCode
4149
- });
4150
- }
4151
- }, "de_DescribeBotLocaleCommandError");
4152
3075
  var de_DescribeBotRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
4153
3076
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4154
- return de_DescribeBotRecommendationCommandError(output, context);
3077
+ return de_CommandError(output, context);
4155
3078
  }
4156
3079
  const contents = (0, import_smithy_client.map)({
4157
3080
  $metadata: deserializeMetadata(output)
@@ -4173,37 +3096,9 @@ var de_DescribeBotRecommendationCommand = /* @__PURE__ */ __name(async (output,
4173
3096
  Object.assign(contents, doc);
4174
3097
  return contents;
4175
3098
  }, "de_DescribeBotRecommendationCommand");
4176
- var de_DescribeBotRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
4177
- const parsedOutput = {
4178
- ...output,
4179
- body: await parseErrorBody(output.body, context)
4180
- };
4181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4182
- switch (errorCode) {
4183
- case "InternalServerException":
4184
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4185
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4186
- case "ResourceNotFoundException":
4187
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4188
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4189
- case "ThrottlingException":
4190
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4191
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4192
- case "ValidationException":
4193
- case "com.amazonaws.lexmodelsv2#ValidationException":
4194
- throw await de_ValidationExceptionRes(parsedOutput, context);
4195
- default:
4196
- const parsedBody = parsedOutput.body;
4197
- return throwDefaultError({
4198
- output,
4199
- parsedBody,
4200
- errorCode
4201
- });
4202
- }
4203
- }, "de_DescribeBotRecommendationCommandError");
4204
3099
  var de_DescribeBotResourceGenerationCommand = /* @__PURE__ */ __name(async (output, context) => {
4205
3100
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4206
- return de_DescribeBotResourceGenerationCommandError(output, context);
3101
+ return de_CommandError(output, context);
4207
3102
  }
4208
3103
  const contents = (0, import_smithy_client.map)({
4209
3104
  $metadata: deserializeMetadata(output)
@@ -4225,37 +3120,9 @@ var de_DescribeBotResourceGenerationCommand = /* @__PURE__ */ __name(async (outp
4225
3120
  Object.assign(contents, doc);
4226
3121
  return contents;
4227
3122
  }, "de_DescribeBotResourceGenerationCommand");
4228
- var de_DescribeBotResourceGenerationCommandError = /* @__PURE__ */ __name(async (output, context) => {
4229
- const parsedOutput = {
4230
- ...output,
4231
- body: await parseErrorBody(output.body, context)
4232
- };
4233
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4234
- switch (errorCode) {
4235
- case "InternalServerException":
4236
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4237
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4238
- case "ResourceNotFoundException":
4239
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4240
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4241
- case "ThrottlingException":
4242
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4243
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4244
- case "ValidationException":
4245
- case "com.amazonaws.lexmodelsv2#ValidationException":
4246
- throw await de_ValidationExceptionRes(parsedOutput, context);
4247
- default:
4248
- const parsedBody = parsedOutput.body;
4249
- return throwDefaultError({
4250
- output,
4251
- parsedBody,
4252
- errorCode
4253
- });
4254
- }
4255
- }, "de_DescribeBotResourceGenerationCommandError");
4256
3123
  var de_DescribeBotVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
4257
3124
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4258
- return de_DescribeBotVersionCommandError(output, context);
3125
+ return de_CommandError(output, context);
4259
3126
  }
4260
3127
  const contents = (0, import_smithy_client.map)({
4261
3128
  $metadata: deserializeMetadata(output)
@@ -4279,40 +3146,9 @@ var de_DescribeBotVersionCommand = /* @__PURE__ */ __name(async (output, context
4279
3146
  Object.assign(contents, doc);
4280
3147
  return contents;
4281
3148
  }, "de_DescribeBotVersionCommand");
4282
- var de_DescribeBotVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4283
- const parsedOutput = {
4284
- ...output,
4285
- body: await parseErrorBody(output.body, context)
4286
- };
4287
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4288
- switch (errorCode) {
4289
- case "InternalServerException":
4290
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4291
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4292
- case "ResourceNotFoundException":
4293
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4294
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4295
- case "ServiceQuotaExceededException":
4296
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4297
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4298
- case "ThrottlingException":
4299
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4300
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4301
- case "ValidationException":
4302
- case "com.amazonaws.lexmodelsv2#ValidationException":
4303
- throw await de_ValidationExceptionRes(parsedOutput, context);
4304
- default:
4305
- const parsedBody = parsedOutput.body;
4306
- return throwDefaultError({
4307
- output,
4308
- parsedBody,
4309
- errorCode
4310
- });
4311
- }
4312
- }, "de_DescribeBotVersionCommandError");
4313
3149
  var de_DescribeCustomVocabularyMetadataCommand = /* @__PURE__ */ __name(async (output, context) => {
4314
3150
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4315
- return de_DescribeCustomVocabularyMetadataCommandError(output, context);
3151
+ return de_CommandError(output, context);
4316
3152
  }
4317
3153
  const contents = (0, import_smithy_client.map)({
4318
3154
  $metadata: deserializeMetadata(output)
@@ -4329,40 +3165,9 @@ var de_DescribeCustomVocabularyMetadataCommand = /* @__PURE__ */ __name(async (o
4329
3165
  Object.assign(contents, doc);
4330
3166
  return contents;
4331
3167
  }, "de_DescribeCustomVocabularyMetadataCommand");
4332
- var de_DescribeCustomVocabularyMetadataCommandError = /* @__PURE__ */ __name(async (output, context) => {
4333
- const parsedOutput = {
4334
- ...output,
4335
- body: await parseErrorBody(output.body, context)
4336
- };
4337
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4338
- switch (errorCode) {
4339
- case "InternalServerException":
4340
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4341
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4342
- case "ResourceNotFoundException":
4343
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4344
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4345
- case "ServiceQuotaExceededException":
4346
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4347
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4348
- case "ThrottlingException":
4349
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4350
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4351
- case "ValidationException":
4352
- case "com.amazonaws.lexmodelsv2#ValidationException":
4353
- throw await de_ValidationExceptionRes(parsedOutput, context);
4354
- default:
4355
- const parsedBody = parsedOutput.body;
4356
- return throwDefaultError({
4357
- output,
4358
- parsedBody,
4359
- errorCode
4360
- });
4361
- }
4362
- }, "de_DescribeCustomVocabularyMetadataCommandError");
4363
3168
  var de_DescribeExportCommand = /* @__PURE__ */ __name(async (output, context) => {
4364
3169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4365
- return de_DescribeExportCommandError(output, context);
3170
+ return de_CommandError(output, context);
4366
3171
  }
4367
3172
  const contents = (0, import_smithy_client.map)({
4368
3173
  $metadata: deserializeMetadata(output)
@@ -4381,37 +3186,9 @@ var de_DescribeExportCommand = /* @__PURE__ */ __name(async (output, context) =>
4381
3186
  Object.assign(contents, doc);
4382
3187
  return contents;
4383
3188
  }, "de_DescribeExportCommand");
4384
- var de_DescribeExportCommandError = /* @__PURE__ */ __name(async (output, context) => {
4385
- const parsedOutput = {
4386
- ...output,
4387
- body: await parseErrorBody(output.body, context)
4388
- };
4389
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4390
- switch (errorCode) {
4391
- case "InternalServerException":
4392
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4393
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4394
- case "ResourceNotFoundException":
4395
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4396
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4397
- case "ThrottlingException":
4398
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4399
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4400
- case "ValidationException":
4401
- case "com.amazonaws.lexmodelsv2#ValidationException":
4402
- throw await de_ValidationExceptionRes(parsedOutput, context);
4403
- default:
4404
- const parsedBody = parsedOutput.body;
4405
- return throwDefaultError({
4406
- output,
4407
- parsedBody,
4408
- errorCode
4409
- });
4410
- }
4411
- }, "de_DescribeExportCommandError");
4412
3189
  var de_DescribeImportCommand = /* @__PURE__ */ __name(async (output, context) => {
4413
3190
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4414
- return de_DescribeImportCommandError(output, context);
3191
+ return de_CommandError(output, context);
4415
3192
  }
4416
3193
  const contents = (0, import_smithy_client.map)({
4417
3194
  $metadata: deserializeMetadata(output)
@@ -4431,37 +3208,9 @@ var de_DescribeImportCommand = /* @__PURE__ */ __name(async (output, context) =>
4431
3208
  Object.assign(contents, doc);
4432
3209
  return contents;
4433
3210
  }, "de_DescribeImportCommand");
4434
- var de_DescribeImportCommandError = /* @__PURE__ */ __name(async (output, context) => {
4435
- const parsedOutput = {
4436
- ...output,
4437
- body: await parseErrorBody(output.body, context)
4438
- };
4439
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4440
- switch (errorCode) {
4441
- case "InternalServerException":
4442
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4443
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4444
- case "ResourceNotFoundException":
4445
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4446
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4447
- case "ThrottlingException":
4448
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4449
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4450
- case "ValidationException":
4451
- case "com.amazonaws.lexmodelsv2#ValidationException":
4452
- throw await de_ValidationExceptionRes(parsedOutput, context);
4453
- default:
4454
- const parsedBody = parsedOutput.body;
4455
- return throwDefaultError({
4456
- output,
4457
- parsedBody,
4458
- errorCode
4459
- });
4460
- }
4461
- }, "de_DescribeImportCommandError");
4462
3211
  var de_DescribeIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
4463
3212
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4464
- return de_DescribeIntentCommandError(output, context);
3213
+ return de_CommandError(output, context);
4465
3214
  }
4466
3215
  const contents = (0, import_smithy_client.map)({
4467
3216
  $metadata: deserializeMetadata(output)
@@ -4491,40 +3240,9 @@ var de_DescribeIntentCommand = /* @__PURE__ */ __name(async (output, context) =>
4491
3240
  Object.assign(contents, doc);
4492
3241
  return contents;
4493
3242
  }, "de_DescribeIntentCommand");
4494
- var de_DescribeIntentCommandError = /* @__PURE__ */ __name(async (output, context) => {
4495
- const parsedOutput = {
4496
- ...output,
4497
- body: await parseErrorBody(output.body, context)
4498
- };
4499
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4500
- switch (errorCode) {
4501
- case "InternalServerException":
4502
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4503
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4504
- case "ResourceNotFoundException":
4505
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4506
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4507
- case "ServiceQuotaExceededException":
4508
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4509
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4510
- case "ThrottlingException":
4511
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4512
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4513
- case "ValidationException":
4514
- case "com.amazonaws.lexmodelsv2#ValidationException":
4515
- throw await de_ValidationExceptionRes(parsedOutput, context);
4516
- default:
4517
- const parsedBody = parsedOutput.body;
4518
- return throwDefaultError({
4519
- output,
4520
- parsedBody,
4521
- errorCode
4522
- });
4523
- }
4524
- }, "de_DescribeIntentCommandError");
4525
3243
  var de_DescribeResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
4526
3244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4527
- return de_DescribeResourcePolicyCommandError(output, context);
3245
+ return de_CommandError(output, context);
4528
3246
  }
4529
3247
  const contents = (0, import_smithy_client.map)({
4530
3248
  $metadata: deserializeMetadata(output)
@@ -4538,34 +3256,9 @@ var de_DescribeResourcePolicyCommand = /* @__PURE__ */ __name(async (output, con
4538
3256
  Object.assign(contents, doc);
4539
3257
  return contents;
4540
3258
  }, "de_DescribeResourcePolicyCommand");
4541
- var de_DescribeResourcePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
4542
- const parsedOutput = {
4543
- ...output,
4544
- body: await parseErrorBody(output.body, context)
4545
- };
4546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4547
- switch (errorCode) {
4548
- case "InternalServerException":
4549
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4550
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4551
- case "ResourceNotFoundException":
4552
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4553
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4554
- case "ThrottlingException":
4555
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4556
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4557
- default:
4558
- const parsedBody = parsedOutput.body;
4559
- return throwDefaultError({
4560
- output,
4561
- parsedBody,
4562
- errorCode
4563
- });
4564
- }
4565
- }, "de_DescribeResourcePolicyCommandError");
4566
3259
  var de_DescribeSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
4567
3260
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4568
- return de_DescribeSlotCommandError(output, context);
3261
+ return de_CommandError(output, context);
4569
3262
  }
4570
3263
  const contents = (0, import_smithy_client.map)({
4571
3264
  $metadata: deserializeMetadata(output)
@@ -4590,40 +3283,9 @@ var de_DescribeSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
4590
3283
  Object.assign(contents, doc);
4591
3284
  return contents;
4592
3285
  }, "de_DescribeSlotCommand");
4593
- var de_DescribeSlotCommandError = /* @__PURE__ */ __name(async (output, context) => {
4594
- const parsedOutput = {
4595
- ...output,
4596
- body: await parseErrorBody(output.body, context)
4597
- };
4598
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4599
- switch (errorCode) {
4600
- case "InternalServerException":
4601
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4602
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4603
- case "ResourceNotFoundException":
4604
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4605
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4606
- case "ServiceQuotaExceededException":
4607
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4608
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4609
- case "ThrottlingException":
4610
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4611
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4612
- case "ValidationException":
4613
- case "com.amazonaws.lexmodelsv2#ValidationException":
4614
- throw await de_ValidationExceptionRes(parsedOutput, context);
4615
- default:
4616
- const parsedBody = parsedOutput.body;
4617
- return throwDefaultError({
4618
- output,
4619
- parsedBody,
4620
- errorCode
4621
- });
4622
- }
4623
- }, "de_DescribeSlotCommandError");
4624
3286
  var de_DescribeSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
4625
3287
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4626
- return de_DescribeSlotTypeCommandError(output, context);
3288
+ return de_CommandError(output, context);
4627
3289
  }
4628
3290
  const contents = (0, import_smithy_client.map)({
4629
3291
  $metadata: deserializeMetadata(output)
@@ -4647,40 +3309,9 @@ var de_DescribeSlotTypeCommand = /* @__PURE__ */ __name(async (output, context)
4647
3309
  Object.assign(contents, doc);
4648
3310
  return contents;
4649
3311
  }, "de_DescribeSlotTypeCommand");
4650
- var de_DescribeSlotTypeCommandError = /* @__PURE__ */ __name(async (output, context) => {
4651
- const parsedOutput = {
4652
- ...output,
4653
- body: await parseErrorBody(output.body, context)
4654
- };
4655
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4656
- switch (errorCode) {
4657
- case "InternalServerException":
4658
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4659
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4660
- case "ResourceNotFoundException":
4661
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4662
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4663
- case "ServiceQuotaExceededException":
4664
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4665
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4666
- case "ThrottlingException":
4667
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4668
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4669
- case "ValidationException":
4670
- case "com.amazonaws.lexmodelsv2#ValidationException":
4671
- throw await de_ValidationExceptionRes(parsedOutput, context);
4672
- default:
4673
- const parsedBody = parsedOutput.body;
4674
- return throwDefaultError({
4675
- output,
4676
- parsedBody,
4677
- errorCode
4678
- });
4679
- }
4680
- }, "de_DescribeSlotTypeCommandError");
4681
3312
  var de_DescribeTestExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
4682
3313
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4683
- return de_DescribeTestExecutionCommandError(output, context);
3314
+ return de_CommandError(output, context);
4684
3315
  }
4685
3316
  const contents = (0, import_smithy_client.map)({
4686
3317
  $metadata: deserializeMetadata(output)
@@ -4701,40 +3332,9 @@ var de_DescribeTestExecutionCommand = /* @__PURE__ */ __name(async (output, cont
4701
3332
  Object.assign(contents, doc);
4702
3333
  return contents;
4703
3334
  }, "de_DescribeTestExecutionCommand");
4704
- var de_DescribeTestExecutionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4705
- const parsedOutput = {
4706
- ...output,
4707
- body: await parseErrorBody(output.body, context)
4708
- };
4709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4710
- switch (errorCode) {
4711
- case "InternalServerException":
4712
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4713
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4714
- case "ResourceNotFoundException":
4715
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4716
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4717
- case "ServiceQuotaExceededException":
4718
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4719
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4720
- case "ThrottlingException":
4721
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4722
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4723
- case "ValidationException":
4724
- case "com.amazonaws.lexmodelsv2#ValidationException":
4725
- throw await de_ValidationExceptionRes(parsedOutput, context);
4726
- default:
4727
- const parsedBody = parsedOutput.body;
4728
- return throwDefaultError({
4729
- output,
4730
- parsedBody,
4731
- errorCode
4732
- });
4733
- }
4734
- }, "de_DescribeTestExecutionCommandError");
4735
3335
  var de_DescribeTestSetCommand = /* @__PURE__ */ __name(async (output, context) => {
4736
3336
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4737
- return de_DescribeTestSetCommandError(output, context);
3337
+ return de_CommandError(output, context);
4738
3338
  }
4739
3339
  const contents = (0, import_smithy_client.map)({
4740
3340
  $metadata: deserializeMetadata(output)
@@ -4755,40 +3355,9 @@ var de_DescribeTestSetCommand = /* @__PURE__ */ __name(async (output, context) =
4755
3355
  Object.assign(contents, doc);
4756
3356
  return contents;
4757
3357
  }, "de_DescribeTestSetCommand");
4758
- var de_DescribeTestSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
4759
- const parsedOutput = {
4760
- ...output,
4761
- body: await parseErrorBody(output.body, context)
4762
- };
4763
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4764
- switch (errorCode) {
4765
- case "InternalServerException":
4766
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4767
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4768
- case "ResourceNotFoundException":
4769
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4770
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4771
- case "ServiceQuotaExceededException":
4772
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4773
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4774
- case "ThrottlingException":
4775
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4776
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4777
- case "ValidationException":
4778
- case "com.amazonaws.lexmodelsv2#ValidationException":
4779
- throw await de_ValidationExceptionRes(parsedOutput, context);
4780
- default:
4781
- const parsedBody = parsedOutput.body;
4782
- return throwDefaultError({
4783
- output,
4784
- parsedBody,
4785
- errorCode
4786
- });
4787
- }
4788
- }, "de_DescribeTestSetCommandError");
4789
3358
  var de_DescribeTestSetDiscrepancyReportCommand = /* @__PURE__ */ __name(async (output, context) => {
4790
3359
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4791
- return de_DescribeTestSetDiscrepancyReportCommandError(output, context);
3360
+ return de_CommandError(output, context);
4792
3361
  }
4793
3362
  const contents = (0, import_smithy_client.map)({
4794
3363
  $metadata: deserializeMetadata(output)
@@ -4808,40 +3377,9 @@ var de_DescribeTestSetDiscrepancyReportCommand = /* @__PURE__ */ __name(async (o
4808
3377
  Object.assign(contents, doc);
4809
3378
  return contents;
4810
3379
  }, "de_DescribeTestSetDiscrepancyReportCommand");
4811
- var de_DescribeTestSetDiscrepancyReportCommandError = /* @__PURE__ */ __name(async (output, context) => {
4812
- const parsedOutput = {
4813
- ...output,
4814
- body: await parseErrorBody(output.body, context)
4815
- };
4816
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4817
- switch (errorCode) {
4818
- case "InternalServerException":
4819
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4820
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4821
- case "ResourceNotFoundException":
4822
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4823
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4824
- case "ServiceQuotaExceededException":
4825
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4826
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4827
- case "ThrottlingException":
4828
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4829
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4830
- case "ValidationException":
4831
- case "com.amazonaws.lexmodelsv2#ValidationException":
4832
- throw await de_ValidationExceptionRes(parsedOutput, context);
4833
- default:
4834
- const parsedBody = parsedOutput.body;
4835
- return throwDefaultError({
4836
- output,
4837
- parsedBody,
4838
- errorCode
4839
- });
4840
- }
4841
- }, "de_DescribeTestSetDiscrepancyReportCommandError");
4842
3380
  var de_DescribeTestSetGenerationCommand = /* @__PURE__ */ __name(async (output, context) => {
4843
3381
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4844
- return de_DescribeTestSetGenerationCommandError(output, context);
3382
+ return de_CommandError(output, context);
4845
3383
  }
4846
3384
  const contents = (0, import_smithy_client.map)({
4847
3385
  $metadata: deserializeMetadata(output)
@@ -4863,40 +3401,9 @@ var de_DescribeTestSetGenerationCommand = /* @__PURE__ */ __name(async (output,
4863
3401
  Object.assign(contents, doc);
4864
3402
  return contents;
4865
3403
  }, "de_DescribeTestSetGenerationCommand");
4866
- var de_DescribeTestSetGenerationCommandError = /* @__PURE__ */ __name(async (output, context) => {
4867
- const parsedOutput = {
4868
- ...output,
4869
- body: await parseErrorBody(output.body, context)
4870
- };
4871
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4872
- switch (errorCode) {
4873
- case "InternalServerException":
4874
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4875
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4876
- case "ResourceNotFoundException":
4877
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4878
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4879
- case "ServiceQuotaExceededException":
4880
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4881
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4882
- case "ThrottlingException":
4883
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4884
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4885
- case "ValidationException":
4886
- case "com.amazonaws.lexmodelsv2#ValidationException":
4887
- throw await de_ValidationExceptionRes(parsedOutput, context);
4888
- default:
4889
- const parsedBody = parsedOutput.body;
4890
- return throwDefaultError({
4891
- output,
4892
- parsedBody,
4893
- errorCode
4894
- });
4895
- }
4896
- }, "de_DescribeTestSetGenerationCommandError");
4897
3404
  var de_GenerateBotElementCommand = /* @__PURE__ */ __name(async (output, context) => {
4898
3405
  if (output.statusCode !== 202 && output.statusCode >= 300) {
4899
- return de_GenerateBotElementCommandError(output, context);
3406
+ return de_CommandError(output, context);
4900
3407
  }
4901
3408
  const contents = (0, import_smithy_client.map)({
4902
3409
  $metadata: deserializeMetadata(output)
@@ -4912,46 +3419,9 @@ var de_GenerateBotElementCommand = /* @__PURE__ */ __name(async (output, context
4912
3419
  Object.assign(contents, doc);
4913
3420
  return contents;
4914
3421
  }, "de_GenerateBotElementCommand");
4915
- var de_GenerateBotElementCommandError = /* @__PURE__ */ __name(async (output, context) => {
4916
- const parsedOutput = {
4917
- ...output,
4918
- body: await parseErrorBody(output.body, context)
4919
- };
4920
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4921
- switch (errorCode) {
4922
- case "ConflictException":
4923
- case "com.amazonaws.lexmodelsv2#ConflictException":
4924
- throw await de_ConflictExceptionRes(parsedOutput, context);
4925
- case "InternalServerException":
4926
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4927
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4928
- case "PreconditionFailedException":
4929
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
4930
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
4931
- case "ResourceNotFoundException":
4932
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4933
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4934
- case "ServiceQuotaExceededException":
4935
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4936
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4937
- case "ThrottlingException":
4938
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4939
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4940
- case "ValidationException":
4941
- case "com.amazonaws.lexmodelsv2#ValidationException":
4942
- throw await de_ValidationExceptionRes(parsedOutput, context);
4943
- default:
4944
- const parsedBody = parsedOutput.body;
4945
- return throwDefaultError({
4946
- output,
4947
- parsedBody,
4948
- errorCode
4949
- });
4950
- }
4951
- }, "de_GenerateBotElementCommandError");
4952
3422
  var de_GetTestExecutionArtifactsUrlCommand = /* @__PURE__ */ __name(async (output, context) => {
4953
3423
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4954
- return de_GetTestExecutionArtifactsUrlCommandError(output, context);
3424
+ return de_CommandError(output, context);
4955
3425
  }
4956
3426
  const contents = (0, import_smithy_client.map)({
4957
3427
  $metadata: deserializeMetadata(output)
@@ -4964,40 +3434,9 @@ var de_GetTestExecutionArtifactsUrlCommand = /* @__PURE__ */ __name(async (outpu
4964
3434
  Object.assign(contents, doc);
4965
3435
  return contents;
4966
3436
  }, "de_GetTestExecutionArtifactsUrlCommand");
4967
- var de_GetTestExecutionArtifactsUrlCommandError = /* @__PURE__ */ __name(async (output, context) => {
4968
- const parsedOutput = {
4969
- ...output,
4970
- body: await parseErrorBody(output.body, context)
4971
- };
4972
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4973
- switch (errorCode) {
4974
- case "InternalServerException":
4975
- case "com.amazonaws.lexmodelsv2#InternalServerException":
4976
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4977
- case "ResourceNotFoundException":
4978
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4979
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4980
- case "ServiceQuotaExceededException":
4981
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
4982
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4983
- case "ThrottlingException":
4984
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
4985
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4986
- case "ValidationException":
4987
- case "com.amazonaws.lexmodelsv2#ValidationException":
4988
- throw await de_ValidationExceptionRes(parsedOutput, context);
4989
- default:
4990
- const parsedBody = parsedOutput.body;
4991
- return throwDefaultError({
4992
- output,
4993
- parsedBody,
4994
- errorCode
4995
- });
4996
- }
4997
- }, "de_GetTestExecutionArtifactsUrlCommandError");
4998
3437
  var de_ListAggregatedUtterancesCommand = /* @__PURE__ */ __name(async (output, context) => {
4999
3438
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5000
- return de_ListAggregatedUtterancesCommandError(output, context);
3439
+ return de_CommandError(output, context);
5001
3440
  }
5002
3441
  const contents = (0, import_smithy_client.map)({
5003
3442
  $metadata: deserializeMetadata(output)
@@ -5018,37 +3457,9 @@ var de_ListAggregatedUtterancesCommand = /* @__PURE__ */ __name(async (output, c
5018
3457
  Object.assign(contents, doc);
5019
3458
  return contents;
5020
3459
  }, "de_ListAggregatedUtterancesCommand");
5021
- var de_ListAggregatedUtterancesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5022
- const parsedOutput = {
5023
- ...output,
5024
- body: await parseErrorBody(output.body, context)
5025
- };
5026
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5027
- switch (errorCode) {
5028
- case "InternalServerException":
5029
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5030
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5031
- case "PreconditionFailedException":
5032
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
5033
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
5034
- case "ThrottlingException":
5035
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5036
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5037
- case "ValidationException":
5038
- case "com.amazonaws.lexmodelsv2#ValidationException":
5039
- throw await de_ValidationExceptionRes(parsedOutput, context);
5040
- default:
5041
- const parsedBody = parsedOutput.body;
5042
- return throwDefaultError({
5043
- output,
5044
- parsedBody,
5045
- errorCode
5046
- });
5047
- }
5048
- }, "de_ListAggregatedUtterancesCommandError");
5049
3460
  var de_ListBotAliasesCommand = /* @__PURE__ */ __name(async (output, context) => {
5050
3461
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5051
- return de_ListBotAliasesCommandError(output, context);
3462
+ return de_CommandError(output, context);
5052
3463
  }
5053
3464
  const contents = (0, import_smithy_client.map)({
5054
3465
  $metadata: deserializeMetadata(output)
@@ -5062,37 +3473,9 @@ var de_ListBotAliasesCommand = /* @__PURE__ */ __name(async (output, context) =>
5062
3473
  Object.assign(contents, doc);
5063
3474
  return contents;
5064
3475
  }, "de_ListBotAliasesCommand");
5065
- var de_ListBotAliasesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5066
- const parsedOutput = {
5067
- ...output,
5068
- body: await parseErrorBody(output.body, context)
5069
- };
5070
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5071
- switch (errorCode) {
5072
- case "InternalServerException":
5073
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5074
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5075
- case "ServiceQuotaExceededException":
5076
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5077
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5078
- case "ThrottlingException":
5079
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5080
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5081
- case "ValidationException":
5082
- case "com.amazonaws.lexmodelsv2#ValidationException":
5083
- throw await de_ValidationExceptionRes(parsedOutput, context);
5084
- default:
5085
- const parsedBody = parsedOutput.body;
5086
- return throwDefaultError({
5087
- output,
5088
- parsedBody,
5089
- errorCode
5090
- });
5091
- }
5092
- }, "de_ListBotAliasesCommandError");
5093
3476
  var de_ListBotLocalesCommand = /* @__PURE__ */ __name(async (output, context) => {
5094
3477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5095
- return de_ListBotLocalesCommandError(output, context);
3478
+ return de_CommandError(output, context);
5096
3479
  }
5097
3480
  const contents = (0, import_smithy_client.map)({
5098
3481
  $metadata: deserializeMetadata(output)
@@ -5107,37 +3490,9 @@ var de_ListBotLocalesCommand = /* @__PURE__ */ __name(async (output, context) =>
5107
3490
  Object.assign(contents, doc);
5108
3491
  return contents;
5109
3492
  }, "de_ListBotLocalesCommand");
5110
- var de_ListBotLocalesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5111
- const parsedOutput = {
5112
- ...output,
5113
- body: await parseErrorBody(output.body, context)
5114
- };
5115
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5116
- switch (errorCode) {
5117
- case "InternalServerException":
5118
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5119
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5120
- case "ServiceQuotaExceededException":
5121
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5122
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5123
- case "ThrottlingException":
5124
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5125
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5126
- case "ValidationException":
5127
- case "com.amazonaws.lexmodelsv2#ValidationException":
5128
- throw await de_ValidationExceptionRes(parsedOutput, context);
5129
- default:
5130
- const parsedBody = parsedOutput.body;
5131
- return throwDefaultError({
5132
- output,
5133
- parsedBody,
5134
- errorCode
5135
- });
5136
- }
5137
- }, "de_ListBotLocalesCommandError");
5138
3493
  var de_ListBotRecommendationsCommand = /* @__PURE__ */ __name(async (output, context) => {
5139
3494
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5140
- return de_ListBotRecommendationsCommandError(output, context);
3495
+ return de_CommandError(output, context);
5141
3496
  }
5142
3497
  const contents = (0, import_smithy_client.map)({
5143
3498
  $metadata: deserializeMetadata(output)
@@ -5153,37 +3508,9 @@ var de_ListBotRecommendationsCommand = /* @__PURE__ */ __name(async (output, con
5153
3508
  Object.assign(contents, doc);
5154
3509
  return contents;
5155
3510
  }, "de_ListBotRecommendationsCommand");
5156
- var de_ListBotRecommendationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5157
- const parsedOutput = {
5158
- ...output,
5159
- body: await parseErrorBody(output.body, context)
5160
- };
5161
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5162
- switch (errorCode) {
5163
- case "InternalServerException":
5164
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5165
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5166
- case "ResourceNotFoundException":
5167
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
5168
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5169
- case "ThrottlingException":
5170
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5171
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5172
- case "ValidationException":
5173
- case "com.amazonaws.lexmodelsv2#ValidationException":
5174
- throw await de_ValidationExceptionRes(parsedOutput, context);
5175
- default:
5176
- const parsedBody = parsedOutput.body;
5177
- return throwDefaultError({
5178
- output,
5179
- parsedBody,
5180
- errorCode
5181
- });
5182
- }
5183
- }, "de_ListBotRecommendationsCommandError");
5184
3511
  var de_ListBotResourceGenerationsCommand = /* @__PURE__ */ __name(async (output, context) => {
5185
3512
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5186
- return de_ListBotResourceGenerationsCommandError(output, context);
3513
+ return de_CommandError(output, context);
5187
3514
  }
5188
3515
  const contents = (0, import_smithy_client.map)({
5189
3516
  $metadata: deserializeMetadata(output)
@@ -5199,37 +3526,9 @@ var de_ListBotResourceGenerationsCommand = /* @__PURE__ */ __name(async (output,
5199
3526
  Object.assign(contents, doc);
5200
3527
  return contents;
5201
3528
  }, "de_ListBotResourceGenerationsCommand");
5202
- var de_ListBotResourceGenerationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5203
- const parsedOutput = {
5204
- ...output,
5205
- body: await parseErrorBody(output.body, context)
5206
- };
5207
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5208
- switch (errorCode) {
5209
- case "InternalServerException":
5210
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5211
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5212
- case "ResourceNotFoundException":
5213
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
5214
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5215
- case "ThrottlingException":
5216
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5217
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5218
- case "ValidationException":
5219
- case "com.amazonaws.lexmodelsv2#ValidationException":
5220
- throw await de_ValidationExceptionRes(parsedOutput, context);
5221
- default:
5222
- const parsedBody = parsedOutput.body;
5223
- return throwDefaultError({
5224
- output,
5225
- parsedBody,
5226
- errorCode
5227
- });
5228
- }
5229
- }, "de_ListBotResourceGenerationsCommandError");
5230
3529
  var de_ListBotsCommand = /* @__PURE__ */ __name(async (output, context) => {
5231
3530
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5232
- return de_ListBotsCommandError(output, context);
3531
+ return de_CommandError(output, context);
5233
3532
  }
5234
3533
  const contents = (0, import_smithy_client.map)({
5235
3534
  $metadata: deserializeMetadata(output)
@@ -5242,37 +3541,9 @@ var de_ListBotsCommand = /* @__PURE__ */ __name(async (output, context) => {
5242
3541
  Object.assign(contents, doc);
5243
3542
  return contents;
5244
3543
  }, "de_ListBotsCommand");
5245
- var de_ListBotsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5246
- const parsedOutput = {
5247
- ...output,
5248
- body: await parseErrorBody(output.body, context)
5249
- };
5250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5251
- switch (errorCode) {
5252
- case "InternalServerException":
5253
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5254
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5255
- case "ServiceQuotaExceededException":
5256
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5257
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5258
- case "ThrottlingException":
5259
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5260
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5261
- case "ValidationException":
5262
- case "com.amazonaws.lexmodelsv2#ValidationException":
5263
- throw await de_ValidationExceptionRes(parsedOutput, context);
5264
- default:
5265
- const parsedBody = parsedOutput.body;
5266
- return throwDefaultError({
5267
- output,
5268
- parsedBody,
5269
- errorCode
5270
- });
5271
- }
5272
- }, "de_ListBotsCommandError");
5273
3544
  var de_ListBotVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
5274
3545
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5275
- return de_ListBotVersionsCommandError(output, context);
3546
+ return de_CommandError(output, context);
5276
3547
  }
5277
3548
  const contents = (0, import_smithy_client.map)({
5278
3549
  $metadata: deserializeMetadata(output)
@@ -5286,37 +3557,9 @@ var de_ListBotVersionsCommand = /* @__PURE__ */ __name(async (output, context) =
5286
3557
  Object.assign(contents, doc);
5287
3558
  return contents;
5288
3559
  }, "de_ListBotVersionsCommand");
5289
- var de_ListBotVersionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5290
- const parsedOutput = {
5291
- ...output,
5292
- body: await parseErrorBody(output.body, context)
5293
- };
5294
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5295
- switch (errorCode) {
5296
- case "InternalServerException":
5297
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5298
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5299
- case "ServiceQuotaExceededException":
5300
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5301
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5302
- case "ThrottlingException":
5303
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5304
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5305
- case "ValidationException":
5306
- case "com.amazonaws.lexmodelsv2#ValidationException":
5307
- throw await de_ValidationExceptionRes(parsedOutput, context);
5308
- default:
5309
- const parsedBody = parsedOutput.body;
5310
- return throwDefaultError({
5311
- output,
5312
- parsedBody,
5313
- errorCode
5314
- });
5315
- }
5316
- }, "de_ListBotVersionsCommandError");
5317
3560
  var de_ListBuiltInIntentsCommand = /* @__PURE__ */ __name(async (output, context) => {
5318
3561
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5319
- return de_ListBuiltInIntentsCommandError(output, context);
3562
+ return de_CommandError(output, context);
5320
3563
  }
5321
3564
  const contents = (0, import_smithy_client.map)({
5322
3565
  $metadata: deserializeMetadata(output)
@@ -5330,37 +3573,9 @@ var de_ListBuiltInIntentsCommand = /* @__PURE__ */ __name(async (output, context
5330
3573
  Object.assign(contents, doc);
5331
3574
  return contents;
5332
3575
  }, "de_ListBuiltInIntentsCommand");
5333
- var de_ListBuiltInIntentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5334
- const parsedOutput = {
5335
- ...output,
5336
- body: await parseErrorBody(output.body, context)
5337
- };
5338
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5339
- switch (errorCode) {
5340
- case "InternalServerException":
5341
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5342
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5343
- case "ServiceQuotaExceededException":
5344
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5345
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5346
- case "ThrottlingException":
5347
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5348
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5349
- case "ValidationException":
5350
- case "com.amazonaws.lexmodelsv2#ValidationException":
5351
- throw await de_ValidationExceptionRes(parsedOutput, context);
5352
- default:
5353
- const parsedBody = parsedOutput.body;
5354
- return throwDefaultError({
5355
- output,
5356
- parsedBody,
5357
- errorCode
5358
- });
5359
- }
5360
- }, "de_ListBuiltInIntentsCommandError");
5361
3576
  var de_ListBuiltInSlotTypesCommand = /* @__PURE__ */ __name(async (output, context) => {
5362
3577
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5363
- return de_ListBuiltInSlotTypesCommandError(output, context);
3578
+ return de_CommandError(output, context);
5364
3579
  }
5365
3580
  const contents = (0, import_smithy_client.map)({
5366
3581
  $metadata: deserializeMetadata(output)
@@ -5374,37 +3589,9 @@ var de_ListBuiltInSlotTypesCommand = /* @__PURE__ */ __name(async (output, conte
5374
3589
  Object.assign(contents, doc);
5375
3590
  return contents;
5376
3591
  }, "de_ListBuiltInSlotTypesCommand");
5377
- var de_ListBuiltInSlotTypesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5378
- const parsedOutput = {
5379
- ...output,
5380
- body: await parseErrorBody(output.body, context)
5381
- };
5382
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5383
- switch (errorCode) {
5384
- case "InternalServerException":
5385
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5386
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5387
- case "ServiceQuotaExceededException":
5388
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5389
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5390
- case "ThrottlingException":
5391
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5392
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5393
- case "ValidationException":
5394
- case "com.amazonaws.lexmodelsv2#ValidationException":
5395
- throw await de_ValidationExceptionRes(parsedOutput, context);
5396
- default:
5397
- const parsedBody = parsedOutput.body;
5398
- return throwDefaultError({
5399
- output,
5400
- parsedBody,
5401
- errorCode
5402
- });
5403
- }
5404
- }, "de_ListBuiltInSlotTypesCommandError");
5405
3592
  var de_ListCustomVocabularyItemsCommand = /* @__PURE__ */ __name(async (output, context) => {
5406
3593
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5407
- return de_ListCustomVocabularyItemsCommandError(output, context);
3594
+ return de_CommandError(output, context);
5408
3595
  }
5409
3596
  const contents = (0, import_smithy_client.map)({
5410
3597
  $metadata: deserializeMetadata(output)
@@ -5420,40 +3607,9 @@ var de_ListCustomVocabularyItemsCommand = /* @__PURE__ */ __name(async (output,
5420
3607
  Object.assign(contents, doc);
5421
3608
  return contents;
5422
3609
  }, "de_ListCustomVocabularyItemsCommand");
5423
- var de_ListCustomVocabularyItemsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5424
- const parsedOutput = {
5425
- ...output,
5426
- body: await parseErrorBody(output.body, context)
5427
- };
5428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5429
- switch (errorCode) {
5430
- case "InternalServerException":
5431
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5432
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5433
- case "ResourceNotFoundException":
5434
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
5435
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5436
- case "ServiceQuotaExceededException":
5437
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5438
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5439
- case "ThrottlingException":
5440
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5441
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5442
- case "ValidationException":
5443
- case "com.amazonaws.lexmodelsv2#ValidationException":
5444
- throw await de_ValidationExceptionRes(parsedOutput, context);
5445
- default:
5446
- const parsedBody = parsedOutput.body;
5447
- return throwDefaultError({
5448
- output,
5449
- parsedBody,
5450
- errorCode
5451
- });
5452
- }
5453
- }, "de_ListCustomVocabularyItemsCommandError");
5454
3610
  var de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => {
5455
3611
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5456
- return de_ListExportsCommandError(output, context);
3612
+ return de_CommandError(output, context);
5457
3613
  }
5458
3614
  const contents = (0, import_smithy_client.map)({
5459
3615
  $metadata: deserializeMetadata(output)
@@ -5469,34 +3625,9 @@ var de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => {
5469
3625
  Object.assign(contents, doc);
5470
3626
  return contents;
5471
3627
  }, "de_ListExportsCommand");
5472
- var de_ListExportsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5473
- const parsedOutput = {
5474
- ...output,
5475
- body: await parseErrorBody(output.body, context)
5476
- };
5477
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5478
- switch (errorCode) {
5479
- case "InternalServerException":
5480
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5481
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5482
- case "ThrottlingException":
5483
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5484
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5485
- case "ValidationException":
5486
- case "com.amazonaws.lexmodelsv2#ValidationException":
5487
- throw await de_ValidationExceptionRes(parsedOutput, context);
5488
- default:
5489
- const parsedBody = parsedOutput.body;
5490
- return throwDefaultError({
5491
- output,
5492
- parsedBody,
5493
- errorCode
5494
- });
5495
- }
5496
- }, "de_ListExportsCommandError");
5497
3628
  var de_ListImportsCommand = /* @__PURE__ */ __name(async (output, context) => {
5498
3629
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5499
- return de_ListImportsCommandError(output, context);
3630
+ return de_CommandError(output, context);
5500
3631
  }
5501
3632
  const contents = (0, import_smithy_client.map)({
5502
3633
  $metadata: deserializeMetadata(output)
@@ -5512,34 +3643,9 @@ var de_ListImportsCommand = /* @__PURE__ */ __name(async (output, context) => {
5512
3643
  Object.assign(contents, doc);
5513
3644
  return contents;
5514
3645
  }, "de_ListImportsCommand");
5515
- var de_ListImportsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5516
- const parsedOutput = {
5517
- ...output,
5518
- body: await parseErrorBody(output.body, context)
5519
- };
5520
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5521
- switch (errorCode) {
5522
- case "InternalServerException":
5523
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5524
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5525
- case "ThrottlingException":
5526
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5527
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5528
- case "ValidationException":
5529
- case "com.amazonaws.lexmodelsv2#ValidationException":
5530
- throw await de_ValidationExceptionRes(parsedOutput, context);
5531
- default:
5532
- const parsedBody = parsedOutput.body;
5533
- return throwDefaultError({
5534
- output,
5535
- parsedBody,
5536
- errorCode
5537
- });
5538
- }
5539
- }, "de_ListImportsCommandError");
5540
3646
  var de_ListIntentMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
5541
3647
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5542
- return de_ListIntentMetricsCommandError(output, context);
3648
+ return de_CommandError(output, context);
5543
3649
  }
5544
3650
  const contents = (0, import_smithy_client.map)({
5545
3651
  $metadata: deserializeMetadata(output)
@@ -5553,40 +3659,9 @@ var de_ListIntentMetricsCommand = /* @__PURE__ */ __name(async (output, context)
5553
3659
  Object.assign(contents, doc);
5554
3660
  return contents;
5555
3661
  }, "de_ListIntentMetricsCommand");
5556
- var de_ListIntentMetricsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5557
- const parsedOutput = {
5558
- ...output,
5559
- body: await parseErrorBody(output.body, context)
5560
- };
5561
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5562
- switch (errorCode) {
5563
- case "InternalServerException":
5564
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5565
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5566
- case "PreconditionFailedException":
5567
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
5568
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
5569
- case "ServiceQuotaExceededException":
5570
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5571
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5572
- case "ThrottlingException":
5573
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5574
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5575
- case "ValidationException":
5576
- case "com.amazonaws.lexmodelsv2#ValidationException":
5577
- throw await de_ValidationExceptionRes(parsedOutput, context);
5578
- default:
5579
- const parsedBody = parsedOutput.body;
5580
- return throwDefaultError({
5581
- output,
5582
- parsedBody,
5583
- errorCode
5584
- });
5585
- }
5586
- }, "de_ListIntentMetricsCommandError");
5587
3662
  var de_ListIntentPathsCommand = /* @__PURE__ */ __name(async (output, context) => {
5588
3663
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5589
- return de_ListIntentPathsCommandError(output, context);
3664
+ return de_CommandError(output, context);
5590
3665
  }
5591
3666
  const contents = (0, import_smithy_client.map)({
5592
3667
  $metadata: deserializeMetadata(output)
@@ -5598,40 +3673,9 @@ var de_ListIntentPathsCommand = /* @__PURE__ */ __name(async (output, context) =
5598
3673
  Object.assign(contents, doc);
5599
3674
  return contents;
5600
3675
  }, "de_ListIntentPathsCommand");
5601
- var de_ListIntentPathsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5602
- const parsedOutput = {
5603
- ...output,
5604
- body: await parseErrorBody(output.body, context)
5605
- };
5606
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5607
- switch (errorCode) {
5608
- case "InternalServerException":
5609
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5610
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5611
- case "PreconditionFailedException":
5612
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
5613
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
5614
- case "ServiceQuotaExceededException":
5615
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5616
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5617
- case "ThrottlingException":
5618
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5619
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5620
- case "ValidationException":
5621
- case "com.amazonaws.lexmodelsv2#ValidationException":
5622
- throw await de_ValidationExceptionRes(parsedOutput, context);
5623
- default:
5624
- const parsedBody = parsedOutput.body;
5625
- return throwDefaultError({
5626
- output,
5627
- parsedBody,
5628
- errorCode
5629
- });
5630
- }
5631
- }, "de_ListIntentPathsCommandError");
5632
3676
  var de_ListIntentsCommand = /* @__PURE__ */ __name(async (output, context) => {
5633
3677
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5634
- return de_ListIntentsCommandError(output, context);
3678
+ return de_CommandError(output, context);
5635
3679
  }
5636
3680
  const contents = (0, import_smithy_client.map)({
5637
3681
  $metadata: deserializeMetadata(output)
@@ -5647,37 +3691,9 @@ var de_ListIntentsCommand = /* @__PURE__ */ __name(async (output, context) => {
5647
3691
  Object.assign(contents, doc);
5648
3692
  return contents;
5649
3693
  }, "de_ListIntentsCommand");
5650
- var de_ListIntentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5651
- const parsedOutput = {
5652
- ...output,
5653
- body: await parseErrorBody(output.body, context)
5654
- };
5655
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5656
- switch (errorCode) {
5657
- case "InternalServerException":
5658
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5659
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5660
- case "ServiceQuotaExceededException":
5661
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5662
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5663
- case "ThrottlingException":
5664
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5665
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5666
- case "ValidationException":
5667
- case "com.amazonaws.lexmodelsv2#ValidationException":
5668
- throw await de_ValidationExceptionRes(parsedOutput, context);
5669
- default:
5670
- const parsedBody = parsedOutput.body;
5671
- return throwDefaultError({
5672
- output,
5673
- parsedBody,
5674
- errorCode
5675
- });
5676
- }
5677
- }, "de_ListIntentsCommandError");
5678
3694
  var de_ListIntentStageMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
5679
3695
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5680
- return de_ListIntentStageMetricsCommandError(output, context);
3696
+ return de_CommandError(output, context);
5681
3697
  }
5682
3698
  const contents = (0, import_smithy_client.map)({
5683
3699
  $metadata: deserializeMetadata(output)
@@ -5691,40 +3707,9 @@ var de_ListIntentStageMetricsCommand = /* @__PURE__ */ __name(async (output, con
5691
3707
  Object.assign(contents, doc);
5692
3708
  return contents;
5693
3709
  }, "de_ListIntentStageMetricsCommand");
5694
- var de_ListIntentStageMetricsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5695
- const parsedOutput = {
5696
- ...output,
5697
- body: await parseErrorBody(output.body, context)
5698
- };
5699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5700
- switch (errorCode) {
5701
- case "InternalServerException":
5702
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5703
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5704
- case "PreconditionFailedException":
5705
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
5706
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
5707
- case "ServiceQuotaExceededException":
5708
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5709
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5710
- case "ThrottlingException":
5711
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5712
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5713
- case "ValidationException":
5714
- case "com.amazonaws.lexmodelsv2#ValidationException":
5715
- throw await de_ValidationExceptionRes(parsedOutput, context);
5716
- default:
5717
- const parsedBody = parsedOutput.body;
5718
- return throwDefaultError({
5719
- output,
5720
- parsedBody,
5721
- errorCode
5722
- });
5723
- }
5724
- }, "de_ListIntentStageMetricsCommandError");
5725
3710
  var de_ListRecommendedIntentsCommand = /* @__PURE__ */ __name(async (output, context) => {
5726
3711
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5727
- return de_ListRecommendedIntentsCommandError(output, context);
3712
+ return de_CommandError(output, context);
5728
3713
  }
5729
3714
  const contents = (0, import_smithy_client.map)({
5730
3715
  $metadata: deserializeMetadata(output)
@@ -5741,40 +3726,9 @@ var de_ListRecommendedIntentsCommand = /* @__PURE__ */ __name(async (output, con
5741
3726
  Object.assign(contents, doc);
5742
3727
  return contents;
5743
3728
  }, "de_ListRecommendedIntentsCommand");
5744
- var de_ListRecommendedIntentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5745
- const parsedOutput = {
5746
- ...output,
5747
- body: await parseErrorBody(output.body, context)
5748
- };
5749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5750
- switch (errorCode) {
5751
- case "InternalServerException":
5752
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5754
- case "ResourceNotFoundException":
5755
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
5756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5757
- case "ServiceQuotaExceededException":
5758
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5759
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5760
- case "ThrottlingException":
5761
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5762
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5763
- case "ValidationException":
5764
- case "com.amazonaws.lexmodelsv2#ValidationException":
5765
- throw await de_ValidationExceptionRes(parsedOutput, context);
5766
- default:
5767
- const parsedBody = parsedOutput.body;
5768
- return throwDefaultError({
5769
- output,
5770
- parsedBody,
5771
- errorCode
5772
- });
5773
- }
5774
- }, "de_ListRecommendedIntentsCommandError");
5775
3729
  var de_ListSessionAnalyticsDataCommand = /* @__PURE__ */ __name(async (output, context) => {
5776
3730
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5777
- return de_ListSessionAnalyticsDataCommandError(output, context);
3731
+ return de_CommandError(output, context);
5778
3732
  }
5779
3733
  const contents = (0, import_smithy_client.map)({
5780
3734
  $metadata: deserializeMetadata(output)
@@ -5788,40 +3742,9 @@ var de_ListSessionAnalyticsDataCommand = /* @__PURE__ */ __name(async (output, c
5788
3742
  Object.assign(contents, doc);
5789
3743
  return contents;
5790
3744
  }, "de_ListSessionAnalyticsDataCommand");
5791
- var de_ListSessionAnalyticsDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
5792
- const parsedOutput = {
5793
- ...output,
5794
- body: await parseErrorBody(output.body, context)
5795
- };
5796
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5797
- switch (errorCode) {
5798
- case "InternalServerException":
5799
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5800
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5801
- case "PreconditionFailedException":
5802
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
5803
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
5804
- case "ServiceQuotaExceededException":
5805
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5806
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5807
- case "ThrottlingException":
5808
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5809
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5810
- case "ValidationException":
5811
- case "com.amazonaws.lexmodelsv2#ValidationException":
5812
- throw await de_ValidationExceptionRes(parsedOutput, context);
5813
- default:
5814
- const parsedBody = parsedOutput.body;
5815
- return throwDefaultError({
5816
- output,
5817
- parsedBody,
5818
- errorCode
5819
- });
5820
- }
5821
- }, "de_ListSessionAnalyticsDataCommandError");
5822
3745
  var de_ListSessionMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
5823
3746
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5824
- return de_ListSessionMetricsCommandError(output, context);
3747
+ return de_CommandError(output, context);
5825
3748
  }
5826
3749
  const contents = (0, import_smithy_client.map)({
5827
3750
  $metadata: deserializeMetadata(output)
@@ -5835,40 +3758,9 @@ var de_ListSessionMetricsCommand = /* @__PURE__ */ __name(async (output, context
5835
3758
  Object.assign(contents, doc);
5836
3759
  return contents;
5837
3760
  }, "de_ListSessionMetricsCommand");
5838
- var de_ListSessionMetricsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5839
- const parsedOutput = {
5840
- ...output,
5841
- body: await parseErrorBody(output.body, context)
5842
- };
5843
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5844
- switch (errorCode) {
5845
- case "InternalServerException":
5846
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5847
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5848
- case "PreconditionFailedException":
5849
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
5850
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
5851
- case "ServiceQuotaExceededException":
5852
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5853
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5854
- case "ThrottlingException":
5855
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5856
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5857
- case "ValidationException":
5858
- case "com.amazonaws.lexmodelsv2#ValidationException":
5859
- throw await de_ValidationExceptionRes(parsedOutput, context);
5860
- default:
5861
- const parsedBody = parsedOutput.body;
5862
- return throwDefaultError({
5863
- output,
5864
- parsedBody,
5865
- errorCode
5866
- });
5867
- }
5868
- }, "de_ListSessionMetricsCommandError");
5869
3761
  var de_ListSlotsCommand = /* @__PURE__ */ __name(async (output, context) => {
5870
3762
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5871
- return de_ListSlotsCommandError(output, context);
3763
+ return de_CommandError(output, context);
5872
3764
  }
5873
3765
  const contents = (0, import_smithy_client.map)({
5874
3766
  $metadata: deserializeMetadata(output)
@@ -5885,37 +3777,9 @@ var de_ListSlotsCommand = /* @__PURE__ */ __name(async (output, context) => {
5885
3777
  Object.assign(contents, doc);
5886
3778
  return contents;
5887
3779
  }, "de_ListSlotsCommand");
5888
- var de_ListSlotsCommandError = /* @__PURE__ */ __name(async (output, context) => {
5889
- const parsedOutput = {
5890
- ...output,
5891
- body: await parseErrorBody(output.body, context)
5892
- };
5893
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5894
- switch (errorCode) {
5895
- case "InternalServerException":
5896
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5897
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5898
- case "ServiceQuotaExceededException":
5899
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5900
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5901
- case "ThrottlingException":
5902
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5903
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5904
- case "ValidationException":
5905
- case "com.amazonaws.lexmodelsv2#ValidationException":
5906
- throw await de_ValidationExceptionRes(parsedOutput, context);
5907
- default:
5908
- const parsedBody = parsedOutput.body;
5909
- return throwDefaultError({
5910
- output,
5911
- parsedBody,
5912
- errorCode
5913
- });
5914
- }
5915
- }, "de_ListSlotsCommandError");
5916
3780
  var de_ListSlotTypesCommand = /* @__PURE__ */ __name(async (output, context) => {
5917
3781
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5918
- return de_ListSlotTypesCommandError(output, context);
3782
+ return de_CommandError(output, context);
5919
3783
  }
5920
3784
  const contents = (0, import_smithy_client.map)({
5921
3785
  $metadata: deserializeMetadata(output)
@@ -5931,37 +3795,9 @@ var de_ListSlotTypesCommand = /* @__PURE__ */ __name(async (output, context) =>
5931
3795
  Object.assign(contents, doc);
5932
3796
  return contents;
5933
3797
  }, "de_ListSlotTypesCommand");
5934
- var de_ListSlotTypesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5935
- const parsedOutput = {
5936
- ...output,
5937
- body: await parseErrorBody(output.body, context)
5938
- };
5939
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5940
- switch (errorCode) {
5941
- case "InternalServerException":
5942
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5943
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5944
- case "ServiceQuotaExceededException":
5945
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
5946
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5947
- case "ThrottlingException":
5948
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5949
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5950
- case "ValidationException":
5951
- case "com.amazonaws.lexmodelsv2#ValidationException":
5952
- throw await de_ValidationExceptionRes(parsedOutput, context);
5953
- default:
5954
- const parsedBody = parsedOutput.body;
5955
- return throwDefaultError({
5956
- output,
5957
- parsedBody,
5958
- errorCode
5959
- });
5960
- }
5961
- }, "de_ListSlotTypesCommandError");
5962
3798
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
5963
3799
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5964
- return de_ListTagsForResourceCommandError(output, context);
3800
+ return de_CommandError(output, context);
5965
3801
  }
5966
3802
  const contents = (0, import_smithy_client.map)({
5967
3803
  $metadata: deserializeMetadata(output)
@@ -5973,37 +3809,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
5973
3809
  Object.assign(contents, doc);
5974
3810
  return contents;
5975
3811
  }, "de_ListTagsForResourceCommand");
5976
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
5977
- const parsedOutput = {
5978
- ...output,
5979
- body: await parseErrorBody(output.body, context)
5980
- };
5981
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5982
- switch (errorCode) {
5983
- case "InternalServerException":
5984
- case "com.amazonaws.lexmodelsv2#InternalServerException":
5985
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5986
- case "ResourceNotFoundException":
5987
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
5988
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5989
- case "ThrottlingException":
5990
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
5991
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5992
- case "ValidationException":
5993
- case "com.amazonaws.lexmodelsv2#ValidationException":
5994
- throw await de_ValidationExceptionRes(parsedOutput, context);
5995
- default:
5996
- const parsedBody = parsedOutput.body;
5997
- return throwDefaultError({
5998
- output,
5999
- parsedBody,
6000
- errorCode
6001
- });
6002
- }
6003
- }, "de_ListTagsForResourceCommandError");
6004
3812
  var de_ListTestExecutionResultItemsCommand = /* @__PURE__ */ __name(async (output, context) => {
6005
3813
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6006
- return de_ListTestExecutionResultItemsCommandError(output, context);
3814
+ return de_CommandError(output, context);
6007
3815
  }
6008
3816
  const contents = (0, import_smithy_client.map)({
6009
3817
  $metadata: deserializeMetadata(output)
@@ -6016,40 +3824,9 @@ var de_ListTestExecutionResultItemsCommand = /* @__PURE__ */ __name(async (outpu
6016
3824
  Object.assign(contents, doc);
6017
3825
  return contents;
6018
3826
  }, "de_ListTestExecutionResultItemsCommand");
6019
- var de_ListTestExecutionResultItemsCommandError = /* @__PURE__ */ __name(async (output, context) => {
6020
- const parsedOutput = {
6021
- ...output,
6022
- body: await parseErrorBody(output.body, context)
6023
- };
6024
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6025
- switch (errorCode) {
6026
- case "InternalServerException":
6027
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6028
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6029
- case "ResourceNotFoundException":
6030
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6031
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6032
- case "ServiceQuotaExceededException":
6033
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6034
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6035
- case "ThrottlingException":
6036
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6037
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6038
- case "ValidationException":
6039
- case "com.amazonaws.lexmodelsv2#ValidationException":
6040
- throw await de_ValidationExceptionRes(parsedOutput, context);
6041
- default:
6042
- const parsedBody = parsedOutput.body;
6043
- return throwDefaultError({
6044
- output,
6045
- parsedBody,
6046
- errorCode
6047
- });
6048
- }
6049
- }, "de_ListTestExecutionResultItemsCommandError");
6050
3827
  var de_ListTestExecutionsCommand = /* @__PURE__ */ __name(async (output, context) => {
6051
3828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6052
- return de_ListTestExecutionsCommandError(output, context);
3829
+ return de_CommandError(output, context);
6053
3830
  }
6054
3831
  const contents = (0, import_smithy_client.map)({
6055
3832
  $metadata: deserializeMetadata(output)
@@ -6062,37 +3839,9 @@ var de_ListTestExecutionsCommand = /* @__PURE__ */ __name(async (output, context
6062
3839
  Object.assign(contents, doc);
6063
3840
  return contents;
6064
3841
  }, "de_ListTestExecutionsCommand");
6065
- var de_ListTestExecutionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
6066
- const parsedOutput = {
6067
- ...output,
6068
- body: await parseErrorBody(output.body, context)
6069
- };
6070
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6071
- switch (errorCode) {
6072
- case "InternalServerException":
6073
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6074
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6075
- case "ServiceQuotaExceededException":
6076
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6077
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6078
- case "ThrottlingException":
6079
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6080
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6081
- case "ValidationException":
6082
- case "com.amazonaws.lexmodelsv2#ValidationException":
6083
- throw await de_ValidationExceptionRes(parsedOutput, context);
6084
- default:
6085
- const parsedBody = parsedOutput.body;
6086
- return throwDefaultError({
6087
- output,
6088
- parsedBody,
6089
- errorCode
6090
- });
6091
- }
6092
- }, "de_ListTestExecutionsCommandError");
6093
3842
  var de_ListTestSetRecordsCommand = /* @__PURE__ */ __name(async (output, context) => {
6094
3843
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6095
- return de_ListTestSetRecordsCommandError(output, context);
3844
+ return de_CommandError(output, context);
6096
3845
  }
6097
3846
  const contents = (0, import_smithy_client.map)({
6098
3847
  $metadata: deserializeMetadata(output)
@@ -6105,40 +3854,9 @@ var de_ListTestSetRecordsCommand = /* @__PURE__ */ __name(async (output, context
6105
3854
  Object.assign(contents, doc);
6106
3855
  return contents;
6107
3856
  }, "de_ListTestSetRecordsCommand");
6108
- var de_ListTestSetRecordsCommandError = /* @__PURE__ */ __name(async (output, context) => {
6109
- const parsedOutput = {
6110
- ...output,
6111
- body: await parseErrorBody(output.body, context)
6112
- };
6113
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6114
- switch (errorCode) {
6115
- case "InternalServerException":
6116
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6117
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6118
- case "ResourceNotFoundException":
6119
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6120
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6121
- case "ServiceQuotaExceededException":
6122
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6123
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6124
- case "ThrottlingException":
6125
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6126
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6127
- case "ValidationException":
6128
- case "com.amazonaws.lexmodelsv2#ValidationException":
6129
- throw await de_ValidationExceptionRes(parsedOutput, context);
6130
- default:
6131
- const parsedBody = parsedOutput.body;
6132
- return throwDefaultError({
6133
- output,
6134
- parsedBody,
6135
- errorCode
6136
- });
6137
- }
6138
- }, "de_ListTestSetRecordsCommandError");
6139
3857
  var de_ListTestSetsCommand = /* @__PURE__ */ __name(async (output, context) => {
6140
3858
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6141
- return de_ListTestSetsCommandError(output, context);
3859
+ return de_CommandError(output, context);
6142
3860
  }
6143
3861
  const contents = (0, import_smithy_client.map)({
6144
3862
  $metadata: deserializeMetadata(output)
@@ -6151,37 +3869,9 @@ var de_ListTestSetsCommand = /* @__PURE__ */ __name(async (output, context) => {
6151
3869
  Object.assign(contents, doc);
6152
3870
  return contents;
6153
3871
  }, "de_ListTestSetsCommand");
6154
- var de_ListTestSetsCommandError = /* @__PURE__ */ __name(async (output, context) => {
6155
- const parsedOutput = {
6156
- ...output,
6157
- body: await parseErrorBody(output.body, context)
6158
- };
6159
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6160
- switch (errorCode) {
6161
- case "InternalServerException":
6162
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6163
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6164
- case "ServiceQuotaExceededException":
6165
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6166
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6167
- case "ThrottlingException":
6168
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6170
- case "ValidationException":
6171
- case "com.amazonaws.lexmodelsv2#ValidationException":
6172
- throw await de_ValidationExceptionRes(parsedOutput, context);
6173
- default:
6174
- const parsedBody = parsedOutput.body;
6175
- return throwDefaultError({
6176
- output,
6177
- parsedBody,
6178
- errorCode
6179
- });
6180
- }
6181
- }, "de_ListTestSetsCommandError");
6182
3872
  var de_ListUtteranceAnalyticsDataCommand = /* @__PURE__ */ __name(async (output, context) => {
6183
3873
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6184
- return de_ListUtteranceAnalyticsDataCommandError(output, context);
3874
+ return de_CommandError(output, context);
6185
3875
  }
6186
3876
  const contents = (0, import_smithy_client.map)({
6187
3877
  $metadata: deserializeMetadata(output)
@@ -6195,40 +3885,9 @@ var de_ListUtteranceAnalyticsDataCommand = /* @__PURE__ */ __name(async (output,
6195
3885
  Object.assign(contents, doc);
6196
3886
  return contents;
6197
3887
  }, "de_ListUtteranceAnalyticsDataCommand");
6198
- var de_ListUtteranceAnalyticsDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
6199
- const parsedOutput = {
6200
- ...output,
6201
- body: await parseErrorBody(output.body, context)
6202
- };
6203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6204
- switch (errorCode) {
6205
- case "InternalServerException":
6206
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6207
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6208
- case "PreconditionFailedException":
6209
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6210
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6211
- case "ServiceQuotaExceededException":
6212
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6213
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6214
- case "ThrottlingException":
6215
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6216
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6217
- case "ValidationException":
6218
- case "com.amazonaws.lexmodelsv2#ValidationException":
6219
- throw await de_ValidationExceptionRes(parsedOutput, context);
6220
- default:
6221
- const parsedBody = parsedOutput.body;
6222
- return throwDefaultError({
6223
- output,
6224
- parsedBody,
6225
- errorCode
6226
- });
6227
- }
6228
- }, "de_ListUtteranceAnalyticsDataCommandError");
6229
3888
  var de_ListUtteranceMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
6230
3889
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6231
- return de_ListUtteranceMetricsCommandError(output, context);
3890
+ return de_CommandError(output, context);
6232
3891
  }
6233
3892
  const contents = (0, import_smithy_client.map)({
6234
3893
  $metadata: deserializeMetadata(output)
@@ -6242,40 +3901,9 @@ var de_ListUtteranceMetricsCommand = /* @__PURE__ */ __name(async (output, conte
6242
3901
  Object.assign(contents, doc);
6243
3902
  return contents;
6244
3903
  }, "de_ListUtteranceMetricsCommand");
6245
- var de_ListUtteranceMetricsCommandError = /* @__PURE__ */ __name(async (output, context) => {
6246
- const parsedOutput = {
6247
- ...output,
6248
- body: await parseErrorBody(output.body, context)
6249
- };
6250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6251
- switch (errorCode) {
6252
- case "InternalServerException":
6253
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6254
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6255
- case "PreconditionFailedException":
6256
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6257
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6258
- case "ServiceQuotaExceededException":
6259
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6260
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6261
- case "ThrottlingException":
6262
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6263
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6264
- case "ValidationException":
6265
- case "com.amazonaws.lexmodelsv2#ValidationException":
6266
- throw await de_ValidationExceptionRes(parsedOutput, context);
6267
- default:
6268
- const parsedBody = parsedOutput.body;
6269
- return throwDefaultError({
6270
- output,
6271
- parsedBody,
6272
- errorCode
6273
- });
6274
- }
6275
- }, "de_ListUtteranceMetricsCommandError");
6276
3904
  var de_SearchAssociatedTranscriptsCommand = /* @__PURE__ */ __name(async (output, context) => {
6277
3905
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6278
- return de_SearchAssociatedTranscriptsCommandError(output, context);
3906
+ return de_CommandError(output, context);
6279
3907
  }
6280
3908
  const contents = (0, import_smithy_client.map)({
6281
3909
  $metadata: deserializeMetadata(output)
@@ -6293,40 +3921,9 @@ var de_SearchAssociatedTranscriptsCommand = /* @__PURE__ */ __name(async (output
6293
3921
  Object.assign(contents, doc);
6294
3922
  return contents;
6295
3923
  }, "de_SearchAssociatedTranscriptsCommand");
6296
- var de_SearchAssociatedTranscriptsCommandError = /* @__PURE__ */ __name(async (output, context) => {
6297
- const parsedOutput = {
6298
- ...output,
6299
- body: await parseErrorBody(output.body, context)
6300
- };
6301
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6302
- switch (errorCode) {
6303
- case "InternalServerException":
6304
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6305
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6306
- case "ResourceNotFoundException":
6307
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6308
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6309
- case "ServiceQuotaExceededException":
6310
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6311
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6312
- case "ThrottlingException":
6313
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6314
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6315
- case "ValidationException":
6316
- case "com.amazonaws.lexmodelsv2#ValidationException":
6317
- throw await de_ValidationExceptionRes(parsedOutput, context);
6318
- default:
6319
- const parsedBody = parsedOutput.body;
6320
- return throwDefaultError({
6321
- output,
6322
- parsedBody,
6323
- errorCode
6324
- });
6325
- }
6326
- }, "de_SearchAssociatedTranscriptsCommandError");
6327
3924
  var de_StartBotRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
6328
3925
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6329
- return de_StartBotRecommendationCommandError(output, context);
3926
+ return de_CommandError(output, context);
6330
3927
  }
6331
3928
  const contents = (0, import_smithy_client.map)({
6332
3929
  $metadata: deserializeMetadata(output)
@@ -6345,46 +3942,9 @@ var de_StartBotRecommendationCommand = /* @__PURE__ */ __name(async (output, con
6345
3942
  Object.assign(contents, doc);
6346
3943
  return contents;
6347
3944
  }, "de_StartBotRecommendationCommand");
6348
- var de_StartBotRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
6349
- const parsedOutput = {
6350
- ...output,
6351
- body: await parseErrorBody(output.body, context)
6352
- };
6353
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6354
- switch (errorCode) {
6355
- case "ConflictException":
6356
- case "com.amazonaws.lexmodelsv2#ConflictException":
6357
- throw await de_ConflictExceptionRes(parsedOutput, context);
6358
- case "InternalServerException":
6359
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6360
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6361
- case "PreconditionFailedException":
6362
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6363
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6364
- case "ResourceNotFoundException":
6365
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6366
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6367
- case "ServiceQuotaExceededException":
6368
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6369
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6370
- case "ThrottlingException":
6371
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6372
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6373
- case "ValidationException":
6374
- case "com.amazonaws.lexmodelsv2#ValidationException":
6375
- throw await de_ValidationExceptionRes(parsedOutput, context);
6376
- default:
6377
- const parsedBody = parsedOutput.body;
6378
- return throwDefaultError({
6379
- output,
6380
- parsedBody,
6381
- errorCode
6382
- });
6383
- }
6384
- }, "de_StartBotRecommendationCommandError");
6385
3945
  var de_StartBotResourceGenerationCommand = /* @__PURE__ */ __name(async (output, context) => {
6386
3946
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6387
- return de_StartBotResourceGenerationCommandError(output, context);
3947
+ return de_CommandError(output, context);
6388
3948
  }
6389
3949
  const contents = (0, import_smithy_client.map)({
6390
3950
  $metadata: deserializeMetadata(output)
@@ -6402,43 +3962,9 @@ var de_StartBotResourceGenerationCommand = /* @__PURE__ */ __name(async (output,
6402
3962
  Object.assign(contents, doc);
6403
3963
  return contents;
6404
3964
  }, "de_StartBotResourceGenerationCommand");
6405
- var de_StartBotResourceGenerationCommandError = /* @__PURE__ */ __name(async (output, context) => {
6406
- const parsedOutput = {
6407
- ...output,
6408
- body: await parseErrorBody(output.body, context)
6409
- };
6410
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6411
- switch (errorCode) {
6412
- case "ConflictException":
6413
- case "com.amazonaws.lexmodelsv2#ConflictException":
6414
- throw await de_ConflictExceptionRes(parsedOutput, context);
6415
- case "InternalServerException":
6416
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6417
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6418
- case "PreconditionFailedException":
6419
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6420
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6421
- case "ServiceQuotaExceededException":
6422
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6423
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6424
- case "ThrottlingException":
6425
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6426
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6427
- case "ValidationException":
6428
- case "com.amazonaws.lexmodelsv2#ValidationException":
6429
- throw await de_ValidationExceptionRes(parsedOutput, context);
6430
- default:
6431
- const parsedBody = parsedOutput.body;
6432
- return throwDefaultError({
6433
- output,
6434
- parsedBody,
6435
- errorCode
6436
- });
6437
- }
6438
- }, "de_StartBotResourceGenerationCommandError");
6439
3965
  var de_StartImportCommand = /* @__PURE__ */ __name(async (output, context) => {
6440
3966
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6441
- return de_StartImportCommandError(output, context);
3967
+ return de_CommandError(output, context);
6442
3968
  }
6443
3969
  const contents = (0, import_smithy_client.map)({
6444
3970
  $metadata: deserializeMetadata(output)
@@ -6454,43 +3980,9 @@ var de_StartImportCommand = /* @__PURE__ */ __name(async (output, context) => {
6454
3980
  Object.assign(contents, doc);
6455
3981
  return contents;
6456
3982
  }, "de_StartImportCommand");
6457
- var de_StartImportCommandError = /* @__PURE__ */ __name(async (output, context) => {
6458
- const parsedOutput = {
6459
- ...output,
6460
- body: await parseErrorBody(output.body, context)
6461
- };
6462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6463
- switch (errorCode) {
6464
- case "ConflictException":
6465
- case "com.amazonaws.lexmodelsv2#ConflictException":
6466
- throw await de_ConflictExceptionRes(parsedOutput, context);
6467
- case "InternalServerException":
6468
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6469
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6470
- case "ResourceNotFoundException":
6471
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6472
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6473
- case "ServiceQuotaExceededException":
6474
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6475
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6476
- case "ThrottlingException":
6477
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6478
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6479
- case "ValidationException":
6480
- case "com.amazonaws.lexmodelsv2#ValidationException":
6481
- throw await de_ValidationExceptionRes(parsedOutput, context);
6482
- default:
6483
- const parsedBody = parsedOutput.body;
6484
- return throwDefaultError({
6485
- output,
6486
- parsedBody,
6487
- errorCode
6488
- });
6489
- }
6490
- }, "de_StartImportCommandError");
6491
3983
  var de_StartTestExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
6492
3984
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6493
- return de_StartTestExecutionCommandError(output, context);
3985
+ return de_CommandError(output, context);
6494
3986
  }
6495
3987
  const contents = (0, import_smithy_client.map)({
6496
3988
  $metadata: deserializeMetadata(output)
@@ -6507,43 +3999,9 @@ var de_StartTestExecutionCommand = /* @__PURE__ */ __name(async (output, context
6507
3999
  Object.assign(contents, doc);
6508
4000
  return contents;
6509
4001
  }, "de_StartTestExecutionCommand");
6510
- var de_StartTestExecutionCommandError = /* @__PURE__ */ __name(async (output, context) => {
6511
- const parsedOutput = {
6512
- ...output,
6513
- body: await parseErrorBody(output.body, context)
6514
- };
6515
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6516
- switch (errorCode) {
6517
- case "ConflictException":
6518
- case "com.amazonaws.lexmodelsv2#ConflictException":
6519
- throw await de_ConflictExceptionRes(parsedOutput, context);
6520
- case "InternalServerException":
6521
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6522
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6523
- case "ResourceNotFoundException":
6524
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6525
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6526
- case "ServiceQuotaExceededException":
6527
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6528
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6529
- case "ThrottlingException":
6530
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6531
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6532
- case "ValidationException":
6533
- case "com.amazonaws.lexmodelsv2#ValidationException":
6534
- throw await de_ValidationExceptionRes(parsedOutput, context);
6535
- default:
6536
- const parsedBody = parsedOutput.body;
6537
- return throwDefaultError({
6538
- output,
6539
- parsedBody,
6540
- errorCode
6541
- });
6542
- }
6543
- }, "de_StartTestExecutionCommandError");
6544
4002
  var de_StartTestSetGenerationCommand = /* @__PURE__ */ __name(async (output, context) => {
6545
4003
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6546
- return de_StartTestSetGenerationCommandError(output, context);
4004
+ return de_CommandError(output, context);
6547
4005
  }
6548
4006
  const contents = (0, import_smithy_client.map)({
6549
4007
  $metadata: deserializeMetadata(output)
@@ -6563,43 +4021,9 @@ var de_StartTestSetGenerationCommand = /* @__PURE__ */ __name(async (output, con
6563
4021
  Object.assign(contents, doc);
6564
4022
  return contents;
6565
4023
  }, "de_StartTestSetGenerationCommand");
6566
- var de_StartTestSetGenerationCommandError = /* @__PURE__ */ __name(async (output, context) => {
6567
- const parsedOutput = {
6568
- ...output,
6569
- body: await parseErrorBody(output.body, context)
6570
- };
6571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6572
- switch (errorCode) {
6573
- case "ConflictException":
6574
- case "com.amazonaws.lexmodelsv2#ConflictException":
6575
- throw await de_ConflictExceptionRes(parsedOutput, context);
6576
- case "InternalServerException":
6577
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6578
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6579
- case "ResourceNotFoundException":
6580
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6581
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6582
- case "ServiceQuotaExceededException":
6583
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6584
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6585
- case "ThrottlingException":
6586
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6587
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6588
- case "ValidationException":
6589
- case "com.amazonaws.lexmodelsv2#ValidationException":
6590
- throw await de_ValidationExceptionRes(parsedOutput, context);
6591
- default:
6592
- const parsedBody = parsedOutput.body;
6593
- return throwDefaultError({
6594
- output,
6595
- parsedBody,
6596
- errorCode
6597
- });
6598
- }
6599
- }, "de_StartTestSetGenerationCommandError");
6600
4024
  var de_StopBotRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
6601
4025
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6602
- return de_StopBotRecommendationCommandError(output, context);
4026
+ return de_CommandError(output, context);
6603
4027
  }
6604
4028
  const contents = (0, import_smithy_client.map)({
6605
4029
  $metadata: deserializeMetadata(output)
@@ -6615,46 +4039,9 @@ var de_StopBotRecommendationCommand = /* @__PURE__ */ __name(async (output, cont
6615
4039
  Object.assign(contents, doc);
6616
4040
  return contents;
6617
4041
  }, "de_StopBotRecommendationCommand");
6618
- var de_StopBotRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
6619
- const parsedOutput = {
6620
- ...output,
6621
- body: await parseErrorBody(output.body, context)
6622
- };
6623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6624
- switch (errorCode) {
6625
- case "ConflictException":
6626
- case "com.amazonaws.lexmodelsv2#ConflictException":
6627
- throw await de_ConflictExceptionRes(parsedOutput, context);
6628
- case "InternalServerException":
6629
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6630
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6631
- case "PreconditionFailedException":
6632
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6633
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6634
- case "ResourceNotFoundException":
6635
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6636
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6637
- case "ServiceQuotaExceededException":
6638
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6639
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6640
- case "ThrottlingException":
6641
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6642
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6643
- case "ValidationException":
6644
- case "com.amazonaws.lexmodelsv2#ValidationException":
6645
- throw await de_ValidationExceptionRes(parsedOutput, context);
6646
- default:
6647
- const parsedBody = parsedOutput.body;
6648
- return throwDefaultError({
6649
- output,
6650
- parsedBody,
6651
- errorCode
6652
- });
6653
- }
6654
- }, "de_StopBotRecommendationCommandError");
6655
4042
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
6656
4043
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6657
- return de_TagResourceCommandError(output, context);
4044
+ return de_CommandError(output, context);
6658
4045
  }
6659
4046
  const contents = (0, import_smithy_client.map)({
6660
4047
  $metadata: deserializeMetadata(output)
@@ -6662,37 +4049,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
6662
4049
  await (0, import_smithy_client.collectBody)(output.body, context);
6663
4050
  return contents;
6664
4051
  }, "de_TagResourceCommand");
6665
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
6666
- const parsedOutput = {
6667
- ...output,
6668
- body: await parseErrorBody(output.body, context)
6669
- };
6670
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6671
- switch (errorCode) {
6672
- case "InternalServerException":
6673
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6674
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6675
- case "ResourceNotFoundException":
6676
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6677
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6678
- case "ThrottlingException":
6679
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6680
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6681
- case "ValidationException":
6682
- case "com.amazonaws.lexmodelsv2#ValidationException":
6683
- throw await de_ValidationExceptionRes(parsedOutput, context);
6684
- default:
6685
- const parsedBody = parsedOutput.body;
6686
- return throwDefaultError({
6687
- output,
6688
- parsedBody,
6689
- errorCode
6690
- });
6691
- }
6692
- }, "de_TagResourceCommandError");
6693
4052
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
6694
4053
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6695
- return de_UntagResourceCommandError(output, context);
4054
+ return de_CommandError(output, context);
6696
4055
  }
6697
4056
  const contents = (0, import_smithy_client.map)({
6698
4057
  $metadata: deserializeMetadata(output)
@@ -6700,37 +4059,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
6700
4059
  await (0, import_smithy_client.collectBody)(output.body, context);
6701
4060
  return contents;
6702
4061
  }, "de_UntagResourceCommand");
6703
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
6704
- const parsedOutput = {
6705
- ...output,
6706
- body: await parseErrorBody(output.body, context)
6707
- };
6708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6709
- switch (errorCode) {
6710
- case "InternalServerException":
6711
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6712
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6713
- case "ResourceNotFoundException":
6714
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6715
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6716
- case "ThrottlingException":
6717
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6718
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6719
- case "ValidationException":
6720
- case "com.amazonaws.lexmodelsv2#ValidationException":
6721
- throw await de_ValidationExceptionRes(parsedOutput, context);
6722
- default:
6723
- const parsedBody = parsedOutput.body;
6724
- return throwDefaultError({
6725
- output,
6726
- parsedBody,
6727
- errorCode
6728
- });
6729
- }
6730
- }, "de_UntagResourceCommandError");
6731
4062
  var de_UpdateBotCommand = /* @__PURE__ */ __name(async (output, context) => {
6732
4063
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6733
- return de_UpdateBotCommandError(output, context);
4064
+ return de_CommandError(output, context);
6734
4065
  }
6735
4066
  const contents = (0, import_smithy_client.map)({
6736
4067
  $metadata: deserializeMetadata(output)
@@ -6752,43 +4083,9 @@ var de_UpdateBotCommand = /* @__PURE__ */ __name(async (output, context) => {
6752
4083
  Object.assign(contents, doc);
6753
4084
  return contents;
6754
4085
  }, "de_UpdateBotCommand");
6755
- var de_UpdateBotCommandError = /* @__PURE__ */ __name(async (output, context) => {
6756
- const parsedOutput = {
6757
- ...output,
6758
- body: await parseErrorBody(output.body, context)
6759
- };
6760
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6761
- switch (errorCode) {
6762
- case "ConflictException":
6763
- case "com.amazonaws.lexmodelsv2#ConflictException":
6764
- throw await de_ConflictExceptionRes(parsedOutput, context);
6765
- case "InternalServerException":
6766
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6767
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6768
- case "PreconditionFailedException":
6769
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6770
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6771
- case "ServiceQuotaExceededException":
6772
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6773
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6774
- case "ThrottlingException":
6775
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6776
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6777
- case "ValidationException":
6778
- case "com.amazonaws.lexmodelsv2#ValidationException":
6779
- throw await de_ValidationExceptionRes(parsedOutput, context);
6780
- default:
6781
- const parsedBody = parsedOutput.body;
6782
- return throwDefaultError({
6783
- output,
6784
- parsedBody,
6785
- errorCode
6786
- });
6787
- }
6788
- }, "de_UpdateBotCommandError");
6789
4086
  var de_UpdateBotAliasCommand = /* @__PURE__ */ __name(async (output, context) => {
6790
4087
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6791
- return de_UpdateBotAliasCommandError(output, context);
4088
+ return de_CommandError(output, context);
6792
4089
  }
6793
4090
  const contents = (0, import_smithy_client.map)({
6794
4091
  $metadata: deserializeMetadata(output)
@@ -6796,57 +4093,23 @@ var de_UpdateBotAliasCommand = /* @__PURE__ */ __name(async (output, context) =>
6796
4093
  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
6797
4094
  const doc = (0, import_smithy_client.take)(data, {
6798
4095
  botAliasId: import_smithy_client.expectString,
6799
- botAliasLocaleSettings: import_smithy_client._json,
6800
- botAliasName: import_smithy_client.expectString,
6801
- botAliasStatus: import_smithy_client.expectString,
6802
- botId: import_smithy_client.expectString,
6803
- botVersion: import_smithy_client.expectString,
6804
- conversationLogSettings: import_smithy_client._json,
6805
- creationDateTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
6806
- description: import_smithy_client.expectString,
6807
- lastUpdatedDateTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
6808
- sentimentAnalysisSettings: import_smithy_client._json
6809
- });
6810
- Object.assign(contents, doc);
6811
- return contents;
6812
- }, "de_UpdateBotAliasCommand");
6813
- var de_UpdateBotAliasCommandError = /* @__PURE__ */ __name(async (output, context) => {
6814
- const parsedOutput = {
6815
- ...output,
6816
- body: await parseErrorBody(output.body, context)
6817
- };
6818
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6819
- switch (errorCode) {
6820
- case "ConflictException":
6821
- case "com.amazonaws.lexmodelsv2#ConflictException":
6822
- throw await de_ConflictExceptionRes(parsedOutput, context);
6823
- case "InternalServerException":
6824
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6825
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6826
- case "PreconditionFailedException":
6827
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6828
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6829
- case "ServiceQuotaExceededException":
6830
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6831
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6832
- case "ThrottlingException":
6833
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6834
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6835
- case "ValidationException":
6836
- case "com.amazonaws.lexmodelsv2#ValidationException":
6837
- throw await de_ValidationExceptionRes(parsedOutput, context);
6838
- default:
6839
- const parsedBody = parsedOutput.body;
6840
- return throwDefaultError({
6841
- output,
6842
- parsedBody,
6843
- errorCode
6844
- });
6845
- }
6846
- }, "de_UpdateBotAliasCommandError");
4096
+ botAliasLocaleSettings: import_smithy_client._json,
4097
+ botAliasName: import_smithy_client.expectString,
4098
+ botAliasStatus: import_smithy_client.expectString,
4099
+ botId: import_smithy_client.expectString,
4100
+ botVersion: import_smithy_client.expectString,
4101
+ conversationLogSettings: import_smithy_client._json,
4102
+ creationDateTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
4103
+ description: import_smithy_client.expectString,
4104
+ lastUpdatedDateTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
4105
+ sentimentAnalysisSettings: import_smithy_client._json
4106
+ });
4107
+ Object.assign(contents, doc);
4108
+ return contents;
4109
+ }, "de_UpdateBotAliasCommand");
6847
4110
  var de_UpdateBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) => {
6848
4111
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6849
- return de_UpdateBotLocaleCommandError(output, context);
4112
+ return de_CommandError(output, context);
6850
4113
  }
6851
4114
  const contents = (0, import_smithy_client.map)({
6852
4115
  $metadata: deserializeMetadata(output)
@@ -6870,43 +4133,9 @@ var de_UpdateBotLocaleCommand = /* @__PURE__ */ __name(async (output, context) =
6870
4133
  Object.assign(contents, doc);
6871
4134
  return contents;
6872
4135
  }, "de_UpdateBotLocaleCommand");
6873
- var de_UpdateBotLocaleCommandError = /* @__PURE__ */ __name(async (output, context) => {
6874
- const parsedOutput = {
6875
- ...output,
6876
- body: await parseErrorBody(output.body, context)
6877
- };
6878
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6879
- switch (errorCode) {
6880
- case "ConflictException":
6881
- case "com.amazonaws.lexmodelsv2#ConflictException":
6882
- throw await de_ConflictExceptionRes(parsedOutput, context);
6883
- case "InternalServerException":
6884
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6885
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6886
- case "PreconditionFailedException":
6887
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6888
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6889
- case "ServiceQuotaExceededException":
6890
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6891
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6892
- case "ThrottlingException":
6893
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6894
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6895
- case "ValidationException":
6896
- case "com.amazonaws.lexmodelsv2#ValidationException":
6897
- throw await de_ValidationExceptionRes(parsedOutput, context);
6898
- default:
6899
- const parsedBody = parsedOutput.body;
6900
- return throwDefaultError({
6901
- output,
6902
- parsedBody,
6903
- errorCode
6904
- });
6905
- }
6906
- }, "de_UpdateBotLocaleCommandError");
6907
4136
  var de_UpdateBotRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
6908
4137
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6909
- return de_UpdateBotRecommendationCommandError(output, context);
4138
+ return de_CommandError(output, context);
6910
4139
  }
6911
4140
  const contents = (0, import_smithy_client.map)({
6912
4141
  $metadata: deserializeMetadata(output)
@@ -6926,46 +4155,9 @@ var de_UpdateBotRecommendationCommand = /* @__PURE__ */ __name(async (output, co
6926
4155
  Object.assign(contents, doc);
6927
4156
  return contents;
6928
4157
  }, "de_UpdateBotRecommendationCommand");
6929
- var de_UpdateBotRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
6930
- const parsedOutput = {
6931
- ...output,
6932
- body: await parseErrorBody(output.body, context)
6933
- };
6934
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6935
- switch (errorCode) {
6936
- case "ConflictException":
6937
- case "com.amazonaws.lexmodelsv2#ConflictException":
6938
- throw await de_ConflictExceptionRes(parsedOutput, context);
6939
- case "InternalServerException":
6940
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6941
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6942
- case "PreconditionFailedException":
6943
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
6944
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
6945
- case "ResourceNotFoundException":
6946
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
6947
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6948
- case "ServiceQuotaExceededException":
6949
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
6950
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
6951
- case "ThrottlingException":
6952
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
6953
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
6954
- case "ValidationException":
6955
- case "com.amazonaws.lexmodelsv2#ValidationException":
6956
- throw await de_ValidationExceptionRes(parsedOutput, context);
6957
- default:
6958
- const parsedBody = parsedOutput.body;
6959
- return throwDefaultError({
6960
- output,
6961
- parsedBody,
6962
- errorCode
6963
- });
6964
- }
6965
- }, "de_UpdateBotRecommendationCommandError");
6966
4158
  var de_UpdateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
6967
4159
  if (output.statusCode !== 202 && output.statusCode >= 300) {
6968
- return de_UpdateExportCommandError(output, context);
4160
+ return de_CommandError(output, context);
6969
4161
  }
6970
4162
  const contents = (0, import_smithy_client.map)({
6971
4163
  $metadata: deserializeMetadata(output)
@@ -6982,43 +4174,9 @@ var de_UpdateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
6982
4174
  Object.assign(contents, doc);
6983
4175
  return contents;
6984
4176
  }, "de_UpdateExportCommand");
6985
- var de_UpdateExportCommandError = /* @__PURE__ */ __name(async (output, context) => {
6986
- const parsedOutput = {
6987
- ...output,
6988
- body: await parseErrorBody(output.body, context)
6989
- };
6990
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6991
- switch (errorCode) {
6992
- case "ConflictException":
6993
- case "com.amazonaws.lexmodelsv2#ConflictException":
6994
- throw await de_ConflictExceptionRes(parsedOutput, context);
6995
- case "InternalServerException":
6996
- case "com.amazonaws.lexmodelsv2#InternalServerException":
6997
- throw await de_InternalServerExceptionRes(parsedOutput, context);
6998
- case "ResourceNotFoundException":
6999
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
7000
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
7001
- case "ServiceQuotaExceededException":
7002
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
7003
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
7004
- case "ThrottlingException":
7005
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
7006
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
7007
- case "ValidationException":
7008
- case "com.amazonaws.lexmodelsv2#ValidationException":
7009
- throw await de_ValidationExceptionRes(parsedOutput, context);
7010
- default:
7011
- const parsedBody = parsedOutput.body;
7012
- return throwDefaultError({
7013
- output,
7014
- parsedBody,
7015
- errorCode
7016
- });
7017
- }
7018
- }, "de_UpdateExportCommandError");
7019
4177
  var de_UpdateIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
7020
4178
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7021
- return de_UpdateIntentCommandError(output, context);
4179
+ return de_CommandError(output, context);
7022
4180
  }
7023
4181
  const contents = (0, import_smithy_client.map)({
7024
4182
  $metadata: deserializeMetadata(output)
@@ -7048,43 +4206,9 @@ var de_UpdateIntentCommand = /* @__PURE__ */ __name(async (output, context) => {
7048
4206
  Object.assign(contents, doc);
7049
4207
  return contents;
7050
4208
  }, "de_UpdateIntentCommand");
7051
- var de_UpdateIntentCommandError = /* @__PURE__ */ __name(async (output, context) => {
7052
- const parsedOutput = {
7053
- ...output,
7054
- body: await parseErrorBody(output.body, context)
7055
- };
7056
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7057
- switch (errorCode) {
7058
- case "ConflictException":
7059
- case "com.amazonaws.lexmodelsv2#ConflictException":
7060
- throw await de_ConflictExceptionRes(parsedOutput, context);
7061
- case "InternalServerException":
7062
- case "com.amazonaws.lexmodelsv2#InternalServerException":
7063
- throw await de_InternalServerExceptionRes(parsedOutput, context);
7064
- case "PreconditionFailedException":
7065
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
7066
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
7067
- case "ServiceQuotaExceededException":
7068
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
7069
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
7070
- case "ThrottlingException":
7071
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
7072
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
7073
- case "ValidationException":
7074
- case "com.amazonaws.lexmodelsv2#ValidationException":
7075
- throw await de_ValidationExceptionRes(parsedOutput, context);
7076
- default:
7077
- const parsedBody = parsedOutput.body;
7078
- return throwDefaultError({
7079
- output,
7080
- parsedBody,
7081
- errorCode
7082
- });
7083
- }
7084
- }, "de_UpdateIntentCommandError");
7085
4209
  var de_UpdateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
7086
4210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7087
- return de_UpdateResourcePolicyCommandError(output, context);
4211
+ return de_CommandError(output, context);
7088
4212
  }
7089
4213
  const contents = (0, import_smithy_client.map)({
7090
4214
  $metadata: deserializeMetadata(output)
@@ -7097,43 +4221,9 @@ var de_UpdateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, conte
7097
4221
  Object.assign(contents, doc);
7098
4222
  return contents;
7099
4223
  }, "de_UpdateResourcePolicyCommand");
7100
- var de_UpdateResourcePolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
7101
- const parsedOutput = {
7102
- ...output,
7103
- body: await parseErrorBody(output.body, context)
7104
- };
7105
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7106
- switch (errorCode) {
7107
- case "InternalServerException":
7108
- case "com.amazonaws.lexmodelsv2#InternalServerException":
7109
- throw await de_InternalServerExceptionRes(parsedOutput, context);
7110
- case "PreconditionFailedException":
7111
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
7112
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
7113
- case "ResourceNotFoundException":
7114
- case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
7115
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
7116
- case "ServiceQuotaExceededException":
7117
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
7118
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
7119
- case "ThrottlingException":
7120
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
7121
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
7122
- case "ValidationException":
7123
- case "com.amazonaws.lexmodelsv2#ValidationException":
7124
- throw await de_ValidationExceptionRes(parsedOutput, context);
7125
- default:
7126
- const parsedBody = parsedOutput.body;
7127
- return throwDefaultError({
7128
- output,
7129
- parsedBody,
7130
- errorCode
7131
- });
7132
- }
7133
- }, "de_UpdateResourcePolicyCommandError");
7134
4224
  var de_UpdateSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
7135
4225
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7136
- return de_UpdateSlotCommandError(output, context);
4226
+ return de_CommandError(output, context);
7137
4227
  }
7138
4228
  const contents = (0, import_smithy_client.map)({
7139
4229
  $metadata: deserializeMetadata(output)
@@ -7158,43 +4248,9 @@ var de_UpdateSlotCommand = /* @__PURE__ */ __name(async (output, context) => {
7158
4248
  Object.assign(contents, doc);
7159
4249
  return contents;
7160
4250
  }, "de_UpdateSlotCommand");
7161
- var de_UpdateSlotCommandError = /* @__PURE__ */ __name(async (output, context) => {
7162
- const parsedOutput = {
7163
- ...output,
7164
- body: await parseErrorBody(output.body, context)
7165
- };
7166
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7167
- switch (errorCode) {
7168
- case "ConflictException":
7169
- case "com.amazonaws.lexmodelsv2#ConflictException":
7170
- throw await de_ConflictExceptionRes(parsedOutput, context);
7171
- case "InternalServerException":
7172
- case "com.amazonaws.lexmodelsv2#InternalServerException":
7173
- throw await de_InternalServerExceptionRes(parsedOutput, context);
7174
- case "PreconditionFailedException":
7175
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
7176
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
7177
- case "ServiceQuotaExceededException":
7178
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
7179
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
7180
- case "ThrottlingException":
7181
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
7182
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
7183
- case "ValidationException":
7184
- case "com.amazonaws.lexmodelsv2#ValidationException":
7185
- throw await de_ValidationExceptionRes(parsedOutput, context);
7186
- default:
7187
- const parsedBody = parsedOutput.body;
7188
- return throwDefaultError({
7189
- output,
7190
- parsedBody,
7191
- errorCode
7192
- });
7193
- }
7194
- }, "de_UpdateSlotCommandError");
7195
4251
  var de_UpdateSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
7196
4252
  if (output.statusCode !== 202 && output.statusCode >= 300) {
7197
- return de_UpdateSlotTypeCommandError(output, context);
4253
+ return de_CommandError(output, context);
7198
4254
  }
7199
4255
  const contents = (0, import_smithy_client.map)({
7200
4256
  $metadata: deserializeMetadata(output)
@@ -7218,43 +4274,9 @@ var de_UpdateSlotTypeCommand = /* @__PURE__ */ __name(async (output, context) =>
7218
4274
  Object.assign(contents, doc);
7219
4275
  return contents;
7220
4276
  }, "de_UpdateSlotTypeCommand");
7221
- var de_UpdateSlotTypeCommandError = /* @__PURE__ */ __name(async (output, context) => {
7222
- const parsedOutput = {
7223
- ...output,
7224
- body: await parseErrorBody(output.body, context)
7225
- };
7226
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7227
- switch (errorCode) {
7228
- case "ConflictException":
7229
- case "com.amazonaws.lexmodelsv2#ConflictException":
7230
- throw await de_ConflictExceptionRes(parsedOutput, context);
7231
- case "InternalServerException":
7232
- case "com.amazonaws.lexmodelsv2#InternalServerException":
7233
- throw await de_InternalServerExceptionRes(parsedOutput, context);
7234
- case "PreconditionFailedException":
7235
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
7236
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
7237
- case "ServiceQuotaExceededException":
7238
- case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
7239
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
7240
- case "ThrottlingException":
7241
- case "com.amazonaws.lexmodelsv2#ThrottlingException":
7242
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
7243
- case "ValidationException":
7244
- case "com.amazonaws.lexmodelsv2#ValidationException":
7245
- throw await de_ValidationExceptionRes(parsedOutput, context);
7246
- default:
7247
- const parsedBody = parsedOutput.body;
7248
- return throwDefaultError({
7249
- output,
7250
- parsedBody,
7251
- errorCode
7252
- });
7253
- }
7254
- }, "de_UpdateSlotTypeCommandError");
7255
4277
  var de_UpdateTestSetCommand = /* @__PURE__ */ __name(async (output, context) => {
7256
4278
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7257
- return de_UpdateTestSetCommandError(output, context);
4279
+ return de_CommandError(output, context);
7258
4280
  }
7259
4281
  const contents = (0, import_smithy_client.map)({
7260
4282
  $metadata: deserializeMetadata(output)
@@ -7275,22 +4297,19 @@ var de_UpdateTestSetCommand = /* @__PURE__ */ __name(async (output, context) =>
7275
4297
  Object.assign(contents, doc);
7276
4298
  return contents;
7277
4299
  }, "de_UpdateTestSetCommand");
7278
- var de_UpdateTestSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
4300
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
7279
4301
  const parsedOutput = {
7280
4302
  ...output,
7281
4303
  body: await parseErrorBody(output.body, context)
7282
4304
  };
7283
4305
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7284
4306
  switch (errorCode) {
7285
- case "ConflictException":
7286
- case "com.amazonaws.lexmodelsv2#ConflictException":
7287
- throw await de_ConflictExceptionRes(parsedOutput, context);
7288
4307
  case "InternalServerException":
7289
4308
  case "com.amazonaws.lexmodelsv2#InternalServerException":
7290
4309
  throw await de_InternalServerExceptionRes(parsedOutput, context);
7291
- case "PreconditionFailedException":
7292
- case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
7293
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
4310
+ case "ResourceNotFoundException":
4311
+ case "com.amazonaws.lexmodelsv2#ResourceNotFoundException":
4312
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
7294
4313
  case "ServiceQuotaExceededException":
7295
4314
  case "com.amazonaws.lexmodelsv2#ServiceQuotaExceededException":
7296
4315
  throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
@@ -7300,6 +4319,12 @@ var de_UpdateTestSetCommandError = /* @__PURE__ */ __name(async (output, context
7300
4319
  case "ValidationException":
7301
4320
  case "com.amazonaws.lexmodelsv2#ValidationException":
7302
4321
  throw await de_ValidationExceptionRes(parsedOutput, context);
4322
+ case "ConflictException":
4323
+ case "com.amazonaws.lexmodelsv2#ConflictException":
4324
+ throw await de_ConflictExceptionRes(parsedOutput, context);
4325
+ case "PreconditionFailedException":
4326
+ case "com.amazonaws.lexmodelsv2#PreconditionFailedException":
4327
+ throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
7303
4328
  default:
7304
4329
  const parsedBody = parsedOutput.body;
7305
4330
  return throwDefaultError({
@@ -7308,7 +4333,7 @@ var de_UpdateTestSetCommandError = /* @__PURE__ */ __name(async (output, context
7308
4333
  errorCode
7309
4334
  });
7310
4335
  }
7311
- }, "de_UpdateTestSetCommandError");
4336
+ }, "de_CommandError");
7312
4337
  var throwDefaultError = (0, import_smithy_client.withBaseException)(LexModelsV2ServiceException);
7313
4338
  var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
7314
4339
  const contents = (0, import_smithy_client.map)({});