Skip to content

Commit ae6484d

Browse files
algolia-botmillotp
andcommitted
fix(specs): add getVersion parameter to getSettings (generated)
algolia/api-clients-automation#5254 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 4c46d69 commit ae6484d

File tree

1 file changed

+68
-6
lines changed

1 file changed

+68
-6
lines changed

algoliasearch/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,6 +2745,33 @@ public CompletableFuture<Rule> getRuleAsync(@Nonnull String indexName, @Nonnull
27452745
return this.getRuleAsync(indexName, objectID, null);
27462746
}
27472747

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+
27482775
/**
27492776
* Retrieves an object with non-null index settings.
27502777
*
@@ -2754,7 +2781,7 @@ public CompletableFuture<Rule> getRuleAsync(@Nonnull String indexName, @Nonnull
27542781
* @throws AlgoliaRuntimeException If it fails to process the API call
27552782
*/
27562783
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);
27582785
}
27592786

27602787
/**
@@ -2764,33 +2791,68 @@ public SettingsResponse getSettings(@Nonnull String indexName, @Nullable Request
27642791
* @throws AlgoliaRuntimeException If it fails to process the API call
27652792
*/
27662793
public SettingsResponse getSettings(@Nonnull String indexName) throws AlgoliaRuntimeException {
2767-
return this.getSettings(indexName, null);
2794+
return this.getSettings(indexName, null, null);
27682795
}
27692796

27702797
/**
27712798
* (asynchronously) Retrieves an object with non-null index settings.
27722799
*
27732800
* @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)
27742803
* @param requestOptions The requestOptions to send along with the query, they will be merged with
27752804
* the transporter requestOptions.
27762805
* @throws AlgoliaRuntimeException If it fails to process the API call
27772806
*/
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 {
27802812
Parameters.requireNonNull(indexName, "Parameter `indexName` is required when calling `getSettings`.");
27812813

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();
27832819
return executeAsync(request, requestOptions, new TypeReference<SettingsResponse>() {});
27842820
}
27852821

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+
27862848
/**
27872849
* (asynchronously) Retrieves an object with non-null index settings.
27882850
*
27892851
* @param indexName Name of the index on which to perform the operation. (required)
27902852
* @throws AlgoliaRuntimeException If it fails to process the API call
27912853
*/
27922854
public CompletableFuture<SettingsResponse> getSettingsAsync(@Nonnull String indexName) throws AlgoliaRuntimeException {
2793-
return this.getSettingsAsync(indexName, null);
2855+
return this.getSettingsAsync(indexName, null, null);
27942856
}
27952857

27962858
/**

0 commit comments

Comments
 (0)