Skip to content

Commit 5752f02

Browse files
chore: generated code for commit fe6f5eda. [skip ci]
algolia/api-clients-automation@fe6f5ed Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 367586e commit 5752f02

File tree

8 files changed

+1785
-504
lines changed

8 files changed

+1785
-504
lines changed

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

Lines changed: 1063 additions & 466 deletions
Large diffs are not rendered by default.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
/** Configured tasks and pagination information. */
13+
public class ListTasksResponseV1 {
14+
15+
@JsonProperty("tasks")
16+
private List<TaskV1> tasks = new ArrayList<>();
17+
18+
@JsonProperty("pagination")
19+
private Pagination pagination;
20+
21+
public ListTasksResponseV1 setTasks(List<TaskV1> tasks) {
22+
this.tasks = tasks;
23+
return this;
24+
}
25+
26+
public ListTasksResponseV1 addTasks(TaskV1 tasksItem) {
27+
this.tasks.add(tasksItem);
28+
return this;
29+
}
30+
31+
/** Get tasks */
32+
@javax.annotation.Nonnull
33+
public List<TaskV1> getTasks() {
34+
return tasks;
35+
}
36+
37+
public ListTasksResponseV1 setPagination(Pagination pagination) {
38+
this.pagination = pagination;
39+
return this;
40+
}
41+
42+
/** Get pagination */
43+
@javax.annotation.Nonnull
44+
public Pagination getPagination() {
45+
return pagination;
46+
}
47+
48+
@Override
49+
public boolean equals(Object o) {
50+
if (this == o) {
51+
return true;
52+
}
53+
if (o == null || getClass() != o.getClass()) {
54+
return false;
55+
}
56+
ListTasksResponseV1 listTasksResponseV1 = (ListTasksResponseV1) o;
57+
return Objects.equals(this.tasks, listTasksResponseV1.tasks) && Objects.equals(this.pagination, listTasksResponseV1.pagination);
58+
}
59+
60+
@Override
61+
public int hashCode() {
62+
return Objects.hash(tasks, pagination);
63+
}
64+
65+
@Override
66+
public String toString() {
67+
StringBuilder sb = new StringBuilder();
68+
sb.append("class ListTasksResponseV1 {\n");
69+
sb.append(" tasks: ").append(toIndentedString(tasks)).append("\n");
70+
sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
71+
sb.append("}");
72+
return sb.toString();
73+
}
74+
75+
/**
76+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
77+
*/
78+
private String toIndentedString(Object o) {
79+
if (o == null) {
80+
return "null";
81+
}
82+
return o.toString().replace("\n", "\n ");
83+
}
84+
}

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

