Skip to content

Commit 65f813c

Browse files
fix(specs): ingestion destinations and transformations (generated)
algolia/api-clients-automation#3477 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent e20f8be commit 65f813c

File tree

4 files changed

+118
-18
lines changed

4 files changed

+118
-18
lines changed

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

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,26 +2833,36 @@ public CompletableFuture<ListTasksResponseV1> listTasksV1Async() throws AlgoliaR
28332833
/**
28342834
* Retrieves a list of transformations.
28352835
*
2836+
* @param itemsPerPage Number of items per page. (optional, default to 10)
2837+
* @param page Page number of the paginated API response. (optional)
28362838
* @param sort Property by which to sort the list. (optional, default to desc)
28372839
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
28382840
* @param requestOptions The requestOptions to send along with the query, they will be merged with
28392841
* the transporter requestOptions.
28402842
* @throws AlgoliaRuntimeException If it fails to process the API call
28412843
*/
2842-
public ListTransformationsResponse listTransformations(SortKeys sort, OrderKeys order, RequestOptions requestOptions)
2843-
throws AlgoliaRuntimeException {
2844-
return LaunderThrowable.await(listTransformationsAsync(sort, order, requestOptions));
2844+
public ListTransformationsResponse listTransformations(
2845+
Integer itemsPerPage,
2846+
Integer page,
2847+
SortKeys sort,
2848+
OrderKeys order,
2849+
RequestOptions requestOptions
2850+
) throws AlgoliaRuntimeException {
2851+
return LaunderThrowable.await(listTransformationsAsync(itemsPerPage, page, sort, order, requestOptions));
28452852
}
28462853

28472854
/**
28482855
* Retrieves a list of transformations.
28492856
*
2857+
* @param itemsPerPage Number of items per page. (optional, default to 10)
2858+
* @param page Page number of the paginated API response. (optional)
28502859
* @param sort Property by which to sort the list. (optional, default to desc)
28512860
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
28522861
* @throws AlgoliaRuntimeException If it fails to process the API call
28532862
*/
2854-
public ListTransformationsResponse listTransformations(SortKeys sort, OrderKeys order) throws AlgoliaRuntimeException {
2855-
return this.listTransformations(sort, order, null);
2863+
public ListTransformationsResponse listTransformations(Integer itemsPerPage, Integer page, SortKeys sort, OrderKeys order)
2864+
throws AlgoliaRuntimeException {
2865+
return this.listTransformations(itemsPerPage, page, sort, order, null);
28562866
}
28572867

28582868
/**
@@ -2863,7 +2873,7 @@ public ListTransformationsResponse listTransformations(SortKeys sort, OrderKeys
28632873
* @throws AlgoliaRuntimeException If it fails to process the API call
28642874
*/
28652875
public ListTransformationsResponse listTransformations(RequestOptions requestOptions) throws AlgoliaRuntimeException {
2866-
return this.listTransformations(null, null, requestOptions);
2876+
return this.listTransformations(null, null, null, null, requestOptions);
28672877
}
28682878

28692879
/**
@@ -2872,26 +2882,32 @@ public ListTransformationsResponse listTransformations(RequestOptions requestOpt
28722882
* @throws AlgoliaRuntimeException If it fails to process the API call
28732883
*/
28742884
public ListTransformationsResponse listTransformations() throws AlgoliaRuntimeException {
2875-
return this.listTransformations(null, null, null);
2885+
return this.listTransformations(null, null, null, null, null);
28762886
}
28772887

28782888
/**
28792889
* (asynchronously) Retrieves a list of transformations.
28802890
*
2891+
* @param itemsPerPage Number of items per page. (optional, default to 10)
2892+
* @param page Page number of the paginated API response. (optional)
28812893
* @param sort Property by which to sort the list. (optional, default to desc)
28822894
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
28832895
* @param requestOptions The requestOptions to send along with the query, they will be merged with
28842896
* the transporter requestOptions.
28852897
* @throws AlgoliaRuntimeException If it fails to process the API call
28862898
*/
28872899
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(
2900+
Integer itemsPerPage,
2901+
Integer page,
28882902
SortKeys sort,
28892903
OrderKeys order,
28902904
RequestOptions requestOptions
28912905
) throws AlgoliaRuntimeException {
28922906
HttpRequest request = HttpRequest.builder()
28932907
.setPath("/1/transformations")
28942908
.setMethod("GET")
2909+
.addQueryParameter("itemsPerPage", itemsPerPage)
2910+
.addQueryParameter("page", page)
28952911
.addQueryParameter("sort", sort)
28962912
.addQueryParameter("order", order)
28972913
.build();
@@ -2901,13 +2917,19 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(
29012917
/**
29022918
* (asynchronously) Retrieves a list of transformations.
29032919
*
2920+
* @param itemsPerPage Number of items per page. (optional, default to 10)
2921+
* @param page Page number of the paginated API response. (optional)
29042922
* @param sort Property by which to sort the list. (optional, default to desc)
29052923
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
29062924
* @throws AlgoliaRuntimeException If it fails to process the API call
29072925
*/
2908-
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(SortKeys sort, OrderKeys order)
2909-
throws AlgoliaRuntimeException {
2910-
return this.listTransformationsAsync(sort, order, null);
2926+
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(
2927+
Integer itemsPerPage,
2928+
Integer page,
2929+
SortKeys sort,
2930+
OrderKeys order
2931+
) throws AlgoliaRuntimeException {
2932+
return this.listTransformationsAsync(itemsPerPage, page, sort, order, null);
29112933
}
29122934

29132935
/**
@@ -2919,7 +2941,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(S
29192941
*/
29202942
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(RequestOptions requestOptions)
29212943
throws AlgoliaRuntimeException {
2922-
return this.listTransformationsAsync(null, null, requestOptions);
2944+
return this.listTransformationsAsync(null, null, null, null, requestOptions);
29232945
}
29242946

29252947
/**
@@ -2928,7 +2950,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(R
29282950
* @throws AlgoliaRuntimeException If it fails to process the API call
29292951
*/
29302952
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync() throws AlgoliaRuntimeException {
2931-
return this.listTransformationsAsync(null, null, null);
2953+
return this.listTransformationsAsync(null, null, null, null, null);
29322954
}
29332955

29342956
/**

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
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
/** Destinations are Algolia resources like indices or event streams. */
@@ -31,6 +33,9 @@ public class Destination {
3133
@JsonProperty("authenticationID")
3234
private String authenticationID;
3335

36+
@JsonProperty("transformationIDs")
37+
private List<String> transformationIDs;
38+
3439
public Destination setDestinationID(String destinationID) {
3540
this.destinationID = destinationID;
3641
return this;
@@ -108,6 +113,25 @@ public String getAuthenticationID() {
108113
return authenticationID;
109114
}
110115

116+
public Destination setTransformationIDs(List<String> transformationIDs) {
117+
this.transformationIDs = transformationIDs;
118+
return this;
119+
}
120+
121+
public Destination addTransformationIDs(String transformationIDsItem) {
122+
if (this.transformationIDs == null) {
123+
this.transformationIDs = new ArrayList<>();
124+
}
125+
this.transformationIDs.add(transformationIDsItem);
126+
return this;
127+
}
128+
129+
/** Get transformationIDs */
130+
@javax.annotation.Nullable
131+
public List<String> getTransformationIDs() {
132+
return transformationIDs;
133+
}
134+
111135
@Override
112136
public boolean equals(Object o) {
113137
if (this == o) {
@@ -124,13 +148,14 @@ public boolean equals(Object o) {
124148
Objects.equals(this.input, destination.input) &&
125149
Objects.equals(this.createdAt, destination.createdAt) &&
126150
Objects.equals(this.updatedAt, destination.updatedAt) &&
127-
Objects.equals(this.authenticationID, destination.authenticationID)
151+
Objects.equals(this.authenticationID, destination.authenticationID) &&
152+
Objects.equals(this.transformationIDs, destination.transformationIDs)
128153
);
129154
}
130155

131156
@Override
132157
public int hashCode() {
133-
return Objects.hash(destinationID, type, name, input, createdAt, updatedAt, authenticationID);
158+
return Objects.hash(destinationID, type, name, input, createdAt, updatedAt, authenticationID, transformationIDs);
134159
}
135160

136161
@Override
@@ -144,6 +169,7 @@ public String toString() {
144169
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
145170
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
146171
sb.append(" authenticationID: ").append(toIndentedString(authenticationID)).append("\n");
172+
sb.append(" transformationIDs: ").append(toIndentedString(transformationIDs)).append("\n");
147173
sb.append("}");
148174
return sb.toString();
149175
}

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
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
/** API request body for creating a new destination. */
@@ -22,6 +24,9 @@ public class DestinationCreate {
2224
@JsonProperty("authenticationID")
2325
private String authenticationID;
2426

27+
@JsonProperty("transformationIDs")
28+
private List<String> transformationIDs;
29+
2530
public DestinationCreate setType(DestinationType type) {
2631
this.type = type;
2732
return this;
@@ -66,6 +71,25 @@ public String getAuthenticationID() {
6671
return authenticationID;
6772
}
6873

74+
public DestinationCreate setTransformationIDs(List<String> transformationIDs) {
75+
this.transformationIDs = transformationIDs;
76+
return this;
77+
}
78+
79+
public DestinationCreate addTransformationIDs(String transformationIDsItem) {
80+
if (this.transformationIDs == null) {
81+
this.transformationIDs = new ArrayList<>();
82+
}
83+
this.transformationIDs.add(transformationIDsItem);
84+
return this;
85+
}
86+
87+
/** Get transformationIDs */
88+
@javax.annotation.Nullable
89+
public List<String> getTransformationIDs() {
90+
return transformationIDs;
91+
}
92+
6993
@Override
7094
public boolean equals(Object o) {
7195
if (this == o) {
@@ -79,13 +103,14 @@ public boolean equals(Object o) {
79103
Objects.equals(this.type, destinationCreate.type) &&
80104
Objects.equals(this.name, destinationCreate.name) &&
81105
Objects.equals(this.input, destinationCreate.input) &&
82-
Objects.equals(this.authenticationID, destinationCreate.authenticationID)
106+
Objects.equals(this.authenticationID, destinationCreate.authenticationID) &&
107+
Objects.equals(this.transformationIDs, destinationCreate.transformationIDs)
83108
);
84109
}
85110

86111
@Override
87112
public int hashCode() {
88-
return Objects.hash(type, name, input, authenticationID);
113+
return Objects.hash(type, name, input, authenticationID, transformationIDs);
89114
}
90115

91116
@Override
@@ -96,6 +121,7 @@ public String toString() {
96121
sb.append(" name: ").append(toIndentedString(name)).append("\n");
97122
sb.append(" input: ").append(toIndentedString(input)).append("\n");
98123
sb.append(" authenticationID: ").append(toIndentedString(authenticationID)).append("\n");
124+
sb.append(" transformationIDs: ").append(toIndentedString(transformationIDs)).append("\n");
99125
sb.append("}");
100126
return sb.toString();
101127
}

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
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
/** API request body for updating a destination. */
@@ -22,6 +24,9 @@ public class DestinationUpdate {
2224
@JsonProperty("authenticationID")
2325
private String authenticationID;
2426

27+
@JsonProperty("transformationIDs")
28+
private List<String> transformationIDs;
29+
2530
public DestinationUpdate setType(DestinationType type) {
2631
this.type = type;
2732
return this;
@@ -66,6 +71,25 @@ public String getAuthenticationID() {
6671
return authenticationID;
6772
}
6873

74+
public DestinationUpdate setTransformationIDs(List<String> transformationIDs) {
75+
this.transformationIDs = transformationIDs;
76+
return this;
77+
}
78+
79+
public DestinationUpdate addTransformationIDs(String transformationIDsItem) {
80+
if (this.transformationIDs == null) {
81+
this.transformationIDs = new ArrayList<>();
82+
}
83+
this.transformationIDs.add(transformationIDsItem);
84+
return this;
85+
}
86+
87+
/** Get transformationIDs */
88+
@javax.annotation.Nullable
89+
public List<String> getTransformationIDs() {
90+
return transformationIDs;
91+
}
92+
6993
@Override
7094
public boolean equals(Object o) {
7195
if (this == o) {
@@ -79,13 +103,14 @@ public boolean equals(Object o) {
79103
Objects.equals(this.type, destinationUpdate.type) &&
80104
Objects.equals(this.name, destinationUpdate.name) &&
81105
Objects.equals(this.input, destinationUpdate.input) &&
82-
Objects.equals(this.authenticationID, destinationUpdate.authenticationID)
106+
Objects.equals(this.authenticationID, destinationUpdate.authenticationID) &&
107+
Objects.equals(this.transformationIDs, destinationUpdate.transformationIDs)
83108
);
84109
}
85110

86111
@Override
87112
public int hashCode() {
88-
return Objects.hash(type, name, input, authenticationID);
113+
return Objects.hash(type, name, input, authenticationID, transformationIDs);
89114
}
90115

91116
@Override
@@ -96,6 +121,7 @@ public String toString() {
96121
sb.append(" name: ").append(toIndentedString(name)).append("\n");
97122
sb.append(" input: ").append(toIndentedString(input)).append("\n");
98123
sb.append(" authenticationID: ").append(toIndentedString(authenticationID)).append("\n");
124+
sb.append(" transformationIDs: ").append(toIndentedString(transformationIDs)).append("\n");
99125
sb.append("}");
100126
return sb.toString();
101127
}

0 commit comments

Comments
 (0)