Skip to content

Commit

Permalink
fix(specs): getObject return object (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3446

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
algolia-bot and millotp committed Jul 30, 2024
1 parent 34f288d commit 67e1cb7
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions algoliasearch/src/main/java/com/algolia/api/SearchClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2383,7 +2383,7 @@ public CompletableFuture<GetLogsResponse> getLogsAsync() throws AlgoliaRuntimeEx
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public Map<String, String> getObject(
public Object getObject(
@Nonnull String indexName,
@Nonnull String objectID,
List<String> attributesToRetrieve,
Expand All @@ -2404,7 +2404,7 @@ public Map<String, String> getObject(
* won't be retrieved unless the request is authenticated with the admin API key. (optional)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public Map<String, String> getObject(@Nonnull String indexName, @Nonnull String objectID, List<String> attributesToRetrieve)
public Object getObject(@Nonnull String indexName, @Nonnull String objectID, List<String> attributesToRetrieve)
throws AlgoliaRuntimeException {
return this.getObject(indexName, objectID, attributesToRetrieve, null);
}
Expand All @@ -2419,7 +2419,7 @@ public Map<String, String> getObject(@Nonnull String indexName, @Nonnull String
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public Map<String, String> getObject(@Nonnull String indexName, @Nonnull String objectID, RequestOptions requestOptions)
public Object getObject(@Nonnull String indexName, @Nonnull String objectID, RequestOptions requestOptions)
throws AlgoliaRuntimeException {
return this.getObject(indexName, objectID, null, requestOptions);
}
Expand All @@ -2432,7 +2432,7 @@ public Map<String, String> getObject(@Nonnull String indexName, @Nonnull String
* @param objectID Unique record identifier. (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public Map<String, String> getObject(@Nonnull String indexName, @Nonnull String objectID) throws AlgoliaRuntimeException {
public Object getObject(@Nonnull String indexName, @Nonnull String objectID) throws AlgoliaRuntimeException {
return this.getObject(indexName, objectID, null, null);
}

Expand All @@ -2450,7 +2450,7 @@ public Map<String, String> getObject(@Nonnull String indexName, @Nonnull String
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<Map<String, String>> getObjectAsync(
public CompletableFuture<Object> getObjectAsync(
@Nonnull String indexName,
@Nonnull String objectID,
List<String> attributesToRetrieve,
Expand All @@ -2465,7 +2465,7 @@ public CompletableFuture<Map<String, String>> getObjectAsync(
.setMethod("GET")
.addQueryParameter("attributesToRetrieve", attributesToRetrieve)
.build();
return executeAsync(request, requestOptions, new TypeReference<Map<String, String>>() {});
return executeAsync(request, requestOptions, new TypeReference<Object>() {});
}

/**
Expand All @@ -2480,11 +2480,8 @@ public CompletableFuture<Map<String, String>> getObjectAsync(
* won't be retrieved unless the request is authenticated with the admin API key. (optional)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<Map<String, String>> getObjectAsync(
@Nonnull String indexName,
@Nonnull String objectID,
List<String> attributesToRetrieve
) throws AlgoliaRuntimeException {
public CompletableFuture<Object> getObjectAsync(@Nonnull String indexName, @Nonnull String objectID, List<String> attributesToRetrieve)
throws AlgoliaRuntimeException {
return this.getObjectAsync(indexName, objectID, attributesToRetrieve, null);
}

Expand All @@ -2498,11 +2495,8 @@ public CompletableFuture<Map<String, String>> getObjectAsync(
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<Map<String, String>> getObjectAsync(
@Nonnull String indexName,
@Nonnull String objectID,
RequestOptions requestOptions
) throws AlgoliaRuntimeException {
public CompletableFuture<Object> getObjectAsync(@Nonnull String indexName, @Nonnull String objectID, RequestOptions requestOptions)
throws AlgoliaRuntimeException {
return this.getObjectAsync(indexName, objectID, null, requestOptions);
}

Expand All @@ -2514,8 +2508,7 @@ public CompletableFuture<Map<String, String>> getObjectAsync(
* @param objectID Unique record identifier. (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<Map<String, String>> getObjectAsync(@Nonnull String indexName, @Nonnull String objectID)
throws AlgoliaRuntimeException {
public CompletableFuture<Object> getObjectAsync(@Nonnull String indexName, @Nonnull String objectID) throws AlgoliaRuntimeException {
return this.getObjectAsync(indexName, objectID, null, null);
}

Expand Down

0 comments on commit 67e1cb7

Please sign in to comment.