Skip to content

Commit 8205398

Browse files
feat(specs): add watch to pushTask ingestion (generated)
algolia/api-clients-automation#4224 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 9d58886 commit 8205398

File tree

1 file changed

+80
-3
lines changed

1 file changed

+80
-3
lines changed

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

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,6 +2996,44 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
29962996
return this.listTransformationsAsync(null, null, null, null, null);
29972997
}
29982998

2999+
/**
3000+
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
3001+
* with the observability endpoints.
3002+
*
3003+
* @param taskID Unique identifier of a task. (required)
3004+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3005+
* Connectors pipeline. (required)
3006+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3007+
* the ingestion to be finished before responding. (optional)
3008+
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3009+
* the transporter requestOptions.
3010+
* @throws AlgoliaRuntimeException If it fails to process the API call
3011+
*/
3012+
public RunResponse pushTask(
3013+
@Nonnull String taskID,
3014+
@Nonnull PushTaskPayload pushTaskPayload,
3015+
Boolean watch,
3016+
RequestOptions requestOptions
3017+
) throws AlgoliaRuntimeException {
3018+
return LaunderThrowable.await(pushTaskAsync(taskID, pushTaskPayload, watch, requestOptions));
3019+
}
3020+
3021+
/**
3022+
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
3023+
* with the observability endpoints.
3024+
*
3025+
* @param taskID Unique identifier of a task. (required)
3026+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3027+
* Connectors pipeline. (required)
3028+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3029+
* the ingestion to be finished before responding. (optional)
3030+
* @throws AlgoliaRuntimeException If it fails to process the API call
3031+
*/
3032+
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
3033+
throws AlgoliaRuntimeException {
3034+
return this.pushTask(taskID, pushTaskPayload, watch, null);
3035+
}
3036+
29993037
/**
30003038
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
30013039
* with the observability endpoints.
@@ -3009,7 +3047,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
30093047
*/
30103048
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, RequestOptions requestOptions)
30113049
throws AlgoliaRuntimeException {
3012-
return LaunderThrowable.await(pushTaskAsync(taskID, pushTaskPayload, requestOptions));
3050+
return this.pushTask(taskID, pushTaskPayload, null, requestOptions);
30133051
}
30143052

30153053
/**
@@ -3022,7 +3060,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30223060
* @throws AlgoliaRuntimeException If it fails to process the API call
30233061
*/
30243062
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload) throws AlgoliaRuntimeException {
3025-
return this.pushTask(taskID, pushTaskPayload, null);
3063+
return this.pushTask(taskID, pushTaskPayload, null, null);
30263064
}
30273065

30283066
/**
@@ -3032,13 +3070,16 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30323070
* @param taskID Unique identifier of a task. (required)
30333071
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
30343072
* Connectors pipeline. (required)
3073+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3074+
* the ingestion to be finished before responding. (optional)
30353075
* @param requestOptions The requestOptions to send along with the query, they will be merged with
30363076
* the transporter requestOptions.
30373077
* @throws AlgoliaRuntimeException If it fails to process the API call
30383078
*/
30393079
public CompletableFuture<RunResponse> pushTaskAsync(
30403080
@Nonnull String taskID,
30413081
@Nonnull PushTaskPayload pushTaskPayload,
3082+
Boolean watch,
30423083
RequestOptions requestOptions
30433084
) throws AlgoliaRuntimeException {
30443085
Parameters.requireNonNull(taskID, "Parameter `taskID` is required when calling `pushTask`.");
@@ -3049,10 +3090,46 @@ public CompletableFuture<RunResponse> pushTaskAsync(
30493090
.setPath("/2/tasks/{taskID}/push", taskID)
30503091
.setMethod("POST")
30513092
.setBody(pushTaskPayload)
3093+
.addQueryParameter("watch", watch)
30523094
.build();
30533095
return executeAsync(request, requestOptions, new TypeReference<RunResponse>() {});
30543096
}
30553097

3098+
/**
3099+
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
3100+
* of task pushes with the observability endpoints.
3101+
*
3102+
* @param taskID Unique identifier of a task. (required)
3103+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3104+
* Connectors pipeline. (required)
3105+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3106+
* the ingestion to be finished before responding. (optional)
3107+
* @throws AlgoliaRuntimeException If it fails to process the API call
3108+
*/
3109+
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
3110+
throws AlgoliaRuntimeException {
3111+
return this.pushTaskAsync(taskID, pushTaskPayload, watch, null);
3112+
}
3113+
3114+
/**
3115+
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
3116+
* of task pushes with the observability endpoints.
3117+
*
3118+
* @param taskID Unique identifier of a task. (required)
3119+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3120+
* Connectors pipeline. (required)
3121+
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3122+
* the transporter requestOptions.
3123+
* @throws AlgoliaRuntimeException If it fails to process the API call
3124+
*/
3125+
public CompletableFuture<RunResponse> pushTaskAsync(
3126+
@Nonnull String taskID,
3127+
@Nonnull PushTaskPayload pushTaskPayload,
3128+
RequestOptions requestOptions
3129+
) throws AlgoliaRuntimeException {
3130+
return this.pushTaskAsync(taskID, pushTaskPayload, null, requestOptions);
3131+
}
3132+
30563133
/**
30573134
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
30583135
* of task pushes with the observability endpoints.
@@ -3064,7 +3141,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
30643141
*/
30653142
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload)
30663143
throws AlgoliaRuntimeException {
3067-
return this.pushTaskAsync(taskID, pushTaskPayload, null);
3144+
return this.pushTaskAsync(taskID, pushTaskPayload, null, null);
30683145
}
30693146

30703147
/**

0 commit comments

Comments
 (0)