@@ -2745,6 +2745,33 @@ public CompletableFuture<Rule> getRuleAsync(@Nonnull String indexName, @Nonnull
2745
2745
return this .getRuleAsync (indexName , objectID , null );
2746
2746
}
2747
2747
2748
+ /**
2749
+ * Retrieves an object with non-null index settings.
2750
+ *
2751
+ * @param indexName Name of the index on which to perform the operation. (required)
2752
+ * @param getVersion When set to 2, the endpoint will not include `synonyms` in the response. This
2753
+ * parameter is here for backward compatibility. (optional, default to 1)
2754
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
2755
+ * the transporter requestOptions.
2756
+ * @throws AlgoliaRuntimeException If it fails to process the API call
2757
+ */
2758
+ public SettingsResponse getSettings (@ Nonnull String indexName , Integer getVersion , @ Nullable RequestOptions requestOptions )
2759
+ throws AlgoliaRuntimeException {
2760
+ return LaunderThrowable .await (getSettingsAsync (indexName , getVersion , requestOptions ));
2761
+ }
2762
+
2763
+ /**
2764
+ * Retrieves an object with non-null index settings.
2765
+ *
2766
+ * @param indexName Name of the index on which to perform the operation. (required)
2767
+ * @param getVersion When set to 2, the endpoint will not include `synonyms` in the response. This
2768
+ * parameter is here for backward compatibility. (optional, default to 1)
2769
+ * @throws AlgoliaRuntimeException If it fails to process the API call
2770
+ */
2771
+ public SettingsResponse getSettings (@ Nonnull String indexName , Integer getVersion ) throws AlgoliaRuntimeException {
2772
+ return this .getSettings (indexName , getVersion , null );
2773
+ }
2774
+
2748
2775
/**
2749
2776
* Retrieves an object with non-null index settings.
2750
2777
*
@@ -2754,7 +2781,7 @@ public CompletableFuture<Rule> getRuleAsync(@Nonnull String indexName, @Nonnull
2754
2781
* @throws AlgoliaRuntimeException If it fails to process the API call
2755
2782
*/
2756
2783
public SettingsResponse getSettings (@ Nonnull String indexName , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
2757
- return LaunderThrowable . await ( getSettingsAsync ( indexName , requestOptions ) );
2784
+ return this . getSettings ( indexName , null , requestOptions );
2758
2785
}
2759
2786
2760
2787
/**
@@ -2764,33 +2791,68 @@ public SettingsResponse getSettings(@Nonnull String indexName, @Nullable Request
2764
2791
* @throws AlgoliaRuntimeException If it fails to process the API call
2765
2792
*/
2766
2793
public SettingsResponse getSettings (@ Nonnull String indexName ) throws AlgoliaRuntimeException {
2767
- return this .getSettings (indexName , null );
2794
+ return this .getSettings (indexName , null , null );
2768
2795
}
2769
2796
2770
2797
/**
2771
2798
* (asynchronously) Retrieves an object with non-null index settings.
2772
2799
*
2773
2800
* @param indexName Name of the index on which to perform the operation. (required)
2801
+ * @param getVersion When set to 2, the endpoint will not include `synonyms` in the response. This
2802
+ * parameter is here for backward compatibility. (optional, default to 1)
2774
2803
* @param requestOptions The requestOptions to send along with the query, they will be merged with
2775
2804
* the transporter requestOptions.
2776
2805
* @throws AlgoliaRuntimeException If it fails to process the API call
2777
2806
*/
2778
- public CompletableFuture <SettingsResponse > getSettingsAsync (@ Nonnull String indexName , @ Nullable RequestOptions requestOptions )
2779
- throws AlgoliaRuntimeException {
2807
+ public CompletableFuture <SettingsResponse > getSettingsAsync (
2808
+ @ Nonnull String indexName ,
2809
+ Integer getVersion ,
2810
+ @ Nullable RequestOptions requestOptions
2811
+ ) throws AlgoliaRuntimeException {
2780
2812
Parameters .requireNonNull (indexName , "Parameter `indexName` is required when calling `getSettings`." );
2781
2813
2782
- HttpRequest request = HttpRequest .builder ().setPath ("/1/indexes/{indexName}/settings" , indexName ).setMethod ("GET" ).build ();
2814
+ HttpRequest request = HttpRequest .builder ()
2815
+ .setPath ("/1/indexes/{indexName}/settings" , indexName )
2816
+ .setMethod ("GET" )
2817
+ .addQueryParameter ("getVersion" , getVersion )
2818
+ .build ();
2783
2819
return executeAsync (request , requestOptions , new TypeReference <SettingsResponse >() {});
2784
2820
}
2785
2821
2822
+ /**
2823
+ * (asynchronously) Retrieves an object with non-null index settings.
2824
+ *
2825
+ * @param indexName Name of the index on which to perform the operation. (required)
2826
+ * @param getVersion When set to 2, the endpoint will not include `synonyms` in the response. This
2827
+ * parameter is here for backward compatibility. (optional, default to 1)
2828
+ * @throws AlgoliaRuntimeException If it fails to process the API call
2829
+ */
2830
+ public CompletableFuture <SettingsResponse > getSettingsAsync (@ Nonnull String indexName , Integer getVersion )
2831
+ throws AlgoliaRuntimeException {
2832
+ return this .getSettingsAsync (indexName , getVersion , null );
2833
+ }
2834
+
2835
+ /**
2836
+ * (asynchronously) Retrieves an object with non-null index settings.
2837
+ *
2838
+ * @param indexName Name of the index on which to perform the operation. (required)
2839
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
2840
+ * the transporter requestOptions.
2841
+ * @throws AlgoliaRuntimeException If it fails to process the API call
2842
+ */
2843
+ public CompletableFuture <SettingsResponse > getSettingsAsync (@ Nonnull String indexName , @ Nullable RequestOptions requestOptions )
2844
+ throws AlgoliaRuntimeException {
2845
+ return this .getSettingsAsync (indexName , null , requestOptions );
2846
+ }
2847
+
2786
2848
/**
2787
2849
* (asynchronously) Retrieves an object with non-null index settings.
2788
2850
*
2789
2851
* @param indexName Name of the index on which to perform the operation. (required)
2790
2852
* @throws AlgoliaRuntimeException If it fails to process the API call
2791
2853
*/
2792
2854
public CompletableFuture <SettingsResponse > getSettingsAsync (@ Nonnull String indexName ) throws AlgoliaRuntimeException {
2793
- return this .getSettingsAsync (indexName , null );
2855
+ return this .getSettingsAsync (indexName , null , null );
2794
2856
}
2795
2857
2796
2858
/**
0 commit comments