|
| 1 | +/* |
| 2 | + * vke |
| 3 | + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 4 | + * |
| 5 | + * OpenAPI spec version: common-version |
| 6 | + * |
| 7 | + * |
| 8 | + * NOTE: This class is auto generated by the swagger code generator program. |
| 9 | + * https://github.com/swagger-api/swagger-codegen.git |
| 10 | + * Do not edit the class manually. |
| 11 | + */ |
| 12 | + |
| 13 | +package com.volcengine.vke.model; |
| 14 | + |
| 15 | +import java.util.Objects; |
| 16 | +import java.util.Arrays; |
| 17 | +import com.google.gson.TypeAdapter; |
| 18 | +import com.google.gson.annotations.JsonAdapter; |
| 19 | +import com.google.gson.annotations.SerializedName; |
| 20 | +import com.google.gson.stream.JsonReader; |
| 21 | +import com.google.gson.stream.JsonWriter; |
| 22 | +import com.volcengine.vke.model.ScheduledInstancePolicyForCreateScalingPolicyInput; |
| 23 | +import com.volcengine.vke.model.ScheduledPolicyForCreateScalingPolicyInput; |
| 24 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 25 | +import java.io.IOException; |
| 26 | +import javax.validation.constraints.*; |
| 27 | +import javax.validation.Valid; |
| 28 | +/** |
| 29 | + * CreateScalingPolicyRequest |
| 30 | + */ |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +public class CreateScalingPolicyRequest { |
| 35 | + @SerializedName("AdjustmentValue") |
| 36 | + private Integer adjustmentValue = null; |
| 37 | + |
| 38 | + @SerializedName("ClientToken") |
| 39 | + private String clientToken = null; |
| 40 | + |
| 41 | + @SerializedName("ClusterId") |
| 42 | + private String clusterId = null; |
| 43 | + |
| 44 | + @SerializedName("Enabled") |
| 45 | + private Boolean enabled = null; |
| 46 | + |
| 47 | + @SerializedName("NodePoolId") |
| 48 | + private String nodePoolId = null; |
| 49 | + |
| 50 | + @SerializedName("ScheduledInstancePolicy") |
| 51 | + private ScheduledInstancePolicyForCreateScalingPolicyInput scheduledInstancePolicy = null; |
| 52 | + |
| 53 | + @SerializedName("ScheduledPolicy") |
| 54 | + private ScheduledPolicyForCreateScalingPolicyInput scheduledPolicy = null; |
| 55 | + |
| 56 | + /** |
| 57 | + * Gets or Sets type |
| 58 | + */ |
| 59 | + @JsonAdapter(TypeEnum.Adapter.class) |
| 60 | + public enum TypeEnum { |
| 61 | + @SerializedName("Scheduled") |
| 62 | + SCHEDULED("Scheduled"), |
| 63 | + @SerializedName("Recurrence") |
| 64 | + RECURRENCE("Recurrence"); |
| 65 | + |
| 66 | + private String value; |
| 67 | + |
| 68 | + TypeEnum(String value) { |
| 69 | + this.value = value; |
| 70 | + } |
| 71 | + public String getValue() { |
| 72 | + return value; |
| 73 | + } |
| 74 | + |
| 75 | + @Override |
| 76 | + public String toString() { |
| 77 | + return String.valueOf(value); |
| 78 | + } |
| 79 | + public static TypeEnum fromValue(String input) { |
| 80 | + for (TypeEnum b : TypeEnum.values()) { |
| 81 | + if (b.value.equals(input)) { |
| 82 | + return b; |
| 83 | + } |
| 84 | + } |
| 85 | + return null; |
| 86 | + } |
| 87 | + public static class Adapter extends TypeAdapter<TypeEnum> { |
| 88 | + @Override |
| 89 | + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { |
| 90 | + jsonWriter.value(String.valueOf(enumeration.getValue())); |
| 91 | + } |
| 92 | + |
| 93 | + @Override |
| 94 | + public TypeEnum read(final JsonReader jsonReader) throws IOException { |
| 95 | + Object value = jsonReader.nextString(); |
| 96 | + return TypeEnum.fromValue((String)(value)); |
| 97 | + } |
| 98 | + } |
| 99 | + } @SerializedName("Type") |
| 100 | + private TypeEnum type = null; |
| 101 | + |
| 102 | + public CreateScalingPolicyRequest adjustmentValue(Integer adjustmentValue) { |
| 103 | + this.adjustmentValue = adjustmentValue; |
| 104 | + return this; |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Get adjustmentValue |
| 109 | + * @return adjustmentValue |
| 110 | + **/ |
| 111 | + @NotNull |
| 112 | + @Schema(required = true, description = "") |
| 113 | + public Integer getAdjustmentValue() { |
| 114 | + return adjustmentValue; |
| 115 | + } |
| 116 | + |
| 117 | + public void setAdjustmentValue(Integer adjustmentValue) { |
| 118 | + this.adjustmentValue = adjustmentValue; |
| 119 | + } |
| 120 | + |
| 121 | + public CreateScalingPolicyRequest clientToken(String clientToken) { |
| 122 | + this.clientToken = clientToken; |
| 123 | + return this; |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * Get clientToken |
| 128 | + * @return clientToken |
| 129 | + **/ |
| 130 | + @Schema(description = "") |
| 131 | + public String getClientToken() { |
| 132 | + return clientToken; |
| 133 | + } |
| 134 | + |
| 135 | + public void setClientToken(String clientToken) { |
| 136 | + this.clientToken = clientToken; |
| 137 | + } |
| 138 | + |
| 139 | + public CreateScalingPolicyRequest clusterId(String clusterId) { |
| 140 | + this.clusterId = clusterId; |
| 141 | + return this; |
| 142 | + } |
| 143 | + |
| 144 | + /** |
| 145 | + * Get clusterId |
| 146 | + * @return clusterId |
| 147 | + **/ |
| 148 | + @NotNull |
| 149 | + @Schema(required = true, description = "") |
| 150 | + public String getClusterId() { |
| 151 | + return clusterId; |
| 152 | + } |
| 153 | + |
| 154 | + public void setClusterId(String clusterId) { |
| 155 | + this.clusterId = clusterId; |
| 156 | + } |
| 157 | + |
| 158 | + public CreateScalingPolicyRequest enabled(Boolean enabled) { |
| 159 | + this.enabled = enabled; |
| 160 | + return this; |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * Get enabled |
| 165 | + * @return enabled |
| 166 | + **/ |
| 167 | + @Schema(description = "") |
| 168 | + public Boolean isEnabled() { |
| 169 | + return enabled; |
| 170 | + } |
| 171 | + |
| 172 | + public void setEnabled(Boolean enabled) { |
| 173 | + this.enabled = enabled; |
| 174 | + } |
| 175 | + |
| 176 | + public CreateScalingPolicyRequest nodePoolId(String nodePoolId) { |
| 177 | + this.nodePoolId = nodePoolId; |
| 178 | + return this; |
| 179 | + } |
| 180 | + |
| 181 | + /** |
| 182 | + * Get nodePoolId |
| 183 | + * @return nodePoolId |
| 184 | + **/ |
| 185 | + @NotNull |
| 186 | + @Schema(required = true, description = "") |
| 187 | + public String getNodePoolId() { |
| 188 | + return nodePoolId; |
| 189 | + } |
| 190 | + |
| 191 | + public void setNodePoolId(String nodePoolId) { |
| 192 | + this.nodePoolId = nodePoolId; |
| 193 | + } |
| 194 | + |
| 195 | + public CreateScalingPolicyRequest scheduledInstancePolicy(ScheduledInstancePolicyForCreateScalingPolicyInput scheduledInstancePolicy) { |
| 196 | + this.scheduledInstancePolicy = scheduledInstancePolicy; |
| 197 | + return this; |
| 198 | + } |
| 199 | + |
| 200 | + /** |
| 201 | + * Get scheduledInstancePolicy |
| 202 | + * @return scheduledInstancePolicy |
| 203 | + **/ |
| 204 | + @Valid |
| 205 | + @Schema(description = "") |
| 206 | + public ScheduledInstancePolicyForCreateScalingPolicyInput getScheduledInstancePolicy() { |
| 207 | + return scheduledInstancePolicy; |
| 208 | + } |
| 209 | + |
| 210 | + public void setScheduledInstancePolicy(ScheduledInstancePolicyForCreateScalingPolicyInput scheduledInstancePolicy) { |
| 211 | + this.scheduledInstancePolicy = scheduledInstancePolicy; |
| 212 | + } |
| 213 | + |
| 214 | + public CreateScalingPolicyRequest scheduledPolicy(ScheduledPolicyForCreateScalingPolicyInput scheduledPolicy) { |
| 215 | + this.scheduledPolicy = scheduledPolicy; |
| 216 | + return this; |
| 217 | + } |
| 218 | + |
| 219 | + /** |
| 220 | + * Get scheduledPolicy |
| 221 | + * @return scheduledPolicy |
| 222 | + **/ |
| 223 | + @Valid |
| 224 | + @Schema(description = "") |
| 225 | + public ScheduledPolicyForCreateScalingPolicyInput getScheduledPolicy() { |
| 226 | + return scheduledPolicy; |
| 227 | + } |
| 228 | + |
| 229 | + public void setScheduledPolicy(ScheduledPolicyForCreateScalingPolicyInput scheduledPolicy) { |
| 230 | + this.scheduledPolicy = scheduledPolicy; |
| 231 | + } |
| 232 | + |
| 233 | + public CreateScalingPolicyRequest type(TypeEnum type) { |
| 234 | + this.type = type; |
| 235 | + return this; |
| 236 | + } |
| 237 | + |
| 238 | + /** |
| 239 | + * Get type |
| 240 | + * @return type |
| 241 | + **/ |
| 242 | + @NotNull |
| 243 | + @Schema(required = true, description = "") |
| 244 | + public TypeEnum getType() { |
| 245 | + return type; |
| 246 | + } |
| 247 | + |
| 248 | + public void setType(TypeEnum type) { |
| 249 | + this.type = type; |
| 250 | + } |
| 251 | + |
| 252 | + |
| 253 | + @Override |
| 254 | + public boolean equals(java.lang.Object o) { |
| 255 | + if (this == o) { |
| 256 | + return true; |
| 257 | + } |
| 258 | + if (o == null || getClass() != o.getClass()) { |
| 259 | + return false; |
| 260 | + } |
| 261 | + CreateScalingPolicyRequest createScalingPolicyRequest = (CreateScalingPolicyRequest) o; |
| 262 | + return Objects.equals(this.adjustmentValue, createScalingPolicyRequest.adjustmentValue) && |
| 263 | + Objects.equals(this.clientToken, createScalingPolicyRequest.clientToken) && |
| 264 | + Objects.equals(this.clusterId, createScalingPolicyRequest.clusterId) && |
| 265 | + Objects.equals(this.enabled, createScalingPolicyRequest.enabled) && |
| 266 | + Objects.equals(this.nodePoolId, createScalingPolicyRequest.nodePoolId) && |
| 267 | + Objects.equals(this.scheduledInstancePolicy, createScalingPolicyRequest.scheduledInstancePolicy) && |
| 268 | + Objects.equals(this.scheduledPolicy, createScalingPolicyRequest.scheduledPolicy) && |
| 269 | + Objects.equals(this.type, createScalingPolicyRequest.type); |
| 270 | + } |
| 271 | + |
| 272 | + @Override |
| 273 | + public int hashCode() { |
| 274 | + return Objects.hash(adjustmentValue, clientToken, clusterId, enabled, nodePoolId, scheduledInstancePolicy, scheduledPolicy, type); |
| 275 | + } |
| 276 | + |
| 277 | + |
| 278 | + @Override |
| 279 | + public String toString() { |
| 280 | + StringBuilder sb = new StringBuilder(); |
| 281 | + sb.append("class CreateScalingPolicyRequest {\n"); |
| 282 | + |
| 283 | + sb.append(" adjustmentValue: ").append(toIndentedString(adjustmentValue)).append("\n"); |
| 284 | + sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n"); |
| 285 | + sb.append(" clusterId: ").append(toIndentedString(clusterId)).append("\n"); |
| 286 | + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); |
| 287 | + sb.append(" nodePoolId: ").append(toIndentedString(nodePoolId)).append("\n"); |
| 288 | + sb.append(" scheduledInstancePolicy: ").append(toIndentedString(scheduledInstancePolicy)).append("\n"); |
| 289 | + sb.append(" scheduledPolicy: ").append(toIndentedString(scheduledPolicy)).append("\n"); |
| 290 | + sb.append(" type: ").append(toIndentedString(type)).append("\n"); |
| 291 | + sb.append("}"); |
| 292 | + return sb.toString(); |
| 293 | + } |
| 294 | + |
| 295 | + /** |
| 296 | + * Convert the given object to string with each line indented by 4 spaces |
| 297 | + * (except the first line). |
| 298 | + */ |
| 299 | + private String toIndentedString(java.lang.Object o) { |
| 300 | + if (o == null) { |
| 301 | + return "null"; |
| 302 | + } |
| 303 | + return o.toString().replace("\n", "\n "); |
| 304 | + } |
| 305 | + |
| 306 | +} |
0 commit comments