diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Address.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Address.java index c887c8d4f20b..678e3f58ab66 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Address.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Address.java @@ -34,7 +34,10 @@ public final class Address implements ApiMessage { private final String ipVersion; private final String kind; private final String name; + private final String network; private final String networkTier; + private final Integer prefixLength; + private final String purpose; private final String region; private final String selfLink; private final String status; @@ -50,7 +53,10 @@ private Address() { this.ipVersion = null; this.kind = null; this.name = null; + this.network = null; this.networkTier = null; + this.prefixLength = null; + this.purpose = null; this.region = null; this.selfLink = null; this.status = null; @@ -67,7 +73,10 @@ private Address( String ipVersion, String kind, String name, + String network, String networkTier, + Integer prefixLength, + String purpose, String region, String selfLink, String status, @@ -81,7 +90,10 @@ private Address( this.ipVersion = ipVersion; this.kind = kind; this.name = name; + this.network = network; this.networkTier = networkTier; + this.prefixLength = prefixLength; + this.purpose = purpose; this.region = region; this.selfLink = selfLink; this.status = status; @@ -115,9 +127,18 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("name")) { return name; } + if (fieldName.equals("network")) { + return network; + } if (fieldName.equals("networkTier")) { return networkTier; } + if (fieldName.equals("prefixLength")) { + return prefixLength; + } + if (fieldName.equals("purpose")) { + return purpose; + } if (fieldName.equals("region")) { return region; } @@ -180,10 +201,22 @@ public String getName() { return name; } + public String getNetwork() { + return network; + } + public String getNetworkTier() { return networkTier; } + public Integer getPrefixLength() { + return prefixLength; + } + + public String getPurpose() { + return purpose; + } + public String getRegion() { return region; } @@ -235,7 +268,10 @@ public static class Builder { private String ipVersion; private String kind; private String name; + private String network; private String networkTier; + private Integer prefixLength; + private String purpose; private String region; private String selfLink; private String status; @@ -270,9 +306,18 @@ public Builder mergeFrom(Address other) { if (other.getName() != null) { this.name = other.name; } + if (other.getNetwork() != null) { + this.network = other.network; + } if (other.getNetworkTier() != null) { this.networkTier = other.networkTier; } + if (other.getPrefixLength() != null) { + this.prefixLength = other.prefixLength; + } + if (other.getPurpose() != null) { + this.purpose = other.purpose; + } if (other.getRegion() != null) { this.region = other.region; } @@ -300,7 +345,10 @@ public Builder mergeFrom(Address other) { this.ipVersion = source.ipVersion; this.kind = source.kind; this.name = source.name; + this.network = source.network; this.networkTier = source.networkTier; + this.prefixLength = source.prefixLength; + this.purpose = source.purpose; this.region = source.region; this.selfLink = source.selfLink; this.status = source.status; @@ -380,6 +428,15 @@ public Builder setName(String name) { return this; } + public String getNetwork() { + return network; + } + + public Builder setNetwork(String network) { + this.network = network; + return this; + } + public String getNetworkTier() { return networkTier; } @@ -389,6 +446,24 @@ public Builder setNetworkTier(String networkTier) { return this; } + public Integer getPrefixLength() { + return prefixLength; + } + + public Builder setPrefixLength(Integer prefixLength) { + this.prefixLength = prefixLength; + return this; + } + + public String getPurpose() { + return purpose; + } + + public Builder setPurpose(String purpose) { + this.purpose = purpose; + return this; + } + public String getRegion() { return region; } @@ -456,7 +531,10 @@ public Address build() { ipVersion, kind, name, + network, networkTier, + prefixLength, + purpose, region, selfLink, status, @@ -474,7 +552,10 @@ public Builder clone() { newBuilder.setIpVersion(this.ipVersion); newBuilder.setKind(this.kind); newBuilder.setName(this.name); + newBuilder.setNetwork(this.network); newBuilder.setNetworkTier(this.networkTier); + newBuilder.setPrefixLength(this.prefixLength); + newBuilder.setPurpose(this.purpose); newBuilder.setRegion(this.region); newBuilder.setSelfLink(this.selfLink); newBuilder.setStatus(this.status); @@ -511,9 +592,18 @@ public String toString() { + "name=" + name + ", " + + "network=" + + network + + ", " + "networkTier=" + networkTier + ", " + + "prefixLength=" + + prefixLength + + ", " + + "purpose=" + + purpose + + ", " + "region=" + region + ", " @@ -546,7 +636,10 @@ public boolean equals(Object o) { && Objects.equals(this.ipVersion, that.getIpVersion()) && Objects.equals(this.kind, that.getKind()) && Objects.equals(this.name, that.getName()) + && Objects.equals(this.network, that.getNetwork()) && Objects.equals(this.networkTier, that.getNetworkTier()) + && Objects.equals(this.prefixLength, that.getPrefixLength()) + && Objects.equals(this.purpose, that.getPurpose()) && Objects.equals(this.region, that.getRegion()) && Objects.equals(this.selfLink, that.getSelfLink()) && Objects.equals(this.status, that.getStatus()) @@ -567,7 +660,10 @@ public int hashCode() { ipVersion, kind, name, + network, networkTier, + prefixLength, + purpose, region, selfLink, status, diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuditConfig.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuditConfig.java new file mode 100644 index 000000000000..6f0cbcf0a9fa --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuditConfig.java @@ -0,0 +1,228 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class AuditConfig implements ApiMessage { + private final List auditLogConfigs; + private final List exemptedMembers; + private final String service; + + private AuditConfig() { + this.auditLogConfigs = null; + this.exemptedMembers = null; + this.service = null; + } + + private AuditConfig( + List auditLogConfigs, List exemptedMembers, String service) { + this.auditLogConfigs = auditLogConfigs; + this.exemptedMembers = exemptedMembers; + this.service = service; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("auditLogConfigs")) { + return auditLogConfigs; + } + if (fieldName.equals("exemptedMembers")) { + return exemptedMembers; + } + if (fieldName.equals("service")) { + return service; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getAuditLogConfigsList() { + return auditLogConfigs; + } + + public List getExemptedMembersList() { + return exemptedMembers; + } + + public String getService() { + return service; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(AuditConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AuditConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AuditConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AuditConfig(); + } + + public static class Builder { + private List auditLogConfigs; + private List exemptedMembers; + private String service; + + Builder() {} + + public Builder mergeFrom(AuditConfig other) { + if (other == AuditConfig.getDefaultInstance()) return this; + if (other.getAuditLogConfigsList() != null) { + this.auditLogConfigs = other.auditLogConfigs; + } + if (other.getExemptedMembersList() != null) { + this.exemptedMembers = other.exemptedMembers; + } + if (other.getService() != null) { + this.service = other.service; + } + return this; + } + + Builder(AuditConfig source) { + this.auditLogConfigs = source.auditLogConfigs; + this.exemptedMembers = source.exemptedMembers; + this.service = source.service; + } + + public List getAuditLogConfigsList() { + return auditLogConfigs; + } + + public Builder addAllAuditLogConfigs(List auditLogConfigs) { + if (this.auditLogConfigs == null) { + this.auditLogConfigs = new LinkedList<>(); + } + this.auditLogConfigs.addAll(auditLogConfigs); + return this; + } + + public Builder addAuditLogConfigs(AuditLogConfig auditLogConfigs) { + if (this.auditLogConfigs == null) { + this.auditLogConfigs = new LinkedList<>(); + } + this.auditLogConfigs.add(auditLogConfigs); + return this; + } + + public List getExemptedMembersList() { + return exemptedMembers; + } + + public Builder addAllExemptedMembers(List exemptedMembers) { + if (this.exemptedMembers == null) { + this.exemptedMembers = new LinkedList<>(); + } + this.exemptedMembers.addAll(exemptedMembers); + return this; + } + + public Builder addExemptedMembers(String exemptedMembers) { + if (this.exemptedMembers == null) { + this.exemptedMembers = new LinkedList<>(); + } + this.exemptedMembers.add(exemptedMembers); + return this; + } + + public String getService() { + return service; + } + + public Builder setService(String service) { + this.service = service; + return this; + } + + public AuditConfig build() { + + return new AuditConfig(auditLogConfigs, exemptedMembers, service); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllAuditLogConfigs(this.auditLogConfigs); + newBuilder.addAllExemptedMembers(this.exemptedMembers); + newBuilder.setService(this.service); + return newBuilder; + } + } + + @Override + public String toString() { + return "AuditConfig{" + + "auditLogConfigs=" + + auditLogConfigs + + ", " + + "exemptedMembers=" + + exemptedMembers + + ", " + + "service=" + + service + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AuditConfig) { + AuditConfig that = (AuditConfig) o; + return Objects.equals(this.auditLogConfigs, that.getAuditLogConfigsList()) + && Objects.equals(this.exemptedMembers, that.getExemptedMembersList()) + && Objects.equals(this.service, that.getService()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(auditLogConfigs, exemptedMembers, service); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java new file mode 100644 index 000000000000..c2a1495baf3c --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java @@ -0,0 +1,187 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class AuditLogConfig implements ApiMessage { + private final List exemptedMembers; + private final String logType; + + private AuditLogConfig() { + this.exemptedMembers = null; + this.logType = null; + } + + private AuditLogConfig(List exemptedMembers, String logType) { + this.exemptedMembers = exemptedMembers; + this.logType = logType; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("exemptedMembers")) { + return exemptedMembers; + } + if (fieldName.equals("logType")) { + return logType; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getExemptedMembersList() { + return exemptedMembers; + } + + public String getLogType() { + return logType; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(AuditLogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AuditLogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AuditLogConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AuditLogConfig(); + } + + public static class Builder { + private List exemptedMembers; + private String logType; + + Builder() {} + + public Builder mergeFrom(AuditLogConfig other) { + if (other == AuditLogConfig.getDefaultInstance()) return this; + if (other.getExemptedMembersList() != null) { + this.exemptedMembers = other.exemptedMembers; + } + if (other.getLogType() != null) { + this.logType = other.logType; + } + return this; + } + + Builder(AuditLogConfig source) { + this.exemptedMembers = source.exemptedMembers; + this.logType = source.logType; + } + + public List getExemptedMembersList() { + return exemptedMembers; + } + + public Builder addAllExemptedMembers(List exemptedMembers) { + if (this.exemptedMembers == null) { + this.exemptedMembers = new LinkedList<>(); + } + this.exemptedMembers.addAll(exemptedMembers); + return this; + } + + public Builder addExemptedMembers(String exemptedMembers) { + if (this.exemptedMembers == null) { + this.exemptedMembers = new LinkedList<>(); + } + this.exemptedMembers.add(exemptedMembers); + return this; + } + + public String getLogType() { + return logType; + } + + public Builder setLogType(String logType) { + this.logType = logType; + return this; + } + + public AuditLogConfig build() { + + return new AuditLogConfig(exemptedMembers, logType); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllExemptedMembers(this.exemptedMembers); + newBuilder.setLogType(this.logType); + return newBuilder; + } + } + + @Override + public String toString() { + return "AuditLogConfig{" + + "exemptedMembers=" + + exemptedMembers + + ", " + + "logType=" + + logType + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AuditLogConfig) { + AuditLogConfig that = (AuditLogConfig) o; + return Objects.equals(this.exemptedMembers, that.getExemptedMembersList()) + && Objects.equals(this.logType, that.getLogType()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(exemptedMembers, logType); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java new file mode 100644 index 000000000000..88de7664f939 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java @@ -0,0 +1,142 @@ +/* + * Copyright 2018 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 +public final class AuthorizationLoggingOptions implements ApiMessage { + private final String permissionType; + + private AuthorizationLoggingOptions() { + this.permissionType = null; + } + + private AuthorizationLoggingOptions(String permissionType) { + this.permissionType = permissionType; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("permissionType")) { + return permissionType; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getPermissionType() { + return permissionType; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(AuthorizationLoggingOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AuthorizationLoggingOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AuthorizationLoggingOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AuthorizationLoggingOptions(); + } + + public static class Builder { + private String permissionType; + + Builder() {} + + public Builder mergeFrom(AuthorizationLoggingOptions other) { + if (other == AuthorizationLoggingOptions.getDefaultInstance()) return this; + if (other.getPermissionType() != null) { + this.permissionType = other.permissionType; + } + return this; + } + + Builder(AuthorizationLoggingOptions source) { + this.permissionType = source.permissionType; + } + + public String getPermissionType() { + return permissionType; + } + + public Builder setPermissionType(String permissionType) { + this.permissionType = permissionType; + return this; + } + + public AuthorizationLoggingOptions build() { + return new AuthorizationLoggingOptions(permissionType); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setPermissionType(this.permissionType); + return newBuilder; + } + } + + @Override + public String toString() { + return "AuthorizationLoggingOptions{" + "permissionType=" + permissionType + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AuthorizationLoggingOptions) { + AuthorizationLoggingOptions that = (AuthorizationLoggingOptions) o; + return Objects.equals(this.permissionType, that.getPermissionType()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(permissionType); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java index e92d7b42f13b..0f63728a3ea6 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java @@ -630,8 +630,7 @@ public final Operation deleteSignedUrlKeyBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified BackendService resource. Gets a list of available backend services by - * making a list() request. + * Returns the specified BackendService resource. Gets a list of available backend services. * *

Sample code: * @@ -657,8 +656,7 @@ public final BackendService getBackendService(ProjectGlobalBackendServiceName ba // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified BackendService resource. Gets a list of available backend services by - * making a list() request. + * Returns the specified BackendService resource. Gets a list of available backend services. * *

Sample code: * @@ -682,8 +680,7 @@ public final BackendService getBackendService(String backendService) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified BackendService resource. Gets a list of available backend services by - * making a list() request. + * Returns the specified BackendService resource. Gets a list of available backend services. * *

Sample code: * @@ -707,8 +704,7 @@ public final BackendService getBackendService(GetBackendServiceHttpRequest reque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified BackendService resource. Gets a list of available backend services by - * making a list() request. + * Returns the specified BackendService resource. Gets a list of available backend services. * *

Sample code: * diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java new file mode 100644 index 000000000000..e6fafcd2cd39 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java @@ -0,0 +1,216 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class Binding implements ApiMessage { + private final Expr condition; + private final List members; + private final String role; + + private Binding() { + this.condition = null; + this.members = null; + this.role = null; + } + + private Binding(Expr condition, List members, String role) { + this.condition = condition; + this.members = members; + this.role = role; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("condition")) { + return condition; + } + if (fieldName.equals("members")) { + return members; + } + if (fieldName.equals("role")) { + return role; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public Expr getCondition() { + return condition; + } + + public List getMembersList() { + return members; + } + + public String getRole() { + return role; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(Binding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static Binding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final Binding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Binding(); + } + + public static class Builder { + private Expr condition; + private List members; + private String role; + + Builder() {} + + public Builder mergeFrom(Binding other) { + if (other == Binding.getDefaultInstance()) return this; + if (other.getCondition() != null) { + this.condition = other.condition; + } + if (other.getMembersList() != null) { + this.members = other.members; + } + if (other.getRole() != null) { + this.role = other.role; + } + return this; + } + + Builder(Binding source) { + this.condition = source.condition; + this.members = source.members; + this.role = source.role; + } + + public Expr getCondition() { + return condition; + } + + public Builder setCondition(Expr condition) { + this.condition = condition; + return this; + } + + public List getMembersList() { + return members; + } + + public Builder addAllMembers(List members) { + if (this.members == null) { + this.members = new LinkedList<>(); + } + this.members.addAll(members); + return this; + } + + public Builder addMembers(String members) { + if (this.members == null) { + this.members = new LinkedList<>(); + } + this.members.add(members); + return this; + } + + public String getRole() { + return role; + } + + public Builder setRole(String role) { + this.role = role; + return this; + } + + public Binding build() { + + return new Binding(condition, members, role); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setCondition(this.condition); + newBuilder.addAllMembers(this.members); + newBuilder.setRole(this.role); + return newBuilder; + } + } + + @Override + public String toString() { + return "Binding{" + + "condition=" + + condition + + ", " + + "members=" + + members + + ", " + + "role=" + + role + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof Binding) { + Binding that = (Binding) o; + return Objects.equals(this.condition, that.getCondition()) + && Objects.equals(this.members, that.getMembersList()) + && Objects.equals(this.role, that.getRole()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(condition, members, role); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Condition.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Condition.java new file mode 100644 index 000000000000..ba55b39e9a2c --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Condition.java @@ -0,0 +1,304 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class Condition implements ApiMessage { + private final String iam; + private final String op; + private final String svc; + private final String sys; + private final String value; + private final List values; + + private Condition() { + this.iam = null; + this.op = null; + this.svc = null; + this.sys = null; + this.value = null; + this.values = null; + } + + private Condition( + String iam, String op, String svc, String sys, String value, List values) { + this.iam = iam; + this.op = op; + this.svc = svc; + this.sys = sys; + this.value = value; + this.values = values; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("iam")) { + return iam; + } + if (fieldName.equals("op")) { + return op; + } + if (fieldName.equals("svc")) { + return svc; + } + if (fieldName.equals("sys")) { + return sys; + } + if (fieldName.equals("value")) { + return value; + } + if (fieldName.equals("values")) { + return values; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getIam() { + return iam; + } + + public String getOp() { + return op; + } + + public String getSvc() { + return svc; + } + + public String getSys() { + return sys; + } + + public String getValue() { + return value; + } + + public List getValuesList() { + return values; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(Condition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static Condition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final Condition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Condition(); + } + + public static class Builder { + private String iam; + private String op; + private String svc; + private String sys; + private String value; + private List values; + + Builder() {} + + public Builder mergeFrom(Condition other) { + if (other == Condition.getDefaultInstance()) return this; + if (other.getIam() != null) { + this.iam = other.iam; + } + if (other.getOp() != null) { + this.op = other.op; + } + if (other.getSvc() != null) { + this.svc = other.svc; + } + if (other.getSys() != null) { + this.sys = other.sys; + } + if (other.getValue() != null) { + this.value = other.value; + } + if (other.getValuesList() != null) { + this.values = other.values; + } + return this; + } + + Builder(Condition source) { + this.iam = source.iam; + this.op = source.op; + this.svc = source.svc; + this.sys = source.sys; + this.value = source.value; + this.values = source.values; + } + + public String getIam() { + return iam; + } + + public Builder setIam(String iam) { + this.iam = iam; + return this; + } + + public String getOp() { + return op; + } + + public Builder setOp(String op) { + this.op = op; + return this; + } + + public String getSvc() { + return svc; + } + + public Builder setSvc(String svc) { + this.svc = svc; + return this; + } + + public String getSys() { + return sys; + } + + public Builder setSys(String sys) { + this.sys = sys; + return this; + } + + public String getValue() { + return value; + } + + public Builder setValue(String value) { + this.value = value; + return this; + } + + public List getValuesList() { + return values; + } + + public Builder addAllValues(List values) { + if (this.values == null) { + this.values = new LinkedList<>(); + } + this.values.addAll(values); + return this; + } + + public Builder addValues(String values) { + if (this.values == null) { + this.values = new LinkedList<>(); + } + this.values.add(values); + return this; + } + + public Condition build() { + + return new Condition(iam, op, svc, sys, value, values); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setIam(this.iam); + newBuilder.setOp(this.op); + newBuilder.setSvc(this.svc); + newBuilder.setSys(this.sys); + newBuilder.setValue(this.value); + newBuilder.addAllValues(this.values); + return newBuilder; + } + } + + @Override + public String toString() { + return "Condition{" + + "iam=" + + iam + + ", " + + "op=" + + op + + ", " + + "svc=" + + svc + + ", " + + "sys=" + + sys + + ", " + + "value=" + + value + + ", " + + "values=" + + values + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof Condition) { + Condition that = (Condition) o; + return Objects.equals(this.iam, that.getIam()) + && Objects.equals(this.op, that.getOp()) + && Objects.equals(this.svc, that.getSvc()) + && Objects.equals(this.sys, that.getSys()) + && Objects.equals(this.value, that.getValue()) + && Objects.equals(this.values, that.getValuesList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(iam, op, svc, sys, value, values); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Disk.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Disk.java index 0e2112ca54dd..d3ee3ffc678e 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Disk.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Disk.java @@ -41,6 +41,7 @@ public final class Disk implements ApiMessage { private final List licenses; private final String name; private final String options; + private final String physicalBlockSizeBytes; private final String region; private final List replicaZones; private final String selfLink; @@ -71,6 +72,7 @@ private Disk() { this.licenses = null; this.name = null; this.options = null; + this.physicalBlockSizeBytes = null; this.region = null; this.replicaZones = null; this.selfLink = null; @@ -102,6 +104,7 @@ private Disk( List licenses, String name, String options, + String physicalBlockSizeBytes, String region, List replicaZones, String selfLink, @@ -130,6 +133,7 @@ private Disk( this.licenses = licenses; this.name = name; this.options = options; + this.physicalBlockSizeBytes = physicalBlockSizeBytes; this.region = region; this.replicaZones = replicaZones; this.selfLink = selfLink; @@ -190,6 +194,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("options")) { return options; } + if (fieldName.equals("physicalBlockSizeBytes")) { + return physicalBlockSizeBytes; + } if (fieldName.equals("region")) { return region; } @@ -303,6 +310,10 @@ public String getOptions() { return options; } + public String getPhysicalBlockSizeBytes() { + return physicalBlockSizeBytes; + } + public String getRegion() { return region; } @@ -396,6 +407,7 @@ public static class Builder { private List licenses; private String name; private String options; + private String physicalBlockSizeBytes; private String region; private List replicaZones; private String selfLink; @@ -457,6 +469,9 @@ public Builder mergeFrom(Disk other) { if (other.getOptions() != null) { this.options = other.options; } + if (other.getPhysicalBlockSizeBytes() != null) { + this.physicalBlockSizeBytes = other.physicalBlockSizeBytes; + } if (other.getRegion() != null) { this.region = other.region; } @@ -517,6 +532,7 @@ public Builder mergeFrom(Disk other) { this.licenses = source.licenses; this.name = source.name; this.options = source.options; + this.physicalBlockSizeBytes = source.physicalBlockSizeBytes; this.region = source.region; this.replicaZones = source.replicaZones; this.selfLink = source.selfLink; @@ -692,6 +708,15 @@ public Builder setOptions(String options) { return this; } + public String getPhysicalBlockSizeBytes() { + return physicalBlockSizeBytes; + } + + public Builder setPhysicalBlockSizeBytes(String physicalBlockSizeBytes) { + this.physicalBlockSizeBytes = physicalBlockSizeBytes; + return this; + } + public String getRegion() { return region; } @@ -858,6 +883,7 @@ public Disk build() { licenses, name, options, + physicalBlockSizeBytes, region, replicaZones, selfLink, @@ -890,6 +916,7 @@ public Builder clone() { newBuilder.addAllLicenses(this.licenses); newBuilder.setName(this.name); newBuilder.setOptions(this.options); + newBuilder.setPhysicalBlockSizeBytes(this.physicalBlockSizeBytes); newBuilder.setRegion(this.region); newBuilder.addAllReplicaZones(this.replicaZones); newBuilder.setSelfLink(this.selfLink); @@ -953,6 +980,9 @@ public String toString() { + "options=" + options + ", " + + "physicalBlockSizeBytes=" + + physicalBlockSizeBytes + + ", " + "region=" + region + ", " @@ -1018,6 +1048,7 @@ public boolean equals(Object o) { && Objects.equals(this.licenses, that.getLicensesList()) && Objects.equals(this.name, that.getName()) && Objects.equals(this.options, that.getOptions()) + && Objects.equals(this.physicalBlockSizeBytes, that.getPhysicalBlockSizeBytes()) && Objects.equals(this.region, that.getRegion()) && Objects.equals(this.replicaZones, that.getReplicaZonesList()) && Objects.equals(this.selfLink, that.getSelfLink()) @@ -1053,6 +1084,7 @@ public int hashCode() { licenses, name, options, + physicalBlockSizeBytes, region, replicaZones, selfLink, diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java index 2cb4af51b702..ac38b4fb00bc 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java @@ -992,7 +992,7 @@ public final UnaryCallable resizeDiskCallable( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param zoneSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1023,7 +1023,7 @@ public final Operation setLabelsDisk( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param zoneSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Expr.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Expr.java new file mode 100644 index 000000000000..883d98d14a8d --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Expr.java @@ -0,0 +1,233 @@ +/* + * Copyright 2018 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 +public final class Expr implements ApiMessage { + private final String description; + private final String expression; + private final String location; + private final String title; + + private Expr() { + this.description = null; + this.expression = null; + this.location = null; + this.title = null; + } + + private Expr(String description, String expression, String location, String title) { + this.description = description; + this.expression = expression; + this.location = location; + this.title = title; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("description")) { + return description; + } + if (fieldName.equals("expression")) { + return expression; + } + if (fieldName.equals("location")) { + return location; + } + if (fieldName.equals("title")) { + return title; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getDescription() { + return description; + } + + public String getExpression() { + return expression; + } + + public String getLocation() { + return location; + } + + public String getTitle() { + return title; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(Expr prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static Expr getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final Expr DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Expr(); + } + + public static class Builder { + private String description; + private String expression; + private String location; + private String title; + + Builder() {} + + public Builder mergeFrom(Expr other) { + if (other == Expr.getDefaultInstance()) return this; + if (other.getDescription() != null) { + this.description = other.description; + } + if (other.getExpression() != null) { + this.expression = other.expression; + } + if (other.getLocation() != null) { + this.location = other.location; + } + if (other.getTitle() != null) { + this.title = other.title; + } + return this; + } + + Builder(Expr source) { + this.description = source.description; + this.expression = source.expression; + this.location = source.location; + this.title = source.title; + } + + public String getDescription() { + return description; + } + + public Builder setDescription(String description) { + this.description = description; + return this; + } + + public String getExpression() { + return expression; + } + + public Builder setExpression(String expression) { + this.expression = expression; + return this; + } + + public String getLocation() { + return location; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public String getTitle() { + return title; + } + + public Builder setTitle(String title) { + this.title = title; + return this; + } + + public Expr build() { + + return new Expr(description, expression, location, title); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setDescription(this.description); + newBuilder.setExpression(this.expression); + newBuilder.setLocation(this.location); + newBuilder.setTitle(this.title); + return newBuilder; + } + } + + @Override + public String toString() { + return "Expr{" + + "description=" + + description + + ", " + + "expression=" + + expression + + ", " + + "location=" + + location + + ", " + + "title=" + + title + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof Expr) { + Expr that = (Expr) o; + return Objects.equals(this.description, that.getDescription()) + && Objects.equals(this.expression, that.getExpression()) + && Objects.equals(this.location, that.getLocation()) + && Objects.equals(this.title, that.getTitle()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(description, expression, location, title); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Firewall.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Firewall.java index 8ec6a06c3057..3c971ee584e5 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Firewall.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Firewall.java @@ -35,6 +35,7 @@ public final class Firewall implements ApiMessage { private final Boolean disabled; private final String id; private final String kind; + private final FirewallLogConfig logConfig; private final String name; private final String network; private final Integer priority; @@ -55,6 +56,7 @@ private Firewall() { this.disabled = null; this.id = null; this.kind = null; + this.logConfig = null; this.name = null; this.network = null; this.priority = null; @@ -76,6 +78,7 @@ private Firewall( Boolean disabled, String id, String kind, + FirewallLogConfig logConfig, String name, String network, Integer priority, @@ -94,6 +97,7 @@ private Firewall( this.disabled = disabled; this.id = id; this.kind = kind; + this.logConfig = logConfig; this.name = name; this.network = network; this.priority = priority; @@ -134,6 +138,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("kind")) { return kind; } + if (fieldName.equals("logConfig")) { + return logConfig; + } if (fieldName.equals("name")) { return name; } @@ -212,6 +219,10 @@ public String getKind() { return kind; } + public FirewallLogConfig getLogConfig() { + return logConfig; + } + public String getName() { return name; } @@ -280,6 +291,7 @@ public static class Builder { private Boolean disabled; private String id; private String kind; + private FirewallLogConfig logConfig; private String name; private String network; private Integer priority; @@ -321,6 +333,9 @@ public Builder mergeFrom(Firewall other) { if (other.getKind() != null) { this.kind = other.kind; } + if (other.getLogConfig() != null) { + this.logConfig = other.logConfig; + } if (other.getName() != null) { this.name = other.name; } @@ -361,6 +376,7 @@ public Builder mergeFrom(Firewall other) { this.disabled = source.disabled; this.id = source.id; this.kind = source.kind; + this.logConfig = source.logConfig; this.name = source.name; this.network = source.network; this.priority = source.priority; @@ -486,6 +502,15 @@ public Builder setKind(String kind) { return this; } + public FirewallLogConfig getLogConfig() { + return logConfig; + } + + public Builder setLogConfig(FirewallLogConfig logConfig) { + this.logConfig = logConfig; + return this; + } + public String getName() { return name; } @@ -634,6 +659,7 @@ public Firewall build() { disabled, id, kind, + logConfig, name, network, priority, @@ -656,6 +682,7 @@ public Builder clone() { newBuilder.setDisabled(this.disabled); newBuilder.setId(this.id); newBuilder.setKind(this.kind); + newBuilder.setLogConfig(this.logConfig); newBuilder.setName(this.name); newBuilder.setNetwork(this.network); newBuilder.setPriority(this.priority); @@ -699,6 +726,9 @@ public String toString() { + "kind=" + kind + ", " + + "logConfig=" + + logConfig + + ", " + "name=" + name + ", " @@ -744,6 +774,7 @@ public boolean equals(Object o) { && Objects.equals(this.disabled, that.getDisabled()) && Objects.equals(this.id, that.getId()) && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.logConfig, that.getLogConfig()) && Objects.equals(this.name, that.getName()) && Objects.equals(this.network, that.getNetwork()) && Objects.equals(this.priority, that.getPriority()) @@ -769,6 +800,7 @@ public int hashCode() { disabled, id, kind, + logConfig, name, network, priority, diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java new file mode 100644 index 000000000000..fc9d64a6d523 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java @@ -0,0 +1,142 @@ +/* + * Copyright 2018 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 +public final class FirewallLogConfig implements ApiMessage { + private final Boolean enable; + + private FirewallLogConfig() { + this.enable = null; + } + + private FirewallLogConfig(Boolean enable) { + this.enable = enable; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("enable")) { + return enable; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public Boolean getEnable() { + return enable; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(FirewallLogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static FirewallLogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final FirewallLogConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new FirewallLogConfig(); + } + + public static class Builder { + private Boolean enable; + + Builder() {} + + public Builder mergeFrom(FirewallLogConfig other) { + if (other == FirewallLogConfig.getDefaultInstance()) return this; + if (other.getEnable() != null) { + this.enable = other.enable; + } + return this; + } + + Builder(FirewallLogConfig source) { + this.enable = source.enable; + } + + public Boolean getEnable() { + return enable; + } + + public Builder setEnable(Boolean enable) { + this.enable = enable; + return this; + } + + public FirewallLogConfig build() { + return new FirewallLogConfig(enable); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setEnable(this.enable); + return newBuilder; + } + } + + @Override + public String toString() { + return "FirewallLogConfig{" + "enable=" + enable + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof FirewallLogConfig) { + FirewallLogConfig that = (FirewallLogConfig) o; + return Objects.equals(this.enable, that.getEnable()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(enable); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java new file mode 100644 index 000000000000..1b4fa06d2019 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java @@ -0,0 +1,216 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class GlobalSetPolicyRequest implements ApiMessage { + private final List bindings; + private final String etag; + private final Policy policy; + + private GlobalSetPolicyRequest() { + this.bindings = null; + this.etag = null; + this.policy = null; + } + + private GlobalSetPolicyRequest(List bindings, String etag, Policy policy) { + this.bindings = bindings; + this.etag = etag; + this.policy = policy; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("bindings")) { + return bindings; + } + if (fieldName.equals("etag")) { + return etag; + } + if (fieldName.equals("policy")) { + return policy; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getBindingsList() { + return bindings; + } + + public String getEtag() { + return etag; + } + + public Policy getPolicy() { + return policy; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(GlobalSetPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static GlobalSetPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final GlobalSetPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new GlobalSetPolicyRequest(); + } + + public static class Builder { + private List bindings; + private String etag; + private Policy policy; + + Builder() {} + + public Builder mergeFrom(GlobalSetPolicyRequest other) { + if (other == GlobalSetPolicyRequest.getDefaultInstance()) return this; + if (other.getBindingsList() != null) { + this.bindings = other.bindings; + } + if (other.getEtag() != null) { + this.etag = other.etag; + } + if (other.getPolicy() != null) { + this.policy = other.policy; + } + return this; + } + + Builder(GlobalSetPolicyRequest source) { + this.bindings = source.bindings; + this.etag = source.etag; + this.policy = source.policy; + } + + public List getBindingsList() { + return bindings; + } + + public Builder addAllBindings(List bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.addAll(bindings); + return this; + } + + public Builder addBindings(Binding bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.add(bindings); + return this; + } + + public String getEtag() { + return etag; + } + + public Builder setEtag(String etag) { + this.etag = etag; + return this; + } + + public Policy getPolicy() { + return policy; + } + + public Builder setPolicy(Policy policy) { + this.policy = policy; + return this; + } + + public GlobalSetPolicyRequest build() { + + return new GlobalSetPolicyRequest(bindings, etag, policy); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllBindings(this.bindings); + newBuilder.setEtag(this.etag); + newBuilder.setPolicy(this.policy); + return newBuilder; + } + } + + @Override + public String toString() { + return "GlobalSetPolicyRequest{" + + "bindings=" + + bindings + + ", " + + "etag=" + + etag + + ", " + + "policy=" + + policy + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof GlobalSetPolicyRequest) { + GlobalSetPolicyRequest that = (GlobalSetPolicyRequest) o; + return Objects.equals(this.bindings, that.getBindingsList()) + && Objects.equals(this.etag, that.getEtag()) + && Objects.equals(this.policy, that.getPolicy()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(bindings, etag, policy); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java index 4a55ffa4d498..b2483291c5fc 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java @@ -847,7 +847,7 @@ public final UnaryCallable listImagesCallable( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param globalSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -879,7 +879,7 @@ public final Operation setLabelsImage( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param globalSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java index a3237585cb67..a48260379507 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java @@ -786,8 +786,9 @@ public final Operation deleteAccessConfigInstance(DeleteAccessConfigInstanceHttp * } * * - * @param instance Instance name. - * @param deviceName Disk device name to detach. + * @param instance Instance name for this request. + * @param deviceName The device name of the disk to detach. Make a get() request on the instance + * to view currently attached disks and device names. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -815,8 +816,9 @@ public final Operation detachDiskInstance(ProjectZoneInstanceName instance, Stri * } * * - * @param instance Instance name. - * @param deviceName Disk device name to detach. + * @param instance Instance name for this request. + * @param deviceName The device name of the disk to detach. Make a get() request on the instance + * to view currently attached disks and device names. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -1615,7 +1617,7 @@ public final UnaryCallable resetInstanceCal * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param deletionProtection Whether the resource should be protected against deletion. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1645,7 +1647,7 @@ public final Operation setDeletionProtectionInstance( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param deletionProtection Whether the resource should be protected against deletion. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1729,9 +1731,10 @@ public final Operation setDeletionProtectionInstance( * } * * - * @param instance The instance name. + * @param instance The instance name for this request. * @param autoDelete Whether to auto-delete the disk when the instance is deleted. - * @param deviceName The device name of the disk to modify. + * @param deviceName The device name of the disk to modify. Make a get() request on the instance + * to view currently attached disks and device names. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -1762,9 +1765,10 @@ public final Operation setDiskAutoDeleteInstance( * } * * - * @param instance The instance name. + * @param instance The instance name for this request. * @param autoDelete Whether to auto-delete the disk when the instance is deleted. - * @param deviceName The device name of the disk to modify. + * @param deviceName The device name of the disk to modify. Make a get() request on the instance + * to view currently attached disks and device names. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -2429,7 +2433,7 @@ public final Operation setMinCpuPlatformInstance(SetMinCpuPlatformInstanceHttpRe * } * * - * @param instance Instance name. + * @param instance Instance name for this request. * @param schedulingResource Sets the scheduling options for an Instance. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2459,7 +2463,7 @@ public final Operation setSchedulingInstance( * } * * - * @param instance Instance name. + * @param instance Instance name for this request. * @param schedulingResource Sets the scheduling options for an Instance. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfig.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfig.java new file mode 100644 index 000000000000..eb1b50a19c73 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfig.java @@ -0,0 +1,207 @@ +/* + * Copyright 2018 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 +public final class LogConfig implements ApiMessage { + private final LogConfigCloudAuditOptions cloudAudit; + private final LogConfigCounterOptions counter; + private final LogConfigDataAccessOptions dataAccess; + + private LogConfig() { + this.cloudAudit = null; + this.counter = null; + this.dataAccess = null; + } + + private LogConfig( + LogConfigCloudAuditOptions cloudAudit, + LogConfigCounterOptions counter, + LogConfigDataAccessOptions dataAccess) { + this.cloudAudit = cloudAudit; + this.counter = counter; + this.dataAccess = dataAccess; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("cloudAudit")) { + return cloudAudit; + } + if (fieldName.equals("counter")) { + return counter; + } + if (fieldName.equals("dataAccess")) { + return dataAccess; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public LogConfigCloudAuditOptions getCloudAudit() { + return cloudAudit; + } + + public LogConfigCounterOptions getCounter() { + return counter; + } + + public LogConfigDataAccessOptions getDataAccess() { + return dataAccess; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(LogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static LogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final LogConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new LogConfig(); + } + + public static class Builder { + private LogConfigCloudAuditOptions cloudAudit; + private LogConfigCounterOptions counter; + private LogConfigDataAccessOptions dataAccess; + + Builder() {} + + public Builder mergeFrom(LogConfig other) { + if (other == LogConfig.getDefaultInstance()) return this; + if (other.getCloudAudit() != null) { + this.cloudAudit = other.cloudAudit; + } + if (other.getCounter() != null) { + this.counter = other.counter; + } + if (other.getDataAccess() != null) { + this.dataAccess = other.dataAccess; + } + return this; + } + + Builder(LogConfig source) { + this.cloudAudit = source.cloudAudit; + this.counter = source.counter; + this.dataAccess = source.dataAccess; + } + + public LogConfigCloudAuditOptions getCloudAudit() { + return cloudAudit; + } + + public Builder setCloudAudit(LogConfigCloudAuditOptions cloudAudit) { + this.cloudAudit = cloudAudit; + return this; + } + + public LogConfigCounterOptions getCounter() { + return counter; + } + + public Builder setCounter(LogConfigCounterOptions counter) { + this.counter = counter; + return this; + } + + public LogConfigDataAccessOptions getDataAccess() { + return dataAccess; + } + + public Builder setDataAccess(LogConfigDataAccessOptions dataAccess) { + this.dataAccess = dataAccess; + return this; + } + + public LogConfig build() { + + return new LogConfig(cloudAudit, counter, dataAccess); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setCloudAudit(this.cloudAudit); + newBuilder.setCounter(this.counter); + newBuilder.setDataAccess(this.dataAccess); + return newBuilder; + } + } + + @Override + public String toString() { + return "LogConfig{" + + "cloudAudit=" + + cloudAudit + + ", " + + "counter=" + + counter + + ", " + + "dataAccess=" + + dataAccess + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LogConfig) { + LogConfig that = (LogConfig) o; + return Objects.equals(this.cloudAudit, that.getCloudAudit()) + && Objects.equals(this.counter, that.getCounter()) + && Objects.equals(this.dataAccess, that.getDataAccess()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(cloudAudit, counter, dataAccess); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java new file mode 100644 index 000000000000..2919f7d32d72 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java @@ -0,0 +1,177 @@ +/* + * Copyright 2018 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 +public final class LogConfigCloudAuditOptions implements ApiMessage { + private final AuthorizationLoggingOptions authorizationLoggingOptions; + private final String logName; + + private LogConfigCloudAuditOptions() { + this.authorizationLoggingOptions = null; + this.logName = null; + } + + private LogConfigCloudAuditOptions( + AuthorizationLoggingOptions authorizationLoggingOptions, String logName) { + this.authorizationLoggingOptions = authorizationLoggingOptions; + this.logName = logName; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("authorizationLoggingOptions")) { + return authorizationLoggingOptions; + } + if (fieldName.equals("logName")) { + return logName; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public AuthorizationLoggingOptions getAuthorizationLoggingOptions() { + return authorizationLoggingOptions; + } + + public String getLogName() { + return logName; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(LogConfigCloudAuditOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static LogConfigCloudAuditOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final LogConfigCloudAuditOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new LogConfigCloudAuditOptions(); + } + + public static class Builder { + private AuthorizationLoggingOptions authorizationLoggingOptions; + private String logName; + + Builder() {} + + public Builder mergeFrom(LogConfigCloudAuditOptions other) { + if (other == LogConfigCloudAuditOptions.getDefaultInstance()) return this; + if (other.getAuthorizationLoggingOptions() != null) { + this.authorizationLoggingOptions = other.authorizationLoggingOptions; + } + if (other.getLogName() != null) { + this.logName = other.logName; + } + return this; + } + + Builder(LogConfigCloudAuditOptions source) { + this.authorizationLoggingOptions = source.authorizationLoggingOptions; + this.logName = source.logName; + } + + public AuthorizationLoggingOptions getAuthorizationLoggingOptions() { + return authorizationLoggingOptions; + } + + public Builder setAuthorizationLoggingOptions( + AuthorizationLoggingOptions authorizationLoggingOptions) { + this.authorizationLoggingOptions = authorizationLoggingOptions; + return this; + } + + public String getLogName() { + return logName; + } + + public Builder setLogName(String logName) { + this.logName = logName; + return this; + } + + public LogConfigCloudAuditOptions build() { + + return new LogConfigCloudAuditOptions(authorizationLoggingOptions, logName); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAuthorizationLoggingOptions(this.authorizationLoggingOptions); + newBuilder.setLogName(this.logName); + return newBuilder; + } + } + + @Override + public String toString() { + return "LogConfigCloudAuditOptions{" + + "authorizationLoggingOptions=" + + authorizationLoggingOptions + + ", " + + "logName=" + + logName + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LogConfigCloudAuditOptions) { + LogConfigCloudAuditOptions that = (LogConfigCloudAuditOptions) o; + return Objects.equals(this.authorizationLoggingOptions, that.getAuthorizationLoggingOptions()) + && Objects.equals(this.logName, that.getLogName()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(authorizationLoggingOptions, logName); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java new file mode 100644 index 000000000000..673e8981c3fc --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java @@ -0,0 +1,169 @@ +/* + * Copyright 2018 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 +public final class LogConfigCounterOptions implements ApiMessage { + private final String field; + private final String metric; + + private LogConfigCounterOptions() { + this.field = null; + this.metric = null; + } + + private LogConfigCounterOptions(String field, String metric) { + this.field = field; + this.metric = metric; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("field")) { + return field; + } + if (fieldName.equals("metric")) { + return metric; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getField() { + return field; + } + + public String getMetric() { + return metric; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(LogConfigCounterOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static LogConfigCounterOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final LogConfigCounterOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new LogConfigCounterOptions(); + } + + public static class Builder { + private String field; + private String metric; + + Builder() {} + + public Builder mergeFrom(LogConfigCounterOptions other) { + if (other == LogConfigCounterOptions.getDefaultInstance()) return this; + if (other.getField() != null) { + this.field = other.field; + } + if (other.getMetric() != null) { + this.metric = other.metric; + } + return this; + } + + Builder(LogConfigCounterOptions source) { + this.field = source.field; + this.metric = source.metric; + } + + public String getField() { + return field; + } + + public Builder setField(String field) { + this.field = field; + return this; + } + + public String getMetric() { + return metric; + } + + public Builder setMetric(String metric) { + this.metric = metric; + return this; + } + + public LogConfigCounterOptions build() { + + return new LogConfigCounterOptions(field, metric); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setField(this.field); + newBuilder.setMetric(this.metric); + return newBuilder; + } + } + + @Override + public String toString() { + return "LogConfigCounterOptions{" + "field=" + field + ", " + "metric=" + metric + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LogConfigCounterOptions) { + LogConfigCounterOptions that = (LogConfigCounterOptions) o; + return Objects.equals(this.field, that.getField()) + && Objects.equals(this.metric, that.getMetric()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(field, metric); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java new file mode 100644 index 000000000000..ac3044029d12 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java @@ -0,0 +1,142 @@ +/* + * Copyright 2018 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 +public final class LogConfigDataAccessOptions implements ApiMessage { + private final String logMode; + + private LogConfigDataAccessOptions() { + this.logMode = null; + } + + private LogConfigDataAccessOptions(String logMode) { + this.logMode = logMode; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("logMode")) { + return logMode; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getLogMode() { + return logMode; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(LogConfigDataAccessOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static LogConfigDataAccessOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final LogConfigDataAccessOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new LogConfigDataAccessOptions(); + } + + public static class Builder { + private String logMode; + + Builder() {} + + public Builder mergeFrom(LogConfigDataAccessOptions other) { + if (other == LogConfigDataAccessOptions.getDefaultInstance()) return this; + if (other.getLogMode() != null) { + this.logMode = other.logMode; + } + return this; + } + + Builder(LogConfigDataAccessOptions source) { + this.logMode = source.logMode; + } + + public String getLogMode() { + return logMode; + } + + public Builder setLogMode(String logMode) { + this.logMode = logMode; + return this; + } + + public LogConfigDataAccessOptions build() { + return new LogConfigDataAccessOptions(logMode); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setLogMode(this.logMode); + return newBuilder; + } + } + + @Override + public String toString() { + return "LogConfigDataAccessOptions{" + "logMode=" + logMode + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LogConfigDataAccessOptions) { + LogConfigDataAccessOptions that = (LogConfigDataAccessOptions) o; + return Objects.equals(this.logMode, that.getLogMode()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(logMode); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java index 26dbbe944289..d73060145454 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java @@ -165,7 +165,7 @@ public NodeGroupStub getStub() { * } * * - * @param nodeGroup Name of the NodeGroup resource to delete. + * @param nodeGroup Name of the NodeGroup resource. * @param nodeGroupsAddNodesRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -196,7 +196,7 @@ public final Operation addNodesNodeGroup( * } * * - * @param nodeGroup Name of the NodeGroup resource to delete. + * @param nodeGroup Name of the NodeGroup resource. * @param nodeGroupsAddNodesRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Policy.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Policy.java new file mode 100644 index 000000000000..a1067f6a3995 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Policy.java @@ -0,0 +1,331 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class Policy implements ApiMessage { + private final List auditConfigs; + private final List bindings; + private final String etag; + private final Boolean iamOwned; + private final List rules; + private final Integer version; + + private Policy() { + this.auditConfigs = null; + this.bindings = null; + this.etag = null; + this.iamOwned = null; + this.rules = null; + this.version = null; + } + + private Policy( + List auditConfigs, + List bindings, + String etag, + Boolean iamOwned, + List rules, + Integer version) { + this.auditConfigs = auditConfigs; + this.bindings = bindings; + this.etag = etag; + this.iamOwned = iamOwned; + this.rules = rules; + this.version = version; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("auditConfigs")) { + return auditConfigs; + } + if (fieldName.equals("bindings")) { + return bindings; + } + if (fieldName.equals("etag")) { + return etag; + } + if (fieldName.equals("iamOwned")) { + return iamOwned; + } + if (fieldName.equals("rules")) { + return rules; + } + if (fieldName.equals("version")) { + return version; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getAuditConfigsList() { + return auditConfigs; + } + + public List getBindingsList() { + return bindings; + } + + public String getEtag() { + return etag; + } + + public Boolean getIamOwned() { + return iamOwned; + } + + public List getRulesList() { + return rules; + } + + public Integer getVersion() { + return version; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(Policy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static Policy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final Policy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Policy(); + } + + public static class Builder { + private List auditConfigs; + private List bindings; + private String etag; + private Boolean iamOwned; + private List rules; + private Integer version; + + Builder() {} + + public Builder mergeFrom(Policy other) { + if (other == Policy.getDefaultInstance()) return this; + if (other.getAuditConfigsList() != null) { + this.auditConfigs = other.auditConfigs; + } + if (other.getBindingsList() != null) { + this.bindings = other.bindings; + } + if (other.getEtag() != null) { + this.etag = other.etag; + } + if (other.getIamOwned() != null) { + this.iamOwned = other.iamOwned; + } + if (other.getRulesList() != null) { + this.rules = other.rules; + } + if (other.getVersion() != null) { + this.version = other.version; + } + return this; + } + + Builder(Policy source) { + this.auditConfigs = source.auditConfigs; + this.bindings = source.bindings; + this.etag = source.etag; + this.iamOwned = source.iamOwned; + this.rules = source.rules; + this.version = source.version; + } + + public List getAuditConfigsList() { + return auditConfigs; + } + + public Builder addAllAuditConfigs(List auditConfigs) { + if (this.auditConfigs == null) { + this.auditConfigs = new LinkedList<>(); + } + this.auditConfigs.addAll(auditConfigs); + return this; + } + + public Builder addAuditConfigs(AuditConfig auditConfigs) { + if (this.auditConfigs == null) { + this.auditConfigs = new LinkedList<>(); + } + this.auditConfigs.add(auditConfigs); + return this; + } + + public List getBindingsList() { + return bindings; + } + + public Builder addAllBindings(List bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.addAll(bindings); + return this; + } + + public Builder addBindings(Binding bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.add(bindings); + return this; + } + + public String getEtag() { + return etag; + } + + public Builder setEtag(String etag) { + this.etag = etag; + return this; + } + + public Boolean getIamOwned() { + return iamOwned; + } + + public Builder setIamOwned(Boolean iamOwned) { + this.iamOwned = iamOwned; + return this; + } + + public List getRulesList() { + return rules; + } + + public Builder addAllRules(List rules) { + if (this.rules == null) { + this.rules = new LinkedList<>(); + } + this.rules.addAll(rules); + return this; + } + + public Builder addRules(Rule rules) { + if (this.rules == null) { + this.rules = new LinkedList<>(); + } + this.rules.add(rules); + return this; + } + + public Integer getVersion() { + return version; + } + + public Builder setVersion(Integer version) { + this.version = version; + return this; + } + + public Policy build() { + + return new Policy(auditConfigs, bindings, etag, iamOwned, rules, version); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllAuditConfigs(this.auditConfigs); + newBuilder.addAllBindings(this.bindings); + newBuilder.setEtag(this.etag); + newBuilder.setIamOwned(this.iamOwned); + newBuilder.addAllRules(this.rules); + newBuilder.setVersion(this.version); + return newBuilder; + } + } + + @Override + public String toString() { + return "Policy{" + + "auditConfigs=" + + auditConfigs + + ", " + + "bindings=" + + bindings + + ", " + + "etag=" + + etag + + ", " + + "iamOwned=" + + iamOwned + + ", " + + "rules=" + + rules + + ", " + + "version=" + + version + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof Policy) { + Policy that = (Policy) o; + return Objects.equals(this.auditConfigs, that.getAuditConfigsList()) + && Objects.equals(this.bindings, that.getBindingsList()) + && Objects.equals(this.etag, that.getEtag()) + && Objects.equals(this.iamOwned, that.getIamOwned()) + && Objects.equals(this.rules, that.getRulesList()) + && Objects.equals(this.version, that.getVersion()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(auditConfigs, bindings, etag, iamOwned, rules, version); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java index d3cbfb424aa3..c33976d9a79b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java @@ -841,7 +841,7 @@ public final UnaryCallable resizeRegionD * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param regionSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -872,7 +872,7 @@ public final Operation setLabelsRegionDisk( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param regionSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java new file mode 100644 index 000000000000..a17bf399b4ab --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java @@ -0,0 +1,216 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class RegionSetPolicyRequest implements ApiMessage { + private final List bindings; + private final String etag; + private final Policy policy; + + private RegionSetPolicyRequest() { + this.bindings = null; + this.etag = null; + this.policy = null; + } + + private RegionSetPolicyRequest(List bindings, String etag, Policy policy) { + this.bindings = bindings; + this.etag = etag; + this.policy = policy; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("bindings")) { + return bindings; + } + if (fieldName.equals("etag")) { + return etag; + } + if (fieldName.equals("policy")) { + return policy; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getBindingsList() { + return bindings; + } + + public String getEtag() { + return etag; + } + + public Policy getPolicy() { + return policy; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(RegionSetPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static RegionSetPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final RegionSetPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new RegionSetPolicyRequest(); + } + + public static class Builder { + private List bindings; + private String etag; + private Policy policy; + + Builder() {} + + public Builder mergeFrom(RegionSetPolicyRequest other) { + if (other == RegionSetPolicyRequest.getDefaultInstance()) return this; + if (other.getBindingsList() != null) { + this.bindings = other.bindings; + } + if (other.getEtag() != null) { + this.etag = other.etag; + } + if (other.getPolicy() != null) { + this.policy = other.policy; + } + return this; + } + + Builder(RegionSetPolicyRequest source) { + this.bindings = source.bindings; + this.etag = source.etag; + this.policy = source.policy; + } + + public List getBindingsList() { + return bindings; + } + + public Builder addAllBindings(List bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.addAll(bindings); + return this; + } + + public Builder addBindings(Binding bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.add(bindings); + return this; + } + + public String getEtag() { + return etag; + } + + public Builder setEtag(String etag) { + this.etag = etag; + return this; + } + + public Policy getPolicy() { + return policy; + } + + public Builder setPolicy(Policy policy) { + this.policy = policy; + return this; + } + + public RegionSetPolicyRequest build() { + + return new RegionSetPolicyRequest(bindings, etag, policy); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllBindings(this.bindings); + newBuilder.setEtag(this.etag); + newBuilder.setPolicy(this.policy); + return newBuilder; + } + } + + @Override + public String toString() { + return "RegionSetPolicyRequest{" + + "bindings=" + + bindings + + ", " + + "etag=" + + etag + + ", " + + "policy=" + + policy + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof RegionSetPolicyRequest) { + RegionSetPolicyRequest that = (RegionSetPolicyRequest) o; + return Objects.equals(this.bindings, that.getBindingsList()) + && Objects.equals(this.etag, that.getEtag()) + && Objects.equals(this.policy, that.getPolicy()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(bindings, etag, policy); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Rule.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Rule.java new file mode 100644 index 000000000000..3fe843a86924 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Rule.java @@ -0,0 +1,383 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class Rule implements ApiMessage { + private final String action; + private final List conditions; + private final String description; + private final List ins; + private final List logConfigs; + private final List notIns; + private final List permissions; + + private Rule() { + this.action = null; + this.conditions = null; + this.description = null; + this.ins = null; + this.logConfigs = null; + this.notIns = null; + this.permissions = null; + } + + private Rule( + String action, + List conditions, + String description, + List ins, + List logConfigs, + List notIns, + List permissions) { + this.action = action; + this.conditions = conditions; + this.description = description; + this.ins = ins; + this.logConfigs = logConfigs; + this.notIns = notIns; + this.permissions = permissions; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("action")) { + return action; + } + if (fieldName.equals("conditions")) { + return conditions; + } + if (fieldName.equals("description")) { + return description; + } + if (fieldName.equals("ins")) { + return ins; + } + if (fieldName.equals("logConfigs")) { + return logConfigs; + } + if (fieldName.equals("notIns")) { + return notIns; + } + if (fieldName.equals("permissions")) { + return permissions; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getAction() { + return action; + } + + public List getConditionsList() { + return conditions; + } + + public String getDescription() { + return description; + } + + public List getInsList() { + return ins; + } + + public List getLogConfigsList() { + return logConfigs; + } + + public List getNotInsList() { + return notIns; + } + + public List getPermissionsList() { + return permissions; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(Rule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static Rule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final Rule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Rule(); + } + + public static class Builder { + private String action; + private List conditions; + private String description; + private List ins; + private List logConfigs; + private List notIns; + private List permissions; + + Builder() {} + + public Builder mergeFrom(Rule other) { + if (other == Rule.getDefaultInstance()) return this; + if (other.getAction() != null) { + this.action = other.action; + } + if (other.getConditionsList() != null) { + this.conditions = other.conditions; + } + if (other.getDescription() != null) { + this.description = other.description; + } + if (other.getInsList() != null) { + this.ins = other.ins; + } + if (other.getLogConfigsList() != null) { + this.logConfigs = other.logConfigs; + } + if (other.getNotInsList() != null) { + this.notIns = other.notIns; + } + if (other.getPermissionsList() != null) { + this.permissions = other.permissions; + } + return this; + } + + Builder(Rule source) { + this.action = source.action; + this.conditions = source.conditions; + this.description = source.description; + this.ins = source.ins; + this.logConfigs = source.logConfigs; + this.notIns = source.notIns; + this.permissions = source.permissions; + } + + public String getAction() { + return action; + } + + public Builder setAction(String action) { + this.action = action; + return this; + } + + public List getConditionsList() { + return conditions; + } + + public Builder addAllConditions(List conditions) { + if (this.conditions == null) { + this.conditions = new LinkedList<>(); + } + this.conditions.addAll(conditions); + return this; + } + + public Builder addConditions(Condition conditions) { + if (this.conditions == null) { + this.conditions = new LinkedList<>(); + } + this.conditions.add(conditions); + return this; + } + + public String getDescription() { + return description; + } + + public Builder setDescription(String description) { + this.description = description; + return this; + } + + public List getInsList() { + return ins; + } + + public Builder addAllIns(List ins) { + if (this.ins == null) { + this.ins = new LinkedList<>(); + } + this.ins.addAll(ins); + return this; + } + + public Builder addIns(String ins) { + if (this.ins == null) { + this.ins = new LinkedList<>(); + } + this.ins.add(ins); + return this; + } + + public List getLogConfigsList() { + return logConfigs; + } + + public Builder addAllLogConfigs(List logConfigs) { + if (this.logConfigs == null) { + this.logConfigs = new LinkedList<>(); + } + this.logConfigs.addAll(logConfigs); + return this; + } + + public Builder addLogConfigs(LogConfig logConfigs) { + if (this.logConfigs == null) { + this.logConfigs = new LinkedList<>(); + } + this.logConfigs.add(logConfigs); + return this; + } + + public List getNotInsList() { + return notIns; + } + + public Builder addAllNotIns(List notIns) { + if (this.notIns == null) { + this.notIns = new LinkedList<>(); + } + this.notIns.addAll(notIns); + return this; + } + + public Builder addNotIns(String notIns) { + if (this.notIns == null) { + this.notIns = new LinkedList<>(); + } + this.notIns.add(notIns); + return this; + } + + public List getPermissionsList() { + return permissions; + } + + public Builder addAllPermissions(List permissions) { + if (this.permissions == null) { + this.permissions = new LinkedList<>(); + } + this.permissions.addAll(permissions); + return this; + } + + public Builder addPermissions(String permissions) { + if (this.permissions == null) { + this.permissions = new LinkedList<>(); + } + this.permissions.add(permissions); + return this; + } + + public Rule build() { + + return new Rule(action, conditions, description, ins, logConfigs, notIns, permissions); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAction(this.action); + newBuilder.addAllConditions(this.conditions); + newBuilder.setDescription(this.description); + newBuilder.addAllIns(this.ins); + newBuilder.addAllLogConfigs(this.logConfigs); + newBuilder.addAllNotIns(this.notIns); + newBuilder.addAllPermissions(this.permissions); + return newBuilder; + } + } + + @Override + public String toString() { + return "Rule{" + + "action=" + + action + + ", " + + "conditions=" + + conditions + + ", " + + "description=" + + description + + ", " + + "ins=" + + ins + + ", " + + "logConfigs=" + + logConfigs + + ", " + + "notIns=" + + notIns + + ", " + + "permissions=" + + permissions + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof Rule) { + Rule that = (Rule) o; + return Objects.equals(this.action, that.getAction()) + && Objects.equals(this.conditions, that.getConditionsList()) + && Objects.equals(this.description, that.getDescription()) + && Objects.equals(this.ins, that.getInsList()) + && Objects.equals(this.logConfigs, that.getLogConfigsList()) + && Objects.equals(this.notIns, that.getNotInsList()) + && Objects.equals(this.permissions, that.getPermissionsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(action, conditions, description, ins, logConfigs, notIns, permissions); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java index 0f27aba4096a..83fc974dd78e 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java @@ -157,7 +157,7 @@ public SnapshotStub getStub() { * for deletion is needed for subsequent snapshots, the data will be moved to the next * corresponding snapshot. * - *

For more information, see Deleting snaphots. + *

For more information, see Deleting snapshots. * *

Sample code: * @@ -188,7 +188,7 @@ public final Operation deleteSnapshot(ProjectGlobalSnapshotName snapshot) { * for deletion is needed for subsequent snapshots, the data will be moved to the next * corresponding snapshot. * - *

For more information, see Deleting snaphots. + *

For more information, see Deleting snapshots. * *

Sample code: * @@ -217,7 +217,7 @@ public final Operation deleteSnapshot(String snapshot) { * for deletion is needed for subsequent snapshots, the data will be moved to the next * corresponding snapshot. * - *

For more information, see Deleting snaphots. + *

For more information, see Deleting snapshots. * *

Sample code: * @@ -246,7 +246,7 @@ public final Operation deleteSnapshot(DeleteSnapshotHttpRequest request) { * for deletion is needed for subsequent snapshots, the data will be moved to the next * corresponding snapshot. * - *

For more information, see Deleting snaphots. + *

For more information, see Deleting snapshots. * *

Sample code: * @@ -519,7 +519,7 @@ public final UnaryCallable listSnapshots * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param globalSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -551,7 +551,7 @@ public final Operation setLabelsSnapshot( * } * * - * @param resource Name of the resource for this request. + * @param resource Name or id of the resource for this request. * @param globalSetLabelsRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java index 3051a2e8f720..26b13decb193 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java @@ -988,10 +988,9 @@ public final ListUsableSubnetworksPagedResponse listUsableSubnetworks( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Patches the specified subnetwork with the data included in the request. Only the following - * fields within the subnetwork resource can be specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current - * fingeprint of the subnetwork resource being patched. + * Patches the specified subnetwork with the data included in the request. Only certain fields can + * up updated with a patch request as indicated in the field descriptions. You must specify the + * current fingeprint of the subnetwork resource being patched. * *

Sample code: * @@ -1027,10 +1026,9 @@ public final Operation patchSubnetwork( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Patches the specified subnetwork with the data included in the request. Only the following - * fields within the subnetwork resource can be specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current - * fingeprint of the subnetwork resource being patched. + * Patches the specified subnetwork with the data included in the request. Only certain fields can + * up updated with a patch request as indicated in the field descriptions. You must specify the + * current fingeprint of the subnetwork resource being patched. * *

Sample code: * @@ -1064,10 +1062,9 @@ public final Operation patchSubnetwork( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Patches the specified subnetwork with the data included in the request. Only the following - * fields within the subnetwork resource can be specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current - * fingeprint of the subnetwork resource being patched. + * Patches the specified subnetwork with the data included in the request. Only certain fields can + * up updated with a patch request as indicated in the field descriptions. You must specify the + * current fingeprint of the subnetwork resource being patched. * *

Sample code: * @@ -1095,10 +1092,9 @@ public final Operation patchSubnetwork(PatchSubnetworkHttpRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Patches the specified subnetwork with the data included in the request. Only the following - * fields within the subnetwork resource can be specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current - * fingeprint of the subnetwork resource being patched. + * Patches the specified subnetwork with the data included in the request. Only certain fields can + * up updated with a patch request as indicated in the field descriptions. You must specify the + * current fingeprint of the subnetwork resource being patched. * *

Sample code: * diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java new file mode 100644 index 000000000000..f73c79d9fdf2 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java @@ -0,0 +1,216 @@ +/* + * Copyright 2018 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.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class ZoneSetPolicyRequest implements ApiMessage { + private final List bindings; + private final String etag; + private final Policy policy; + + private ZoneSetPolicyRequest() { + this.bindings = null; + this.etag = null; + this.policy = null; + } + + private ZoneSetPolicyRequest(List bindings, String etag, Policy policy) { + this.bindings = bindings; + this.etag = etag; + this.policy = policy; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("bindings")) { + return bindings; + } + if (fieldName.equals("etag")) { + return etag; + } + if (fieldName.equals("policy")) { + return policy; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getBindingsList() { + return bindings; + } + + public String getEtag() { + return etag; + } + + public Policy getPolicy() { + return policy; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ZoneSetPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static ZoneSetPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final ZoneSetPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ZoneSetPolicyRequest(); + } + + public static class Builder { + private List bindings; + private String etag; + private Policy policy; + + Builder() {} + + public Builder mergeFrom(ZoneSetPolicyRequest other) { + if (other == ZoneSetPolicyRequest.getDefaultInstance()) return this; + if (other.getBindingsList() != null) { + this.bindings = other.bindings; + } + if (other.getEtag() != null) { + this.etag = other.etag; + } + if (other.getPolicy() != null) { + this.policy = other.policy; + } + return this; + } + + Builder(ZoneSetPolicyRequest source) { + this.bindings = source.bindings; + this.etag = source.etag; + this.policy = source.policy; + } + + public List getBindingsList() { + return bindings; + } + + public Builder addAllBindings(List bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.addAll(bindings); + return this; + } + + public Builder addBindings(Binding bindings) { + if (this.bindings == null) { + this.bindings = new LinkedList<>(); + } + this.bindings.add(bindings); + return this; + } + + public String getEtag() { + return etag; + } + + public Builder setEtag(String etag) { + this.etag = etag; + return this; + } + + public Policy getPolicy() { + return policy; + } + + public Builder setPolicy(Policy policy) { + this.policy = policy; + return this; + } + + public ZoneSetPolicyRequest build() { + + return new ZoneSetPolicyRequest(bindings, etag, policy); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllBindings(this.bindings); + newBuilder.setEtag(this.etag); + newBuilder.setPolicy(this.policy); + return newBuilder; + } + } + + @Override + public String toString() { + return "ZoneSetPolicyRequest{" + + "bindings=" + + bindings + + ", " + + "etag=" + + etag + + ", " + + "policy=" + + policy + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ZoneSetPolicyRequest) { + ZoneSetPolicyRequest that = (ZoneSetPolicyRequest) o; + return Objects.equals(this.bindings, that.getBindingsList()) + && Objects.equals(this.etag, that.getEtag()) + && Objects.equals(this.policy, that.getPolicy()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(bindings, etag, policy); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java index ce95a4016a28..af657bd4ed1b 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java @@ -245,10 +245,13 @@ public void deleteAddressExceptionTest() throws Exception { public void getAddressTest() { ProjectGlobalAddressName address2 = ProjectGlobalAddressName.of("[PROJECT]", "[ADDRESS]"); String networkTier = "networkTier-19473069"; + String purpose = "purpose-220463842"; String addressType = "addressType264307877"; String kind = "kind3292052"; String description = "description-1724546052"; + ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]"); String selfLink = "selfLink-1691268851"; + Integer prefixLength = 1157046989; String ipVersion = "ipVersion-1315653184"; ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]"); @@ -261,10 +264,13 @@ public void getAddressTest() { Address.newBuilder() .setAddress(address2.toString()) .setNetworkTier(networkTier) + .setPurpose(purpose) .setAddressType(addressType) .setKind(kind) .setDescription(description) + .setNetwork(network.toString()) .setSelfLink(selfLink) + .setPrefixLength(prefixLength) .setIpVersion(ipVersion) .setSubnetwork(subnetwork.toString()) .setCreationTimestamp(creationTimestamp) diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java index 94683e69e0cd..688495f076a4 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java @@ -353,6 +353,7 @@ public void getDiskTest() { String kind = "kind3292052"; String lastAttachTimestamp = "lastAttachTimestamp-2105323995"; String selfLink = "selfLink-1691268851"; + String physicalBlockSizeBytes = "physicalBlockSizeBytes-1190604793"; String name = "name3373707"; String sourceImage = "sourceImage1661056055"; ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); @@ -374,6 +375,7 @@ public void getDiskTest() { .setKind(kind) .setLastAttachTimestamp(lastAttachTimestamp) .setSelfLink(selfLink) + .setPhysicalBlockSizeBytes(physicalBlockSizeBytes) .setName(name) .setSourceImage(sourceImage) .setRegion(region.toString()) diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/GlobalAddressClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/GlobalAddressClientTest.java index 4705d177dc84..a8fa6c7a2641 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/GlobalAddressClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/GlobalAddressClientTest.java @@ -175,10 +175,13 @@ public void deleteGlobalAddressExceptionTest() throws Exception { public void getGlobalAddressTest() { ProjectGlobalAddressName address2 = ProjectGlobalAddressName.of("[PROJECT]", "[ADDRESS]"); String networkTier = "networkTier-19473069"; + String purpose = "purpose-220463842"; String addressType = "addressType264307877"; String kind = "kind3292052"; String description = "description-1724546052"; + ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]"); String selfLink = "selfLink-1691268851"; + Integer prefixLength = 1157046989; String ipVersion = "ipVersion-1315653184"; ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]"); @@ -191,10 +194,13 @@ public void getGlobalAddressTest() { Address.newBuilder() .setAddress(address2.toString()) .setNetworkTier(networkTier) + .setPurpose(purpose) .setAddressType(addressType) .setKind(kind) .setDescription(description) + .setNetwork(network.toString()) .setSelfLink(selfLink) + .setPrefixLength(prefixLength) .setIpVersion(ipVersion) .setSubnetwork(subnetwork.toString()) .setCreationTimestamp(creationTimestamp) diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/RegionDiskClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/RegionDiskClientTest.java index 4466235bf6b9..3eda11fea012 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/RegionDiskClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/RegionDiskClientTest.java @@ -286,6 +286,7 @@ public void getRegionDiskTest() { String kind = "kind3292052"; String lastAttachTimestamp = "lastAttachTimestamp-2105323995"; String selfLink = "selfLink-1691268851"; + String physicalBlockSizeBytes = "physicalBlockSizeBytes-1190604793"; String name = "name3373707"; String sourceImage = "sourceImage1661056055"; ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); @@ -307,6 +308,7 @@ public void getRegionDiskTest() { .setKind(kind) .setLastAttachTimestamp(lastAttachTimestamp) .setSelfLink(selfLink) + .setPhysicalBlockSizeBytes(physicalBlockSizeBytes) .setName(name) .setSourceImage(sourceImage) .setRegion(region.toString()) diff --git a/google-cloud-clients/google-cloud-compute/synth.metadata b/google-cloud-clients/google-cloud-compute/synth.metadata index 2bd4f07a69a5..a7e69ba472cb 100644 --- a/google-cloud-clients/google-cloud-compute/synth.metadata +++ b/google-cloud-clients/google-cloud-compute/synth.metadata @@ -1,27 +1,19 @@ { + "updateTime": "2018-12-08T08:36:32.837586Z", "sources": [ { "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f", - "internalRef": "221837528" - } - }, - { - "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641", - "internalRef": "221340946" + "name": "discovery-artifact-manager", + "remote": "https://github.com/googleapis/discovery-artifact-manager.git", + "sha": "e91a43b559cdf54e5148f6e558a1b182917f1cff" } }, { "generator": { "name": "artman", - "version": "0.16.0", - "dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b" + "version": "0.16.2", + "dockerImage": "googleapis/artman@sha256:2f6b261ee7fe1aedf238991c93a20b3820de37a343d0cacf3e3e9555c2aaf2ea" } } ] -} +} \ No newline at end of file