All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.compute.v1.VpnGateway Maven / Gradle / Ivy

There is a newer version: 1.66.0
Show newest version
/*
 * Copyright 2024 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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.compute.v1;

/**
 *
 *
 * 
 * Represents a HA VPN gateway. HA VPN is a high-availability (HA) Cloud VPN solution that lets you securely connect your on-premises network to your Google Cloud Virtual Private Cloud network through an IPsec VPN connection in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies .
 * 
* * Protobuf type {@code google.cloud.compute.v1.VpnGateway} */ public final class VpnGateway extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.VpnGateway) VpnGatewayOrBuilder { private static final long serialVersionUID = 0L; // Use VpnGateway.newBuilder() to construct. private VpnGateway(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private VpnGateway() { creationTimestamp_ = ""; description_ = ""; gatewayIpVersion_ = ""; kind_ = ""; labelFingerprint_ = ""; name_ = ""; network_ = ""; region_ = ""; selfLink_ = ""; stackType_ = ""; vpnInterfaces_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new VpnGateway(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 500195327: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.compute.v1.VpnGateway.class, com.google.cloud.compute.v1.VpnGateway.Builder.class); } /** * * *
   * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
   * 
* * Protobuf enum {@code google.cloud.compute.v1.VpnGateway.GatewayIpVersion} */ public enum GatewayIpVersion implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * A value indicating that the enum field is not set.
     * 
* * UNDEFINED_GATEWAY_IP_VERSION = 0; */ UNDEFINED_GATEWAY_IP_VERSION(0), /** * * *
     * Every HA-VPN gateway interface is configured with an IPv4 address.
     * 
* * IPV4 = 2254341; */ IPV4(2254341), /** * * *
     * Every HA-VPN gateway interface is configured with an IPv6 address.
     * 
* * IPV6 = 2254343; */ IPV6(2254343), UNRECOGNIZED(-1), ; /** * * *
     * A value indicating that the enum field is not set.
     * 
* * UNDEFINED_GATEWAY_IP_VERSION = 0; */ public static final int UNDEFINED_GATEWAY_IP_VERSION_VALUE = 0; /** * * *
     * Every HA-VPN gateway interface is configured with an IPv4 address.
     * 
* * IPV4 = 2254341; */ public static final int IPV4_VALUE = 2254341; /** * * *
     * Every HA-VPN gateway interface is configured with an IPv6 address.
     * 
* * IPV6 = 2254343; */ public static final int IPV6_VALUE = 2254343; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static GatewayIpVersion valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static GatewayIpVersion forNumber(int value) { switch (value) { case 0: return UNDEFINED_GATEWAY_IP_VERSION; case 2254341: return IPV4; case 2254343: return IPV6; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public GatewayIpVersion findValueByNumber(int number) { return GatewayIpVersion.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.compute.v1.VpnGateway.getDescriptor().getEnumTypes().get(0); } private static final GatewayIpVersion[] VALUES = values(); public static GatewayIpVersion valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private GatewayIpVersion(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.VpnGateway.GatewayIpVersion) } /** * * *
   * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
   * 
* * Protobuf enum {@code google.cloud.compute.v1.VpnGateway.StackType} */ public enum StackType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * A value indicating that the enum field is not set.
     * 
* * UNDEFINED_STACK_TYPE = 0; */ UNDEFINED_STACK_TYPE(0), /** * * *
     * Enable VPN gateway with both IPv4 and IPv6 protocols.
     * 
* * IPV4_IPV6 = 22197249; */ IPV4_IPV6(22197249), /** * * *
     * Enable VPN gateway with only IPv4 protocol.
     * 
* * IPV4_ONLY = 22373798; */ IPV4_ONLY(22373798), /** * * *
     * Enable VPN gateway with only IPv6 protocol.
     * 
* * IPV6_ONLY = 79632100; */ IPV6_ONLY(79632100), UNRECOGNIZED(-1), ; /** * * *
     * A value indicating that the enum field is not set.
     * 
* * UNDEFINED_STACK_TYPE = 0; */ public static final int UNDEFINED_STACK_TYPE_VALUE = 0; /** * * *
     * Enable VPN gateway with both IPv4 and IPv6 protocols.
     * 
* * IPV4_IPV6 = 22197249; */ public static final int IPV4_IPV6_VALUE = 22197249; /** * * *
     * Enable VPN gateway with only IPv4 protocol.
     * 
* * IPV4_ONLY = 22373798; */ public static final int IPV4_ONLY_VALUE = 22373798; /** * * *
     * Enable VPN gateway with only IPv6 protocol.
     * 
* * IPV6_ONLY = 79632100; */ public static final int IPV6_ONLY_VALUE = 79632100; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static StackType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static StackType forNumber(int value) { switch (value) { case 0: return UNDEFINED_STACK_TYPE; case 22197249: return IPV4_IPV6; case 22373798: return IPV4_ONLY; case 79632100: return IPV6_ONLY; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public StackType findValueByNumber(int number) { return StackType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.compute.v1.VpnGateway.getDescriptor().getEnumTypes().get(1); } private static final StackType[] VALUES = values(); public static StackType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private StackType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.VpnGateway.StackType) } private int bitField0_; public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; @SuppressWarnings("serial") private volatile java.lang.Object creationTimestamp_ = ""; /** * * *
   * [Output Only] Creation timestamp in RFC3339 text format.
   * 
* * optional string creation_timestamp = 30525366; * * @return Whether the creationTimestamp field is set. */ @java.lang.Override public boolean hasCreationTimestamp() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * [Output Only] Creation timestamp in RFC3339 text format.
   * 
* * optional string creation_timestamp = 30525366; * * @return The creationTimestamp. */ @java.lang.Override public java.lang.String getCreationTimestamp() { java.lang.Object ref = creationTimestamp_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); creationTimestamp_ = s; return s; } } /** * * *
   * [Output Only] Creation timestamp in RFC3339 text format.
   * 
* * optional string creation_timestamp = 30525366; * * @return The bytes for creationTimestamp. */ @java.lang.Override public com.google.protobuf.ByteString getCreationTimestampBytes() { java.lang.Object ref = creationTimestamp_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); creationTimestamp_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 422937596; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * * *
   * An optional description of this resource. Provide this property when you create the resource.
   * 
