@@ -3641,6 +3641,31 @@ public CompletableFuture<RunSourceResponse> runSourceAsync(@Nonnull String sourc
3641
3641
return this .runSourceAsync (sourceID , null , null );
3642
3642
}
3643
3643
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
+
3644
3669
/**
3645
3670
* Runs a task. You can check the status of task runs with the observability endpoints.
3646
3671
*
@@ -3650,7 +3675,7 @@ public CompletableFuture<RunSourceResponse> runSourceAsync(@Nonnull String sourc
3650
3675
* @throws AlgoliaRuntimeException If it fails to process the API call
3651
3676
*/
3652
3677
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 );
3654
3679
}
3655
3680
3656
3681
/**
@@ -3660,27 +3685,56 @@ public RunResponse runTask(@Nonnull String taskID, @Nullable RequestOptions requ
3660
3685
* @throws AlgoliaRuntimeException If it fails to process the API call
3661
3686
*/
3662
3687
public RunResponse runTask (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3663
- return this .runTask (taskID , null );
3688
+ return this .runTask (taskID , null , null );
3664
3689
}
3665
3690
3666
3691
/**
3667
3692
* (asynchronously) Runs a task. You can check the status of task runs with the observability
3668
3693
* endpoints.
3669
3694
*
3670
3695
* @param taskID Unique identifier of a task. (required)
3696
+ * @param runTaskPayload (optional)
3671
3697
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3672
3698
* the transporter requestOptions.
3673
3699
* @throws AlgoliaRuntimeException If it fails to process the API call
3674
3700
*/
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 {
3677
3706
Parameters .requireNonNull (taskID , "Parameter `taskID` is required when calling `runTask`." );
3678
3707
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 ();
3681
3709
return executeAsync (request , requestOptions , new TypeReference <RunResponse >() {});
3682
3710
}
3683
3711
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
+
3684
3738
/**
3685
3739
* (asynchronously) Runs a task. You can check the status of task runs with the observability
3686
3740
* endpoints.
@@ -3689,54 +3743,84 @@ public CompletableFuture<RunResponse> runTaskAsync(@Nonnull String taskID, @Null
3689
3743
* @throws AlgoliaRuntimeException If it fails to process the API call
3690
3744
*/
3691
3745
public CompletableFuture <RunResponse > runTaskAsync (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3692
- return this .runTaskAsync (taskID , null );
3746
+ return this .runTaskAsync (taskID , null , null );
3693
3747
}
3694
3748
3695
3749
/**
3696
3750
* Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of
3697
3751
* task runs with the observability endpoints.
3698
3752
*
3699
3753
* @param taskID Unique identifier of a task. (required)
3754
+ * @param runTaskPayload (optional)
3700
3755
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3701
3756
* the transporter requestOptions.
3702
3757
* @throws AlgoliaRuntimeException If it fails to process the API call
3703
3758
* @deprecated
3704
3759
*/
3705
3760
@ 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 ));
3708
3764
}
3709
3765
3710
3766
/**
3711
3767
* Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of
3712
3768
* task runs with the observability endpoints.
3713
3769
*
3714
3770
* @param taskID Unique identifier of a task. (required)
3771
+ * @param runTaskPayload (optional)
3715
3772
* @throws AlgoliaRuntimeException If it fails to process the API call
3716
3773
* @deprecated
3717
3774
*/
3718
3775
@ 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
+ */
3719
3800
public RunResponse runTaskV1 (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3720
- return this .runTaskV1 (taskID , null );
3801
+ return this .runTaskV1 (taskID , null , null );
3721
3802
}
3722
3803
3723
3804
/**
3724
3805
* (asynchronously) Runs a task using the v1 endpoint, please use `runTask` instead. You can check
3725
3806
* the status of task runs with the observability endpoints.
3726
3807
*
3727
3808
* @param taskID Unique identifier of a task. (required)
3809
+ * @param runTaskPayload (optional)
3728
3810
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3729
3811
* the transporter requestOptions.
3730
3812
* @throws AlgoliaRuntimeException If it fails to process the API call
3731
3813
* @deprecated
3732
3814
*/
3733
3815
@ 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 {
3736
3821
Parameters .requireNonNull (taskID , "Parameter `taskID` is required when calling `runTaskV1`." );
3737
3822
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 ();
3740
3824
return executeAsync (request , requestOptions , new TypeReference <RunResponse >() {});
3741
3825
}
3742
3826
@@ -3745,12 +3829,39 @@ public CompletableFuture<RunResponse> runTaskV1Async(@Nonnull String taskID, @Nu
3745
3829
* the status of task runs with the observability endpoints.
3746
3830
*
3747
3831
* @param taskID Unique identifier of a task. (required)
3832
+ * @param runTaskPayload (optional)
3748
3833
* @throws AlgoliaRuntimeException If it fails to process the API call
3749
3834
* @deprecated
3750
3835
*/
3751
3836
@ 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
+ */
3752
3863
public CompletableFuture <RunResponse > runTaskV1Async (@ Nonnull String taskID ) throws AlgoliaRuntimeException {
3753
- return this .runTaskV1Async (taskID , null );
3864
+ return this .runTaskV1Async (taskID , null , null );
3754
3865
}
3755
3866
3756
3867
/**
0 commit comments