Skip to content

Commit

Permalink
fix(specs): ingestion docker task input (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3488

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Aug 7, 2024
1 parent 80eec16 commit c6c235d
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 11 deletions.
16 changes: 8 additions & 8 deletions algoliasearch/src/main/java/com/algolia/api/IngestionClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -3653,9 +3653,9 @@ public CompletableFuture<SourceWatchResponse> triggerDockerSourceDiscoverAsync(@
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public TransformationTryResponse tryTransformations(@Nonnull TransformationTry transformationTry, RequestOptions requestOptions)
public TransformationTryResponse tryTransformation(@Nonnull TransformationTry transformationTry, RequestOptions requestOptions)
throws AlgoliaRuntimeException {
return LaunderThrowable.await(tryTransformationsAsync(transformationTry, requestOptions));
return LaunderThrowable.await(tryTransformationAsync(transformationTry, requestOptions));
}

/**
Expand All @@ -3664,8 +3664,8 @@ public TransformationTryResponse tryTransformations(@Nonnull TransformationTry t
* @param transformationTry (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public TransformationTryResponse tryTransformations(@Nonnull TransformationTry transformationTry) throws AlgoliaRuntimeException {
return this.tryTransformations(transformationTry, null);
public TransformationTryResponse tryTransformation(@Nonnull TransformationTry transformationTry) throws AlgoliaRuntimeException {
return this.tryTransformation(transformationTry, null);
}

/**
Expand All @@ -3676,11 +3676,11 @@ public TransformationTryResponse tryTransformations(@Nonnull TransformationTry t
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<TransformationTryResponse> tryTransformationsAsync(
public CompletableFuture<TransformationTryResponse> tryTransformationAsync(
@Nonnull TransformationTry transformationTry,
RequestOptions requestOptions
) throws AlgoliaRuntimeException {
Parameters.requireNonNull(transformationTry, "Parameter `transformationTry` is required when calling `tryTransformations`.");
Parameters.requireNonNull(transformationTry, "Parameter `transformationTry` is required when calling `tryTransformation`.");

HttpRequest request = HttpRequest.builder().setPath("/1/transformations/try").setMethod("POST").setBody(transformationTry).build();
return executeAsync(request, requestOptions, new TypeReference<TransformationTryResponse>() {});
Expand All @@ -3692,9 +3692,9 @@ public CompletableFuture<TransformationTryResponse> tryTransformationsAsync(
* @param transformationTry (required)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<TransformationTryResponse> tryTransformationsAsync(@Nonnull TransformationTry transformationTry)
public CompletableFuture<TransformationTryResponse> tryTransformationAsync(@Nonnull TransformationTry transformationTry)
throws AlgoliaRuntimeException {
return this.tryTransformationsAsync(transformationTry, null);
return this.tryTransformationAsync(transformationTry, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

package com.algolia.model.ingestion;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** DockerStreams */
public class DockerStreams {

@JsonProperty("name")
private String name;

@JsonProperty("properties")
private List<String> properties;

@JsonProperty("syncMode")
private DockerStreamsSyncMode syncMode;

public DockerStreams setName(String name) {
this.name = name;
return this;
}

/** The name of the stream to fetch the data from (e.g. table name). */
@javax.annotation.Nonnull
public String getName() {
return name;
}

public DockerStreams setProperties(List<String> properties) {
this.properties = properties;
return this;
}

public DockerStreams addProperties(String propertiesItem) {
if (this.properties == null) {
this.properties = new ArrayList<>();
}
this.properties.add(propertiesItem);
return this;
}

/** The properties of the stream to select (e.g. column). */
@javax.annotation.Nullable
public List<String> getProperties() {
return properties;
}

public DockerStreams setSyncMode(DockerStreamsSyncMode syncMode) {
this.syncMode = syncMode;
return this;
}

/** Get syncMode */
@javax.annotation.Nonnull
public DockerStreamsSyncMode getSyncMode() {
return syncMode;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DockerStreams dockerStreams = (DockerStreams) o;
return (
Objects.equals(this.name, dockerStreams.name) &&
Objects.equals(this.properties, dockerStreams.properties) &&
Objects.equals(this.syncMode, dockerStreams.syncMode)
);
}

@Override
public int hashCode() {
return Objects.hash(name, properties, syncMode);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DockerStreams {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" syncMode: ").append(toIndentedString(syncMode)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,30 @@

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** The selected streams of a singer or airbyte connector. */
@JsonDeserialize(as = DockerStreamsInput.class)
public class DockerStreamsInput implements TaskInput {

@JsonProperty("streams")
private Object streams;
private List<DockerStreams> streams = new ArrayList<>();

public DockerStreamsInput setStreams(Object streams) {
public DockerStreamsInput setStreams(List<DockerStreams> streams) {
this.streams = streams;
return this;
}

public DockerStreamsInput addStreams(DockerStreams streamsItem) {
this.streams.add(streamsItem);
return this;
}

/** Get streams */
@javax.annotation.Nonnull
public Object getStreams() {
public List<DockerStreams> getStreams() {
return streams;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

package com.algolia.model.ingestion;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

/** The strategy to use to fetch the data. */
public enum DockerStreamsSyncMode {
INCREMENTAL("incremental"),

FULL_TABLE("fullTable");

private final String value;

DockerStreamsSyncMode(String value) {
this.value = value;
}

@JsonValue
public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static DockerStreamsSyncMode fromValue(String value) {
for (DockerStreamsSyncMode b : DockerStreamsSyncMode.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

0 comments on commit c6c235d

Please sign in to comment.