* * optional string description = 422937596; * * @return Whether the description field is set. */ @java.lang.Override public boolean hasDescription() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * An optional description of this resource. Provide this property when you create the resource.
   * 
* * optional string description = 422937596; * * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** * * *
   * An optional description of this resource. Provide this property when you create the resource.
   * 
* * optional string description = 422937596; * * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GATEWAY_IP_VERSION_FIELD_NUMBER = 65074843; @SuppressWarnings("serial") private volatile java.lang.Object gatewayIpVersion_ = ""; /** * * *
   * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
   * Check the GatewayIpVersion enum for the list of possible values.
   * 
* * optional string gateway_ip_version = 65074843; * * @return Whether the gatewayIpVersion field is set. */ @java.lang.Override public boolean hasGatewayIpVersion() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
   * Check the GatewayIpVersion enum for the list of possible values.
   * 
* * optional string gateway_ip_version = 65074843; * * @return The gatewayIpVersion. */ @java.lang.Override public java.lang.String getGatewayIpVersion() { java.lang.Object ref = gatewayIpVersion_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); gatewayIpVersion_ = s; return s; } } /** * * *
   * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
   * Check the GatewayIpVersion enum for the list of possible values.
   * 
* * optional string gateway_ip_version = 65074843; * * @return The bytes for gatewayIpVersion. */ @java.lang.Override public com.google.protobuf.ByteString getGatewayIpVersionBytes() { java.lang.Object ref = gatewayIpVersion_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); gatewayIpVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ID_FIELD_NUMBER = 3355; private long id_ = 0L; /** * * *
   * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   * 
* * optional uint64 id = 3355; * * @return Whether the id field is set. */ @java.lang.Override public boolean hasId() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   * 
* * optional uint64 id = 3355; * * @return The id. */ @java.lang.Override public long getId() { return id_; } public static final int KIND_FIELD_NUMBER = 3292052; @SuppressWarnings("serial") private volatile java.lang.Object kind_ = ""; /** * * *
   * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
   * 
* * optional string kind = 3292052; * * @return Whether the kind field is set. */ @java.lang.Override public boolean hasKind() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
   * 
* * optional string kind = 3292052; * * @return The kind. */ @java.lang.Override public java.lang.String getKind() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; return s; } } /** * * *
   * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
   * 
* * optional string kind = 3292052; * * @return The bytes for kind. */ @java.lang.Override public com.google.protobuf.ByteString getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); kind_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FINGERPRINT_FIELD_NUMBER = 178124825; @SuppressWarnings("serial") private volatile java.lang.Object labelFingerprint_ = ""; /** * * *
   * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
   * 
* * optional string label_fingerprint = 178124825; * * @return Whether the labelFingerprint field is set. */ @java.lang.Override public boolean hasLabelFingerprint() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
   * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
   * 
* * optional string label_fingerprint = 178124825; * * @return The labelFingerprint. */ @java.lang.Override public java.lang.String getLabelFingerprint() { java.lang.Object ref = labelFingerprint_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); labelFingerprint_ = s; return s; } } /** * * *
   * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
   * 
* * optional string label_fingerprint = 178124825; * * @return The bytes for labelFingerprint. */ @java.lang.Override public com.google.protobuf.ByteString getLabelFingerprintBytes() { java.lang.Object ref = labelFingerprint_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); labelFingerprint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABELS_FIELD_NUMBER = 500195327; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
   * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
   * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
   * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
   * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
   * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
   * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int NAME_FIELD_NUMBER = 3373707; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
   * 
* * optional string name = 3373707; * * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
   * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
   * 
* * optional string name = 3373707; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
   * 
* * optional string name = 3373707; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NETWORK_FIELD_NUMBER = 232872494; @SuppressWarnings("serial") private volatile java.lang.Object network_ = ""; /** * * *
   * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
   * 
* * optional string network = 232872494; * * @return Whether the network field is set. */ @java.lang.Override public boolean hasNetwork() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
   * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
   * 
