Skip to content

Commit c3bbaef

Browse files
author
BitsAdmin
committed
Merge branch 'natgateway-Java-2020-04-01-online-1760-2025_10_29_17_30_58' into 'integration_2025-11-06_1076839247618'
feat: [development task] natgateway-1760-Java (1806259) See merge request iaasng/volcengine-java-sdk!729
2 parents 4ec4998 + ad1cfb7 commit c3bbaef

File tree

47 files changed

+7102
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7102
-408
lines changed

volcengine-java-sdk-natgateway/src/main/java/com/volcengine/natgateway/NatgatewayApi.java

Lines changed: 1688 additions & 176 deletions
Large diffs are not rendered by default.

volcengine-java-sdk-natgateway/src/main/java/com/volcengine/natgateway/model/CreateDnatEntryRequest.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public class CreateDnatEntryRequest {
4848
@SerializedName("NatGatewayId")
4949
private String natGatewayId = null;
5050

51+
@SerializedName("PortType")
52+
private String portType = null;
53+
5154
@SerializedName("Protocol")
5255
private String protocol = null;
5356

@@ -164,6 +167,24 @@ public void setNatGatewayId(String natGatewayId) {
164167
this.natGatewayId = natGatewayId;
165168
}
166169

170+
public CreateDnatEntryRequest portType(String portType) {
171+
this.portType = portType;
172+
return this;
173+
}
174+
175+
/**
176+
* Get portType
177+
* @return portType
178+
**/
179+
@Schema(description = "")
180+
public String getPortType() {
181+
return portType;
182+
}
183+
184+
public void setPortType(String portType) {
185+
this.portType = portType;
186+
}
187+
167188
public CreateDnatEntryRequest protocol(String protocol) {
168189
this.protocol = protocol;
169190
return this;
@@ -199,12 +220,13 @@ public boolean equals(java.lang.Object o) {
199220
Objects.equals(this.internalIp, createDnatEntryRequest.internalIp) &&
200221
Objects.equals(this.internalPort, createDnatEntryRequest.internalPort) &&
201222
Objects.equals(this.natGatewayId, createDnatEntryRequest.natGatewayId) &&
223+
Objects.equals(this.portType, createDnatEntryRequest.portType) &&
202224
Objects.equals(this.protocol, createDnatEntryRequest.protocol);
203225
}
204226

205227
@Override
206228
public int hashCode() {
207-
return Objects.hash(dnatEntryName, externalIp, externalPort, internalIp, internalPort, natGatewayId, protocol);
229+
return Objects.hash(dnatEntryName, externalIp, externalPort, internalIp, internalPort, natGatewayId, portType, protocol);
208230
}
209231

210232

@@ -219,6 +241,7 @@ public String toString() {
219241
sb.append(" internalIp: ").append(toIndentedString(internalIp)).append("\n");
220242
sb.append(" internalPort: ").append(toIndentedString(internalPort)).append("\n");
221243
sb.append(" natGatewayId: ").append(toIndentedString(natGatewayId)).append("\n");
244+
sb.append(" portType: ").append(toIndentedString(portType)).append("\n");
222245
sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n");
223246
sb.append("}");
224247
return sb.toString();

volcengine-java-sdk-natgateway/src/main/java/com/volcengine/natgateway/model/CreateNatGatewayRequest.java

Lines changed: 59 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -42,108 +42,26 @@ public class CreateNatGatewayRequest {
4242
@SerializedName("Description")
4343
private String description = null;
4444

45+
@SerializedName("DirectMode")
46+
private Boolean directMode = null;
47+
4548
@SerializedName("NatGatewayName")
4649
private String natGatewayName = null;
4750

51+
@SerializedName("NetworkType")
52+
private String networkType = null;
53+
4854
@SerializedName("Period")
4955
private Integer period = null;
5056

51-
/**
52-
* Gets or Sets periodUnit
53-
*/
54-
@JsonAdapter(PeriodUnitEnum.Adapter.class)
55-
public enum PeriodUnitEnum {
56-
@SerializedName("Month")
57-
MONTH("Month"),
58-
@SerializedName("Year")
59-
YEAR("Year");
60-
61-
private String value;
62-
63-
PeriodUnitEnum(String value) {
64-
this.value = value;
65-
}
66-
public String getValue() {
67-
return value;
68-
}
69-
70-
@Override
71-
public String toString() {
72-
return String.valueOf(value);
73-
}
74-
public static PeriodUnitEnum fromValue(String input) {
75-
for (PeriodUnitEnum b : PeriodUnitEnum.values()) {
76-
if (b.value.equals(input)) {
77-
return b;
78-
}
79-
}
80-
return null;
81-
}
82-
public static class Adapter extends TypeAdapter<PeriodUnitEnum> {
83-
@Override
84-
public void write(final JsonWriter jsonWriter, final PeriodUnitEnum enumeration) throws IOException {
85-
jsonWriter.value(String.valueOf(enumeration.getValue()));
86-
}
87-
88-
@Override
89-
public PeriodUnitEnum read(final JsonReader jsonReader) throws IOException {
90-
Object value = jsonReader.nextString();
91-
return PeriodUnitEnum.fromValue((String)(value));
92-
}
93-
}
94-
} @SerializedName("PeriodUnit")
95-
private PeriodUnitEnum periodUnit = null;
57+
@SerializedName("PeriodUnit")
58+
private String periodUnit = null;
9659

9760
@SerializedName("ProjectName")
9861
private String projectName = null;
9962

100-
/**
101-
* Gets or Sets spec
102-
*/
103-
@JsonAdapter(SpecEnum.Adapter.class)
104-
public enum SpecEnum {
105-
@SerializedName("Small")
106-
SMALL("Small"),
107-
@SerializedName("Medium")
108-
MEDIUM("Medium"),
109-
@SerializedName("Large")
110-
LARGE("Large");
111-
112-
private String value;
113-
114-
SpecEnum(String value) {
115-
this.value = value;
116-
}
117-
public String getValue() {
118-
return value;
119-
}
120-
121-
@Override
122-
public String toString() {
123-
return String.valueOf(value);
124-
}
125-
public static SpecEnum fromValue(String input) {
126-
for (SpecEnum b : SpecEnum.values()) {
127-
if (b.value.equals(input)) {
128-
return b;
129-
}
130-
}
131-
return null;
132-
}
133-
public static class Adapter extends TypeAdapter<SpecEnum> {
134-
@Override
135-
public void write(final JsonWriter jsonWriter, final SpecEnum enumeration) throws IOException {
136-
jsonWriter.value(String.valueOf(enumeration.getValue()));
137-
}
138-
139-
@Override
140-
public SpecEnum read(final JsonReader jsonReader) throws IOException {
141-
Object value = jsonReader.nextString();
142-
return SpecEnum.fromValue((String)(value));
143-
}
144-
}
145-
} @SerializedName("Spec")
146-
private SpecEnum spec = null;
63+
@SerializedName("Spec")
64+
private String spec = null;
14765

14866
@SerializedName("SubnetId")
14967
private String subnetId = null;
@@ -162,10 +80,10 @@ public CreateNatGatewayRequest billingType(Integer billingType) {
16280
/**
16381
* Get billingType
16482
* minimum: 1
165-
* maximum: 1
83+
* maximum: 3
16684
* @return billingType
16785
**/
168-
@Min(1) @Max(1) @Schema(description = "")
86+
@Min(1) @Max(3) @Schema(description = "")
16987
public Integer getBillingType() {
17088
return billingType;
17189
}
@@ -210,6 +128,24 @@ public void setDescription(String description) {
210128
this.description = description;
211129
}
212130

131+
public CreateNatGatewayRequest directMode(Boolean directMode) {
132+
this.directMode = directMode;
133+
return this;
134+
}
135+
136+
/**
137+
* Get directMode
138+
* @return directMode
139+
**/
140+
@Schema(description = "")
141+
public Boolean isDirectMode() {
142+
return directMode;
143+
}
144+
145+
public void setDirectMode(Boolean directMode) {
146+
this.directMode = directMode;
147+
}
148+
213149
public CreateNatGatewayRequest natGatewayName(String natGatewayName) {
214150
this.natGatewayName = natGatewayName;
215151
return this;
@@ -228,6 +164,24 @@ public void setNatGatewayName(String natGatewayName) {
228164
this.natGatewayName = natGatewayName;
229165
}
230166

167+
public CreateNatGatewayRequest networkType(String networkType) {
168+
this.networkType = networkType;
169+
return this;
170+
}
171+
172+
/**
173+
* Get networkType
174+
* @return networkType
175+
**/
176+
@Schema(description = "")
177+
public String getNetworkType() {
178+
return networkType;
179+
}
180+
181+
public void setNetworkType(String networkType) {
182+
this.networkType = networkType;
183+
}
184+
231185
public CreateNatGatewayRequest period(Integer period) {
232186
this.period = period;
233187
return this;
@@ -246,7 +200,7 @@ public void setPeriod(Integer period) {
246200
this.period = period;
247201
}
248202

249-
public CreateNatGatewayRequest periodUnit(PeriodUnitEnum periodUnit) {
203+
public CreateNatGatewayRequest periodUnit(String periodUnit) {
250204
this.periodUnit = periodUnit;
251205
return this;
252206
}
@@ -256,11 +210,11 @@ public CreateNatGatewayRequest periodUnit(PeriodUnitEnum periodUnit) {
256210
* @return periodUnit
257211
**/
258212
@Schema(description = "")
259-
public PeriodUnitEnum getPeriodUnit() {
213+
public String getPeriodUnit() {
260214
return periodUnit;
261215
}
262216

263-
public void setPeriodUnit(PeriodUnitEnum periodUnit) {
217+
public void setPeriodUnit(String periodUnit) {
264218
this.periodUnit = periodUnit;
265219
}
266220

@@ -282,7 +236,7 @@ public void setProjectName(String projectName) {
282236
this.projectName = projectName;
283237
}
284238

285-
public CreateNatGatewayRequest spec(SpecEnum spec) {
239+
public CreateNatGatewayRequest spec(String spec) {
286240
this.spec = spec;
287241
return this;
288242
}
@@ -292,11 +246,11 @@ public CreateNatGatewayRequest spec(SpecEnum spec) {
292246
* @return spec
293247
**/
294248
@Schema(description = "")
295-
public SpecEnum getSpec() {
249+
public String getSpec() {
296250
return spec;
297251
}
298252

299-
public void setSpec(SpecEnum spec) {
253+
public void setSpec(String spec) {
300254
this.spec = spec;
301255
}
302256

@@ -377,7 +331,9 @@ public boolean equals(java.lang.Object o) {
377331
return Objects.equals(this.billingType, createNatGatewayRequest.billingType) &&
378332
Objects.equals(this.clientToken, createNatGatewayRequest.clientToken) &&
379333
Objects.equals(this.description, createNatGatewayRequest.description) &&
334+
Objects.equals(this.directMode, createNatGatewayRequest.directMode) &&
380335
Objects.equals(this.natGatewayName, createNatGatewayRequest.natGatewayName) &&
336+
Objects.equals(this.networkType, createNatGatewayRequest.networkType) &&
381337
Objects.equals(this.period, createNatGatewayRequest.period) &&
382338
Objects.equals(this.periodUnit, createNatGatewayRequest.periodUnit) &&
383339
Objects.equals(this.projectName, createNatGatewayRequest.projectName) &&
@@ -389,7 +345,7 @@ public boolean equals(java.lang.Object o) {
389345

390346
@Override
391347
public int hashCode() {
392-
return Objects.hash(billingType, clientToken, description, natGatewayName, period, periodUnit, projectName, spec, subnetId, tags, vpcId);
348+
return Objects.hash(billingType, clientToken, description, directMode, natGatewayName, networkType, period, periodUnit, projectName, spec, subnetId, tags, vpcId);
393349
}
394350

395351

@@ -401,7 +357,9 @@ public String toString() {
401357
sb.append(" billingType: ").append(toIndentedString(billingType)).append("\n");
402358
sb.append(" clientToken: ").append(toIndentedString(clientToken)).append("\n");
403359
sb.append(" description: ").append(toIndentedString(description)).append("\n");
360+
sb.append(" directMode: ").append(toIndentedString(directMode)).append("\n");
404361
sb.append(" natGatewayName: ").append(toIndentedString(natGatewayName)).append("\n");
362+
sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n");
405363
sb.append(" period: ").append(toIndentedString(period)).append("\n");
406364
sb.append(" periodUnit: ").append(toIndentedString(periodUnit)).append("\n");
407365
sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n");

0 commit comments

Comments
 (0)