Skip to content

Commit 9dabb5b

Browse files
algolia-botmillotp
andcommitted
feat(specs): add notification settings to tasks [skip-bc] (generated)
algolia/api-clients-automation#4297 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 4c834ab commit 9dabb5b

File tree

8 files changed

+400
-12
lines changed

8 files changed

+400
-12
lines changed

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

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,6 +2521,8 @@ public CompletableFuture<ListSourcesResponse> listSourcesAsync() throws AlgoliaR
25212521
* @param sourceType Filters the tasks with the specified source type. (optional)
25222522
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
25232523
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
2524+
* @param withEmailNotifications If specified, the response only includes tasks with
2525+
* notifications.email.enabled set to this value. (optional)
25242526
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
25252527
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
25262528
* @param requestOptions The requestOptions to send along with the query, they will be merged with
@@ -2536,12 +2538,26 @@ public ListTasksResponse listTasks(
25362538
List<SourceType> sourceType,
25372539
List<String> destinationID,
25382540
List<TriggerType> triggerType,
2541+
Boolean withEmailNotifications,
25392542
TaskSortKeys sort,
25402543
OrderKeys order,
25412544
RequestOptions requestOptions
25422545
) throws AlgoliaRuntimeException {
25432546
return LaunderThrowable.await(
2544-
listTasksAsync(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, requestOptions)
2547+
listTasksAsync(
2548+
itemsPerPage,
2549+
page,
2550+
action,
2551+
enabled,
2552+
sourceID,
2553+
sourceType,
2554+
destinationID,
2555+
triggerType,
2556+
withEmailNotifications,
2557+
sort,
2558+
order,
2559+
requestOptions
2560+
)
25452561
);
25462562
}
25472563