* * optional string network = 232872494; * * @return The network. */ @java.lang.Override public java.lang.String getNetwork() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; } } /** * * *
   * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
   * 
* * optional string network = 232872494; * * @return The bytes for network. */ @java.lang.Override public com.google.protobuf.ByteString getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REGION_FIELD_NUMBER = 138946292; @SuppressWarnings("serial") private volatile java.lang.Object region_ = ""; /** * * *
   * [Output Only] URL of the region where the VPN gateway resides.
   * 
* * optional string region = 138946292; * * @return Whether the region field is set. */ @java.lang.Override public boolean hasRegion() { return ((bitField0_ & 0x00000100) != 0); } /** * * *
   * [Output Only] URL of the region where the VPN gateway resides.
   * 
* * optional string region = 138946292; * * @return The region. */ @java.lang.Override public java.lang.String getRegion() { java.lang.Object ref = region_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); region_ = s; return s; } } /** * * *
   * [Output Only] URL of the region where the VPN gateway resides.
   * 
* * optional string region = 138946292; * * @return The bytes for region. */ @java.lang.Override public com.google.protobuf.ByteString getRegionBytes() { java.lang.Object ref = region_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); region_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SELF_LINK_FIELD_NUMBER = 456214797; @SuppressWarnings("serial") private volatile java.lang.Object selfLink_ = ""; /** * * *
   * [Output Only] Server-defined URL for the resource.
   * 
* * optional string self_link = 456214797; * * @return Whether the selfLink field is set. */ @java.lang.Override public boolean hasSelfLink() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
   * [Output Only] Server-defined URL for the resource.
   * 
