Skip to content

Commit d27e132

Browse files
fix(specs): enable watcher for push [skip-bc] (generated)
algolia/api-clients-automation#4229 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 909d12a commit d27e132

File tree

2 files changed

+44
-48
lines changed

2 files changed

+44
-48
lines changed

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

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,7 +3009,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
30093009
* the transporter requestOptions.
30103010
* @throws AlgoliaRuntimeException If it fails to process the API call
30113011
*/
3012-
public RunResponse pushTask(
3012+
public WatchResponse pushTask(
30133013
@Nonnull String taskID,
30143014
@Nonnull PushTaskPayload pushTaskPayload,
30153015
Boolean watch,
@@ -3029,7 +3029,7 @@ public RunResponse pushTask(
30293029
* the ingestion to be finished before responding. (optional)
30303030
* @throws AlgoliaRuntimeException If it fails to process the API call
30313031
*/
3032-
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
3032+
public WatchResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
30333033
throws AlgoliaRuntimeException {
30343034
return this.pushTask(taskID, pushTaskPayload, watch, null);
30353035
}
@@ -3045,7 +3045,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30453045
* the transporter requestOptions.
30463046
* @throws AlgoliaRuntimeException If it fails to process the API call
30473047
*/
3048-
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, RequestOptions requestOptions)
3048+
public WatchResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, RequestOptions requestOptions)
30493049
throws AlgoliaRuntimeException {
30503050
return this.pushTask(taskID, pushTaskPayload, null, requestOptions);
30513051
}
@@ -3059,7 +3059,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30593059
* Connectors pipeline. (required)
30603060
* @throws AlgoliaRuntimeException If it fails to process the API call
30613061
*/
3062-
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload) throws AlgoliaRuntimeException {
3062+
public WatchResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload) throws AlgoliaRuntimeException {
30633063
return this.pushTask(taskID, pushTaskPayload, null, null);
30643064
}
30653065

@@ -3076,7 +3076,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30763076
* the transporter requestOptions.
30773077
* @throws AlgoliaRuntimeException If it fails to process the API call
30783078
*/
3079-
public CompletableFuture<RunResponse> pushTaskAsync(
3079+
public CompletableFuture<WatchResponse> pushTaskAsync(
30803080
@Nonnull String taskID,
30813081
@Nonnull PushTaskPayload pushTaskPayload,
30823082
Boolean watch,
@@ -3092,7 +3092,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
30923092
.setBody(pushTaskPayload)
30933093
.addQueryParameter("watch", watch)
30943094
.build();
3095-
return executeAsync(request, requestOptions, new TypeReference<RunResponse>() {});
3095+
return executeAsync(request, requestOptions, new TypeReference<WatchResponse>() {});
30963096
}
30973097

30983098
/**
@@ -3106,7 +3106,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
31063106
* the ingestion to be finished before responding. (optional)
31073107
* @throws AlgoliaRuntimeException If it fails to process the API call
31083108
*/
3109-
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
3109+
public CompletableFuture<WatchResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
31103110
throws AlgoliaRuntimeException {
31113111
return this.pushTaskAsync(taskID, pushTaskPayload, watch, null);
31123112
}
@@ -3122,7 +3122,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Non
31223122
* the transporter requestOptions.
31233123
* @throws AlgoliaRuntimeException If it fails to process the API call
31243124
*/
3125-
public CompletableFuture<RunResponse> pushTaskAsync(
3125+
public CompletableFuture<WatchResponse> pushTaskAsync(
31263126
@Nonnull String taskID,
31273127
@Nonnull PushTaskPayload pushTaskPayload,
31283128
RequestOptions requestOptions
@@ -3139,7 +3139,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
31393139
* Connectors pipeline. (required)
31403140
* @throws AlgoliaRuntimeException If it fails to process the API call
31413141
*/
3142-
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload)
3142+
public CompletableFuture<WatchResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload)
31433143
throws AlgoliaRuntimeException {
31443144
return this.pushTaskAsync(taskID, pushTaskPayload, null, null);
31453145
}
@@ -3678,8 +3678,7 @@ public CompletableFuture<List<Transformation>> searchTransformationsAsync(@Nonnu
36783678
* the transporter requestOptions.
36793679
* @throws AlgoliaRuntimeException If it fails to process the API call
36803680
*/
3681-
public SourceWatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID, RequestOptions requestOptions)
3682-
throws AlgoliaRuntimeException {
3681+
public WatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID, RequestOptions requestOptions) throws AlgoliaRuntimeException {
36833682
return LaunderThrowable.await(triggerDockerSourceDiscoverAsync(sourceID, requestOptions));
36843683
}
36853684

@@ -3690,7 +3689,7 @@ public SourceWatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID,
36903689
* @param sourceID Unique identifier of a source. (required)
36913690
* @throws AlgoliaRuntimeException If it fails to process the API call
36923691
*/
3693-
public SourceWatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID) throws AlgoliaRuntimeException {
3692+
public WatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID) throws AlgoliaRuntimeException {
36943693
return this.triggerDockerSourceDiscover(sourceID, null);
36953694
}
36963695

