@@ -2996,6 +2996,44 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
2996
2996
return this .listTransformationsAsync (null , null , null , null , null );
2997
2997
}
2998
2998
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
+
2999
3037
/**
3000
3038
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
3001
3039
* with the observability endpoints.
@@ -3009,7 +3047,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
3009
3047
*/
3010
3048
public RunResponse pushTask (@ Nonnull String taskID , @ Nonnull PushTaskPayload pushTaskPayload , RequestOptions requestOptions )
3011
3049
throws AlgoliaRuntimeException {
3012
- return LaunderThrowable . await ( pushTaskAsync ( taskID , pushTaskPayload , requestOptions ) );
3050
+ return this . pushTask ( taskID , pushTaskPayload , null , requestOptions );
3013
3051
}
3014
3052
3015
3053
/**
@@ -3022,7 +3060,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
3022
3060
* @throws AlgoliaRuntimeException If it fails to process the API call
3023
3061
*/
3024
3062
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 );
3026
3064
}
3027
3065
3028
3066
/**
@@ -3032,13 +3070,16 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
3032
3070
* @param taskID Unique identifier of a task. (required)
3033
3071
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3034
3072
* 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)
3035
3075
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3036
3076
* the transporter requestOptions.
3037
3077
* @throws AlgoliaRuntimeException If it fails to process the API call
3038
3078
*/
3039
3079
public CompletableFuture <RunResponse > pushTaskAsync (
3040
3080
@ Nonnull String taskID ,
3041
3081
@ Nonnull PushTaskPayload pushTaskPayload ,
3082
+ Boolean watch ,
3042
3083
RequestOptions requestOptions
3043
3084
) throws AlgoliaRuntimeException {
3044
3085
Parameters .requireNonNull (taskID , "Parameter `taskID` is required when calling `pushTask`." );
@@ -3049,10 +3090,46 @@ public CompletableFuture<RunResponse> pushTaskAsync(
3049
3090
.setPath ("/2/tasks/{taskID}/push" , taskID )
3050
3091
.setMethod ("POST" )
3051
3092
.setBody (pushTaskPayload )
3093
+ .addQueryParameter ("watch" , watch )
3052
3094
.build ();
3053
3095
return executeAsync (request , requestOptions , new TypeReference <RunResponse >() {});
3054
3096
}
3055
3097
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
+
3056
3133
/**
3057
3134
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
3058
3135
* of task pushes with the observability endpoints.
@@ -3064,7 +3141,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
3064
3141
*/
3065
3142
public CompletableFuture <RunResponse > pushTaskAsync (@ Nonnull String taskID , @ Nonnull PushTaskPayload pushTaskPayload )
3066
3143
throws AlgoliaRuntimeException {
3067
- return this .pushTaskAsync (taskID , pushTaskPayload , null );
3144
+ return this .pushTaskAsync (taskID , pushTaskPayload , null , null );
3068
3145
}
3069
3146
3070
3147
/**
0 commit comments