* * optional string self_link = 456214797; * * @return The selfLink. */ @java.lang.Override public java.lang.String getSelfLink() { java.lang.Object ref = selfLink_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); selfLink_ = s; return s; } } /** * * *
   * [Output Only] Server-defined URL for the resource.
   * 
* * optional string self_link = 456214797; * * @return The bytes for selfLink. */ @java.lang.Override public com.google.protobuf.ByteString getSelfLinkBytes() { java.lang.Object ref = selfLink_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); selfLink_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STACK_TYPE_FIELD_NUMBER = 425908881; @SuppressWarnings("serial") private volatile java.lang.Object stackType_ = ""; /** * * *
   * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
   * Check the StackType enum for the list of possible values.
   * 
* * optional string stack_type = 425908881; * * @return Whether the stackType field is set. */ @java.lang.Override public boolean hasStackType() { return ((bitField0_ & 0x00000400) != 0); } /** * * *
   * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
   * Check the StackType enum for the list of possible values.
   * 
* * optional string stack_type = 425908881; * * @return The stackType. */ @java.lang.Override public java.lang.String getStackType() { java.lang.Object ref = stackType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); stackType_ = s; return s; } } /** * * *
   * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
   * Check the StackType enum for the list of possible values.
   * 
* * optional string stack_type = 425908881; * * @return The bytes for stackType. */ @java.lang.Override public com.google.protobuf.ByteString getStackTypeBytes() { java.lang.Object ref = stackType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); stackType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VPN_INTERFACES_FIELD_NUMBER = 91842181; @SuppressWarnings("serial") private java.util.List vpnInterfaces_; /** * * *
   * The list of VPN interfaces associated with this VPN gateway.
   * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ @java.lang.Override public java.util.List getVpnInterfacesList() { return vpnInterfaces_; } /** * * *
   * The list of VPN interfaces associated with this VPN gateway.
   * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder> getVpnInterfacesOrBuilderList() { return vpnInterfaces_; } /** * * *
   * The list of VPN interfaces associated with this VPN gateway.
   * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ @java.lang.Override public int getVpnInterfacesCount() { return vpnInterfaces_.size(); } /** * * *
   * The list of VPN interfaces associated with this VPN gateway.
   * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ @java.lang.Override public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface getVpnInterfaces(int index) { return vpnInterfaces_.get(index); } /** * * *
   * The list of VPN interfaces associated with this VPN gateway.
   * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ @java.lang.Override public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder getVpnInterfacesOrBuilder(int index) { return vpnInterfaces_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000008) != 0)) { output.writeUInt64(3355, id_); } if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); } if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); } if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 65074843, gatewayIpVersion_); } for (int i = 0; i < vpnInterfaces_.size(); i++) { output.writeMessage(91842181, vpnInterfaces_.get(i)); } if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); } if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 178124825, labelFingerprint_); } if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } if (((bitField0_ & 0x00000400) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 425908881, stackType_); } if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); } if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(65074843, gatewayIpVersion_); } for (int i = 0; i < vpnInterfaces_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(91842181, vpnInterfaces_.get(i)); } if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(178124825, labelFingerprint_); } if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(425908881, stackType_); } if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.compute.v1.VpnGateway)) { return super.equals(obj); } com.google.cloud.compute.v1.VpnGateway other = (com.google.cloud.compute.v1.VpnGateway) obj; if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; if (hasCreationTimestamp()) { if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; } if (hasDescription() != other.hasDescription()) return false; if (hasDescription()) { if (!getDescription().equals(other.getDescription())) return false; } if (hasGatewayIpVersion() != other.hasGatewayIpVersion()) return false; if (hasGatewayIpVersion()) { if (!getGatewayIpVersion().equals(other.getGatewayIpVersion())) return false; } if (hasId() != other.hasId()) return false; if (hasId()) { if (getId() != other.getId()) return false; } if (hasKind() != other.hasKind()) return false; if (hasKind()) { if (!getKind().equals(other.getKind())) return false; } if (hasLabelFingerprint() != other.hasLabelFingerprint()) return false; if (hasLabelFingerprint()) { if (!getLabelFingerprint().equals(other.getLabelFingerprint())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName().equals(other.getName())) return false; } if (hasNetwork() != other.hasNetwork()) return false; if (hasNetwork()) { if (!getNetwork().equals(other.getNetwork())) return false; } if (hasRegion() != other.hasRegion()) return false; if (hasRegion()) { if (!getRegion().equals(other.getRegion())) return false; } if (hasSelfLink() != other.hasSelfLink()) return false; if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } if (hasStackType() != other.hasStackType()) return false; if (hasStackType()) { if (!getStackType().equals(other.getStackType())) return false; } if (!getVpnInterfacesList().equals(other.getVpnInterfacesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasCreationTimestamp()) { hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getCreationTimestamp().hashCode(); } if (hasDescription()) { hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); } if (hasGatewayIpVersion()) { hash = (37 * hash) + GATEWAY_IP_VERSION_FIELD_NUMBER; hash = (53 * hash) + getGatewayIpVersion().hashCode(); } if (hasId()) { hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); } if (hasKind()) { hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); } if (hasLabelFingerprint()) { hash = (37 * hash) + LABEL_FINGERPRINT_FIELD_NUMBER; hash = (53 * hash) + getLabelFingerprint().hashCode(); } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasNetwork()) { hash = (37 * hash) + NETWORK_FIELD_NUMBER; hash = (53 * hash) + getNetwork().hashCode(); } if (hasRegion()) { hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); } if (hasSelfLink()) { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } if (hasStackType()) { hash = (37 * hash) + STACK_TYPE_FIELD_NUMBER; hash = (53 * hash) + getStackType().hashCode(); } if (getVpnInterfacesCount() > 0) { hash = (37 * hash) + VPN_INTERFACES_FIELD_NUMBER; hash = (53 * hash) + getVpnInterfacesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.compute.v1.VpnGateway parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.compute.v1.VpnGateway parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.compute.v1.VpnGateway parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.compute.v1.VpnGateway parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.VpnGateway parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.VpnGateway parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.compute.v1.VpnGateway prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Represents a HA VPN gateway. HA VPN is a high-availability (HA) Cloud VPN solution that lets you securely connect your on-premises network to your Google Cloud Virtual Private Cloud network through an IPsec VPN connection in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies .
   * 
* * Protobuf type {@code google.cloud.compute.v1.VpnGateway} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.VpnGateway) com.google.cloud.compute.v1.VpnGatewayOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 500195327: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 500195327: return internalGetMutableLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.compute.v1.VpnGateway.class, com.google.cloud.compute.v1.VpnGateway.Builder.class); } // Construct using com.google.cloud.compute.v1.VpnGateway.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; creationTimestamp_ = ""; description_ = ""; gatewayIpVersion_ = ""; id_ = 0L; kind_ = ""; labelFingerprint_ = ""; internalGetMutableLabels().clear(); name_ = ""; network_ = ""; region_ = ""; selfLink_ = ""; stackType_ = ""; if (vpnInterfacesBuilder_ == null) { vpnInterfaces_ = java.util.Collections.emptyList(); } else { vpnInterfaces_ = null; vpnInterfacesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00001000); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_descriptor; } @java.lang.Override public com.google.cloud.compute.v1.VpnGateway getDefaultInstanceForType() { return com.google.cloud.compute.v1.VpnGateway.getDefaultInstance(); } @java.lang.Override public com.google.cloud.compute.v1.VpnGateway build() { com.google.cloud.compute.v1.VpnGateway result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.compute.v1.VpnGateway buildPartial() { com.google.cloud.compute.v1.VpnGateway result = new com.google.cloud.compute.v1.VpnGateway(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.compute.v1.VpnGateway result) { if (vpnInterfacesBuilder_ == null) { if (((bitField0_ & 0x00001000) != 0)) { vpnInterfaces_ = java.util.Collections.unmodifiableList(vpnInterfaces_); bitField0_ = (bitField0_ & ~0x00001000); } result.vpnInterfaces_ = vpnInterfaces_; } else { result.vpnInterfaces_ = vpnInterfacesBuilder_.build(); } } private void buildPartial0(com.google.cloud.compute.v1.VpnGateway result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.creationTimestamp_ = creationTimestamp_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.gatewayIpVersion_ = gatewayIpVersion_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.id_ = id_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { result.kind_ = kind_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000020) != 0)) { result.labelFingerprint_ = labelFingerprint_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000040) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00000080) != 0)) { result.name_ = name_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000100) != 0)) { result.network_ = network_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000200) != 0)) { result.region_ = region_; to_bitField0_ |= 0x00000100; } if (((from_bitField0_ & 0x00000400) != 0)) { result.selfLink_ = selfLink_; to_bitField0_ |= 0x00000200; } if (((from_bitField0_ & 0x00000800) != 0)) { result.stackType_ = stackType_; to_bitField0_ |= 0x00000400; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.compute.v1.VpnGateway) { return mergeFrom((com.google.cloud.compute.v1.VpnGateway) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.compute.v1.VpnGateway other) { if (other == com.google.cloud.compute.v1.VpnGateway.getDefaultInstance()) return this; if (other.hasCreationTimestamp()) { creationTimestamp_ = other.creationTimestamp_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasDescription()) { description_ = other.description_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasGatewayIpVersion()) { gatewayIpVersion_ = other.gatewayIpVersion_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasId()) { setId(other.getId()); } if (other.hasKind()) { kind_ = other.kind_; bitField0_ |= 0x00000010; onChanged(); } if (other.hasLabelFingerprint()) { labelFingerprint_ = other.labelFingerprint_; bitField0_ |= 0x00000020; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000040; if (other.hasName()) { name_ = other.name_; bitField0_ |= 0x00000080; onChanged(); } if (other.hasNetwork()) { network_ = other.network_; bitField0_ |= 0x00000100; onChanged(); } if (other.hasRegion()) { region_ = other.region_; bitField0_ |= 0x00000200; onChanged(); } if (other.hasSelfLink()) { selfLink_ = other.selfLink_; bitField0_ |= 0x00000400; onChanged(); } if (other.hasStackType()) { stackType_ = other.stackType_; bitField0_ |= 0x00000800; onChanged(); } if (vpnInterfacesBuilder_ == null) { if (!other.vpnInterfaces_.isEmpty()) { if (vpnInterfaces_.isEmpty()) { vpnInterfaces_ = other.vpnInterfaces_; bitField0_ = (bitField0_ & ~0x00001000); } else { ensureVpnInterfacesIsMutable(); vpnInterfaces_.addAll(other.vpnInterfaces_); } onChanged(); } } else { if (!other.vpnInterfaces_.isEmpty()) { if (vpnInterfacesBuilder_.isEmpty()) { vpnInterfacesBuilder_.dispose(); vpnInterfacesBuilder_ = null; vpnInterfaces_ = other.vpnInterfaces_; bitField0_ = (bitField0_ & ~0x00001000); vpnInterfacesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getVpnInterfacesFieldBuilder() : null; } else { vpnInterfacesBuilder_.addAllMessages(other.vpnInterfaces_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 26840: { id_ = input.readUInt64(); bitField0_ |= 0x00000008; break; } // case 26840 case 26336418: { kind_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 26336418 case 26989658: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 26989658 case 244202930: { creationTimestamp_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 244202930 case 520598746: { gatewayIpVersion_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 520598746 case 734737450: { com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface m = input.readMessage( com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.parser(), extensionRegistry); if (vpnInterfacesBuilder_ == null) { ensureVpnInterfacesIsMutable(); vpnInterfaces_.add(m); } else { vpnInterfacesBuilder_.addMessage(m); } break; } // case 734737450 case 1111570338: { region_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000200; break; } // case 1111570338 case 1424998602: { labelFingerprint_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 1424998602 case 1862979954: { network_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000100; break; } // case 1862979954 case -911466526: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case -911466526 case -887696246: { stackType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000800; break; } // case -887696246 case -645248918: { selfLink_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000400; break; } // case -645248918 case -293404678: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000040; break; } // case -293404678 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object creationTimestamp_ = ""; /** * * *
     * [Output Only] Creation timestamp in RFC3339 text format.
     * 
* * optional string creation_timestamp = 30525366; * * @return Whether the creationTimestamp field is set. */ public boolean hasCreationTimestamp() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * [Output Only] Creation timestamp in RFC3339 text format.
     * 
