Skip to content

Commit c6c235d

Browse files
fix(specs): ingestion docker task input (generated)
algolia/api-clients-automation#3488 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 80eec16 commit c6c235d

File tree

4 files changed

+164
-11
lines changed

4 files changed

+164
-11
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3653,9 +3653,9 @@ public CompletableFuture<SourceWatchResponse> triggerDockerSourceDiscoverAsync(@
36533653
* the transporter requestOptions.
36543654
* @throws AlgoliaRuntimeException If it fails to process the API call
36553655
*/
3656-
public TransformationTryResponse tryTransformations(@Nonnull TransformationTry transformationTry, RequestOptions requestOptions)
3656+
public TransformationTryResponse tryTransformation(@Nonnull TransformationTry transformationTry, RequestOptions requestOptions)
36573657
throws AlgoliaRuntimeException {
3658-
return LaunderThrowable.await(tryTransformationsAsync(transformationTry, requestOptions));
3658+
return LaunderThrowable.await(tryTransformationAsync(transformationTry, requestOptions));
36593659
}
36603660

36613661
/**
@@ -3664,8 +3664,8 @@ public TransformationTryResponse tryTransformations(@Nonnull TransformationTry t
36643664
* @param transformationTry (required)
36653665
* @throws AlgoliaRuntimeException If it fails to process the API call
36663666
*/
3667-
public TransformationTryResponse tryTransformations(@Nonnull TransformationTry transformationTry) throws AlgoliaRuntimeException {
3668-
return this.tryTransformations(transformationTry, null);
3667+
public TransformationTryResponse tryTransformation(@Nonnull TransformationTry transformationTry) throws AlgoliaRuntimeException {
3668+
return this.tryTransformation(transformationTry, null);
36693669
}
36703670

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

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

37003700
/**
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.ingestion;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.ArrayList;
9+
import java.util.List;
10+
import java.util.Objects;
11+
12+
/** DockerStreams */
13+
public class DockerStreams {
14+
15+
@JsonProperty("name")
16+
private String name;
17+
18+
@JsonProperty("properties")
19+
private List<String> properties;
20+
21+
@JsonProperty("syncMode")
22+
private DockerStreamsSyncMode syncMode;
23+
24+
public DockerStreams setName(String name) {
25+
this.name = name;
26+
return this;
27+
}
28+
29+
/** The name of the stream to fetch the data from (e.g. table name). */
30+
@javax.annotation.Nonnull
31+
public String getName() {
32+
return name;
33+
}
34+
35+
public DockerStreams setProperties(List<String> properties) {
36+
this.properties = properties;
37+
return this;
38+
}
39+
40+
public DockerStreams addProperties(String propertiesItem) {
41+
if (this.properties == null) {
42+
this.properties = new ArrayList<>();
43+
}
44+
this.properties.add(propertiesItem);
45+
return this;
46+
}
47+
48+
/** The properties of the stream to select (e.g. column). */
49+
@javax.annotation.Nullable
50+
public List<String> getProperties() {
51+
return properties;
52+
}
53+
54+
public DockerStreams setSyncMode(DockerStreamsSyncMode syncMode) {
55+
this.syncMode = syncMode;
56+
return this;
57+
}
58+
59+
/** Get syncMode */
60+
@javax.annotation.Nonnull
61+
public DockerStreamsSyncMode getSyncMode() {
62+
return syncMode;
63+
}
64+
65+
@Override
66+
public boolean equals(Object o) {
67+
if (this == o) {
68+
return true;
69+
}
70+
if (o == null || getClass() != o.getClass()) {
71+
return false;
72+
}
73+
DockerStreams dockerStreams = (DockerStreams) o;
74+
return (
75+
Objects.equals(this.name, dockerStreams.name) &&
76+
Objects.equals(this.properties, dockerStreams.properties) &&
77+
Objects.equals(this.syncMode, dockerStreams.syncMode)
78+
);
79+
}
80+
81+
@Override
82+
public int hashCode() {
83+
return Objects.hash(name, properties, syncMode);
84+
}
85+
86+
@Override
87+
public String toString() {
88+
StringBuilder sb = new StringBuilder();
89+
sb.append("class DockerStreams {\n");
90+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
91+
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
92+
sb.append(" syncMode: ").append(toIndentedString(syncMode)).append("\n");
93+
sb.append("}");
94+
return sb.toString();
95+
}
96+
97+
/**
98+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
99+
*/
100+
private String toIndentedString(Object o) {
101+
if (o == null) {
102+
return "null";
103+
}
104+
return o.toString().replace("\n", "\n ");
105+
}
106+
}

algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,30 @@
55

66
import com.fasterxml.jackson.annotation.*;
77
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.ArrayList;
9+
import java.util.List;
810
import java.util.Objects;
911

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

1416
@JsonProperty("streams")
15-
private Object streams;
17+
private List<DockerStreams> streams = new ArrayList<>();
1618

17-
public DockerStreamsInput setStreams(Object streams) {
19+
public DockerStreamsInput setStreams(List<DockerStreams> streams) {
1820
this.streams = streams;
1921
return this;
2022
}
2123

24+
public DockerStreamsInput addStreams(DockerStreams streamsItem) {
25+
this.streams.add(streamsItem);
26+
return this;
27+
}
28+
2229
/** Get streams */
2330
@javax.annotation.Nonnull
24-
public Object getStreams() {
31+
public List<DockerStreams> getStreams() {
2532
return streams;
2633
}
2734

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.ingestion;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
9+
/** The strategy to use to fetch the data. */
10+
public enum DockerStreamsSyncMode {
11+
INCREMENTAL("incremental"),
12+
13+
FULL_TABLE("fullTable");
14+
15+
private final String value;
16+
17+
DockerStreamsSyncMode(String value) {
18+
this.value = value;
19+
}
20+
21+
@JsonValue
22+
public String getValue() {
23+
return value;
24+
}
25+
26+
@Override
27+
public String toString() {
28+
return String.valueOf(value);
29+
}
30+
31+
@JsonCreator
32+
public static DockerStreamsSyncMode fromValue(String value) {
33+
for (DockerStreamsSyncMode b : DockerStreamsSyncMode.values()) {
34+
if (b.value.equals(value)) {
35+
return b;
36+
}
37+
}
38+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
39+
}
40+
}

0 commit comments

Comments
 (0)