|
| 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 | +/** API request body for updating a task. */ |
| 11 | +public class TaskReplace { |
| 12 | + |
| 13 | + @JsonProperty("destinationID") |
| 14 | + private String destinationID; |
| 15 | + |
| 16 | + @JsonProperty("action") |
| 17 | + private ActionType action; |
| 18 | + |
| 19 | + @JsonProperty("subscriptionAction") |
| 20 | + private ActionType subscriptionAction; |
| 21 | + |
| 22 | + @JsonProperty("cron") |
| 23 | + private String cron; |
| 24 | + |
| 25 | + @JsonProperty("enabled") |
| 26 | + private Boolean enabled; |
| 27 | + |
| 28 | + @JsonProperty("failureThreshold") |
| 29 | + private Integer failureThreshold; |
| 30 | + |
| 31 | + @JsonProperty("input") |
| 32 | + private TaskInput input; |
| 33 | + |
| 34 | + @JsonProperty("cursor") |
| 35 | + private String cursor; |
| 36 | + |
| 37 | + @JsonProperty("notifications") |
| 38 | + private Notifications notifications; |
| 39 | + |
| 40 | + @JsonProperty("policies") |
| 41 | + private Policies policies; |
| 42 | + |
| 43 | + public TaskReplace setDestinationID(String destinationID) { |
| 44 | + this.destinationID = destinationID; |
| 45 | + return this; |
| 46 | + } |
| 47 | + |
| 48 | + /** Universally unique identifier (UUID) of a destination resource. */ |
| 49 | + @javax.annotation.Nonnull |
| 50 | + public String getDestinationID() { |
| 51 | + return destinationID; |
| 52 | + } |
| 53 | + |
| 54 | + public TaskReplace setAction(ActionType action) { |
| 55 | + this.action = action; |
| 56 | + return this; |
| 57 | + } |
| 58 | + |
| 59 | + /** Get action */ |
| 60 | + @javax.annotation.Nonnull |
| 61 | + public ActionType getAction() { |
| 62 | + return action; |
| 63 | + } |
| 64 | + |
| 65 | + public TaskReplace setSubscriptionAction(ActionType subscriptionAction) { |
| 66 | + this.subscriptionAction = subscriptionAction; |
| 67 | + return this; |
| 68 | + } |
| 69 | + |
| 70 | + /** Get subscriptionAction */ |
| 71 | + @javax.annotation.Nullable |
| 72 | + public ActionType getSubscriptionAction() { |
| 73 | + return subscriptionAction; |
| 74 | + } |
| 75 | + |
| 76 | + public TaskReplace setCron(String cron) { |
| 77 | + this.cron = cron; |
| 78 | + return this; |
| 79 | + } |
| 80 | + |
| 81 | + /** Cron expression for the task's schedule. */ |
| 82 | + @javax.annotation.Nullable |
| 83 | + public String getCron() { |
| 84 | + return cron; |
| 85 | + } |
| 86 | + |
| 87 | + public TaskReplace setEnabled(Boolean enabled) { |
| 88 | + this.enabled = enabled; |
| 89 | + return this; |
| 90 | + } |
| 91 | + |
| 92 | + /** Whether the task is enabled. */ |
| 93 | + @javax.annotation.Nullable |
| 94 | + public Boolean getEnabled() { |
| 95 | + return enabled; |
| 96 | + } |
| 97 | + |
| 98 | + public TaskReplace setFailureThreshold(Integer failureThreshold) { |
| 99 | + this.failureThreshold = failureThreshold; |
| 100 | + return this; |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * Maximum accepted percentage of failures for a task run to finish successfully. minimum: 0 |
| 105 | + * maximum: 100 |
| 106 | + */ |
| 107 | + @javax.annotation.Nullable |
| 108 | + public Integer getFailureThreshold() { |
| 109 | + return failureThreshold; |
| 110 | + } |
| 111 | + |
| 112 | + public TaskReplace setInput(TaskInput input) { |
| 113 | + this.input = input; |
| 114 | + return this; |
| 115 | + } |
| 116 | + |
| 117 | + /** Get input */ |
| 118 | + @javax.annotation.Nullable |
| 119 | + public TaskInput getInput() { |
| 120 | + return input; |
| 121 | + } |
| 122 | + |
| 123 | + public TaskReplace setCursor(String cursor) { |
| 124 | + this.cursor = cursor; |
| 125 | + return this; |
| 126 | + } |
| 127 | + |
| 128 | + /** Date of the last cursor in RFC 3339 format. */ |
| 129 | + @javax.annotation.Nullable |
| 130 | + public String getCursor() { |
| 131 | + return cursor; |
| 132 | + } |
| 133 | + |
| 134 | + public TaskReplace setNotifications(Notifications notifications) { |
| 135 | + this.notifications = notifications; |
| 136 | + return this; |
| 137 | + } |
| 138 | + |
| 139 | + /** Get notifications */ |
| 140 | + @javax.annotation.Nullable |
| 141 | + public Notifications getNotifications() { |
| 142 | + return notifications; |
| 143 | + } |
| 144 | + |
| 145 | + public TaskReplace setPolicies(Policies policies) { |
| 146 | + this.policies = policies; |
| 147 | + return this; |
| 148 | + } |
| 149 | + |
| 150 | + /** Get policies */ |
| 151 | + @javax.annotation.Nullable |
| 152 | + public Policies getPolicies() { |
| 153 | + return policies; |
| 154 | + } |
| 155 | + |
| 156 | + @Override |
| 157 | + public boolean equals(Object o) { |
| 158 | + if (this == o) { |
| 159 | + return true; |
| 160 | + } |
| 161 | + if (o == null || getClass() != o.getClass()) { |
| 162 | + return false; |
| 163 | + } |
| 164 | + TaskReplace taskReplace = (TaskReplace) o; |
| 165 | + return ( |
| 166 | + Objects.equals(this.destinationID, taskReplace.destinationID) && |
| 167 | + Objects.equals(this.action, taskReplace.action) && |
| 168 | + Objects.equals(this.subscriptionAction, taskReplace.subscriptionAction) && |
| 169 | + Objects.equals(this.cron, taskReplace.cron) && |
| 170 | + Objects.equals(this.enabled, taskReplace.enabled) && |
| 171 | + Objects.equals(this.failureThreshold, taskReplace.failureThreshold) && |
| 172 | + Objects.equals(this.input, taskReplace.input) && |
| 173 | + Objects.equals(this.cursor, taskReplace.cursor) && |
| 174 | + Objects.equals(this.notifications, taskReplace.notifications) && |
| 175 | + Objects.equals(this.policies, taskReplace.policies) |
| 176 | + ); |
| 177 | + } |
| 178 | + |
| 179 | + @Override |
| 180 | + public int hashCode() { |
| 181 | + return Objects.hash(destinationID, action, subscriptionAction, cron, enabled, failureThreshold, input, cursor, notifications, policies); |
| 182 | + } |
| 183 | + |
| 184 | + @Override |
| 185 | + public String toString() { |
| 186 | + StringBuilder sb = new StringBuilder(); |
| 187 | + sb.append("class TaskReplace {\n"); |
| 188 | + sb.append(" destinationID: ").append(toIndentedString(destinationID)).append("\n"); |
| 189 | + sb.append(" action: ").append(toIndentedString(action)).append("\n"); |
| 190 | + sb.append(" subscriptionAction: ").append(toIndentedString(subscriptionAction)).append("\n"); |
| 191 | + sb.append(" cron: ").append(toIndentedString(cron)).append("\n"); |
| 192 | + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); |
| 193 | + sb.append(" failureThreshold: ").append(toIndentedString(failureThreshold)).append("\n"); |
| 194 | + sb.append(" input: ").append(toIndentedString(input)).append("\n"); |
| 195 | + sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); |
| 196 | + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); |
| 197 | + sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); |
| 198 | + sb.append("}"); |
| 199 | + return sb.toString(); |
| 200 | + } |
| 201 | + |
| 202 | + /** |
| 203 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 204 | + */ |
| 205 | + private String toIndentedString(Object o) { |
| 206 | + if (o == null) { |
| 207 | + return "null"; |
| 208 | + } |
| 209 | + return o.toString().replace("\n", "\n "); |
| 210 | + } |
| 211 | +} |
0 commit comments