Skip to content

Commit

Permalink
feat(specs): add notification settings to tasks [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4297

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jan 6, 2025
1 parent 4c834ab commit 9dabb5b
Show file tree
Hide file tree
Showing 8 changed files with 400 additions and 12 deletions.
66 changes: 59 additions & 7 deletions algoliasearch/src/main/java/com/algolia/api/IngestionClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2521,6 +2521,8 @@ public CompletableFuture<ListSourcesResponse> listSourcesAsync() throws AlgoliaR
* @param sourceType Filters the tasks with the specified source type. (optional)
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
* @param withEmailNotifications If specified, the response only includes tasks with
* notifications.email.enabled set to this value. (optional)
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
* @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
Expand All @@ -2536,12 +2538,26 @@ public ListTasksResponse listTasks(
List<SourceType> sourceType,
List<String> destinationID,
List<TriggerType> triggerType,
Boolean withEmailNotifications,
TaskSortKeys sort,
OrderKeys order,
RequestOptions requestOptions
) throws AlgoliaRuntimeException {
return LaunderThrowable.await(
listTasksAsync(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, requestOptions)
listTasksAsync(
itemsPerPage,
page,
action,
enabled,
sourceID,
sourceType,
destinationID,
triggerType,
withEmailNotifications,
sort,
order,
requestOptions
)
);
}

Expand All @@ -2556,6 +2572,8 @@ public ListTasksResponse listTasks(
* @param sourceType Filters the tasks with the specified source type. (optional)
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
* @param withEmailNotifications If specified, the response only includes tasks with
* notifications.email.enabled set to this value. (optional)
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
* @throws AlgoliaRuntimeException If it fails to process the API call
Expand All @@ -2569,10 +2587,24 @@ public ListTasksResponse listTasks(
List<SourceType> sourceType,
List<String> destinationID,
List<TriggerType> triggerType,
Boolean withEmailNotifications,
TaskSortKeys sort,
OrderKeys order
) throws AlgoliaRuntimeException {
return this.listTasks(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, null);
return this.listTasks(
itemsPerPage,
page,
action,
enabled,
sourceID,
sourceType,
destinationID,
triggerType,
withEmailNotifications,
sort,
order,
null
);
}

/**
Expand All @@ -2583,7 +2615,7 @@ public ListTasksResponse listTasks(
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public ListTasksResponse listTasks(RequestOptions requestOptions) throws AlgoliaRuntimeException {
return this.listTasks(null, null, null, null, null, null, null, null, null, null, requestOptions);
return this.listTasks(null, null, null, null, null, null, null, null, null, null, null, requestOptions);
}

/**
Expand All @@ -2592,7 +2624,7 @@ public ListTasksResponse listTasks(RequestOptions requestOptions) throws Algolia
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public ListTasksResponse listTasks() throws AlgoliaRuntimeException {
return this.listTasks(null, null, null, null, null, null, null, null, null, null, null);
return this.listTasks(null, null, null, null, null, null, null, null, null, null, null, null);
}

/**
Expand All @@ -2606,6 +2638,8 @@ public ListTasksResponse listTasks() throws AlgoliaRuntimeException {
* @param sourceType Filters the tasks with the specified source type. (optional)
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
* @param withEmailNotifications If specified, the response only includes tasks with
* notifications.email.enabled set to this value. (optional)
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
* @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
Expand All @@ -2621,6 +2655,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
List<SourceType> sourceType,
List<String> destinationID,
List<TriggerType> triggerType,
Boolean withEmailNotifications,
TaskSortKeys sort,
OrderKeys order,
RequestOptions requestOptions
Expand All @@ -2636,6 +2671,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
.addQueryParameter("sourceType", sourceType)
.addQueryParameter("destinationID", destinationID)
.addQueryParameter("triggerType", triggerType)
.addQueryParameter("withEmailNotifications", withEmailNotifications)
.addQueryParameter("sort", sort)
.addQueryParameter("order", order)
.build();
Expand All @@ -2653,6 +2689,8 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
* @param sourceType Filters the tasks with the specified source type. (optional)
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
* @param withEmailNotifications If specified, the response only includes tasks with
* notifications.email.enabled set to this value. (optional)
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
* @throws AlgoliaRuntimeException If it fails to process the API call
Expand All @@ -2666,10 +2704,24 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
List<SourceType> sourceType,
List<String> destinationID,
List<TriggerType> triggerType,
Boolean withEmailNotifications,
TaskSortKeys sort,
OrderKeys order
) throws AlgoliaRuntimeException {
return this.listTasksAsync(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, null);
return this.listTasksAsync(
itemsPerPage,
page,
action,
enabled,
sourceID,
sourceType,
destinationID,
triggerType,
withEmailNotifications,
sort,
order,
null
);
}

/**
Expand All @@ -2680,7 +2732,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<ListTasksResponse> listTasksAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException {
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, requestOptions);
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, null, requestOptions);
}

/**
Expand All @@ -2689,7 +2741,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(RequestOptions reques
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<ListTasksResponse> listTasksAsync() throws AlgoliaRuntimeException {
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, null);
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, null, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// 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.Objects;

/** EmailNotifications */
public class EmailNotifications {

@JsonProperty("enabled")
private Boolean enabled;

public EmailNotifications setEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}

/**
* Whether to send email notifications, note that this doesn't prevent the task from being
* blocked.
*/
@javax.annotation.Nullable
public Boolean getEnabled() {
return enabled;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EmailNotifications emailNotifications = (EmailNotifications) o;
return Objects.equals(this.enabled, emailNotifications.enabled);
}

@Override
public int hashCode() {
return Objects.hash(enabled);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EmailNotifications {\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).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
@@ -0,0 +1,62 @@
// 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.Objects;

/** Notifications settings for a task. */
public class Notifications {

@JsonProperty("email")
private EmailNotifications email;

public Notifications setEmail(EmailNotifications email) {
this.email = email;
return this;
}

/** Get email */
@javax.annotation.Nonnull
public EmailNotifications getEmail() {
return email;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Notifications notifications = (Notifications) o;
return Objects.equals(this.email, notifications.email);
}

@Override
public int hashCode() {
return Objects.hash(email);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Notifications {\n");
sb.append(" email: ").append(toIndentedString(email)).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
@@ -0,0 +1,65 @@
// 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.Objects;

/** Set of rules for a task. */
public class Policies {

@JsonProperty("criticalThreshold")
private Integer criticalThreshold;

public Policies setCriticalThreshold(Integer criticalThreshold) {
this.criticalThreshold = criticalThreshold;
return this;
}

/**
* The number of critical failures in a row before blocking the task and sending a notification.
* minimum: 1 maximum: 10
*/
@javax.annotation.Nullable
public Integer getCriticalThreshold() {
return criticalThreshold;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Policies policies = (Policies) o;
return Objects.equals(this.criticalThreshold, policies.criticalThreshold);
}

@Override
public int hashCode() {
return Objects.hash(criticalThreshold);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Policies {\n");
sb.append(" criticalThreshold: ").append(toIndentedString(criticalThreshold)).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 ");
}
}
Loading

0 comments on commit 9dabb5b

Please sign in to comment.