Skip to content

Commit 4f96e56

Browse files
yoshi-automationsduskis
authored andcommitted
Regenerate compute client (#4731)
1 parent bab445b commit 4f96e56

File tree

6 files changed

+869
-4
lines changed

6 files changed

+869
-4
lines changed

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public final class Instance implements ApiMessage {
4848
private final Scheduling scheduling;
4949
private final String selfLink;
5050
private final List<ServiceAccount> serviceAccounts;
51+
private final ShieldedInstanceConfig shieldedInstanceConfig;
52+
private final ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy;
5153
private final Boolean startRestricted;
5254
private final String status;
5355
private final String statusMessage;
@@ -75,6 +77,8 @@ private Instance() {
7577
this.scheduling = null;
7678
this.selfLink = null;
7779
this.serviceAccounts = null;
80+
this.shieldedInstanceConfig = null;
81+
this.shieldedInstanceIntegrityPolicy = null;
7882
this.startRestricted = null;
7983
this.status = null;
8084
this.statusMessage = null;
@@ -103,6 +107,8 @@ private Instance(
103107
Scheduling scheduling,
104108
String selfLink,
105109
List<ServiceAccount> serviceAccounts,
110+
ShieldedInstanceConfig shieldedInstanceConfig,
111+
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy,
106112
Boolean startRestricted,
107113
String status,
108114
String statusMessage,
@@ -128,6 +134,8 @@ private Instance(
128134
this.scheduling = scheduling;
129135
this.selfLink = selfLink;
130136
this.serviceAccounts = serviceAccounts;
137+
this.shieldedInstanceConfig = shieldedInstanceConfig;
138+
this.shieldedInstanceIntegrityPolicy = shieldedInstanceIntegrityPolicy;
131139
this.startRestricted = startRestricted;
132140
this.status = status;
133141
this.statusMessage = statusMessage;
@@ -197,6 +205,12 @@ public Object getFieldValue(String fieldName) {
197205
if ("serviceAccounts".equals(fieldName)) {
198206
return serviceAccounts;
199207
}
208+
if ("shieldedInstanceConfig".equals(fieldName)) {
209+
return shieldedInstanceConfig;
210+
}
211+
if ("shieldedInstanceIntegrityPolicy".equals(fieldName)) {
212+
return shieldedInstanceIntegrityPolicy;
213+
}
200214
if ("startRestricted".equals(fieldName)) {
201215
return startRestricted;
202216
}
@@ -387,6 +401,14 @@ public List<ServiceAccount> getServiceAccountsList() {
387401
return serviceAccounts;
388402
}
389403

404+
public ShieldedInstanceConfig getShieldedInstanceConfig() {
405+
return shieldedInstanceConfig;
406+
}
407+
408+
public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy() {
409+
return shieldedInstanceIntegrityPolicy;
410+
}
411+
390412
/**
391413
* [Output Only] Whether a VM has been restricted for start because Compute Engine has detected
392414
* suspicious activity.
@@ -469,6 +491,8 @@ public static class Builder {
469491
private Scheduling scheduling;
470492
private String selfLink;
471493
private List<ServiceAccount> serviceAccounts;
494+
private ShieldedInstanceConfig shieldedInstanceConfig;
495+
private ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy;
472496
private Boolean startRestricted;
473497
private String status;
474498
private String statusMessage;
@@ -539,6 +563,12 @@ public Builder mergeFrom(Instance other) {
539563
if (other.getServiceAccountsList() != null) {
540564
this.serviceAccounts = other.serviceAccounts;
541565
}
566+
if (other.getShieldedInstanceConfig() != null) {
567+
this.shieldedInstanceConfig = other.shieldedInstanceConfig;
568+
}
569+
if (other.getShieldedInstanceIntegrityPolicy() != null) {
570+
this.shieldedInstanceIntegrityPolicy = other.shieldedInstanceIntegrityPolicy;
571+
}
542572
if (other.getStartRestricted() != null) {
543573
this.startRestricted = other.startRestricted;
544574
}
@@ -578,6 +608,8 @@ public Builder mergeFrom(Instance other) {
578608
this.scheduling = source.scheduling;
579609
this.selfLink = source.selfLink;
580610
this.serviceAccounts = source.serviceAccounts;
611+
this.shieldedInstanceConfig = source.shieldedInstanceConfig;
612+
this.shieldedInstanceIntegrityPolicy = source.shieldedInstanceIntegrityPolicy;
581613
this.startRestricted = source.startRestricted;
582614
this.status = source.status;
583615
this.statusMessage = source.statusMessage;
@@ -981,6 +1013,25 @@ public Builder addServiceAccounts(ServiceAccount serviceAccounts) {
9811013
return this;
9821014
}
9831015

1016+
public ShieldedInstanceConfig getShieldedInstanceConfig() {
1017+
return shieldedInstanceConfig;
1018+
}
1019+
1020+
public Builder setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig) {
1021+
this.shieldedInstanceConfig = shieldedInstanceConfig;
1022+
return this;
1023+
}
1024+
1025+
public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy() {
1026+
return shieldedInstanceIntegrityPolicy;
1027+
}
1028+
1029+
public Builder setShieldedInstanceIntegrityPolicy(
1030+
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy) {
1031+
this.shieldedInstanceIntegrityPolicy = shieldedInstanceIntegrityPolicy;
1032+
return this;
1033+
}
1034+
9841035
/**
9851036
* [Output Only] Whether a VM has been restricted for start because Compute Engine has detected
9861037
* suspicious activity.
@@ -1087,6 +1138,8 @@ public Instance build() {
10871138
scheduling,
10881139
selfLink,
10891140
serviceAccounts,
1141+
shieldedInstanceConfig,
1142+
shieldedInstanceIntegrityPolicy,
10901143
startRestricted,
10911144
status,
10921145
statusMessage,
@@ -1116,6 +1169,8 @@ public Builder clone() {
11161169
newBuilder.setScheduling(this.scheduling);
11171170
newBuilder.setSelfLink(this.selfLink);
11181171
newBuilder.addAllServiceAccounts(this.serviceAccounts);
1172+
newBuilder.setShieldedInstanceConfig(this.shieldedInstanceConfig);
1173+
newBuilder.setShieldedInstanceIntegrityPolicy(this.shieldedInstanceIntegrityPolicy);
11191174
newBuilder.setStartRestricted(this.startRestricted);
11201175
newBuilder.setStatus(this.status);
11211176
newBuilder.setStatusMessage(this.statusMessage);
@@ -1188,6 +1243,12 @@ public String toString() {
11881243
+ "serviceAccounts="
11891244
+ serviceAccounts
11901245
+ ", "
1246+
+ "shieldedInstanceConfig="
1247+
+ shieldedInstanceConfig
1248+
+ ", "
1249+
+ "shieldedInstanceIntegrityPolicy="
1250+
+ shieldedInstanceIntegrityPolicy
1251+
+ ", "
11911252
+ "startRestricted="
11921253
+ startRestricted
11931254
+ ", "
@@ -1232,6 +1293,9 @@ public boolean equals(Object o) {
12321293
&& Objects.equals(this.scheduling, that.getScheduling())
12331294
&& Objects.equals(this.selfLink, that.getSelfLink())
12341295
&& Objects.equals(this.serviceAccounts, that.getServiceAccountsList())
1296+
&& Objects.equals(this.shieldedInstanceConfig, that.getShieldedInstanceConfig())
1297+
&& Objects.equals(
1298+
this.shieldedInstanceIntegrityPolicy, that.getShieldedInstanceIntegrityPolicy())
12351299
&& Objects.equals(this.startRestricted, that.getStartRestricted())
12361300
&& Objects.equals(this.status, that.getStatus())
12371301
&& Objects.equals(this.statusMessage, that.getStatusMessage())
@@ -1264,6 +1328,8 @@ public int hashCode() {
12641328
scheduling,
12651329
selfLink,
12661330
serviceAccounts,
1331+
shieldedInstanceConfig,
1332+
shieldedInstanceIntegrityPolicy,
12671333
startRestricted,
12681334
status,
12691335
statusMessage,
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
/*
2+
* Copyright 2019 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.google.cloud.compute.v1;
17+
18+
import com.google.api.core.BetaApi;
19+
import com.google.api.gax.httpjson.ApiMessage;
20+
import java.util.List;
21+
import java.util.Objects;
22+
import javax.annotation.Generated;
23+
import javax.annotation.Nullable;
24+
25+
@Generated("by GAPIC")
26+
@BetaApi
27+
/** A set of Shielded Instance options. */
28+
public final class ShieldedInstanceConfig implements ApiMessage {
29+
private final Boolean enableIntegrityMonitoring;
30+
private final Boolean enableSecureBoot;
31+
private final Boolean enableVtpm;
32+
33+
private ShieldedInstanceConfig() {
34+
this.enableIntegrityMonitoring = null;
35+
this.enableSecureBoot = null;
36+
this.enableVtpm = null;
37+
}
38+
39+
private ShieldedInstanceConfig(
40+
Boolean enableIntegrityMonitoring, Boolean enableSecureBoot, Boolean enableVtpm) {
41+
this.enableIntegrityMonitoring = enableIntegrityMonitoring;
42+
this.enableSecureBoot = enableSecureBoot;
43+
this.enableVtpm = enableVtpm;
44+
}
45+
46+
@Override
47+
public Object getFieldValue(String fieldName) {
48+
if ("enableIntegrityMonitoring".equals(fieldName)) {
49+
return enableIntegrityMonitoring;
50+
}
51+
if ("enableSecureBoot".equals(fieldName)) {
52+
return enableSecureBoot;
53+
}
54+
if ("enableVtpm".equals(fieldName)) {
55+
return enableVtpm;
56+
}
57+
return null;
58+
}
59+
60+
@Nullable
61+
@Override
62+
public ApiMessage getApiMessageRequestBody() {
63+
return null;
64+
}
65+
66+
@Nullable
67+
@Override
68+
/**
69+
* The fields that should be serialized (even if they have empty values). If the containing
70+
* message object has a non-null fieldmask, then all the fields in the field mask (and only those
71+
* fields in the field mask) will be serialized. If the containing object does not have a
72+
* fieldmask, then only non-empty fields will be serialized.
73+
*/
74+
public List<String> getFieldMask() {
75+
return null;
76+
}
77+
78+
/** Defines whether the instance has integrity monitoring enabled. */
79+
public Boolean getEnableIntegrityMonitoring() {
80+
return enableIntegrityMonitoring;
81+
}
82+
83+
/** Defines whether the instance has Secure Boot enabled. */
84+
public Boolean getEnableSecureBoot() {
85+
return enableSecureBoot;
86+
}
87+
88+
/** Defines whether the instance has the vTPM enabled. */
89+
public Boolean getEnableVtpm() {
90+
return enableVtpm;
91+
}
92+
93+
public static Builder newBuilder() {
94+
return DEFAULT_INSTANCE.toBuilder();
95+
}
96+
97+
public static Builder newBuilder(ShieldedInstanceConfig prototype) {
98+
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
99+
}
100+
101+
public Builder toBuilder() {
102+
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
103+
}
104+
105+
public static ShieldedInstanceConfig getDefaultInstance() {
106+
return DEFAULT_INSTANCE;
107+
}
108+
109+
private static final ShieldedInstanceConfig DEFAULT_INSTANCE;
110+
111+
static {
112+
DEFAULT_INSTANCE = new ShieldedInstanceConfig();
113+
}
114+
115+
public static class Builder {
116+
private Boolean enableIntegrityMonitoring;
117+
private Boolean enableSecureBoot;
118+
private Boolean enableVtpm;
119+
120+
Builder() {}
121+
122+
public Builder mergeFrom(ShieldedInstanceConfig other) {
123+
if (other == ShieldedInstanceConfig.getDefaultInstance()) return this;
124+
if (other.getEnableIntegrityMonitoring() != null) {
125+
this.enableIntegrityMonitoring = other.enableIntegrityMonitoring;
126+
}
127+
if (other.getEnableSecureBoot() != null) {
128+
this.enableSecureBoot = other.enableSecureBoot;
129+
}
130+
if (other.getEnableVtpm() != null) {
131+
this.enableVtpm = other.enableVtpm;
132+
}
133+
return this;
134+
}
135+
136+
Builder(ShieldedInstanceConfig source) {
137+
this.enableIntegrityMonitoring = source.enableIntegrityMonitoring;
138+
this.enableSecureBoot = source.enableSecureBoot;
139+
this.enableVtpm = source.enableVtpm;
140+
}
141+
142+
/** Defines whether the instance has integrity monitoring enabled. */
143+
public Boolean getEnableIntegrityMonitoring() {
144+
return enableIntegrityMonitoring;
145+
}
146+
147+
/** Defines whether the instance has integrity monitoring enabled. */
148+
public Builder setEnableIntegrityMonitoring(Boolean enableIntegrityMonitoring) {
149+
this.enableIntegrityMonitoring = enableIntegrityMonitoring;
150+
return this;
151+
}
152+
153+
/** Defines whether the instance has Secure Boot enabled. */
154+
public Boolean getEnableSecureBoot() {
155+
return enableSecureBoot;
156+
}
157+
158+
/** Defines whether the instance has Secure Boot enabled. */
159+
public Builder setEnableSecureBoot(Boolean enableSecureBoot) {
160+
this.enableSecureBoot = enableSecureBoot;
161+
return this;
162+
}
163+
164+
/** Defines whether the instance has the vTPM enabled. */
165+
public Boolean getEnableVtpm() {
166+
return enableVtpm;
167+
}
168+
169+
/** Defines whether the instance has the vTPM enabled. */
170+
public Builder setEnableVtpm(Boolean enableVtpm) {
171+
this.enableVtpm = enableVtpm;
172+
return this;
173+
}
174+
175+
public ShieldedInstanceConfig build() {
176+
177+
return new ShieldedInstanceConfig(enableIntegrityMonitoring, enableSecureBoot, enableVtpm);
178+
}
179+
180+
public Builder clone() {
181+
Builder newBuilder = new Builder();
182+
newBuilder.setEnableIntegrityMonitoring(this.enableIntegrityMonitoring);
183+
newBuilder.setEnableSecureBoot(this.enableSecureBoot);
184+
newBuilder.setEnableVtpm(this.enableVtpm);
185+
return newBuilder;
186+
}
187+
}
188+
189+
@Override
190+
public String toString() {
191+
return "ShieldedInstanceConfig{"
192+
+ "enableIntegrityMonitoring="
193+
+ enableIntegrityMonitoring
194+
+ ", "
195+
+ "enableSecureBoot="
196+
+ enableSecureBoot
197+
+ ", "
198+
+ "enableVtpm="
199+
+ enableVtpm
200+
+ "}";
201+
}
202+
203+
@Override
204+
public boolean equals(Object o) {
205+
if (o == this) {
206+
return true;
207+
}
208+
if (o instanceof ShieldedInstanceConfig) {
209+
ShieldedInstanceConfig that = (ShieldedInstanceConfig) o;
210+
return Objects.equals(this.enableIntegrityMonitoring, that.getEnableIntegrityMonitoring())
211+
&& Objects.equals(this.enableSecureBoot, that.getEnableSecureBoot())
212+
&& Objects.equals(this.enableVtpm, that.getEnableVtpm());
213+
}
214+
return false;
215+
}
216+
217+
@Override
218+
public int hashCode() {
219+
return Objects.hash(enableIntegrityMonitoring, enableSecureBoot, enableVtpm);
220+
}
221+
}

0 commit comments

Comments
 (0)