|
| 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 io.swagger.v3.oas.annotations.media.Schema; |
| 23 | +import java.io.IOException; |
| 24 | +import javax.validation.constraints.*; |
| 25 | +import javax.validation.Valid; |
| 26 | +/** |
| 27 | + * CreateKubeconfigRequest |
| 28 | + */ |
| 29 | + |
| 30 | + |
| 31 | +public class CreateKubeconfigRequest { |
| 32 | + @SerializedName("ClusterId") |
| 33 | + private String clusterId = null; |
| 34 | + |
| 35 | + /** |
| 36 | + * Gets or Sets type |
| 37 | + */ |
| 38 | + @JsonAdapter(TypeEnum.Adapter.class) |
| 39 | + public enum TypeEnum { |
| 40 | + PRIVATE("Private"), |
| 41 | + PUBLIC("Public"), |
| 42 | + TARGETCLUSTER("TargetCluster"); |
| 43 | + |
| 44 | + private String value; |
| 45 | + |
| 46 | + TypeEnum(String value) { |
| 47 | + this.value = value; |
| 48 | + } |
| 49 | + public String getValue() { |
| 50 | + return value; |
| 51 | + } |
| 52 | + |
| 53 | + @Override |
| 54 | + public String toString() { |
| 55 | + return String.valueOf(value); |
| 56 | + } |
| 57 | + public static TypeEnum fromValue(String input) { |
| 58 | + for (TypeEnum b : TypeEnum.values()) { |
| 59 | + if (b.value.equals(input)) { |
| 60 | + return b; |
| 61 | + } |
| 62 | + } |
| 63 | + return null; |
| 64 | + } |
| 65 | + public static class Adapter extends TypeAdapter<TypeEnum> { |
| 66 | + @Override |
| 67 | + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { |
| 68 | + jsonWriter.value(String.valueOf(enumeration.getValue())); |
| 69 | + } |
| 70 | + |
| 71 | + @Override |
| 72 | + public TypeEnum read(final JsonReader jsonReader) throws IOException { |
| 73 | + Object value = jsonReader.nextString(); |
| 74 | + return TypeEnum.fromValue((String)(value)); |
| 75 | + } |
| 76 | + } |
| 77 | + } @SerializedName("Type") |
| 78 | + private TypeEnum type = null; |
| 79 | + |
| 80 | + @SerializedName("ValidDuration") |
| 81 | + private Integer validDuration = null; |
| 82 | + |
| 83 | + public CreateKubeconfigRequest clusterId(String clusterId) { |
| 84 | + this.clusterId = clusterId; |
| 85 | + return this; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Get clusterId |
| 90 | + * @return clusterId |
| 91 | + **/ |
| 92 | + @Schema(description = "") |
| 93 | + public String getClusterId() { |
| 94 | + return clusterId; |
| 95 | + } |
| 96 | + |
| 97 | + public void setClusterId(String clusterId) { |
| 98 | + this.clusterId = clusterId; |
| 99 | + } |
| 100 | + |
| 101 | + public CreateKubeconfigRequest type(TypeEnum type) { |
| 102 | + this.type = type; |
| 103 | + return this; |
| 104 | + } |
| 105 | + |
| 106 | + /** |
| 107 | + * Get type |
| 108 | + * @return type |
| 109 | + **/ |
| 110 | + @Schema(description = "") |
| 111 | + public TypeEnum getType() { |
| 112 | + return type; |
| 113 | + } |
| 114 | + |
| 115 | + public void setType(TypeEnum type) { |
| 116 | + this.type = type; |
| 117 | + } |
| 118 | + |
| 119 | + public CreateKubeconfigRequest validDuration(Integer validDuration) { |
| 120 | + this.validDuration = validDuration; |
| 121 | + return this; |
| 122 | + } |
| 123 | + |
| 124 | + /** |
| 125 | + * Get validDuration |
| 126 | + * @return validDuration |
| 127 | + **/ |
| 128 | + @Schema(description = "") |
| 129 | + public Integer getValidDuration() { |
| 130 | + return validDuration; |
| 131 | + } |
| 132 | + |
| 133 | + public void setValidDuration(Integer validDuration) { |
| 134 | + this.validDuration = validDuration; |
| 135 | + } |
| 136 | + |
| 137 | + |
| 138 | + @Override |
| 139 | + public boolean equals(java.lang.Object o) { |
| 140 | + if (this == o) { |
| 141 | + return true; |
| 142 | + } |
| 143 | + if (o == null || getClass() != o.getClass()) { |
| 144 | + return false; |
| 145 | + } |
| 146 | + CreateKubeconfigRequest createKubeconfigRequest = (CreateKubeconfigRequest) o; |
| 147 | + return Objects.equals(this.clusterId, createKubeconfigRequest.clusterId) && |
| 148 | + Objects.equals(this.type, createKubeconfigRequest.type) && |
| 149 | + Objects.equals(this.validDuration, createKubeconfigRequest.validDuration); |
| 150 | + } |
| 151 | + |
| 152 | + @Override |
| 153 | + public int hashCode() { |
| 154 | + return Objects.hash(clusterId, type, validDuration); |
| 155 | + } |
| 156 | + |
| 157 | + |
| 158 | + @Override |
| 159 | + public String toString() { |
| 160 | + StringBuilder sb = new StringBuilder(); |
| 161 | + sb.append("class CreateKubeconfigRequest {\n"); |
| 162 | + |
| 163 | + sb.append(" clusterId: ").append(toIndentedString(clusterId)).append("\n"); |
| 164 | + sb.append(" type: ").append(toIndentedString(type)).append("\n"); |
| 165 | + sb.append(" validDuration: ").append(toIndentedString(validDuration)).append("\n"); |
| 166 | + sb.append("}"); |
| 167 | + return sb.toString(); |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * Convert the given object to string with each line indented by 4 spaces |
| 172 | + * (except the first line). |
| 173 | + */ |
| 174 | + private String toIndentedString(java.lang.Object o) { |
| 175 | + if (o == null) { |
| 176 | + return "null"; |
| 177 | + } |
| 178 | + return o.toString().replace("\n", "\n "); |
| 179 | + } |
| 180 | + |
| 181 | +} |
0 commit comments