Skip to content

Commit 19bafcd

Browse files
yoshi-automationsduskis
authored andcommitted
Regenerate compute client (#4527)
1 parent 9e56353 commit 19bafcd

File tree

12 files changed

+284
-101
lines changed

12 files changed

+284
-101
lines changed

google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AttachDiskInstanceHttpRequest.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ public String getFields() {
158158
return fields;
159159
}
160160

161-
/**
162-
* Whether to force attach the disk even if it's currently attached to another instance. This is
163-
* only available for regional disks.
164-
*/
161+
/** Whether to force attach the disk even if it's currently attached to another instance. */
165162
public Boolean getForceAttach() {
166163
return forceAttach;
167164
}
@@ -348,18 +345,12 @@ public Builder setFields(String fields) {
348345
return this;
349346
}
350347

351-
/**
352-
* Whether to force attach the disk even if it's currently attached to another instance. This is
353-
* only available for regional disks.
354-
*/
348+
/** Whether to force attach the disk even if it's currently attached to another instance. */
355349
public Boolean getForceAttach() {
356350
return forceAttach;
357351
}
358352

359-
/**
360-
* Whether to force attach the disk even if it's currently attached to another instance. This is
361-
* only available for regional disks.
362-
*/
353+
/** Whether to force attach the disk even if it's currently attached to another instance. */
363354
public Builder setForceAttach(Boolean forceAttach) {
364355
this.forceAttach = forceAttach;
365356
return this;

google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Condition.java

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,21 @@ public final class Condition implements ApiMessage {
3131
private final String op;
3232
private final String svc;
3333
private final String sys;
34-
private final String value;
3534
private final List<String> values;
3635

3736
private Condition() {
3837
this.iam = null;
3938
this.op = null;
4039
this.svc = null;
4140
this.sys = null;
42-
this.value = null;
4341
this.values = null;
4442
}
4543

46-
private Condition(
47-
String iam, String op, String svc, String sys, String value, List<String> values) {
44+
private Condition(String iam, String op, String svc, String sys, List<String> values) {
4845
this.iam = iam;
4946
this.op = op;
5047
this.svc = svc;
5148
this.sys = sys;
52-
this.value = value;
5349
this.values = values;
5450
}
5551

@@ -67,9 +63,6 @@ public Object getFieldValue(String fieldName) {
6763
if ("sys".equals(fieldName)) {
6864
return sys;
6965
}
70-
if ("value".equals(fieldName)) {
71-
return value;
72-
}
7366
if ("values".equals(fieldName)) {
7467
return values;
7568
}
@@ -117,12 +110,7 @@ public String getSys() {
117110
return sys;
118111
}
119112

120-
/** DEPRECATED. Use 'values' instead. */
121-
public String getValue() {
122-
return value;
123-
}
124-
125-
/** The objects of the condition. This is mutually exclusive with 'value'. */
113+
/** The objects of the condition. */
126114
public List<String> getValuesList() {
127115
return values;
128116
}
@@ -154,7 +142,6 @@ public static class Builder {
154142
private String op;
155143
private String svc;
156144
private String sys;
157-
private String value;
158145
private List<String> values;
159146

160147
Builder() {}
@@ -173,9 +160,6 @@ public Builder mergeFrom(Condition other) {
173160
if (other.getSys() != null) {
174161
this.sys = other.sys;
175162
}
176-
if (other.getValue() != null) {
177-
this.value = other.value;
178-
}
179163
if (other.getValuesList() != null) {
180164
this.values = other.values;
181165
}
@@ -187,7 +171,6 @@ public Builder mergeFrom(Condition other) {
187171
this.op = source.op;
188172
this.svc = source.svc;
189173
this.sys = source.sys;
190-
this.value = source.value;
191174
this.values = source.values;
192175
}
193176

@@ -241,23 +224,12 @@ public Builder setSys(String sys) {
241224
return this;
242225
}
243226

244-
/** DEPRECATED. Use 'values' instead. */
245-
public String getValue() {
246-
return value;
247-
}
248-
249-
/** DEPRECATED. Use 'values' instead. */
250-
public Builder setValue(String value) {
251-
this.value = value;
252-
return this;
253-
}
254-
255-
/** The objects of the condition. This is mutually exclusive with 'value'. */
227+
/** The objects of the condition. */
256228
public List<String> getValuesList() {
257229
return values;
258230
}
259231

260-
/** The objects of the condition. This is mutually exclusive with 'value'. */
232+
/** The objects of the condition. */
261233
public Builder addAllValues(List<String> values) {
262234
if (this.values == null) {
263235
this.values = new LinkedList<>();
@@ -266,7 +238,7 @@ public Builder addAllValues(List<String> values) {
266238
return this;
267239
}
268240

269-
/** The objects of the condition. This is mutually exclusive with 'value'. */
241+
/** The objects of the condition. */
270242
public Builder addValues(String values) {
271243
if (this.values == null) {
272244
this.values = new LinkedList<>();
@@ -277,7 +249,7 @@ public Builder addValues(String values) {
277249

278250
public Condition build() {
279251

280-
return new Condition(iam, op, svc, sys, value, values);
252+
return new Condition(iam, op, svc, sys, values);
281253
}
282254

283255
public Builder clone() {
@@ -286,7 +258,6 @@ public Builder clone() {
286258
newBuilder.setOp(this.op);
287259
newBuilder.setSvc(this.svc);
288260
newBuilder.setSys(this.sys);
289-
newBuilder.setValue(this.value);
290261
newBuilder.addAllValues(this.values);
291262
return newBuilder;
292263
}
@@ -307,9 +278,6 @@ public String toString() {
307278
+ "sys="
308279
+ sys
309280
+ ", "
310-
+ "value="
311-
+ value
312-
+ ", "
313281
+ "values="
314282
+ values
315283
+ "}";
@@ -326,14 +294,13 @@ public boolean equals(Object o) {
326294
&& Objects.equals(this.op, that.getOp())
327295
&& Objects.equals(this.svc, that.getSvc())
328296
&& Objects.equals(this.sys, that.getSys())
329-
&& Objects.equals(this.value, that.getValue())
330297
&& Objects.equals(this.values, that.getValuesList());
331298
}
332299
return false;
333300
}
334301

335302
@Override
336303
public int hashCode() {
337-
return Objects.hash(iam, op, svc, sys, value, values);
304+
return Objects.hash(iam, op, svc, sys, values);
338305
}
339306
}

google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)
3535
*/
3636
public final class ForwardingRule implements ApiMessage {
37+
private final Boolean allPorts;
3738
private final String backendService;
3839
private final String creationTimestamp;
3940
private final String description;
@@ -61,6 +62,7 @@ public final class ForwardingRule implements ApiMessage {
6162
private final String target;
6263

6364
private ForwardingRule() {
65+
this.allPorts = null;
6466
this.backendService = null;
6567
this.creationTimestamp = null;
6668
this.description = null;
@@ -84,6 +86,7 @@ private ForwardingRule() {
8486
}
8587

8688
private ForwardingRule(
89+
Boolean allPorts,
8790
String backendService,
8891
String creationTimestamp,
8992
String description,
@@ -104,6 +107,7 @@ private ForwardingRule(
104107
String serviceName,
105108
String subnetwork,
106109
String target) {
110+
this.allPorts = allPorts;
107111
this.backendService = backendService;
108112
this.creationTimestamp = creationTimestamp;
109113
this.description = description;
@@ -128,6 +132,9 @@ private ForwardingRule(
128132

129133
@Override
130134
public Object getFieldValue(String fieldName) {
135+
if ("allPorts".equals(fieldName)) {
136+
return allPorts;
137+
}
131138
if ("backendService".equals(fieldName)) {
132139
return backendService;
133140
}
@@ -209,6 +216,19 @@ public List<String> getFieldMask() {
209216
return null;
210217
}
211218

219+
/**
220+
* This field is used along with the backend_service field for internal load balancing or with the
221+
* target field for internal TargetInstance. This field cannot be used with port or portRange
222+
* fields.
223+
*
224+
* <p>When the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to
225+
* allow packets addressed to any ports will be forwarded to the backends configured with this
226+
* forwarding rule.
227+
*/
228+
public Boolean getAllPorts() {
229+
return allPorts;
230+
}
231+
212232
/**
213233
* This field is only used for INTERNAL load balancing.
214234
*
@@ -427,8 +447,8 @@ public String getSubnetwork() {
427447
* The URL of the target resource to receive the matched traffic. For regional forwarding rules,
428448
* this target must live in the same region as the forwarding rule. For global forwarding rules,
429449
* this target must be a global load balancing resource. The forwarded traffic must be of a type
430-
* appropriate to the target object. For INTERNAL_SELF_MANAGED" load balancing, only HTTP and
431-
* HTTPS targets are valid.
450+
* appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS
451+
* targets are valid.
432452
*/
433453
public String getTarget() {
434454
return target;
@@ -457,6 +477,7 @@ public static ForwardingRule getDefaultInstance() {
457477
}
458478

459479
public static class Builder {
480+
private Boolean allPorts;
460481
private String backendService;
461482
private String creationTimestamp;
462483
private String description;
@@ -482,6 +503,9 @@ public static class Builder {
482503

483504
public Builder mergeFrom(ForwardingRule other) {
484505
if (other == ForwardingRule.getDefaultInstance()) return this;
506+
if (other.getAllPorts() != null) {
507+
this.allPorts = other.allPorts;
508+
}
485509
if (other.getBackendService() != null) {
486510
this.backendService = other.backendService;
487511
}
@@ -546,6 +570,7 @@ public Builder mergeFrom(ForwardingRule other) {
546570
}
547571

548572
Builder(ForwardingRule source) {
573+
this.allPorts = source.allPorts;
549574
this.backendService = source.backendService;
550575
this.creationTimestamp = source.creationTimestamp;
551576
this.description = source.description;
@@ -568,6 +593,33 @@ public Builder mergeFrom(ForwardingRule other) {
568593
this.target = source.target;
569594
}
570595

596+
/**
597+
* This field is used along with the backend_service field for internal load balancing or with
598+
* the target field for internal TargetInstance. This field cannot be used with port or
599+
* portRange fields.
600+
*
601+
* <p>When the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to
602+
* allow packets addressed to any ports will be forwarded to the backends configured with this
603+
* forwarding rule.
604+
*/
605+
public Boolean getAllPorts() {
606+
return allPorts;
607+
}
608+
609+
/**
610+
* This field is used along with the backend_service field for internal load balancing or with
611+
* the target field for internal TargetInstance. This field cannot be used with port or
612+
* portRange fields.
613+
*
614+
* <p>When the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to
615+
* allow packets addressed to any ports will be forwarded to the backends configured with this
616+
* forwarding rule.
617+
*/
618+
public Builder setAllPorts(Boolean allPorts) {
619+
this.allPorts = allPorts;
620+
return this;
621+
}
622+
571623
/**
572624
* This field is only used for INTERNAL load balancing.
573625
*
@@ -1045,7 +1097,7 @@ public Builder setSubnetwork(String subnetwork) {
10451097
* The URL of the target resource to receive the matched traffic. For regional forwarding rules,
10461098
* this target must live in the same region as the forwarding rule. For global forwarding rules,
10471099
* this target must be a global load balancing resource. The forwarded traffic must be of a type
1048-
* appropriate to the target object. For INTERNAL_SELF_MANAGED" load balancing, only HTTP and
1100+
* appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and
10491101
* HTTPS targets are valid.
10501102
*/
10511103
public String getTarget() {
@@ -1056,7 +1108,7 @@ public String getTarget() {
10561108
* The URL of the target resource to receive the matched traffic. For regional forwarding rules,
10571109
* this target must live in the same region as the forwarding rule. For global forwarding rules,
10581110
* this target must be a global load balancing resource. The forwarded traffic must be of a type
1059-
* appropriate to the target object. For INTERNAL_SELF_MANAGED" load balancing, only HTTP and
1111+
* appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and
10601112
* HTTPS targets are valid.
10611113
*/
10621114
public Builder setTarget(String target) {
@@ -1067,6 +1119,7 @@ public Builder setTarget(String target) {
10671119
public ForwardingRule build() {
10681120

10691121
return new ForwardingRule(
1122+
allPorts,
10701123
backendService,
10711124
creationTimestamp,
10721125
description,
@@ -1091,6 +1144,7 @@ public ForwardingRule build() {
10911144

10921145
public Builder clone() {
10931146
Builder newBuilder = new Builder();
1147+
newBuilder.setAllPorts(this.allPorts);
10941148
newBuilder.setBackendService(this.backendService);
10951149
newBuilder.setCreationTimestamp(this.creationTimestamp);
10961150
newBuilder.setDescription(this.description);
@@ -1118,6 +1172,9 @@ public Builder clone() {
11181172
@Override
11191173
public String toString() {
11201174
return "ForwardingRule{"
1175+
+ "allPorts="
1176+
+ allPorts
1177+
+ ", "
11211178
+ "backendService="
11221179
+ backendService
11231180
+ ", "
@@ -1187,7 +1244,8 @@ public boolean equals(Object o) {
11871244
}
11881245
if (o instanceof ForwardingRule) {
11891246
ForwardingRule that = (ForwardingRule) o;
1190-
return Objects.equals(this.backendService, that.getBackendService())
1247+
return Objects.equals(this.allPorts, that.getAllPorts())
1248+
&& Objects.equals(this.backendService, that.getBackendService())
11911249
&& Objects.equals(this.creationTimestamp, that.getCreationTimestamp())
11921250
&& Objects.equals(this.description, that.getDescription())
11931251
&& Objects.equals(this.iPAddress, that.getIPAddress())
@@ -1214,6 +1272,7 @@ public boolean equals(Object o) {
12141272
@Override
12151273
public int hashCode() {
12161274
return Objects.hash(
1275+
allPorts,
12171276
backendService,
12181277
creationTimestamp,
12191278
description,

0 commit comments

Comments
 (0)