Skip to content

Commit 44d81a2

Browse files
author
BitsAdmin
committed
Merge branch 'redis-Java-2020-12-07-online-837-2024_12_10_20_36_08' into 'integration_2024-12-16_638911295234'
feat: [development task] Redis-837-Java (916202) See merge request iaasng/volcengine-java-sdk!320
2 parents 87498ca + d33b77f commit 44d81a2

23 files changed

+3246
-20
lines changed

volcengine-java-sdk-redis/src/main/java/com/volcengine/redis/RedisApi.java

Lines changed: 504 additions & 0 deletions
Large diffs are not rendered by default.

volcengine-java-sdk-redis/src/main/java/com/volcengine/redis/model/AllowListForDescribeAllowListsOutput.java

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
import com.google.gson.annotations.SerializedName;
2020
import com.google.gson.stream.JsonReader;
2121
import com.google.gson.stream.JsonWriter;
22+
import com.volcengine.redis.model.SecurityGroupBindInfoForDescribeAllowListsOutput;
2223
import io.swagger.v3.oas.annotations.media.Schema;
2324
import java.io.IOException;
25+
import java.util.ArrayList;
26+
import java.util.List;
2427
import javax.validation.constraints.*;
2528
import javax.validation.Valid;
2629
/**
@@ -30,6 +33,52 @@
3033

3134

3235
public class AllowListForDescribeAllowListsOutput {
36+
/**
37+
* Gets or Sets allowListCategory
38+
*/
39+
@JsonAdapter(AllowListCategoryEnum.Adapter.class)
40+
public enum AllowListCategoryEnum {
41+
@SerializedName("Ordinary")
42+
ORDINARY("Ordinary"),
43+
@SerializedName("Default")
44+
DEFAULT("Default");
45+
46+
private String value;
47+
48+
AllowListCategoryEnum(String value) {
49+
this.value = value;
50+
}
51+
public String getValue() {
52+
return value;
53+
}
54+
55+
@Override
56+
public String toString() {
57+
return String.valueOf(value);
58+
}
59+
public static AllowListCategoryEnum fromValue(String input) {
60+
for (AllowListCategoryEnum b : AllowListCategoryEnum.values()) {
61+
if (b.value.equals(input)) {
62+
return b;
63+
}
64+
}
65+
return null;
66+
}
67+
public static class Adapter extends TypeAdapter<AllowListCategoryEnum> {
68+
@Override
69+
public void write(final JsonWriter jsonWriter, final AllowListCategoryEnum enumeration) throws IOException {
70+
jsonWriter.value(String.valueOf(enumeration.getValue()));
71+
}
72+
73+
@Override
74+
public AllowListCategoryEnum read(final JsonReader jsonReader) throws IOException {
75+
Object value = jsonReader.nextString();
76+
return AllowListCategoryEnum.fromValue((String)(value));
77+
}
78+
}
79+
} @SerializedName("AllowListCategory")
80+
private AllowListCategoryEnum allowListCategory = null;
81+
3382
@SerializedName("AllowListDesc")
3483
private String allowListDesc = null;
3584