@@ -3703,12 +3702,12 @@ public SourceWatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID)
37033702
* the transporter requestOptions.
37043703
* @throws AlgoliaRuntimeException If it fails to process the API call
37053704
*/
3706-
public CompletableFuture<SourceWatchResponse> triggerDockerSourceDiscoverAsync(@Nonnull String sourceID, RequestOptions requestOptions)
3705+
public CompletableFuture<WatchResponse> triggerDockerSourceDiscoverAsync(@Nonnull String sourceID, RequestOptions requestOptions)
37073706
throws AlgoliaRuntimeException {
37083707
Parameters.requireNonNull(sourceID, "Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.");
37093708

37103709
HttpRequest request = HttpRequest.builder().setPath("/1/sources/{sourceID}/discover", sourceID).setMethod("POST").build();
3711-
return executeAsync(request, requestOptions, new TypeReference<SourceWatchResponse>() {});
3710+
return executeAsync(request, requestOptions, new TypeReference<WatchResponse>() {});
37123711
}
37133712

37143713
/**
@@ -3718,7 +3717,7 @@ public CompletableFuture<SourceWatchResponse> triggerDockerSourceDiscoverAsync(@
37183717
* @param sourceID Unique identifier of a source. (required)
37193718
* @throws AlgoliaRuntimeException If it fails to process the API call
37203719
*/
3721-
public CompletableFuture<SourceWatchResponse> triggerDockerSourceDiscoverAsync(@Nonnull String sourceID) throws AlgoliaRuntimeException {
3720+
public CompletableFuture<WatchResponse> triggerDockerSourceDiscoverAsync(@Nonnull String sourceID) throws AlgoliaRuntimeException {
37223721
return this.triggerDockerSourceDiscoverAsync(sourceID, null);
37233722
}
37243723

@@ -4244,7 +4243,7 @@ public CompletableFuture<TransformationUpdateResponse> updateTransformationAsync
42444243
* the transporter requestOptions.
42454244
* @throws AlgoliaRuntimeException If it fails to process the API call
42464245
*/
4247-
public SourceWatchResponse validateSource(SourceCreate sourceCreate, RequestOptions requestOptions) throws AlgoliaRuntimeException {
4246+
public WatchResponse validateSource(SourceCreate sourceCreate, RequestOptions requestOptions) throws AlgoliaRuntimeException {
42484247
return LaunderThrowable.await(validateSourceAsync(sourceCreate, requestOptions));
42494248
}
42504249

@@ -4255,7 +4254,7 @@ public SourceWatchResponse validateSource(SourceCreate sourceCreate, RequestOpti
42554254
* @param sourceCreate (optional)
42564255
* @throws AlgoliaRuntimeException If it fails to process the API call
42574256
*/
4258-
public SourceWatchResponse validateSource(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
4257+
public WatchResponse validateSource(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
42594258
return this.validateSource(sourceCreate, null);
42604259
}
42614260

@@ -4267,7 +4266,7 @@ public SourceWatchResponse validateSource(SourceCreate sourceCreate) throws Algo
42674266
* the transporter requestOptions.
42684267
* @throws AlgoliaRuntimeException If it fails to process the API call
42694268
*/
4270-
public SourceWatchResponse validateSource(RequestOptions requestOptions) throws AlgoliaRuntimeException {
4269+
public WatchResponse validateSource(RequestOptions requestOptions) throws AlgoliaRuntimeException {
42714270
return this.validateSource(null, requestOptions);
42724271
}
42734272

@@ -4277,7 +4276,7 @@ public SourceWatchResponse validateSource(RequestOptions requestOptions) throws
42774276
*
42784277
* @throws AlgoliaRuntimeException If it fails to process the API call
42794278
*/
4280-
public SourceWatchResponse validateSource() throws AlgoliaRuntimeException {
4279+
public WatchResponse validateSource() throws AlgoliaRuntimeException {
42814280
return this.validateSource(null, null);
42824281
}
42834282

@@ -4290,10 +4289,10 @@ public SourceWatchResponse validateSource() throws AlgoliaRuntimeException {
42904289
* the transporter requestOptions.
42914290
* @throws AlgoliaRuntimeException If it fails to process the API call
42924291
*/
4293-
public CompletableFuture<SourceWatchResponse> validateSourceAsync(SourceCreate sourceCreate, RequestOptions requestOptions)
4292+
public CompletableFuture<WatchResponse> validateSourceAsync(SourceCreate sourceCreate, RequestOptions requestOptions)
42944293
throws AlgoliaRuntimeException {
42954294
HttpRequest request = HttpRequest.builder().setPath("/1/sources/validate").setMethod("POST").setBody(sourceCreate).build();
4296-
return executeAsync(request, requestOptions, new TypeReference<SourceWatchResponse>() {});
4295+
return executeAsync(request, requestOptions, new TypeReference<WatchResponse>() {});
42974296
}
42984297

42994298
/**
@@ -4303,7 +4302,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync(SourceCreate s
43034302
* @param sourceCreate (optional)
43044303
* @throws AlgoliaRuntimeException If it fails to process the API call
43054304
*/
4306-
public CompletableFuture<SourceWatchResponse> validateSourceAsync(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
4305+
public CompletableFuture<WatchResponse> validateSourceAsync(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
43074306
return this.validateSourceAsync(sourceCreate, null);
43084307
}
43094308

@@ -4315,7 +4314,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync(SourceCreate s
43154314
* the transporter requestOptions.
43164315
* @throws AlgoliaRuntimeException If it fails to process the API call
43174316
*/
4318-
public CompletableFuture<SourceWatchResponse> validateSourceAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException {
4317+
public CompletableFuture<WatchResponse> validateSourceAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException {
43194318
return this.validateSourceAsync(null, requestOptions);
43204319
}
43214320

@@ -4325,7 +4324,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync(RequestOptions
43254324
*
43264325
* @throws AlgoliaRuntimeException If it fails to process the API call
43274326
*/
4328-
public CompletableFuture<SourceWatchResponse> validateSourceAsync() throws AlgoliaRuntimeException {
4327+
public CompletableFuture<WatchResponse> validateSourceAsync() throws AlgoliaRuntimeException {
43294328
return this.validateSourceAsync(null, null);
43304329
}
43314330

@@ -4339,7 +4338,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync() throws Algol
43394338
* the transporter requestOptions.
43404339
* @throws AlgoliaRuntimeException If it fails to process the API call
43414340
*/
4342-
public SourceWatchResponse validateSourceBeforeUpdate(
4341+
public WatchResponse validateSourceBeforeUpdate(
43434342
@Nonnull String sourceID,
43444343
@Nonnull SourceUpdate sourceUpdate,
43454344
RequestOptions requestOptions
@@ -4355,7 +4354,7 @@ public SourceWatchResponse validateSourceBeforeUpdate(
43554354
* @param sourceUpdate (required)
43564355
* @throws AlgoliaRuntimeException If it fails to process the API call
43574356
*/
4358-
public SourceWatchResponse validateSourceBeforeUpdate(@Nonnull String sourceID, @Nonnull SourceUpdate sourceUpdate)
4357+
public WatchResponse validateSourceBeforeUpdate(@Nonnull String sourceID, @Nonnull SourceUpdate sourceUpdate)
43594358
throws AlgoliaRuntimeException {
43604359
return this.validateSourceBeforeUpdate(sourceID, sourceUpdate, null);
43614360
}
@@ -4370,7 +4369,7 @@ public SourceWatchResponse validateSourceBeforeUpdate(@Nonnull String sourceID,
43704369
* the transporter requestOptions.
43714370
* @throws AlgoliaRuntimeException If it fails to process the API call
43724371
*/
4373-
public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
4372+
public CompletableFuture<WatchResponse> validateSourceBeforeUpdateAsync(
43744373
@Nonnull String sourceID,
43754374
@Nonnull SourceUpdate sourceUpdate,
43764375
RequestOptions requestOptions
@@ -4384,7 +4383,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
43844383
.setMethod("POST")
43854384
.setBody(sourceUpdate)
43864385
.build();
4387-
return executeAsync(request, requestOptions, new TypeReference<SourceWatchResponse>() {});
4386+
return executeAsync(request, requestOptions, new TypeReference<WatchResponse>() {});
43884387
}
43894388

43904389
/**
@@ -4395,10 +4394,8 @@ public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
43954394
* @param sourceUpdate (required)
43964395
* @throws AlgoliaRuntimeException If it fails to process the API call
43974396
*/
4398-
public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
4399-
@Nonnull String sourceID,
4400-
@Nonnull SourceUpdate sourceUpdate
4401-
) throws AlgoliaRuntimeException {
4397+
public CompletableFuture<WatchResponse> validateSourceBeforeUpdateAsync(@Nonnull String sourceID, @Nonnull SourceUpdate sourceUpdate)
4398+
throws AlgoliaRuntimeException {
44024399
return this.validateSourceBeforeUpdateAsync(sourceID, sourceUpdate, null);
44034400
}
44044401
}

algoliasearch/src/main/java/com/algolia/model/ingestion/SourceWatchResponse.java renamed to algoliasearch/src/main/java/com/algolia/model/ingestion/WatchResponse.java

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import java.util.List;
1010
import java.util.Objects;
1111

12-
/** SourceWatchResponse */
13-
public class SourceWatchResponse {
12+
/** WatchResponse */
13+
public class WatchResponse {
1414

1515
@JsonProperty("runID")
1616
private String runID;
@@ -24,7 +24,7 @@ public class SourceWatchResponse {
2424
@JsonProperty("message")
2525
private String message;
2626

27-
public SourceWatchResponse setRunID(String runID) {
27+
public WatchResponse setRunID(String runID) {
2828
this.runID = runID;
2929
return this;
3030
}
@@ -35,12 +35,12 @@ public String getRunID() {
3535
return runID;
3636
}
3737

38-
public SourceWatchResponse setData(List<Object> data) {
38+
public WatchResponse setData(List<Object> data) {
3939
this.data = data;
4040
return this;
4141
}
4242

43-
public SourceWatchResponse addData(Object dataItem) {
43+
public WatchResponse addData(Object dataItem) {
4444
if (this.data == null) {
4545
this.data = new ArrayList<>();
4646
}
@@ -49,20 +49,19 @@ public SourceWatchResponse addData(Object dataItem) {
4949
}
5050

5151
/**
52-
* depending on the source type, the validation returns sampling data of your source (JSON, CSV,
53-
* BigQuery).
52+
* when used with discovering or validating sources, the sampled data of your source is returned.
5453
*/
5554
@javax.annotation.Nullable
5655
public List<Object> getData() {
5756
return data;
5857
}
5958

60-
public SourceWatchResponse setEvents(List<Event> events) {
59+
public WatchResponse setEvents(List<Event> events) {
6160
this.events = events;
6261
return this;
6362
}
6463

65-
public SourceWatchResponse addEvents(Event eventsItem) {
64+
public WatchResponse addEvents(Event eventsItem) {
6665
if (this.events == null) {
6766
this.events = new ArrayList<>();
6867
}
@@ -76,7 +75,7 @@ public List<Event> getEvents() {
7675
return events;
7776
}
7877

79-
public SourceWatchResponse setMessage(String message) {
78+
public WatchResponse setMessage(String message) {
8079
this.message = message;
8180
return this;
8281
}
@@ -95,12 +94,12 @@ public boolean equals(Object o) {
9594
if (o == null || getClass() != o.getClass()) {
9695
return false;
9796
}
98-
SourceWatchResponse sourceWatchResponse = (SourceWatchResponse) o;
97+
WatchResponse watchResponse = (WatchResponse) o;
9998
return (
100-
Objects.equals(this.runID, sourceWatchResponse.runID) &&
101-
Objects.equals(this.data, sourceWatchResponse.data) &&
102-
Objects.equals(this.events, sourceWatchResponse.events) &&
103-
Objects.equals(this.message, sourceWatchResponse.message)
99+
Objects.equals(this.runID, watchResponse.runID) &&
100+
Objects.equals(this.data, watchResponse.data) &&
101+
Objects.equals(this.events, watchResponse.events) &&
102+
Objects.equals(this.message, watchResponse.message)
104103
);
105104
}
106105

@@ -112,7 +111,7 @@ public int hashCode() {
112111
@Override
113112
public String toString() {
114113
StringBuilder sb = new StringBuilder();
115-
sb.append("class SourceWatchResponse {\n");
114+
sb.append("class WatchResponse {\n");
116115
sb.append(" runID: ").append(toIndentedString(runID)).append("\n");
117116
sb.append(" data: ").append(toIndentedString(data)).append("\n");
118117
sb.append(" events: ").append(toIndentedString(events)).append("\n");

0 commit comments

Comments
 (0)