Skip to content

Commit

Permalink
fix(specs): enable watcher for push [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4229

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Dec 11, 2024
1 parent 909d12a commit d27e132
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 48 deletions.
61 changes: 29 additions & 32 deletions algoliasearch/src/main/java/com/algolia/api/IngestionClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -3009,7 +3009,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public RunResponse pushTask(
public WatchResponse pushTask(
@Nonnull String taskID,
@Nonnull PushTaskPayload pushTaskPayload,
Boolean watch,
Expand All @@ -3029,7 +3029,7 @@ public RunResponse pushTask(
* the ingestion to be finished before responding. (optional)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
public WatchResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
throws AlgoliaRuntimeException {
return this.pushTask(taskID, pushTaskPayload, watch, null);
}
Expand All @@ -3045,7 +3045,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, RequestOptions requestOptions)
public WatchResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, RequestOptions requestOptions)
throws AlgoliaRuntimeException {
return this.pushTask(taskID, pushTaskPayload, null, requestOptions);
}
Expand All @@ -3059,7 +3059,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
* Connectors pipeline. (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload) throws AlgoliaRuntimeException {
public WatchResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload) throws AlgoliaRuntimeException {
return this.pushTask(taskID, pushTaskPayload, null, null);
}

Expand All @@ -3076,7 +3076,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<RunResponse> pushTaskAsync(
public CompletableFuture<WatchResponse> pushTaskAsync(
@Nonnull String taskID,
@Nonnull PushTaskPayload pushTaskPayload,
Boolean watch,
Expand All @@ -3092,7 +3092,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
.setBody(pushTaskPayload)
.addQueryParameter("watch", watch)
.build();
return executeAsync(request, requestOptions, new TypeReference<RunResponse>() {});
return executeAsync(request, requestOptions, new TypeReference<WatchResponse>() {});
}

/**
Expand All @@ -3106,7 +3106,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
* the ingestion to be finished before responding. (optional)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
public CompletableFuture<WatchResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
throws AlgoliaRuntimeException {
return this.pushTaskAsync(taskID, pushTaskPayload, watch, null);
}
Expand All @@ -3122,7 +3122,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Non
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<RunResponse> pushTaskAsync(
public CompletableFuture<WatchResponse> pushTaskAsync(
@Nonnull String taskID,
@Nonnull PushTaskPayload pushTaskPayload,
RequestOptions requestOptions
Expand All @@ -3139,7 +3139,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
* Connectors pipeline. (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload)
public CompletableFuture<WatchResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload)
throws AlgoliaRuntimeException {
return this.pushTaskAsync(taskID, pushTaskPayload, null, null);
}
Expand Down Expand Up @@ -3678,8 +3678,7 @@ public CompletableFuture<List<Transformation>> searchTransformationsAsync(@Nonnu
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID, RequestOptions requestOptions)
throws AlgoliaRuntimeException {
public WatchResponse triggerDockerSourceDiscover(@Nonnull String sourceID, RequestOptions requestOptions) throws AlgoliaRuntimeException {
return LaunderThrowable.await(triggerDockerSourceDiscoverAsync(sourceID, requestOptions));
}

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

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

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

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

Expand Down Expand Up @@ -4244,7 +4243,7 @@ public CompletableFuture<TransformationUpdateResponse> updateTransformationAsync
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse validateSource(SourceCreate sourceCreate, RequestOptions requestOptions) throws AlgoliaRuntimeException {
public WatchResponse validateSource(SourceCreate sourceCreate, RequestOptions requestOptions) throws AlgoliaRuntimeException {
return LaunderThrowable.await(validateSourceAsync(sourceCreate, requestOptions));
}

Expand All @@ -4255,7 +4254,7 @@ public SourceWatchResponse validateSource(SourceCreate sourceCreate, RequestOpti
* @param sourceCreate (optional)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse validateSource(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
public WatchResponse validateSource(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
return this.validateSource(sourceCreate, null);
}

Expand All @@ -4267,7 +4266,7 @@ public SourceWatchResponse validateSource(SourceCreate sourceCreate) throws Algo
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse validateSource(RequestOptions requestOptions) throws AlgoliaRuntimeException {
public WatchResponse validateSource(RequestOptions requestOptions) throws AlgoliaRuntimeException {
return this.validateSource(null, requestOptions);
}

Expand All @@ -4277,7 +4276,7 @@ public SourceWatchResponse validateSource(RequestOptions requestOptions) throws
*
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse validateSource() throws AlgoliaRuntimeException {
public WatchResponse validateSource() throws AlgoliaRuntimeException {
return this.validateSource(null, null);
}

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

/**
Expand All @@ -4303,7 +4302,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync(SourceCreate s
* @param sourceCreate (optional)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<SourceWatchResponse> validateSourceAsync(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
public CompletableFuture<WatchResponse> validateSourceAsync(SourceCreate sourceCreate) throws AlgoliaRuntimeException {
return this.validateSourceAsync(sourceCreate, null);
}

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

Expand All @@ -4325,7 +4324,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync(RequestOptions
*
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<SourceWatchResponse> validateSourceAsync() throws AlgoliaRuntimeException {
public CompletableFuture<WatchResponse> validateSourceAsync() throws AlgoliaRuntimeException {
return this.validateSourceAsync(null, null);
}

Expand All @@ -4339,7 +4338,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceAsync() throws Algol
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse validateSourceBeforeUpdate(
public WatchResponse validateSourceBeforeUpdate(
@Nonnull String sourceID,
@Nonnull SourceUpdate sourceUpdate,
RequestOptions requestOptions
Expand All @@ -4355,7 +4354,7 @@ public SourceWatchResponse validateSourceBeforeUpdate(
* @param sourceUpdate (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public SourceWatchResponse validateSourceBeforeUpdate(@Nonnull String sourceID, @Nonnull SourceUpdate sourceUpdate)
public WatchResponse validateSourceBeforeUpdate(@Nonnull String sourceID, @Nonnull SourceUpdate sourceUpdate)
throws AlgoliaRuntimeException {
return this.validateSourceBeforeUpdate(sourceID, sourceUpdate, null);
}
Expand All @@ -4370,7 +4369,7 @@ public SourceWatchResponse validateSourceBeforeUpdate(@Nonnull String sourceID,
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
public CompletableFuture<WatchResponse> validateSourceBeforeUpdateAsync(
@Nonnull String sourceID,
@Nonnull SourceUpdate sourceUpdate,
RequestOptions requestOptions
Expand All @@ -4384,7 +4383,7 @@ public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
.setMethod("POST")
.setBody(sourceUpdate)
.build();
return executeAsync(request, requestOptions, new TypeReference<SourceWatchResponse>() {});
return executeAsync(request, requestOptions, new TypeReference<WatchResponse>() {});
}

/**
Expand All @@ -4395,10 +4394,8 @@ public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
* @param sourceUpdate (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<SourceWatchResponse> validateSourceBeforeUpdateAsync(
@Nonnull String sourceID,
@Nonnull SourceUpdate sourceUpdate
) throws AlgoliaRuntimeException {
public CompletableFuture<WatchResponse> validateSourceBeforeUpdateAsync(@Nonnull String sourceID, @Nonnull SourceUpdate sourceUpdate)
throws AlgoliaRuntimeException {
return this.validateSourceBeforeUpdateAsync(sourceID, sourceUpdate, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import java.util.List;
import java.util.Objects;

/** SourceWatchResponse */
public class SourceWatchResponse {
/** WatchResponse */
public class WatchResponse {

@JsonProperty("runID")
private String runID;
Expand All @@ -24,7 +24,7 @@ public class SourceWatchResponse {
@JsonProperty("message")
private String message;

public SourceWatchResponse setRunID(String runID) {
public WatchResponse setRunID(String runID) {
this.runID = runID;
return this;
}
Expand All @@ -35,12 +35,12 @@ public String getRunID() {
return runID;
}

public SourceWatchResponse setData(List<Object> data) {
public WatchResponse setData(List<Object> data) {
this.data = data;
return this;
}

public SourceWatchResponse addData(Object dataItem) {
public WatchResponse addData(Object dataItem) {
if (this.data == null) {
this.data = new ArrayList<>();
}
Expand All @@ -49,20 +49,19 @@ public SourceWatchResponse addData(Object dataItem) {
}

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

public SourceWatchResponse setEvents(List<Event> events) {
public WatchResponse setEvents(List<Event> events) {
this.events = events;
return this;
}

public SourceWatchResponse addEvents(Event eventsItem) {
public WatchResponse addEvents(Event eventsItem) {
if (this.events == null) {
this.events = new ArrayList<>();
}
Expand All @@ -76,7 +75,7 @@ public List<Event> getEvents() {
return events;
}

public SourceWatchResponse setMessage(String message) {
public WatchResponse setMessage(String message) {
this.message = message;
return this;
}
Expand All @@ -95,12 +94,12 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
SourceWatchResponse sourceWatchResponse = (SourceWatchResponse) o;
WatchResponse watchResponse = (WatchResponse) o;
return (
Objects.equals(this.runID, sourceWatchResponse.runID) &&
Objects.equals(this.data, sourceWatchResponse.data) &&
Objects.equals(this.events, sourceWatchResponse.events) &&
Objects.equals(this.message, sourceWatchResponse.message)
Objects.equals(this.runID, watchResponse.runID) &&
Objects.equals(this.data, watchResponse.data) &&
Objects.equals(this.events, watchResponse.events) &&
Objects.equals(this.message, watchResponse.message)
);
}

Expand All @@ -112,7 +111,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SourceWatchResponse {\n");
sb.append("class WatchResponse {\n");
sb.append(" runID: ").append(toIndentedString(runID)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" events: ").append(toIndentedString(events)).append("\n");
Expand Down

0 comments on commit d27e132

Please sign in to comment.