@@ -3641,6 +3641,31 @@ public CompletableFuture<RunSourceResponse> runSourceAsync(@Nonnull String sourc
36413641 return this .runSourceAsync (sourceID , null , null );
36423642 }
36433643
3644+ /**
3645+ * Runs a task. You can check the status of task runs with the observability endpoints.
3646+ *
3647+ * @param taskID Unique identifier of a task. (required)
3648+ * @param runTaskPayload (optional)
3649+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
3650+ * the transporter requestOptions.
3651+ * @throws AlgoliaRuntimeException If it fails to process the API call
3652+ */
3653+ public RunResponse runTask (@ Nonnull String taskID , RunTaskPayload runTaskPayload , @ Nullable RequestOptions requestOptions )
3654+ throws AlgoliaRuntimeException {
3655+ return LaunderThrowable .await (runTaskAsync (taskID , runTaskPayload , requestOptions ));
3656+ }
3657+
3658+ /**
3659+ * Runs a task. You can check the status of task runs with the observability endpoints.
3660+ *
3661+ * @param taskID Unique identifier of a task. (required)
3662+ * @param runTaskPayload (optional)
3663+ * @throws AlgoliaRuntimeException If it fails to process the API call
3664+ */
3665+ public RunResponse runTask (@ Nonnull String taskID , RunTaskPayload runTaskPayload ) throws AlgoliaRuntimeException {
3666+ return this .runTask (taskID , runTaskPayload , null );
3667+ }
3668+
36443669 /**
36453670 * Runs a task. You can check the status of task runs with the observability endpoints.
36463671 *
@@ -3650,7 +3675,7 @@ public CompletableFuture<RunSourceResponse> runSourceAsync(@Nonnull String sourc
36503675 * @throws AlgoliaRuntimeException If it fails to process the API call
36513676 */
36523677 public RunResponse runTask (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
3653- return LaunderThrowable . await ( runTaskAsync ( taskID , requestOptions ) );
3678+ return this . runTask ( taskID , null , requestOptions );
36543679 }
36553680
36563681 /**
@@ -3660,27 +3685,56 @@ public RunResponse runTask(@Nonnull String taskID, @Nullable RequestOptions requ
36603685 * @throws AlgoliaRuntimeException If it fails to process the API call
36613686 */
36623687 public RunResponse runTask (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3663- return this .runTask (taskID , null );
3688+ return this .runTask (taskID , null , null );
36643689 }
36653690
36663691 /**
36673692 * (asynchronously) Runs a task. You can check the status of task runs with the observability
36683693 * endpoints.
36693694 *
36703695 * @param taskID Unique identifier of a task. (required)
3696+ * @param runTaskPayload (optional)
36713697 * @param requestOptions The requestOptions to send along with the query, they will be merged with
36723698 * the transporter requestOptions.
36733699 * @throws AlgoliaRuntimeException If it fails to process the API call
36743700 */
3675- public CompletableFuture <RunResponse > runTaskAsync (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions )
3676- throws AlgoliaRuntimeException {
3701+ public CompletableFuture <RunResponse > runTaskAsync (
3702+ @ Nonnull String taskID ,
3703+ RunTaskPayload runTaskPayload ,
3704+ @ Nullable RequestOptions requestOptions
3705+ ) throws AlgoliaRuntimeException {
36773706 Parameters .requireNonNull (taskID , "Parameter `taskID` is required when calling `runTask`." );
36783707
3679- HttpRequest request = HttpRequest .builder ().setPath ("/2/tasks/{taskID}/run" , taskID ).setMethod ("POST" ).build ();
3680-
3708+ HttpRequest request = HttpRequest .builder ().setPath ("/2/tasks/{taskID}/run" , taskID ).setMethod ("POST" ).setBody (runTaskPayload ).build ();
36813709 return executeAsync (request , requestOptions , new TypeReference <RunResponse >() {});
36823710 }
36833711
3712+ /**
3713+ * (asynchronously) Runs a task. You can check the status of task runs with the observability
3714+ * endpoints.
3715+ *
3716+ * @param taskID Unique identifier of a task. (required)
3717+ * @param runTaskPayload (optional)
3718+ * @throws AlgoliaRuntimeException If it fails to process the API call
3719+ */
3720+ public CompletableFuture <RunResponse > runTaskAsync (@ Nonnull String taskID , RunTaskPayload runTaskPayload ) throws AlgoliaRuntimeException {
3721+ return this .runTaskAsync (taskID , runTaskPayload , null );
3722+ }
3723+
3724+ /**
3725+ * (asynchronously) Runs a task. You can check the status of task runs with the observability
3726+ * endpoints.
3727+ *
3728+ * @param taskID Unique identifier of a task. (required)
3729+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
3730+ * the transporter requestOptions.
3731+ * @throws AlgoliaRuntimeException If it fails to process the API call
3732+ */
3733+ public CompletableFuture <RunResponse > runTaskAsync (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions )
3734+ throws AlgoliaRuntimeException {
3735+ return this .runTaskAsync (taskID , null , requestOptions );
3736+ }
3737+
36843738 /**
36853739 * (asynchronously) Runs a task. You can check the status of task runs with the observability
36863740 * endpoints.
@@ -3689,54 +3743,84 @@ public CompletableFuture<RunResponse> runTaskAsync(@Nonnull String taskID, @Null
36893743 * @throws AlgoliaRuntimeException If it fails to process the API call
36903744 */
36913745 public CompletableFuture <RunResponse > runTaskAsync (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3692- return this .runTaskAsync (taskID , null );
3746+ return this .runTaskAsync (taskID , null , null );
36933747 }
36943748
36953749 /**
36963750 * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of
36973751 * task runs with the observability endpoints.
36983752 *
36993753 * @param taskID Unique identifier of a task. (required)
3754+ * @param runTaskPayload (optional)
37003755 * @param requestOptions The requestOptions to send along with the query, they will be merged with
37013756 * the transporter requestOptions.
37023757 * @throws AlgoliaRuntimeException If it fails to process the API call
37033758 * @deprecated
37043759 */
37053760 @ Deprecated
3706- public RunResponse runTaskV1 (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
3707- return LaunderThrowable .await (runTaskV1Async (taskID , requestOptions ));
3761+ public RunResponse runTaskV1 (@ Nonnull String taskID , RunTaskPayload runTaskPayload , @ Nullable RequestOptions requestOptions )
3762+ throws AlgoliaRuntimeException {
3763+ return LaunderThrowable .await (runTaskV1Async (taskID , runTaskPayload , requestOptions ));
37083764 }
37093765
37103766 /**
37113767 * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of
37123768 * task runs with the observability endpoints.
37133769 *
37143770 * @param taskID Unique identifier of a task. (required)
3771+ * @param runTaskPayload (optional)
37153772 * @throws AlgoliaRuntimeException If it fails to process the API call
37163773 * @deprecated
37173774 */
37183775 @ Deprecated
3776+ public RunResponse runTaskV1 (@ Nonnull String taskID , RunTaskPayload runTaskPayload ) throws AlgoliaRuntimeException {
3777+ return this .runTaskV1 (taskID , runTaskPayload , null );
3778+ }
3779+
3780+ /**
3781+ * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of
3782+ * task runs with the observability endpoints.
3783+ *
3784+ * @param taskID Unique identifier of a task. (required)
3785+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
3786+ * the transporter requestOptions.
3787+ * @throws AlgoliaRuntimeException If it fails to process the API call
3788+ */
3789+ public RunResponse runTaskV1 (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions ) throws AlgoliaRuntimeException {
3790+ return this .runTaskV1 (taskID , null , requestOptions );
3791+ }
3792+
3793+ /**
3794+ * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of
3795+ * task runs with the observability endpoints.
3796+ *
3797+ * @param taskID Unique identifier of a task. (required)
3798+ * @throws AlgoliaRuntimeException If it fails to process the API call
3799+ */
37193800 public RunResponse runTaskV1 (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3720- return this .runTaskV1 (taskID , null );
3801+ return this .runTaskV1 (taskID , null , null );
37213802 }
37223803
37233804 /**
37243805 * (asynchronously) Runs a task using the v1 endpoint, please use `runTask` instead. You can check
37253806 * the status of task runs with the observability endpoints.
37263807 *
37273808 * @param taskID Unique identifier of a task. (required)
3809+ * @param runTaskPayload (optional)
37283810 * @param requestOptions The requestOptions to send along with the query, they will be merged with
37293811 * the transporter requestOptions.
37303812 * @throws AlgoliaRuntimeException If it fails to process the API call
37313813 * @deprecated
37323814 */
37333815 @ Deprecated
3734- public CompletableFuture <RunResponse > runTaskV1Async (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions )
3735- throws AlgoliaRuntimeException {
3816+ public CompletableFuture <RunResponse > runTaskV1Async (
3817+ @ Nonnull String taskID ,
3818+ RunTaskPayload runTaskPayload ,
3819+ @ Nullable RequestOptions requestOptions
3820+ ) throws AlgoliaRuntimeException {
37363821 Parameters .requireNonNull (taskID , "Parameter `taskID` is required when calling `runTaskV1`." );
37373822
3738- HttpRequest request = HttpRequest .builder ().setPath ("/1/tasks/{taskID}/run" , taskID ).setMethod ("POST" ).build ();
3739-
3823+ HttpRequest request = HttpRequest .builder ().setPath ("/1/tasks/{taskID}/run" , taskID ).setMethod ("POST" ).setBody (runTaskPayload ).build ();
37403824 return executeAsync (request , requestOptions , new TypeReference <RunResponse >() {});
37413825 }
37423826
@@ -3745,12 +3829,39 @@ public CompletableFuture<RunResponse> runTaskV1Async(@Nonnull String taskID, @Nu
37453829 * the status of task runs with the observability endpoints.
37463830 *
37473831 * @param taskID Unique identifier of a task. (required)
3832+ * @param runTaskPayload (optional)
37483833 * @throws AlgoliaRuntimeException If it fails to process the API call
37493834 * @deprecated
37503835 */
37513836 @ Deprecated
3837+ public CompletableFuture <RunResponse > runTaskV1Async (@ Nonnull String taskID , RunTaskPayload runTaskPayload )
3838+ throws AlgoliaRuntimeException {
3839+ return this .runTaskV1Async (taskID , runTaskPayload , null );
3840+ }
3841+
3842+ /**
3843+ * (asynchronously) Runs a task using the v1 endpoint, please use `runTask` instead. You can check
3844+ * the status of task runs with the observability endpoints.
3845+ *
3846+ * @param taskID Unique identifier of a task. (required)
3847+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
3848+ * the transporter requestOptions.
3849+ * @throws AlgoliaRuntimeException If it fails to process the API call
3850+ */
3851+ public CompletableFuture <RunResponse > runTaskV1Async (@ Nonnull String taskID , @ Nullable RequestOptions requestOptions )
3852+ throws AlgoliaRuntimeException {
3853+ return this .runTaskV1Async (taskID , null , requestOptions );
3854+ }
3855+
3856+ /**
3857+ * (asynchronously) Runs a task using the v1 endpoint, please use `runTask` instead. You can check
3858+ * the status of task runs with the observability endpoints.
3859+ *
3860+ * @param taskID Unique identifier of a task. (required)
3861+ * @throws AlgoliaRuntimeException If it fails to process the API call
3862+ */
37523863 public CompletableFuture <RunResponse > runTaskV1Async (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3753- return this .runTaskV1Async (taskID , null );
3864+ return this .runTaskV1Async (taskID , null , null );
37543865 }
37553866
37563867 /**
0 commit comments