@@ -2556,6 +2572,8 @@ public ListTasksResponse listTasks(
25562572
* @param sourceType Filters the tasks with the specified source type. (optional)
25572573
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
25582574
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
2575+
* @param withEmailNotifications If specified, the response only includes tasks with
2576+
* notifications.email.enabled set to this value. (optional)
25592577
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
25602578
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
25612579
* @throws AlgoliaRuntimeException If it fails to process the API call
@@ -2569,10 +2587,24 @@ public ListTasksResponse listTasks(
25692587
List<SourceType> sourceType,
25702588
List<String> destinationID,
25712589
List<TriggerType> triggerType,
2590+
Boolean withEmailNotifications,
25722591
TaskSortKeys sort,
25732592
OrderKeys order
25742593
) throws AlgoliaRuntimeException {
2575-
return this.listTasks(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, null);
2594+
return this.listTasks(
2595+
itemsPerPage,
2596+
page,
2597+
action,
2598+
enabled,
2599+
sourceID,
2600+
sourceType,
2601+
destinationID,
2602+
triggerType,
2603+
withEmailNotifications,
2604+
sort,
2605+
order,
2606+
null
2607+
);
25762608
}
25772609

25782610
/**
@@ -2583,7 +2615,7 @@ public ListTasksResponse listTasks(
25832615
* @throws AlgoliaRuntimeException If it fails to process the API call
25842616
*/
25852617
public ListTasksResponse listTasks(RequestOptions requestOptions) throws AlgoliaRuntimeException {
2586-
return this.listTasks(null, null, null, null, null, null, null, null, null, null, requestOptions);
2618+
return this.listTasks(null, null, null, null, null, null, null, null, null, null, null, requestOptions);
25872619
}
25882620

25892621
/**
@@ -2592,7 +2624,7 @@ public ListTasksResponse listTasks(RequestOptions requestOptions) throws Algolia
25922624
* @throws AlgoliaRuntimeException If it fails to process the API call
25932625
*/
25942626
public ListTasksResponse listTasks() throws AlgoliaRuntimeException {
2595-
return this.listTasks(null, null, null, null, null, null, null, null, null, null, null);
2627+
return this.listTasks(null, null, null, null, null, null, null, null, null, null, null, null);
25962628
}
25972629

25982630
/**
@@ -2606,6 +2638,8 @@ public ListTasksResponse listTasks() throws AlgoliaRuntimeException {
26062638
* @param sourceType Filters the tasks with the specified source type. (optional)
26072639
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
26082640
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
2641+
* @param withEmailNotifications If specified, the response only includes tasks with
2642+
* notifications.email.enabled set to this value. (optional)
26092643
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
26102644
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
26112645
* @param requestOptions The requestOptions to send along with the query, they will be merged with
@@ -2621,6 +2655,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
26212655
List<SourceType> sourceType,
26222656
List<String> destinationID,
26232657
List<TriggerType> triggerType,
2658+
Boolean withEmailNotifications,
26242659
TaskSortKeys sort,
26252660
OrderKeys order,
26262661
RequestOptions requestOptions
@@ -2636,6 +2671,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
26362671
.addQueryParameter("sourceType", sourceType)
26372672
.addQueryParameter("destinationID", destinationID)
26382673
.addQueryParameter("triggerType", triggerType)
2674+
.addQueryParameter("withEmailNotifications", withEmailNotifications)
26392675
.addQueryParameter("sort", sort)
26402676
.addQueryParameter("order", order)
26412677
.build();
@@ -2653,6 +2689,8 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
26532689
* @param sourceType Filters the tasks with the specified source type. (optional)
26542690
* @param destinationID Destination IDs for filtering the list of tasks. (optional)
26552691
* @param triggerType Type of task trigger for filtering the list of tasks. (optional)
2692+
* @param withEmailNotifications If specified, the response only includes tasks with
2693+
* notifications.email.enabled set to this value. (optional)
26562694
* @param sort Property by which to sort the list of tasks. (optional, default to createdAt)
26572695
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
26582696
* @throws AlgoliaRuntimeException If it fails to process the API call
@@ -2666,10 +2704,24 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
26662704
List<SourceType> sourceType,
26672705
List<String> destinationID,
26682706
List<TriggerType> triggerType,
2707+
Boolean withEmailNotifications,
26692708
TaskSortKeys sort,
26702709
OrderKeys order
26712710
) throws AlgoliaRuntimeException {
2672-
return this.listTasksAsync(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, null);
2711+
return this.listTasksAsync(
2712+
itemsPerPage,
2713+
page,
2714+
action,
2715+
enabled,
2716+
sourceID,
2717+
sourceType,
2718+
destinationID,
2719+
triggerType,
2720+
withEmailNotifications,
2721+
sort,
2722+
order,
2723+
null
2724+
);
26732725
}
26742726

26752727
/**
@@ -2680,7 +2732,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(
26802732
* @throws AlgoliaRuntimeException If it fails to process the API call
26812733
*/
26822734
public CompletableFuture<ListTasksResponse> listTasksAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException {
2683-
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, requestOptions);
2735+
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, null, requestOptions);
26842736
}
26852737

26862738
/**
@@ -2689,7 +2741,7 @@ public CompletableFuture<ListTasksResponse> listTasksAsync(RequestOptions reques
26892741
* @throws AlgoliaRuntimeException If it fails to process the API call
26902742
*/
26912743
public CompletableFuture<ListTasksResponse> listTasksAsync() throws AlgoliaRuntimeException {
2692-
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, null);
2744+
return this.listTasksAsync(null, null, null, null, null, null, null, null, null, null, null, null);
26932745
}
26942746

