Skip to content

Commit

Permalink
Regenerate compute client (#4731)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and sduskis committed Mar 25, 2019
1 parent bab445b commit 4f96e56
Show file tree
Hide file tree
Showing 6 changed files with 869 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public final class Instance implements ApiMessage {
private final Scheduling scheduling;
private final String selfLink;
private final List<ServiceAccount> serviceAccounts;
private final ShieldedInstanceConfig shieldedInstanceConfig;
private final ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy;
private final Boolean startRestricted;
private final String status;
private final String statusMessage;
Expand Down Expand Up @@ -75,6 +77,8 @@ private Instance() {
this.scheduling = null;
this.selfLink = null;
this.serviceAccounts = null;
this.shieldedInstanceConfig = null;
this.shieldedInstanceIntegrityPolicy = null;
this.startRestricted = null;
this.status = null;
this.statusMessage = null;
Expand Down Expand Up @@ -103,6 +107,8 @@ private Instance(
Scheduling scheduling,
String selfLink,
List<ServiceAccount> serviceAccounts,
ShieldedInstanceConfig shieldedInstanceConfig,
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy,
Boolean startRestricted,
String status,
String statusMessage,
Expand All @@ -128,6 +134,8 @@ private Instance(
this.scheduling = scheduling;
this.selfLink = selfLink;
this.serviceAccounts = serviceAccounts;
this.shieldedInstanceConfig = shieldedInstanceConfig;
this.shieldedInstanceIntegrityPolicy = shieldedInstanceIntegrityPolicy;
this.startRestricted = startRestricted;
this.status = status;
this.statusMessage = statusMessage;
Expand Down Expand Up @@ -197,6 +205,12 @@ public Object getFieldValue(String fieldName) {
if ("serviceAccounts".equals(fieldName)) {
return serviceAccounts;
}
if ("shieldedInstanceConfig".equals(fieldName)) {
return shieldedInstanceConfig;
}
if ("shieldedInstanceIntegrityPolicy".equals(fieldName)) {
return shieldedInstanceIntegrityPolicy;
}
if ("startRestricted".equals(fieldName)) {
return startRestricted;
}
Expand Down Expand Up @@ -387,6 +401,14 @@ public List<ServiceAccount> getServiceAccountsList() {
return serviceAccounts;
}

public ShieldedInstanceConfig getShieldedInstanceConfig() {
return shieldedInstanceConfig;
}

public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy() {
return shieldedInstanceIntegrityPolicy;
}

/**
* [Output Only] Whether a VM has been restricted for start because Compute Engine has detected
* suspicious activity.
Expand Down Expand Up @@ -469,6 +491,8 @@ public static class Builder {
private Scheduling scheduling;
private String selfLink;
private List<ServiceAccount> serviceAccounts;
private ShieldedInstanceConfig shieldedInstanceConfig;
private ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy;
private Boolean startRestricted;
private String status;
private String statusMessage;
Expand Down Expand Up @@ -539,6 +563,12 @@ public Builder mergeFrom(Instance other) {
if (other.getServiceAccountsList() != null) {
this.serviceAccounts = other.serviceAccounts;
}
if (other.getShieldedInstanceConfig() != null) {
this.shieldedInstanceConfig = other.shieldedInstanceConfig;
}
if (other.getShieldedInstanceIntegrityPolicy() != null) {
this.shieldedInstanceIntegrityPolicy = other.shieldedInstanceIntegrityPolicy;
}
if (other.getStartRestricted() != null) {
this.startRestricted = other.startRestricted;
}
Expand Down Expand Up @@ -578,6 +608,8 @@ public Builder mergeFrom(Instance other) {
this.scheduling = source.scheduling;
this.selfLink = source.selfLink;
this.serviceAccounts = source.serviceAccounts;
this.shieldedInstanceConfig = source.shieldedInstanceConfig;
this.shieldedInstanceIntegrityPolicy = source.shieldedInstanceIntegrityPolicy;
this.startRestricted = source.startRestricted;
this.status = source.status;
this.statusMessage = source.statusMessage;
Expand Down Expand Up @@ -981,6 +1013,25 @@ public Builder addServiceAccounts(ServiceAccount serviceAccounts) {
return this;
}

public ShieldedInstanceConfig getShieldedInstanceConfig() {
return shieldedInstanceConfig;
}

public Builder setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig) {
this.shieldedInstanceConfig = shieldedInstanceConfig;
return this;
}

public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy() {
return shieldedInstanceIntegrityPolicy;
}

public Builder setShieldedInstanceIntegrityPolicy(
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy) {
this.shieldedInstanceIntegrityPolicy = shieldedInstanceIntegrityPolicy;
return this;
}

/**
* [Output Only] Whether a VM has been restricted for start because Compute Engine has detected
* suspicious activity.
Expand Down Expand Up @@ -1087,6 +1138,8 @@ public Instance build() {
scheduling,
selfLink,
serviceAccounts,
shieldedInstanceConfig,
shieldedInstanceIntegrityPolicy,
startRestricted,
status,
statusMessage,
Expand Down Expand Up @@ -1116,6 +1169,8 @@ public Builder clone() {
newBuilder.setScheduling(this.scheduling);
newBuilder.setSelfLink(this.selfLink);
newBuilder.addAllServiceAccounts(this.serviceAccounts);
newBuilder.setShieldedInstanceConfig(this.shieldedInstanceConfig);
newBuilder.setShieldedInstanceIntegrityPolicy(this.shieldedInstanceIntegrityPolicy);
newBuilder.setStartRestricted(this.startRestricted);
newBuilder.setStatus(this.status);
newBuilder.setStatusMessage(this.statusMessage);
Expand Down Expand Up @@ -1188,6 +1243,12 @@ public String toString() {
+ "serviceAccounts="
+ serviceAccounts
+ ", "
+ "shieldedInstanceConfig="
+ shieldedInstanceConfig
+ ", "
+ "shieldedInstanceIntegrityPolicy="
+ shieldedInstanceIntegrityPolicy
+ ", "
+ "startRestricted="
+ startRestricted
+ ", "
Expand Down Expand Up @@ -1232,6 +1293,9 @@ public boolean equals(Object o) {
&& Objects.equals(this.scheduling, that.getScheduling())
&& Objects.equals(this.selfLink, that.getSelfLink())
&& Objects.equals(this.serviceAccounts, that.getServiceAccountsList())
&& Objects.equals(this.shieldedInstanceConfig, that.getShieldedInstanceConfig())
&& Objects.equals(
this.shieldedInstanceIntegrityPolicy, that.getShieldedInstanceIntegrityPolicy())
&& Objects.equals(this.startRestricted, that.getStartRestricted())
&& Objects.equals(this.status, that.getStatus())
&& Objects.equals(this.statusMessage, that.getStatusMessage())
Expand Down Expand Up @@ -1264,6 +1328,8 @@ public int hashCode() {
scheduling,
selfLink,
serviceAccounts,
shieldedInstanceConfig,
shieldedInstanceIntegrityPolicy,
startRestricted,
status,
statusMessage,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.compute.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.ApiMessage;
import java.util.List;
import java.util.Objects;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("by GAPIC")
@BetaApi
/** A set of Shielded Instance options. */
public final class ShieldedInstanceConfig implements ApiMessage {
private final Boolean enableIntegrityMonitoring;
private final Boolean enableSecureBoot;
private final Boolean enableVtpm;

private ShieldedInstanceConfig() {
this.enableIntegrityMonitoring = null;
this.enableSecureBoot = null;
this.enableVtpm = null;
}

private ShieldedInstanceConfig(
Boolean enableIntegrityMonitoring, Boolean enableSecureBoot, Boolean enableVtpm) {
this.enableIntegrityMonitoring = enableIntegrityMonitoring;
this.enableSecureBoot = enableSecureBoot;
this.enableVtpm = enableVtpm;
}

@Override
public Object getFieldValue(String fieldName) {
if ("enableIntegrityMonitoring".equals(fieldName)) {
return enableIntegrityMonitoring;
}
if ("enableSecureBoot".equals(fieldName)) {
return enableSecureBoot;
}
if ("enableVtpm".equals(fieldName)) {
return enableVtpm;
}
return null;
}

@Nullable
@Override
public ApiMessage getApiMessageRequestBody() {
return null;
}

@Nullable
@Override
/**
* The fields that should be serialized (even if they have empty values). If the containing
* message object has a non-null fieldmask, then all the fields in the field mask (and only those
* fields in the field mask) will be serialized. If the containing object does not have a
* fieldmask, then only non-empty fields will be serialized.
*/
public List<String> getFieldMask() {
return null;
}

/** Defines whether the instance has integrity monitoring enabled. */
public Boolean getEnableIntegrityMonitoring() {
return enableIntegrityMonitoring;
}

/** Defines whether the instance has Secure Boot enabled. */
public Boolean getEnableSecureBoot() {
return enableSecureBoot;
}

/** Defines whether the instance has the vTPM enabled. */
public Boolean getEnableVtpm() {
return enableVtpm;
}

public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}

public static Builder newBuilder(ShieldedInstanceConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}

public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}

public static ShieldedInstanceConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}

private static final ShieldedInstanceConfig DEFAULT_INSTANCE;

static {
DEFAULT_INSTANCE = new ShieldedInstanceConfig();
}

public static class Builder {
private Boolean enableIntegrityMonitoring;
private Boolean enableSecureBoot;
private Boolean enableVtpm;

Builder() {}

public Builder mergeFrom(ShieldedInstanceConfig other) {
if (other == ShieldedInstanceConfig.getDefaultInstance()) return this;
if (other.getEnableIntegrityMonitoring() != null) {
this.enableIntegrityMonitoring = other.enableIntegrityMonitoring;
}
if (other.getEnableSecureBoot() != null) {
this.enableSecureBoot = other.enableSecureBoot;
}
if (other.getEnableVtpm() != null) {
this.enableVtpm = other.enableVtpm;
}
return this;
}

Builder(ShieldedInstanceConfig source) {
this.enableIntegrityMonitoring = source.enableIntegrityMonitoring;
this.enableSecureBoot = source.enableSecureBoot;
this.enableVtpm = source.enableVtpm;
}

/** Defines whether the instance has integrity monitoring enabled. */
public Boolean getEnableIntegrityMonitoring() {
return enableIntegrityMonitoring;
}

/** Defines whether the instance has integrity monitoring enabled. */
public Builder setEnableIntegrityMonitoring(Boolean enableIntegrityMonitoring) {
this.enableIntegrityMonitoring = enableIntegrityMonitoring;
return this;
}

/** Defines whether the instance has Secure Boot enabled. */
public Boolean getEnableSecureBoot() {
return enableSecureBoot;
}

/** Defines whether the instance has Secure Boot enabled. */
public Builder setEnableSecureBoot(Boolean enableSecureBoot) {
this.enableSecureBoot = enableSecureBoot;
return this;
}

/** Defines whether the instance has the vTPM enabled. */
public Boolean getEnableVtpm() {
return enableVtpm;
}

/** Defines whether the instance has the vTPM enabled. */
public Builder setEnableVtpm(Boolean enableVtpm) {
this.enableVtpm = enableVtpm;
return this;
}

public ShieldedInstanceConfig build() {

return new ShieldedInstanceConfig(enableIntegrityMonitoring, enableSecureBoot, enableVtpm);
}

public Builder clone() {
Builder newBuilder = new Builder();
newBuilder.setEnableIntegrityMonitoring(this.enableIntegrityMonitoring);
newBuilder.setEnableSecureBoot(this.enableSecureBoot);
newBuilder.setEnableVtpm(this.enableVtpm);
return newBuilder;
}
}

@Override
public String toString() {
return "ShieldedInstanceConfig{"
+ "enableIntegrityMonitoring="
+ enableIntegrityMonitoring
+ ", "
+ "enableSecureBoot="
+ enableSecureBoot
+ ", "
+ "enableVtpm="
+ enableVtpm
+ "}";
}

@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ShieldedInstanceConfig) {
ShieldedInstanceConfig that = (ShieldedInstanceConfig) o;
return Objects.equals(this.enableIntegrityMonitoring, that.getEnableIntegrityMonitoring())
&& Objects.equals(this.enableSecureBoot, that.getEnableSecureBoot())
&& Objects.equals(this.enableVtpm, that.getEnableVtpm());
}
return false;
}

@Override
public int hashCode() {
return Objects.hash(enableIntegrityMonitoring, enableSecureBoot, enableVtpm);
}
}
Loading

0 comments on commit 4f96e56

Please sign in to comment.