* * optional string creation_timestamp = 30525366; * * @return The creationTimestamp. */ public java.lang.String getCreationTimestamp() { java.lang.Object ref = creationTimestamp_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); creationTimestamp_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [Output Only] Creation timestamp in RFC3339 text format.
     * 
* * optional string creation_timestamp = 30525366; * * @return The bytes for creationTimestamp. */ public com.google.protobuf.ByteString getCreationTimestampBytes() { java.lang.Object ref = creationTimestamp_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); creationTimestamp_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [Output Only] Creation timestamp in RFC3339 text format.
     * 
* * optional string creation_timestamp = 30525366; * * @param value The creationTimestamp to set. * @return This builder for chaining. */ public Builder setCreationTimestamp(java.lang.String value) { if (value == null) { throw new NullPointerException(); } creationTimestamp_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * [Output Only] Creation timestamp in RFC3339 text format.
     * 
* * optional string creation_timestamp = 30525366; * * @return This builder for chaining. */ public Builder clearCreationTimestamp() { creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * [Output Only] Creation timestamp in RFC3339 text format.
     * 
* * optional string creation_timestamp = 30525366; * * @param value The bytes for creationTimestamp to set. * @return This builder for chaining. */ public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); creationTimestamp_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object description_ = ""; /** * * *
     * An optional description of this resource. Provide this property when you create the resource.
     * 
* * optional string description = 422937596; * * @return Whether the description field is set. */ public boolean hasDescription() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * An optional description of this resource. Provide this property when you create the resource.
     * 
* * optional string description = 422937596; * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * An optional description of this resource. Provide this property when you create the resource.
     * 
* * optional string description = 422937596; * * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * An optional description of this resource. Provide this property when you create the resource.
     * 
* * optional string description = 422937596; * * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * An optional description of this resource. Provide this property when you create the resource.
     * 
* * optional string description = 422937596; * * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * An optional description of this resource. Provide this property when you create the resource.
     * 
* * optional string description = 422937596; * * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object gatewayIpVersion_ = ""; /** * * *
     * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
     * Check the GatewayIpVersion enum for the list of possible values.
     * 
* * optional string gateway_ip_version = 65074843; * * @return Whether the gatewayIpVersion field is set. */ public boolean hasGatewayIpVersion() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
     * Check the GatewayIpVersion enum for the list of possible values.
     * 
* * optional string gateway_ip_version = 65074843; * * @return The gatewayIpVersion. */ public java.lang.String getGatewayIpVersion() { java.lang.Object ref = gatewayIpVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); gatewayIpVersion_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
     * Check the GatewayIpVersion enum for the list of possible values.
     * 
* * optional string gateway_ip_version = 65074843; * * @return The bytes for gatewayIpVersion. */ public com.google.protobuf.ByteString getGatewayIpVersionBytes() { java.lang.Object ref = gatewayIpVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); gatewayIpVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
     * Check the GatewayIpVersion enum for the list of possible values.
     * 
* * optional string gateway_ip_version = 65074843; * * @param value The gatewayIpVersion to set. * @return This builder for chaining. */ public Builder setGatewayIpVersion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } gatewayIpVersion_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
     * Check the GatewayIpVersion enum for the list of possible values.
     * 