Lines changed: 57 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ public class Task {
1919
@JsonProperty("destinationID")
2020
private String destinationID;
2121

22-
@JsonProperty("trigger")
23-
private Trigger trigger;
22+
@JsonProperty("cron")
23+
private String cron;
24+
25+
@JsonProperty("lastRun")
26+
private String lastRun;
27+
28+
@JsonProperty("nextRun")
29+
private String nextRun;
2430

2531
@JsonProperty("input")
2632
private TaskInput input;
@@ -76,15 +82,37 @@ public String getDestinationID() {
7682
return destinationID;
7783
}
7884

79-
public Task setTrigger(Trigger trigger) {
80-
this.trigger = trigger;
85+
public Task setCron(String cron) {
86+
this.cron = cron;
8187
return this;
8288
}
8389

84-
/** Get trigger */
85-
@javax.annotation.Nonnull
86-
public Trigger getTrigger() {
87-
return trigger;
90+
/** Cron expression for the task's schedule. */
91+
@javax.annotation.Nullable
92+
public String getCron() {
93+
return cron;
94+
}
95+
96+
public Task setLastRun(String lastRun) {
97+
this.lastRun = lastRun;
98+
return this;
99+
}
100+
101+
/** The last time the scheduled task ran in RFC 3339 format. */
102+
@javax.annotation.Nullable
103+
public String getLastRun() {
104+
return lastRun;
105+
}
106+
107+
public Task setNextRun(String nextRun) {
108+
this.nextRun = nextRun;
109+
return this;
110+
}
111+
112+
/** The next scheduled run of the task in RFC 3339 format. */
113+
@javax.annotation.Nullable
114+
public String getNextRun() {
115+
return nextRun;
88116
}
89117

90118
public Task setInput(TaskInput input) {
@@ -180,7 +208,9 @@ public boolean equals(Object o) {
180208
Objects.equals(this.taskID, task.taskID) &&
181209
Objects.equals(this.sourceID, task.sourceID) &&
182210
Objects.equals(this.destinationID, task.destinationID) &&
183-
Objects.equals(this.trigger, task.trigger) &&
211+
Objects.equals(this.cron, task.cron) &&
212+
Objects.equals(this.lastRun, task.lastRun) &&
213+
Objects.equals(this.nextRun, task.nextRun) &&
184214
Objects.equals(this.input, task.input) &&
185215
Objects.equals(this.enabled, task.enabled) &&
186216
Objects.equals(this.failureThreshold, task.failureThreshold) &&
@@ -193,7 +223,21 @@ public boolean equals(Object o) {
193223

194224
@Override
195225
public int hashCode() {
196-
return Objects.hash(taskID, sourceID, destinationID, trigger, input, enabled, failureThreshold, action, cursor, createdAt, updatedAt);
226+
return Objects.hash(
227+
taskID,
228+
sourceID,
229+
destinationID,
230+
cron,
231+
lastRun,
232+
nextRun,
233+
input,
234+
enabled,
235+
failureThreshold,
236+
action,
237+
cursor,
238+
createdAt,
239+
updatedAt
240+
);
197241
}
198242

199243
@Override
@@ -203,7 +247,9 @@ public String toString() {
203247
sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n");
204248
sb.append(" sourceID: ").append(toIndentedString(sourceID)).append("\n");
205249
sb.append(" destinationID: ").append(toIndentedString(destinationID)).append("\n");
206-
sb.append(" trigger: ").append(toIndentedString(trigger)).append("\n");
250+
sb.append(" cron: ").append(toIndentedString(cron)).append("\n");
251+
sb.append(" lastRun: ").append(toIndentedString(lastRun)).append("\n");
252+
sb.append(" nextRun: ").append(toIndentedString(nextRun)).append("\n");
207253
sb.append(" input: ").append(toIndentedString(input)).append("\n");
208254
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
209255
sb.append(" failureThreshold: ").append(toIndentedString(failureThreshold)).append("\n");

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public class TaskCreate {
1616
@JsonProperty("destinationID")
1717
private String destinationID;
1818

19-
@JsonProperty("trigger")
20-
private TaskCreateTrigger trigger;
21-
2219
@JsonProperty("action")
2320
private ActionType action;
2421

22+
@JsonProperty("cron")
23+
private String cron;
24+
2525
@JsonProperty("enabled")
2626
private Boolean enabled;
2727

@@ -56,17 +56,6 @@ public String getDestinationID() {
5656
return destinationID;
5757
}
5858

59-
public TaskCreate setTrigger(TaskCreateTrigger trigger) {
60-
this.trigger = trigger;
61-
return this;
62-
}
63-
64-
/** Get trigger */
65-
@javax.annotation.Nonnull
66-
public TaskCreateTrigger getTrigger() {
67-
return trigger;
68-
}
69-
7059
public TaskCreate setAction(ActionType action) {
7160
this.action = action;
7261
return this;
@@ -78,6 +67,17 @@ public ActionType getAction() {
7867
return action;
7968
}
8069

70+
public TaskCreate setCron(String cron) {
71+
this.cron = cron;
72+
return this;
73+
}
74+
75+
/** Cron expression for the task's schedule. */
76+
@javax.annotation.Nullable
77+
public String getCron() {
78+
return cron;
79+
}
80+
8181
public TaskCreate setEnabled(Boolean enabled) {
8282
this.enabled = enabled;
8383
return this;
@@ -137,8 +137,8 @@ public boolean equals(Object o) {
137137
return (
138138
Objects.equals(this.sourceID, taskCreate.sourceID) &&
139139
Objects.equals(this.destinationID, taskCreate.destinationID) &&
140-
Objects.equals(this.trigger, taskCreate.trigger) &&
141140
Objects.equals(this.action, taskCreate.action) &&
141+
Objects.equals(this.cron, taskCreate.cron) &&
142142
Objects.equals(this.enabled, taskCreate.enabled) &&
143143
Objects.equals(this.failureThreshold, taskCreate.failureThreshold) &&
144144
Objects.equals(this.input, taskCreate.input) &&
@@ -148,7 +148,7 @@ public boolean equals(Object o) {
148148

149149
@Override
150150
public int hashCode() {
151-
return Objects.hash(sourceID, destinationID, trigger, action, enabled, failureThreshold, input, cursor);
151+
return Objects.hash(sourceID, destinationID, action, cron, enabled, failureThreshold, input, cursor);
152152
}
153153

154154
@Override
@@ -157,8 +157,8 @@ public String toString() {
157157
sb.append("class TaskCreate {\n");
158158
sb.append(" sourceID: ").append(toIndentedString(sourceID)).append("\n");
159159
sb.append(" destinationID: ").append(toIndentedString(destinationID)).append("\n");
160-
sb.append(" trigger: ").append(toIndentedString(trigger)).append("\n");
161160
sb.append(" action: ").append(toIndentedString(action)).append("\n");
161+
sb.append(" cron: ").append(toIndentedString(cron)).append("\n");
162162
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
163163
sb.append(" failureThreshold: ").append(toIndentedString(failureThreshold)).append("\n");
164164
sb.append(" input: ").append(toIndentedString(input)).append("\n");

0 commit comments

Comments
 (0)