com.volcengine.vedbm.model.ModifyDBInstanceSpecRequest Maven / Gradle / Ivy
/*
* vedbm
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: common-version
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.volcengine.vedbm.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* ModifyDBInstanceSpecRequest
*/
public class ModifyDBInstanceSpecRequest {
@SerializedName("InstanceId")
private String instanceId = null;
@SerializedName("NodeNumber")
private Integer nodeNumber = null;
/**
* Gets or Sets nodeSpec
*/
@JsonAdapter(NodeSpecEnum.Adapter.class)
public enum NodeSpecEnum {
@SerializedName("vedb.mysql.x4.large")
X4_LARGE("vedb.mysql.x4.large"),
@SerializedName("vedb.mysql.x8.large")
X8_LARGE("vedb.mysql.x8.large"),
@SerializedName("vedb.mysql.x4.xlarge")
X4_XLARGE("vedb.mysql.x4.xlarge"),
@SerializedName("vedb.mysql.x8.xlarge")
X8_XLARGE("vedb.mysql.x8.xlarge"),
@SerializedName("vedb.mysql.x4.2xlarge")
X4_2XLARGE("vedb.mysql.x4.2xlarge"),
@SerializedName("vedb.mysql.x8.2xlarge")
X8_2XLARGE("vedb.mysql.x8.2xlarge"),
@SerializedName("vedb.mysql.x4.4xlarge")
X4_4XLARGE("vedb.mysql.x4.4xlarge"),
@SerializedName("vedb.mysql.x8.4xlarge")
X8_4XLARGE("vedb.mysql.x8.4xlarge"),
@SerializedName("vedb.mysql.x8.6xlarge")
X8_6XLARGE("vedb.mysql.x8.6xlarge"),
@SerializedName("vedb.mysql.x4.8xlarge")
X4_8XLARGE("vedb.mysql.x4.8xlarge"),
@SerializedName("vedb.mysql.x8.8xlarge")
X8_8XLARGE("vedb.mysql.x8.8xlarge"),
@SerializedName("vedb.mysql.g4.large")
G4_LARGE("vedb.mysql.g4.large"),
@SerializedName("vedb.mysql.g4.xlarge")
G4_XLARGE("vedb.mysql.g4.xlarge"),
@SerializedName("vedb.mysql.g4.2xlarge")
G4_2XLARGE("vedb.mysql.g4.2xlarge"),
@SerializedName("vedb.mysql.g8.2xlarge")
G8_2XLARGE("vedb.mysql.g8.2xlarge"),
@SerializedName("vedb.mysql.g4.4xlarge")
G4_4XLARGE("vedb.mysql.g4.4xlarge");
private String value;
NodeSpecEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static NodeSpecEnum fromValue(String input) {
for (NodeSpecEnum b : NodeSpecEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final NodeSpecEnum enumeration) throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public NodeSpecEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return NodeSpecEnum.fromValue((String)(value));
}
}
} @SerializedName("NodeSpec")
private NodeSpecEnum nodeSpec = null;
@SerializedName("PrePaidStorageInGB")
private Integer prePaidStorageInGB = null;
public ModifyDBInstanceSpecRequest instanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* Get instanceId
* @return instanceId
**/
@NotNull
@Schema(required = true, description = "")
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public ModifyDBInstanceSpecRequest nodeNumber(Integer nodeNumber) {
this.nodeNumber = nodeNumber;
return this;
}
/**
* Get nodeNumber
* @return nodeNumber
**/
@NotNull
@Schema(required = true, description = "")
public Integer getNodeNumber() {
return nodeNumber;
}
public void setNodeNumber(Integer nodeNumber) {
this.nodeNumber = nodeNumber;
}
public ModifyDBInstanceSpecRequest nodeSpec(NodeSpecEnum nodeSpec) {
this.nodeSpec = nodeSpec;
return this;
}
/**
* Get nodeSpec
* @return nodeSpec
**/
@NotNull
@Schema(required = true, description = "")
public NodeSpecEnum getNodeSpec() {
return nodeSpec;
}
public void setNodeSpec(NodeSpecEnum nodeSpec) {
this.nodeSpec = nodeSpec;
}
public ModifyDBInstanceSpecRequest prePaidStorageInGB(Integer prePaidStorageInGB) {
this.prePaidStorageInGB = prePaidStorageInGB;
return this;
}
/**
* Get prePaidStorageInGB
* @return prePaidStorageInGB
**/
@Schema(description = "")
public Integer getPrePaidStorageInGB() {
return prePaidStorageInGB;
}
public void setPrePaidStorageInGB(Integer prePaidStorageInGB) {
this.prePaidStorageInGB = prePaidStorageInGB;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModifyDBInstanceSpecRequest modifyDBInstanceSpecRequest = (ModifyDBInstanceSpecRequest) o;
return Objects.equals(this.instanceId, modifyDBInstanceSpecRequest.instanceId) &&
Objects.equals(this.nodeNumber, modifyDBInstanceSpecRequest.nodeNumber) &&
Objects.equals(this.nodeSpec, modifyDBInstanceSpecRequest.nodeSpec) &&
Objects.equals(this.prePaidStorageInGB, modifyDBInstanceSpecRequest.prePaidStorageInGB);
}
@Override
public int hashCode() {
return Objects.hash(instanceId, nodeNumber, nodeSpec, prePaidStorageInGB);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModifyDBInstanceSpecRequest {\n");
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
sb.append(" nodeNumber: ").append(toIndentedString(nodeNumber)).append("\n");
sb.append(" nodeSpec: ").append(toIndentedString(nodeSpec)).append("\n");
sb.append(" prePaidStorageInGB: ").append(toIndentedString(prePaidStorageInGB)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}