* * optional string gateway_ip_version = 65074843; * * @return This builder for chaining. */ public Builder clearGatewayIpVersion() { gatewayIpVersion_ = getDefaultInstance().getGatewayIpVersion(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
     * Check the GatewayIpVersion enum for the list of possible values.
     * 
* * optional string gateway_ip_version = 65074843; * * @param value The bytes for gatewayIpVersion to set. * @return This builder for chaining. */ public Builder setGatewayIpVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); gatewayIpVersion_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private long id_; /** * * *
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     * 
* * optional uint64 id = 3355; * * @return Whether the id field is set. */ @java.lang.Override public boolean hasId() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     * 
* * optional uint64 id = 3355; * * @return The id. */ @java.lang.Override public long getId() { return id_; } /** * * *
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     * 
* * optional uint64 id = 3355; * * @param value The id to set. * @return This builder for chaining. */ public Builder setId(long value) { id_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     * 
* * optional uint64 id = 3355; * * @return This builder for chaining. */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000008); id_ = 0L; onChanged(); return this; } private java.lang.Object kind_ = ""; /** * * *
     * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
     * 
* * optional string kind = 3292052; * * @return Whether the kind field is set. */ public boolean hasKind() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
     * 
* * optional string kind = 3292052; * * @return The kind. */ public java.lang.String getKind() { java.lang.Object ref = kind_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
     * 
* * optional string kind = 3292052; * * @return The bytes for kind. */ public com.google.protobuf.ByteString getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); kind_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
     * 