@@ -48,6 +97,27 @@ public class AllowListForDescribeAllowListsOutput {
4897
@SerializedName("AssociatedInstanceNum")
4998
private Integer associatedInstanceNum = null;
5099

100+
@SerializedName("SecurityGroupBindInfos")
101+
private List<SecurityGroupBindInfoForDescribeAllowListsOutput> securityGroupBindInfos = null;
102+
103+
public AllowListForDescribeAllowListsOutput allowListCategory(AllowListCategoryEnum allowListCategory) {
104+
this.allowListCategory = allowListCategory;
105+
return this;
106+
}
107+
108+
/**
109+
* Get allowListCategory
110+
* @return allowListCategory
111+
**/
112+
@Schema(description = "")
113+
public AllowListCategoryEnum getAllowListCategory() {
114+
return allowListCategory;
115+
}
116+
117+
public void setAllowListCategory(AllowListCategoryEnum allowListCategory) {
118+
this.allowListCategory = allowListCategory;
119+
}
120+
51121
public AllowListForDescribeAllowListsOutput allowListDesc(String allowListDesc) {
52122
this.allowListDesc = allowListDesc;
53123
return this;
@@ -156,6 +226,33 @@ public void setAssociatedInstanceNum(Integer associatedInstanceNum) {
156226
this.associatedInstanceNum = associatedInstanceNum;
157227
}
158228

229+
public AllowListForDescribeAllowListsOutput securityGroupBindInfos(List<SecurityGroupBindInfoForDescribeAllowListsOutput> securityGroupBindInfos) {
230+
this.securityGroupBindInfos = securityGroupBindInfos;
231+
return this;
232+
}
233+
234+
public AllowListForDescribeAllowListsOutput addSecurityGroupBindInfosItem(SecurityGroupBindInfoForDescribeAllowListsOutput securityGroupBindInfosItem) {
235+
if (this.securityGroupBindInfos == null) {
236+
this.securityGroupBindInfos = new ArrayList<SecurityGroupBindInfoForDescribeAllowListsOutput>();
237+
}
238+
this.securityGroupBindInfos.add(securityGroupBindInfosItem);
239+
return this;
240+
}
241+
242+
/**
243+
* Get securityGroupBindInfos
244+
* @return securityGroupBindInfos
245+
**/
246+
@Valid
247+
@Schema(description = "")
248+
public List<SecurityGroupBindInfoForDescribeAllowListsOutput> getSecurityGroupBindInfos() {
249+
return securityGroupBindInfos;
250+
}
251+
252+
public void setSecurityGroupBindInfos(List<SecurityGroupBindInfoForDescribeAllowListsOutput> securityGroupBindInfos) {
253+
this.securityGroupBindInfos = securityGroupBindInfos;
254+
}
255+
159256

160257
@Override
161258
public boolean equals(java.lang.Object o) {
@@ -166,17 +263,19 @@ public boolean equals(java.lang.Object o) {
166263
return false;
167264
}
168265
AllowListForDescribeAllowListsOutput allowListForDescribeAllowListsOutput = (AllowListForDescribeAllowListsOutput) o;
169-
return Objects.equals(this.allowListDesc, allowListForDescribeAllowListsOutput.allowListDesc) &&
266+
return Objects.equals(this.allowListCategory, allowListForDescribeAllowListsOutput.allowListCategory) &&
267+
Objects.equals(this.allowListDesc, allowListForDescribeAllowListsOutput.allowListDesc) &&
170268
Objects.equals(this.allowListIPNum, allowListForDescribeAllowListsOutput.allowListIPNum) &&
171269
Objects.equals(this.allowListId, allowListForDescribeAllowListsOutput.allowListId) &&
172270
Objects.equals(this.allowListName, allowListForDescribeAllowListsOutput.allowListName) &&
173271
Objects.equals(this.allowListType, allowListForDescribeAllowListsOutput.allowListType) &&
174-
Objects.equals(this.associatedInstanceNum, allowListForDescribeAllowListsOutput.associatedInstanceNum);
272+
Objects.equals(this.associatedInstanceNum, allowListForDescribeAllowListsOutput.associatedInstanceNum) &&
273+
Objects.equals(this.securityGroupBindInfos, allowListForDescribeAllowListsOutput.securityGroupBindInfos);
175274
}
176275

177276
@Override
178277
public int hashCode() {
179-
return Objects.hash(allowListDesc, allowListIPNum, allowListId, allowListName, allowListType, associatedInstanceNum);
278+
return Objects.hash(allowListCategory, allowListDesc, allowListIPNum, allowListId, allowListName, allowListType, associatedInstanceNum, securityGroupBindInfos);
180279
}
181280

182281

@@ -185,12 +284,14 @@ public String toString() {
185284
StringBuilder sb = new StringBuilder();
186285
sb.append("class AllowListForDescribeAllowListsOutput {\n");
187286

287+
sb.append(" allowListCategory: ").append(toIndentedString(allowListCategory)).append("\n");
188288
sb.append(" allowListDesc: ").append(toIndentedString(allowListDesc)).append("\n");
189289
sb.append(" allowListIPNum: ").append(toIndentedString(allowListIPNum)).append("\n");
190290
sb.append(" allowListId: ").append(toIndentedString(allowListId)).append("\n");
191291
sb.append(" allowListName: ").append(toIndentedString(allowListName)).append("\n");
192292
sb.append(" allowListType: ").append(toIndentedString(allowListType)).append("\n");
193293
sb.append(" associatedInstanceNum: ").append(toIndentedString(associatedInstanceNum)).append("\n");
294+
sb.append(" securityGroupBindInfos: ").append(toIndentedString(securityGroupBindInfos)).append("\n");
194295
sb.append("}");
195296
return sb.toString();
196297
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* redis
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.redis.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+
* ConfigureNodeForDescribeDBInstanceDetailOutput
28+
*/
29+
30+
31+
32+
public class ConfigureNodeForDescribeDBInstanceDetailOutput {
33+
@SerializedName("AZ")
34+
private String AZ = null;
35+
36+
public ConfigureNodeForDescribeDBInstanceDetailOutput AZ(String AZ) {
37+
this.AZ = AZ;
38+
return this;
39+
}
40+
41+
/**
42+
* Get AZ
43+
* @return AZ
44+
**/
45+
@Schema(description = "")
46+
public String getAZ() {
47+
return AZ;
48+
}
49+
50+
public void setAZ(String AZ) {
51+
this.AZ = AZ;
52+
}
53+
54+
55+
@Override
56+
public boolean equals(java.lang.Object o) {
57+
if (this == o) {
58+
return true;
59+
}
60+
if (o == null || getClass() != o.getClass()) {
61+
return false;
62+
}
63+
ConfigureNodeForDescribeDBInstanceDetailOutput configureNodeForDescribeDBInstanceDetailOutput = (ConfigureNodeForDescribeDBInstanceDetailOutput) o;
64+
return Objects.equals(this.AZ, configureNodeForDescribeDBInstanceDetailOutput.AZ);
65+
}
66+
67+
@Override
68+
public int hashCode() {
69+
return Objects.hash(AZ);
70+
}
71+
72+
73+
@Override
74+
public String toString() {
75+
StringBuilder sb = new StringBuilder();
76+
sb.append("class ConfigureNodeForDescribeDBInstanceDetailOutput {\n");
77+
78+
sb.append(" AZ: ").append(toIndentedString(AZ)).append("\n");
79+
sb.append("}");
80+
return sb.toString();
81+
}
82+
83+
/**
84+
* Convert the given object to string with each line indented by 4 spaces
85+
* (except the first line).
86+
*/
87+
private String toIndentedString(java.lang.Object o) {
88+
if (o == null) {
89+
return "null";
90+
}
91+
return o.toString().replace("\n", "\n ");
92+
}
93+
94+
}

volcengine-java-sdk-redis/src/main/java/com/volcengine/redis/model/CreateAllowListRequest.java

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
import com.google.gson.annotations.SerializedName;
2020
import com.google.gson.stream.JsonReader;
2121
import com.google.gson.stream.JsonWriter;
22+
import com.volcengine.redis.model.SecurityGroupBindInfoForCreateAllowListInput;
2223
import io.swagger.v3.oas.annotations.media.Schema;
2324
import java.io.IOException;
25+
import java.util.ArrayList;
26+
import java.util.List;
2427
import javax.validation.constraints.*;
2528
import javax.validation.Valid;
2629
/**
@@ -91,6 +94,9 @@ public AllowListCategoryEnum read(final JsonReader jsonReader) throws IOExceptio
9194
@SerializedName("ClientToken")
9295
private String clientToken = null;
9396

97+
@SerializedName("SecurityGroupBindInfos")
98+
private List<SecurityGroupBindInfoForCreateAllowListInput> securityGroupBindInfos = null;
99+
94100
public CreateAllowListRequest allowList(String allowList) {
95101
this.allowList = allowList;
96102
return this;
@@ -100,8 +106,7 @@ public CreateAllowListRequest allowList(String allowList) {
100106
* Get allowList
101107
* @return allowList
102108
**/
103-
@NotNull
104-
@Schema(required = true, description = "")
109+
@Schema(description = "")
105110
public String getAllowList() {
106111
return allowList;
107112
}
@@ -201,6 +206,33 @@ public void setClientToken(String clientToken) {
201206
this.clientToken = clientToken;
202207
}
203208

209+
public CreateAllowListRequest securityGroupBindInfos(List<SecurityGroupBindInfoForCreateAllowListInput> securityGroupBindInfos) {
210+
this.securityGroupBindInfos = securityGroupBindInfos;
211+
return this;
212+
}
213+
214+
public CreateAllowListRequest addSecurityGroupBindInfosItem(SecurityGroupBindInfoForCreateAllowListInput securityGroupBindInfosItem) {
215+
if (this.securityGroupBindInfos == null) {
216+
this.securityGroupBindInfos = new ArrayList<SecurityGroupBindInfoForCreateAllowListInput>();
217+
}
218+
this.securityGroupBindInfos.add(securityGroupBindInfosItem);
219+
return this;
220+
}
221+
222+
/**
223+
* Get securityGroupBindInfos
224+
* @return securityGroupBindInfos
225+
**/
226+
@Valid
227+
@Schema(description = "")
228+
public List<SecurityGroupBindInfoForCreateAllowListInput> getSecurityGroupBindInfos() {
229+
return securityGroupBindInfos;
230+
}
231+
232+
public void setSecurityGroupBindInfos(List<SecurityGroupBindInfoForCreateAllowListInput> securityGroupBindInfos) {
233+
this.securityGroupBindInfos = securityGroupBindInfos;
234+
}
235+
204236

205237
@Override
206238
public boolean equals(java.lang.Object o) {
@@ -216,12 +248,13 @@ public boolean equals(java.lang.Object o) {
216248
Objects.equals(this.allowListDesc, createAllowListRequest.allowListDesc) &&
217249
Objects.equals(this.allowListName, createAllowListRequest.allowListName) &&
218250
Objects.equals(this.allowListType, createAllowListRequest.allowListType) &&
219-
Objects.equals(this.clientToken, createAllowListRequest.clientToken);
251+
Objects.equals(this.clientToken, createAllowListRequest.clientToken) &&
252+
Objects.equals(this.securityGroupBindInfos, createAllowListRequest.securityGroupBindInfos);
220253
}
221254

222255
@Override
223256
public int hashCode() {
224-
return Objects.hash(allowList, allowListCategory, allowListDesc, allowListName, allowListType, clientToken);
257+
return Objects.hash(allowList, allowListCategory, allowListDesc, allowListName, allowListType, clientToken, securityGroupBindInfos);
225258
}
226259

227260

@@ -236,6 +269,7 @@ public String toString() {
236269
sb.append(" allowListName: ").append(toIndentedString(allowListName)).append("\n");
237270
sb.append(" allowListType: ").append(toIndentedString(allowListType)).append("\n");
238271
sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n");
272+
sb.append(" securityGroupBindInfos: ").append(toIndentedString(securityGroupBindInfos)).append("\n");
239273
sb.append("}");
240274
return sb.toString();
241275
}

0 commit comments

Comments
 (0)