Skip to content

Commit

Permalink
fix(specs): ingestion destinations and transformations (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3477

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 5, 2024
1 parent e20f8be commit 65f813c
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 18 deletions.
46 changes: 34 additions & 12 deletions algoliasearch/src/main/java/com/algolia/api/IngestionClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2833,26 +2833,36 @@ public CompletableFuture<ListTasksResponseV1> listTasksV1Async() throws AlgoliaR
/**
* Retrieves a list of transformations.
*
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param sort Property by which to sort the list. (optional, default to desc)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public ListTransformationsResponse listTransformations(SortKeys sort, OrderKeys order, RequestOptions requestOptions)
throws AlgoliaRuntimeException {
return LaunderThrowable.await(listTransformationsAsync(sort, order, requestOptions));
public ListTransformationsResponse listTransformations(
Integer itemsPerPage,
Integer page,
SortKeys sort,
OrderKeys order,
RequestOptions requestOptions
) throws AlgoliaRuntimeException {
return LaunderThrowable.await(listTransformationsAsync(itemsPerPage, page, sort, order, requestOptions));
}

/**
* Retrieves a list of transformations.
*
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param sort Property by which to sort the list. (optional, default to desc)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public ListTransformationsResponse listTransformations(SortKeys sort, OrderKeys order) throws AlgoliaRuntimeException {
return this.listTransformations(sort, order, null);
public ListTransformationsResponse listTransformations(Integer itemsPerPage, Integer page, SortKeys sort, OrderKeys order)
throws AlgoliaRuntimeException {
return this.listTransformations(itemsPerPage, page, sort, order, null);
}

/**
Expand All @@ -2863,7 +2873,7 @@ public ListTransformationsResponse listTransformations(SortKeys sort, OrderKeys
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public ListTransformationsResponse listTransformations(RequestOptions requestOptions) throws AlgoliaRuntimeException {
return this.listTransformations(null, null, requestOptions);
return this.listTransformations(null, null, null, null, requestOptions);
}

/**
Expand All @@ -2872,26 +2882,32 @@ public ListTransformationsResponse listTransformations(RequestOptions requestOpt
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public ListTransformationsResponse listTransformations() throws AlgoliaRuntimeException {
return this.listTransformations(null, null, null);
return this.listTransformations(null, null, null, null, null);
}

/**
* (asynchronously) Retrieves a list of transformations.
*
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param sort Property by which to sort the list. (optional, default to desc)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
* @param requestOptions The requestOptions to send along with the query, they will be merged with
* the transporter requestOptions.
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(
Integer itemsPerPage,
Integer page,
SortKeys sort,
OrderKeys order,
RequestOptions requestOptions
) throws AlgoliaRuntimeException {
HttpRequest request = HttpRequest.builder()
.setPath("/1/transformations")
.setMethod("GET")
.addQueryParameter("itemsPerPage", itemsPerPage)
.addQueryParameter("page", page)
.addQueryParameter("sort", sort)
.addQueryParameter("order", order)
.build();
Expand All @@ -2901,13 +2917,19 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(
/**
* (asynchronously) Retrieves a list of transformations.
*
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param sort Property by which to sort the list. (optional, default to desc)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(SortKeys sort, OrderKeys order)
throws AlgoliaRuntimeException {
return this.listTransformationsAsync(sort, order, null);
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(
Integer itemsPerPage,
Integer page,
SortKeys sort,
OrderKeys order
) throws AlgoliaRuntimeException {
return this.listTransformationsAsync(itemsPerPage, page, sort, order, null);
}

/**
Expand All @@ -2919,7 +2941,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(S
*/
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(RequestOptions requestOptions)
throws AlgoliaRuntimeException {
return this.listTransformationsAsync(null, null, requestOptions);
return this.listTransformationsAsync(null, null, null, null, requestOptions);
}

/**
Expand All @@ -2928,7 +2950,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync(R
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<ListTransformationsResponse> listTransformationsAsync() throws AlgoliaRuntimeException {
return this.listTransformationsAsync(null, null, null);
return this.listTransformationsAsync(null, null, null, null, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

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

/** Destinations are Algolia resources like indices or event streams. */
Expand All @@ -31,6 +33,9 @@ public class Destination {
@JsonProperty("authenticationID")
private String authenticationID;

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

public Destination setDestinationID(String destinationID) {
this.destinationID = destinationID;
return this;
Expand Down Expand Up @@ -108,6 +113,25 @@ public String getAuthenticationID() {
return authenticationID;
}

public Destination setTransformationIDs(List<String> transformationIDs) {
this.transformationIDs = transformationIDs;
return this;
}

public Destination addTransformationIDs(String transformationIDsItem) {
if (this.transformationIDs == null) {
this.transformationIDs = new ArrayList<>();
}
this.transformationIDs.add(transformationIDsItem);
return this;
}

/** Get transformationIDs */
@javax.annotation.Nullable
public List<String> getTransformationIDs() {
return transformationIDs;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -124,13 +148,14 @@ public boolean equals(Object o) {
Objects.equals(this.input, destination.input) &&
Objects.equals(this.createdAt, destination.createdAt) &&
Objects.equals(this.updatedAt, destination.updatedAt) &&
Objects.equals(this.authenticationID, destination.authenticationID)
Objects.equals(this.authenticationID, destination.authenticationID) &&
Objects.equals(this.transformationIDs, destination.transformationIDs)
);
}

@Override
public int hashCode() {
return Objects.hash(destinationID, type, name, input, createdAt, updatedAt, authenticationID);
return Objects.hash(destinationID, type, name, input, createdAt, updatedAt, authenticationID, transformationIDs);
}

@Override
Expand All @@ -144,6 +169,7 @@ public String toString() {
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" authenticationID: ").append(toIndentedString(authenticationID)).append("\n");
sb.append(" transformationIDs: ").append(toIndentedString(transformationIDs)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

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

/** API request body for creating a new destination. */
Expand All @@ -22,6 +24,9 @@ public class DestinationCreate {
@JsonProperty("authenticationID")
private String authenticationID;

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

public DestinationCreate setType(DestinationType type) {
this.type = type;
return this;
Expand Down Expand Up @@ -66,6 +71,25 @@ public String getAuthenticationID() {
return authenticationID;
}

public DestinationCreate setTransformationIDs(List<String> transformationIDs) {
this.transformationIDs = transformationIDs;
return this;
}

public DestinationCreate addTransformationIDs(String transformationIDsItem) {
if (this.transformationIDs == null) {
this.transformationIDs = new ArrayList<>();
}
this.transformationIDs.add(transformationIDsItem);
return this;
}

/** Get transformationIDs */
@javax.annotation.Nullable
public List<String> getTransformationIDs() {
return transformationIDs;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -79,13 +103,14 @@ public boolean equals(Object o) {
Objects.equals(this.type, destinationCreate.type) &&
Objects.equals(this.name, destinationCreate.name) &&
Objects.equals(this.input, destinationCreate.input) &&
Objects.equals(this.authenticationID, destinationCreate.authenticationID)
Objects.equals(this.authenticationID, destinationCreate.authenticationID) &&
Objects.equals(this.transformationIDs, destinationCreate.transformationIDs)
);
}

@Override
public int hashCode() {
return Objects.hash(type, name, input, authenticationID);
return Objects.hash(type, name, input, authenticationID, transformationIDs);
}

@Override
Expand All @@ -96,6 +121,7 @@ public String toString() {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" input: ").append(toIndentedString(input)).append("\n");
sb.append(" authenticationID: ").append(toIndentedString(authenticationID)).append("\n");
sb.append(" transformationIDs: ").append(toIndentedString(transformationIDs)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

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

/** API request body for updating a destination. */
Expand All @@ -22,6 +24,9 @@ public class DestinationUpdate {
@JsonProperty("authenticationID")
private String authenticationID;

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

public DestinationUpdate setType(DestinationType type) {
this.type = type;
return this;
Expand Down Expand Up @@ -66,6 +71,25 @@ public String getAuthenticationID() {
return authenticationID;
}

public DestinationUpdate setTransformationIDs(List<String> transformationIDs) {
this.transformationIDs = transformationIDs;
return this;
}

public DestinationUpdate addTransformationIDs(String transformationIDsItem) {
if (this.transformationIDs == null) {
this.transformationIDs = new ArrayList<>();
}
this.transformationIDs.add(transformationIDsItem);
return this;
}

/** Get transformationIDs */
@javax.annotation.Nullable
public List<String> getTransformationIDs() {
return transformationIDs;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -79,13 +103,14 @@ public boolean equals(Object o) {
Objects.equals(this.type, destinationUpdate.type) &&
Objects.equals(this.name, destinationUpdate.name) &&
Objects.equals(this.input, destinationUpdate.input) &&
Objects.equals(this.authenticationID, destinationUpdate.authenticationID)
Objects.equals(this.authenticationID, destinationUpdate.authenticationID) &&
Objects.equals(this.transformationIDs, destinationUpdate.transformationIDs)
);
}

@Override
public int hashCode() {
return Objects.hash(type, name, input, authenticationID);
return Objects.hash(type, name, input, authenticationID, transformationIDs);
}

@Override
Expand All @@ -96,6 +121,7 @@ public String toString() {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" input: ").append(toIndentedString(input)).append("\n");
sb.append(" authenticationID: ").append(toIndentedString(authenticationID)).append("\n");
sb.append(" transformationIDs: ").append(toIndentedString(transformationIDs)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down

0 comments on commit 65f813c

Please sign in to comment.