* * optional string kind = 3292052; * * @param value The kind to set. * @return This builder for chaining. */ public Builder setKind(java.lang.String value) { if (value == null) { throw new NullPointerException(); } kind_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
     * 
* * optional string kind = 3292052; * * @return This builder for chaining. */ public Builder clearKind() { kind_ = getDefaultInstance().getKind(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
     * 
* * optional string kind = 3292052; * * @param value The bytes for kind to set. * @return This builder for chaining. */ public Builder setKindBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); kind_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object labelFingerprint_ = ""; /** * * *
     * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
     * 
* * optional string label_fingerprint = 178124825; * * @return Whether the labelFingerprint field is set. */ public boolean hasLabelFingerprint() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
     * 
* * optional string label_fingerprint = 178124825; * * @return The labelFingerprint. */ public java.lang.String getLabelFingerprint() { java.lang.Object ref = labelFingerprint_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); labelFingerprint_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
     * 
* * optional string label_fingerprint = 178124825; * * @return The bytes for labelFingerprint. */ public com.google.protobuf.ByteString getLabelFingerprintBytes() { java.lang.Object ref = labelFingerprint_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); labelFingerprint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
     * 
* * optional string label_fingerprint = 178124825; * * @param value The labelFingerprint to set. * @return This builder for chaining. */ public Builder setLabelFingerprint(java.lang.String value) { if (value == null) { throw new NullPointerException(); } labelFingerprint_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
     * 
* * optional string label_fingerprint = 178124825; * * @return This builder for chaining. */ public Builder clearLabelFingerprint() { labelFingerprint_ = getDefaultInstance().getLabelFingerprint(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
     * 
* * optional string label_fingerprint = 178124825; * * @param value The bytes for labelFingerprint to set. * @return This builder for chaining. */ public Builder setLabelFingerprintBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); labelFingerprint_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000040; onChanged(); return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ public Builder removeLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000040; return internalGetMutableLabels().getMutableMap(); } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); bitField0_ |= 0x00000040; return this; } /** * * *
     * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
     * 
* * map<string, string> labels = 500195327; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00000040; return this; } private java.lang.Object name_ = ""; /** * * *
     * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * * *
     * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     * 
* * optional string name = 3373707; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } private java.lang.Object network_ = ""; /** * * *
     * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
     * 
* * optional string network = 232872494; * * @return Whether the network field is set. */ public boolean hasNetwork() { return ((bitField0_ & 0x00000100) != 0); } /** * * *
     * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
     * 
* * optional string network = 232872494; * * @return The network. */ public java.lang.String getNetwork() { java.lang.Object ref = network_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
     * 
* * optional string network = 232872494; * * @return The bytes for network. */ public com.google.protobuf.ByteString getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
     * 
* * optional string network = 232872494; * * @param value The network to set. * @return This builder for chaining. */ public Builder setNetwork(java.lang.String value) { if (value == null) { throw new NullPointerException(); } network_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
     * 
* * optional string network = 232872494; * * @return This builder for chaining. */ public Builder clearNetwork() { network_ = getDefaultInstance().getNetwork(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** * * *
     * URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
     * 
* * optional string network = 232872494; * * @param value The bytes for network to set. * @return This builder for chaining. */ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); network_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } private java.lang.Object region_ = ""; /** * * *
     * [Output Only] URL of the region where the VPN gateway resides.
     * 
* * optional string region = 138946292; * * @return Whether the region field is set. */ public boolean hasRegion() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
     * [Output Only] URL of the region where the VPN gateway resides.
     * 
* * optional string region = 138946292; * * @return The region. */ public java.lang.String getRegion() { java.lang.Object ref = region_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); region_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [Output Only] URL of the region where the VPN gateway resides.
     * 
* * optional string region = 138946292; * * @return The bytes for region. */ public com.google.protobuf.ByteString getRegionBytes() { java.lang.Object ref = region_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); region_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [Output Only] URL of the region where the VPN gateway resides.
     * 
* * optional string region = 138946292; * * @param value The region to set. * @return This builder for chaining. */ public Builder setRegion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } region_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * [Output Only] URL of the region where the VPN gateway resides.
     * 
* * optional string region = 138946292; * * @return This builder for chaining. */ public Builder clearRegion() { region_ = getDefaultInstance().getRegion(); bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } /** * * *
     * [Output Only] URL of the region where the VPN gateway resides.
     * 
* * optional string region = 138946292; * * @param value The bytes for region to set. * @return This builder for chaining. */ public Builder setRegionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); region_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } private java.lang.Object selfLink_ = ""; /** * * *
     * [Output Only] Server-defined URL for the resource.
     * 
* * optional string self_link = 456214797; * * @return Whether the selfLink field is set. */ public boolean hasSelfLink() { return ((bitField0_ & 0x00000400) != 0); } /** * * *
     * [Output Only] Server-defined URL for the resource.
     * 
* * optional string self_link = 456214797; * * @return The selfLink. */ public java.lang.String getSelfLink() { java.lang.Object ref = selfLink_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); selfLink_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [Output Only] Server-defined URL for the resource.
     * 
* * optional string self_link = 456214797; * * @return The bytes for selfLink. */ public com.google.protobuf.ByteString getSelfLinkBytes() { java.lang.Object ref = selfLink_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); selfLink_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [Output Only] Server-defined URL for the resource.
     * 
* * optional string self_link = 456214797; * * @param value The selfLink to set. * @return This builder for chaining. */ public Builder setSelfLink(java.lang.String value) { if (value == null) { throw new NullPointerException(); } selfLink_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * [Output Only] Server-defined URL for the resource.
     * 
* * optional string self_link = 456214797; * * @return This builder for chaining. */ public Builder clearSelfLink() { selfLink_ = getDefaultInstance().getSelfLink(); bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } /** * * *
     * [Output Only] Server-defined URL for the resource.
     * 
* * optional string self_link = 456214797; * * @param value The bytes for selfLink to set. * @return This builder for chaining. */ public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); selfLink_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } private java.lang.Object stackType_ = ""; /** * * *
     * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
     * Check the StackType enum for the list of possible values.
     * 
* * optional string stack_type = 425908881; * * @return Whether the stackType field is set. */ public boolean hasStackType() { return ((bitField0_ & 0x00000800) != 0); } /** * * *
     * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
     * Check the StackType enum for the list of possible values.
     * 
* * optional string stack_type = 425908881; * * @return The stackType. */ public java.lang.String getStackType() { java.lang.Object ref = stackType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); stackType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
     * Check the StackType enum for the list of possible values.
     * 
* * optional string stack_type = 425908881; * * @return The bytes for stackType. */ public com.google.protobuf.ByteString getStackTypeBytes() { java.lang.Object ref = stackType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); stackType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
     * Check the StackType enum for the list of possible values.
     * 
* * optional string stack_type = 425908881; * * @param value The stackType to set. * @return This builder for chaining. */ public Builder setStackType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } stackType_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
     * Check the StackType enum for the list of possible values.
     * 