26952747
/**
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.Objects;
9+
10+
/** EmailNotifications */
11+
public class EmailNotifications {
12+
13+
@JsonProperty("enabled")
14+
private Boolean enabled;
15+
16+
public EmailNotifications setEnabled(Boolean enabled) {
17+
this.enabled = enabled;
18+
return this;
19+
}
20+
21+
/**
22+
* Whether to send email notifications, note that this doesn't prevent the task from being
23+
* blocked.
24+
*/
25+
@javax.annotation.Nullable
26+
public Boolean getEnabled() {
27+
return enabled;
28+
}
29+
30+
@Override
31+
public boolean equals(Object o) {
32+
if (this == o) {
33+
return true;
34+
}
35+
if (o == null || getClass() != o.getClass()) {
36+
return false;
37+
}
38+
EmailNotifications emailNotifications = (EmailNotifications) o;
39+
return Objects.equals(this.enabled, emailNotifications.enabled);
40+
}
41+
42+
@Override
43+
public int hashCode() {
44+
return Objects.hash(enabled);
45+
}
46+
47+
@Override
48+
public String toString() {
49+
StringBuilder sb = new StringBuilder();
50+
sb.append("class EmailNotifications {\n");
51+
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
52+
sb.append("}");
53+
return sb.toString();
54+
}
55+
56+
/**
57+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
58+
*/
59+
private String toIndentedString(Object o) {
60+
if (o == null) {
61+
return "null";
62+
}
63+
return o.toString().replace("\n", "\n ");
64+
}
65+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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.Objects;
9+
10+
/** Notifications settings for a task. */
11+
public class Notifications {
12+
13+
@JsonProperty("email")
14+
private EmailNotifications email;
15+
16+
public Notifications setEmail(EmailNotifications email) {
17+
this.email = email;
18+
return this;
19+
}
20+
21+
/** Get email */
22+
@javax.annotation.Nonnull
23+
public EmailNotifications getEmail() {
24+
return email;
25+
}
26+
27+
@Override
28+
public boolean equals(Object o) {
29+
if (this == o) {
30+
return true;
31+
}
32+
if (o == null || getClass() != o.getClass()) {
33+
return false;
34+
}
35+
Notifications notifications = (Notifications) o;
36+
return Objects.equals(this.email, notifications.email);
37+
}
38+
39+
@Override
40+
public int hashCode() {
41+
return Objects.hash(email);
42+
}
43+
44+
@Override
45+
public String toString() {
46+
StringBuilder sb = new StringBuilder();
47+
sb.append("class Notifications {\n");
48+
sb.append(" email: ").append(toIndentedString(email)).append("\n");
49+
sb.append("}");
50+
return sb.toString();
51+
}
52+
53+
/**
54+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
55+
*/
56+
private String toIndentedString(Object o) {
57+
if (o == null) {
58+
return "null";
59+
}
60+
return o.toString().replace("\n", "\n ");
61+
}
62+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.Objects;
9+
10+
/** Set of rules for a task. */
11+
public class Policies {
12+
13+
@JsonProperty("criticalThreshold")
14+
private Integer criticalThreshold;
15+
16+
public Policies setCriticalThreshold(Integer criticalThreshold) {
17+
this.criticalThreshold = criticalThreshold;
18+
return this;
19+
}
20+
21+
/**
22+
* The number of critical failures in a row before blocking the task and sending a notification.
23+
* minimum: 1 maximum: 10
24+
*/
25+
@javax.annotation.Nullable
26+
public Integer getCriticalThreshold() {
27+
return criticalThreshold;
28+
}
29+
30+
@Override
31+
public boolean equals(Object o) {
32+
if (this == o) {
33+
return true;
34+
}
35+
if (o == null || getClass() != o.getClass()) {
36+
return false;
37+
}
38+
Policies policies = (Policies) o;
39+
return Objects.equals(this.criticalThreshold, policies.criticalThreshold);
40+
}
41+
42+
@Override
43+
public int hashCode() {
44+
return Objects.hash(criticalThreshold);
45+
}
46+
47+
@Override
48+
public String toString() {
49+
StringBuilder sb = new StringBuilder();
50+
sb.append("class Policies {\n");
51+
sb.append(" criticalThreshold: ").append(toIndentedString(criticalThreshold)).append("\n");
52+
sb.append("}");
53+
return sb.toString();
54+
}
55+
56+
/**
57+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
58+
*/
59+
private String toIndentedString(Object o) {
60+
if (o == null) {
61+
return "null";
62+
}
63+
return o.toString().replace("\n", "\n ");
64+
}
65+
}

0 commit comments

Comments
 (0)