* * optional string stack_type = 425908881; * * @return This builder for chaining. */ public Builder clearStackType() { stackType_ = getDefaultInstance().getStackType(); bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } /** * * *
     * The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.
     * Check the StackType enum for the list of possible values.
     * 
* * optional string stack_type = 425908881; * * @param value The bytes for stackType to set. * @return This builder for chaining. */ public Builder setStackTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); stackType_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } private java.util.List vpnInterfaces_ = java.util.Collections.emptyList(); private void ensureVpnInterfacesIsMutable() { if (!((bitField0_ & 0x00001000) != 0)) { vpnInterfaces_ = new java.util.ArrayList( vpnInterfaces_); bitField0_ |= 0x00001000; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder> vpnInterfacesBuilder_; /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public java.util.List getVpnInterfacesList() { if (vpnInterfacesBuilder_ == null) { return java.util.Collections.unmodifiableList(vpnInterfaces_); } else { return vpnInterfacesBuilder_.getMessageList(); } } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public int getVpnInterfacesCount() { if (vpnInterfacesBuilder_ == null) { return vpnInterfaces_.size(); } else { return vpnInterfacesBuilder_.getCount(); } } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface getVpnInterfaces(int index) { if (vpnInterfacesBuilder_ == null) { return vpnInterfaces_.get(index); } else { return vpnInterfacesBuilder_.getMessage(index); } } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder setVpnInterfaces( int index, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface value) { if (vpnInterfacesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureVpnInterfacesIsMutable(); vpnInterfaces_.set(index, value); onChanged(); } else { vpnInterfacesBuilder_.setMessage(index, value); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder setVpnInterfaces( int index, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder builderForValue) { if (vpnInterfacesBuilder_ == null) { ensureVpnInterfacesIsMutable(); vpnInterfaces_.set(index, builderForValue.build()); onChanged(); } else { vpnInterfacesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder addVpnInterfaces( com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface value) { if (vpnInterfacesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureVpnInterfacesIsMutable(); vpnInterfaces_.add(value); onChanged(); } else { vpnInterfacesBuilder_.addMessage(value); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder addVpnInterfaces( int index, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface value) { if (vpnInterfacesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureVpnInterfacesIsMutable(); vpnInterfaces_.add(index, value); onChanged(); } else { vpnInterfacesBuilder_.addMessage(index, value); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder addVpnInterfaces( com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder builderForValue) { if (vpnInterfacesBuilder_ == null) { ensureVpnInterfacesIsMutable(); vpnInterfaces_.add(builderForValue.build()); onChanged(); } else { vpnInterfacesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder addVpnInterfaces( int index, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder builderForValue) { if (vpnInterfacesBuilder_ == null) { ensureVpnInterfacesIsMutable(); vpnInterfaces_.add(index, builderForValue.build()); onChanged(); } else { vpnInterfacesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder addAllVpnInterfaces( java.lang.Iterable values) { if (vpnInterfacesBuilder_ == null) { ensureVpnInterfacesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vpnInterfaces_); onChanged(); } else { vpnInterfacesBuilder_.addAllMessages(values); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder clearVpnInterfaces() { if (vpnInterfacesBuilder_ == null) { vpnInterfaces_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00001000); onChanged(); } else { vpnInterfacesBuilder_.clear(); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public Builder removeVpnInterfaces(int index) { if (vpnInterfacesBuilder_ == null) { ensureVpnInterfacesIsMutable(); vpnInterfaces_.remove(index); onChanged(); } else { vpnInterfacesBuilder_.remove(index); } return this; } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder getVpnInterfacesBuilder(int index) { return getVpnInterfacesFieldBuilder().getBuilder(index); } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder getVpnInterfacesOrBuilder(int index) { if (vpnInterfacesBuilder_ == null) { return vpnInterfaces_.get(index); } else { return vpnInterfacesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public java.util.List< ? extends com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder> getVpnInterfacesOrBuilderList() { if (vpnInterfacesBuilder_ != null) { return vpnInterfacesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(vpnInterfaces_); } } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder addVpnInterfacesBuilder() { return getVpnInterfacesFieldBuilder() .addBuilder( com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.getDefaultInstance()); } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder addVpnInterfacesBuilder(int index) { return getVpnInterfacesFieldBuilder() .addBuilder( index, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.getDefaultInstance()); } /** * * *
     * The list of VPN interfaces associated with this VPN gateway.
     * 
* * * repeated .google.cloud.compute.v1.VpnGatewayVpnGatewayInterface vpn_interfaces = 91842181; * */ public java.util.List getVpnInterfacesBuilderList() { return getVpnInterfacesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder> getVpnInterfacesFieldBuilder() { if (vpnInterfacesBuilder_ == null) { vpnInterfacesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.Builder, com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfaceOrBuilder>( vpnInterfaces_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); vpnInterfaces_ = null; } return vpnInterfacesBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.VpnGateway) } // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.VpnGateway) private static final com.google.cloud.compute.v1.VpnGateway DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.compute.v1.VpnGateway(); } public static com.google.cloud.compute.v1.VpnGateway getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public VpnGateway parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.compute.v1.VpnGateway getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy