
com.google.cloud.compute.v1.Address Maven / Gradle / Ivy
/*
* 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 an IP Address resource. Google Compute Engine has two IP Address resources: * [Global (external and internal)](https://cloud.google.com/compute/docs/reference/rest/v1/globalAddresses) * [Regional (external and internal)](https://cloud.google.com/compute/docs/reference/rest/v1/addresses) For more information, see Reserving a static external IP address.
*
*
* Protobuf type {@code google.cloud.compute.v1.Address}
*/
public final class Address extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Address)
AddressOrBuilder {
private static final long serialVersionUID = 0L;
// Use Address.newBuilder() to construct.
private Address(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Address() {
address_ = "";
addressType_ = "";
creationTimestamp_ = "";
description_ = "";
ipVersion_ = "";
ipv6EndpointType_ = "";
kind_ = "";
labelFingerprint_ = "";
name_ = "";
network_ = "";
networkTier_ = "";
purpose_ = "";
region_ = "";
selfLink_ = "";
status_ = "";
subnetwork_ = "";
users_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Address();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Address_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_Address_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.Address.class,
com.google.cloud.compute.v1.Address.Builder.class);
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Address.AddressType}
*/
public enum AddressType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_ADDRESS_TYPE = 0;
*/
UNDEFINED_ADDRESS_TYPE(0),
/**
*
*
*
* A publicly visible external IP address.
*
*
* EXTERNAL = 35607499;
*/
EXTERNAL(35607499),
/**
*
*
*
* A private network IP address, for use with an Instance or Internal Load Balancer forwarding rule.
*
*
* INTERNAL = 279295677;
*/
INTERNAL(279295677),
/** UNSPECIFIED_TYPE = 53933922;
*/
UNSPECIFIED_TYPE(53933922),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_ADDRESS_TYPE = 0;
*/
public static final int UNDEFINED_ADDRESS_TYPE_VALUE = 0;
/**
*
*
*
* A publicly visible external IP address.
*
*
* EXTERNAL = 35607499;
*/
public static final int EXTERNAL_VALUE = 35607499;
/**
*
*
*
* A private network IP address, for use with an Instance or Internal Load Balancer forwarding rule.
*
*
* INTERNAL = 279295677;
*/
public static final int INTERNAL_VALUE = 279295677;
/** UNSPECIFIED_TYPE = 53933922;
*/
public static final int UNSPECIFIED_TYPE_VALUE = 53933922;
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 AddressType 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 AddressType forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_ADDRESS_TYPE;
case 35607499:
return EXTERNAL;
case 279295677:
return INTERNAL;
case 53933922:
return UNSPECIFIED_TYPE;
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 AddressType findValueByNumber(int number) {
return AddressType.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.Address.getDescriptor().getEnumTypes().get(0);
}
private static final AddressType[] VALUES = values();
public static AddressType 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 AddressType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Address.AddressType)
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Address.IpVersion}
*/
public enum IpVersion implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_IP_VERSION = 0;
*/
UNDEFINED_IP_VERSION(0),
/** IPV4 = 2254341;
*/
IPV4(2254341),
/** IPV6 = 2254343;
*/
IPV6(2254343),
/** UNSPECIFIED_VERSION = 21850000;
*/
UNSPECIFIED_VERSION(21850000),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_IP_VERSION = 0;
*/
public static final int UNDEFINED_IP_VERSION_VALUE = 0;
/** IPV4 = 2254341;
*/
public static final int IPV4_VALUE = 2254341;
/** IPV6 = 2254343;
*/
public static final int IPV6_VALUE = 2254343;
/** UNSPECIFIED_VERSION = 21850000;
*/
public static final int UNSPECIFIED_VERSION_VALUE = 21850000;
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 IpVersion 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 IpVersion forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_IP_VERSION;
case 2254341:
return IPV4;
case 2254343:
return IPV6;
case 21850000:
return UNSPECIFIED_VERSION;
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 IpVersion findValueByNumber(int number) {
return IpVersion.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.Address.getDescriptor().getEnumTypes().get(1);
}
private static final IpVersion[] VALUES = values();
public static IpVersion 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 IpVersion(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Address.IpVersion)
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Address.Ipv6EndpointType}
*/
public enum Ipv6EndpointType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_IPV6_ENDPOINT_TYPE = 0;
*/
UNDEFINED_IPV6_ENDPOINT_TYPE(0),
/**
*
*
*
* Reserved IPv6 address can be used on network load balancer.
*
*
* NETLB = 74173363;
*/
NETLB(74173363),
/**
*
*
*
* Reserved IPv6 address can be used on VM.
*
*
* VM = 2743;
*/
VM(2743),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_IPV6_ENDPOINT_TYPE = 0;
*/
public static final int UNDEFINED_IPV6_ENDPOINT_TYPE_VALUE = 0;
/**
*
*
*
* Reserved IPv6 address can be used on network load balancer.
*
*
* NETLB = 74173363;
*/
public static final int NETLB_VALUE = 74173363;
/**
*
*
*
* Reserved IPv6 address can be used on VM.
*
*
* VM = 2743;
*/
public static final int VM_VALUE = 2743;
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 Ipv6EndpointType 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 Ipv6EndpointType forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_IPV6_ENDPOINT_TYPE;
case 74173363:
return NETLB;
case 2743:
return VM;
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 Ipv6EndpointType findValueByNumber(int number) {
return Ipv6EndpointType.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.Address.getDescriptor().getEnumTypes().get(2);
}
private static final Ipv6EndpointType[] VALUES = values();
public static Ipv6EndpointType 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 Ipv6EndpointType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Address.Ipv6EndpointType)
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Address.NetworkTier}
*/
public enum NetworkTier implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_NETWORK_TIER = 0;
*/
UNDEFINED_NETWORK_TIER(0),
/**
*
*
*
* Public internet quality with fixed bandwidth.
*
*
* FIXED_STANDARD = 310464328;
*/
FIXED_STANDARD(310464328),
/**
*
*
*
* High quality, Google-grade network tier, support for all networking products.
*
*
* PREMIUM = 399530551;
*/
PREMIUM(399530551),
/**
*
*
*
* Public internet quality, only limited support for other networking products.
*
*
* STANDARD = 484642493;
*/
STANDARD(484642493),
/**
*
*
*
* (Output only) Temporary tier for FIXED_STANDARD when fixed standard tier is expired or not configured.
*
*
* STANDARD_OVERRIDES_FIXED_STANDARD = 465847234;
*/
STANDARD_OVERRIDES_FIXED_STANDARD(465847234),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_NETWORK_TIER = 0;
*/
public static final int UNDEFINED_NETWORK_TIER_VALUE = 0;
/**
*
*
*
* Public internet quality with fixed bandwidth.
*
*
* FIXED_STANDARD = 310464328;
*/
public static final int FIXED_STANDARD_VALUE = 310464328;
/**
*
*
*
* High quality, Google-grade network tier, support for all networking products.
*
*
* PREMIUM = 399530551;
*/
public static final int PREMIUM_VALUE = 399530551;
/**
*
*
*
* Public internet quality, only limited support for other networking products.
*
*
* STANDARD = 484642493;
*/
public static final int STANDARD_VALUE = 484642493;
/**
*
*
*
* (Output only) Temporary tier for FIXED_STANDARD when fixed standard tier is expired or not configured.
*
*
* STANDARD_OVERRIDES_FIXED_STANDARD = 465847234;
*/
public static final int STANDARD_OVERRIDES_FIXED_STANDARD_VALUE = 465847234;
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 NetworkTier 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 NetworkTier forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_NETWORK_TIER;
case 310464328:
return FIXED_STANDARD;
case 399530551:
return PREMIUM;
case 484642493:
return STANDARD;
case 465847234:
return STANDARD_OVERRIDES_FIXED_STANDARD;
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 NetworkTier findValueByNumber(int number) {
return NetworkTier.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.Address.getDescriptor().getEnumTypes().get(3);
}
private static final NetworkTier[] VALUES = values();
public static NetworkTier 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 NetworkTier(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Address.NetworkTier)
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Address.Purpose}
*/
public enum Purpose implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_PURPOSE = 0;
*/
UNDEFINED_PURPOSE(0),
/**
*
*
*
* DNS resolver address in the subnetwork.
*
*
* DNS_RESOLVER = 476114556;
*/
DNS_RESOLVER(476114556),
/**
*
*
*
* VM internal/alias IP, Internal LB service IP, etc.
*
*
* GCE_ENDPOINT = 230515243;
*/
GCE_ENDPOINT(230515243),
/**
*
*
*
* A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment’s IP address range.
*
*
* IPSEC_INTERCONNECT = 340437251;
*/
IPSEC_INTERCONNECT(340437251),
/**
*
*
*
* External IP automatically reserved for Cloud NAT.
*
*
* NAT_AUTO = 163666477;
*/
NAT_AUTO(163666477),
/**
*
*
*
* A private network IP address that can be used to configure Private Service Connect. This purpose can be specified only for GLOBAL addresses of Type INTERNAL
*
*
* PRIVATE_SERVICE_CONNECT = 48134724;
*/
PRIVATE_SERVICE_CONNECT(48134724),
/**
*
*
*
* A regional internal IP address range reserved for Serverless.
*
*
* SERVERLESS = 270492508;
*/
SERVERLESS(270492508),
/**
*
*
*
* A private network IP address that can be shared by multiple Internal Load Balancer forwarding rules.
*
*
* SHARED_LOADBALANCER_VIP = 294447572;
*/
SHARED_LOADBALANCER_VIP(294447572),
/**
*
*
*
* IP range for peer networks.
*
*
* VPC_PEERING = 400800170;
*/
VPC_PEERING(400800170),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_PURPOSE = 0;
*/
public static final int UNDEFINED_PURPOSE_VALUE = 0;
/**
*
*
*
* DNS resolver address in the subnetwork.
*
*
* DNS_RESOLVER = 476114556;
*/
public static final int DNS_RESOLVER_VALUE = 476114556;
/**
*
*
*
* VM internal/alias IP, Internal LB service IP, etc.
*
*
* GCE_ENDPOINT = 230515243;
*/
public static final int GCE_ENDPOINT_VALUE = 230515243;
/**
*
*
*
* A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment’s IP address range.
*
*
* IPSEC_INTERCONNECT = 340437251;
*/
public static final int IPSEC_INTERCONNECT_VALUE = 340437251;
/**
*
*
*
* External IP automatically reserved for Cloud NAT.
*
*
* NAT_AUTO = 163666477;
*/
public static final int NAT_AUTO_VALUE = 163666477;
/**
*
*
*
* A private network IP address that can be used to configure Private Service Connect. This purpose can be specified only for GLOBAL addresses of Type INTERNAL
*
*
* PRIVATE_SERVICE_CONNECT = 48134724;
*/
public static final int PRIVATE_SERVICE_CONNECT_VALUE = 48134724;
/**
*
*
*
* A regional internal IP address range reserved for Serverless.
*
*
* SERVERLESS = 270492508;
*/
public static final int SERVERLESS_VALUE = 270492508;
/**
*
*
*
* A private network IP address that can be shared by multiple Internal Load Balancer forwarding rules.
*
*
* SHARED_LOADBALANCER_VIP = 294447572;
*/
public static final int SHARED_LOADBALANCER_VIP_VALUE = 294447572;
/**
*
*
*
* IP range for peer networks.
*
*
* VPC_PEERING = 400800170;
*/
public static final int VPC_PEERING_VALUE = 400800170;
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 Purpose 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 Purpose forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_PURPOSE;
case 476114556:
return DNS_RESOLVER;
case 230515243:
return GCE_ENDPOINT;
case 340437251:
return IPSEC_INTERCONNECT;
case 163666477:
return NAT_AUTO;
case 48134724:
return PRIVATE_SERVICE_CONNECT;
case 270492508:
return SERVERLESS;
case 294447572:
return SHARED_LOADBALANCER_VIP;
case 400800170:
return VPC_PEERING;
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 Purpose findValueByNumber(int number) {
return Purpose.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.Address.getDescriptor().getEnumTypes().get(4);
}
private static final Purpose[] VALUES = values();
public static Purpose 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 Purpose(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Address.Purpose)
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Address.Status}
*/
public enum Status implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_STATUS = 0;
*/
UNDEFINED_STATUS(0),
/**
*
*
*
* Address is being used by another resource and is not available.
*
*
* IN_USE = 17393485;
*/
IN_USE(17393485),
/**
*
*
*
* Address is reserved and available to use.
*
*
* RESERVED = 432241448;
*/
RESERVED(432241448),
/**
*
*
*
* Address is being reserved.
*
*
* RESERVING = 514587225;
*/
RESERVING(514587225),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_STATUS = 0;
*/
public static final int UNDEFINED_STATUS_VALUE = 0;
/**
*
*
*
* Address is being used by another resource and is not available.
*
*
* IN_USE = 17393485;
*/
public static final int IN_USE_VALUE = 17393485;
/**
*
*
*
* Address is reserved and available to use.
*
*
* RESERVED = 432241448;
*/
public static final int RESERVED_VALUE = 432241448;
/**
*
*
*
* Address is being reserved.
*
*
* RESERVING = 514587225;
*/
public static final int RESERVING_VALUE = 514587225;
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 Status 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 Status forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_STATUS;
case 17393485:
return IN_USE;
case 432241448:
return RESERVED;
case 514587225:
return RESERVING;
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 Status findValueByNumber(int number) {
return Status.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.Address.getDescriptor().getEnumTypes().get(5);
}
private static final Status[] VALUES = values();
public static Status 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 Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Address.Status)
}
private int bitField0_;
public static final int ADDRESS_FIELD_NUMBER = 462920692;
@SuppressWarnings("serial")
private volatile java.lang.Object address_ = "";
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return Whether the address field is set.
*/
@java.lang.Override
public boolean hasAddress() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return The address.
*/
@java.lang.Override
public java.lang.String getAddress() {
java.lang.Object ref = address_;
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();
address_ = s;
return s;
}
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return The bytes for address.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADDRESS_TYPE_FIELD_NUMBER = 264307877;
@SuppressWarnings("serial")
private volatile java.lang.Object addressType_ = "";
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return Whether the addressType field is set.
*/
@java.lang.Override
public boolean hasAddressType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return The addressType.
*/
@java.lang.Override
public java.lang.String getAddressType() {
java.lang.Object ref = addressType_;
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();
addressType_ = s;
return s;
}
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return The bytes for addressType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAddressTypeBytes() {
java.lang.Object ref = addressType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
addressType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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_ & 0x00000004) != 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 field when you create the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* An optional description of this resource. Provide this field 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 field 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 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_ & 0x00000010) != 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 IP_VERSION_FIELD_NUMBER = 294959552;
@SuppressWarnings("serial")
private volatile java.lang.Object ipVersion_ = "";
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return Whether the ipVersion field is set.
*/
@java.lang.Override
public boolean hasIpVersion() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return The ipVersion.
*/
@java.lang.Override
public java.lang.String getIpVersion() {
java.lang.Object ref = ipVersion_;
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();
ipVersion_ = s;
return s;
}
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return The bytes for ipVersion.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIpVersionBytes() {
java.lang.Object ref = ipVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ipVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IPV6_ENDPOINT_TYPE_FIELD_NUMBER = 97501004;
@SuppressWarnings("serial")
private volatile java.lang.Object ipv6EndpointType_ = "";
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return Whether the ipv6EndpointType field is set.
*/
@java.lang.Override
public boolean hasIpv6EndpointType() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return The ipv6EndpointType.
*/
@java.lang.Override
public java.lang.String getIpv6EndpointType() {
java.lang.Object ref = ipv6EndpointType_;
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();
ipv6EndpointType_ = s;
return s;
}
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return The bytes for ipv6EndpointType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIpv6EndpointTypeBytes() {
java.lang.Object ref = ipv6EndpointType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ipv6EndpointType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KIND_FIELD_NUMBER = 3292052;
@SuppressWarnings("serial")
private volatile java.lang.Object kind_ = "";
/**
*
*
*
* [Output Only] Type of the resource. Always compute#address for addresses.
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
@java.lang.Override
public boolean hasKind() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#address for addresses.
*
*
* 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 the resource. Always compute#address for addresses.
*
*
* 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 Address, 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 an Address.
*
*
* optional string label_fingerprint = 178124825;
*
* @return Whether the labelFingerprint field is set.
*/
@java.lang.Override
public boolean hasLabelFingerprint() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* A fingerprint for the labels being applied to this Address, 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 an Address.
*
*
* 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 Address, 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 an Address.
*
*
* 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_Address_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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000200) != 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* 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_ = "";
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* optional string network = 232872494;
*
* @return Whether the network field is set.
*/
@java.lang.Override
public boolean hasNetwork() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* 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;
}
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* 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 NETWORK_TIER_FIELD_NUMBER = 517397843;
@SuppressWarnings("serial")
private volatile java.lang.Object networkTier_ = "";
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return Whether the networkTier field is set.
*/
@java.lang.Override
public boolean hasNetworkTier() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return The networkTier.
*/
@java.lang.Override
public java.lang.String getNetworkTier() {
java.lang.Object ref = networkTier_;
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();
networkTier_ = s;
return s;
}
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return The bytes for networkTier.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNetworkTierBytes() {
java.lang.Object ref = networkTier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
networkTier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PREFIX_LENGTH_FIELD_NUMBER = 453565747;
private int prefixLength_ = 0;
/**
*
*
*
* The prefix length if the resource represents an IP range.
*
*
* optional int32 prefix_length = 453565747;
*
* @return Whether the prefixLength field is set.
*/
@java.lang.Override
public boolean hasPrefixLength() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* The prefix length if the resource represents an IP range.
*
*
* optional int32 prefix_length = 453565747;
*
* @return The prefixLength.
*/
@java.lang.Override
public int getPrefixLength() {
return prefixLength_;
}
public static final int PURPOSE_FIELD_NUMBER = 316407070;
@SuppressWarnings("serial")
private volatile java.lang.Object purpose_ = "";
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return Whether the purpose field is set.
*/
@java.lang.Override
public boolean hasPurpose() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return The purpose.
*/
@java.lang.Override
public java.lang.String getPurpose() {
java.lang.Object ref = purpose_;
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();
purpose_ = s;
return s;
}
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return The bytes for purpose.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPurposeBytes() {
java.lang.Object ref = purpose_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
purpose_ = 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] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* optional string region = 138946292;
*
* @return Whether the region field is set.
*/
@java.lang.Override
public boolean hasRegion() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
*
*
* [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* 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] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* 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_ & 0x00008000) != 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 STATUS_FIELD_NUMBER = 181260274;
@SuppressWarnings("serial")
private volatile java.lang.Object status_ = "";
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return ((bitField0_ & 0x00010000) != 0);
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The status.
*/
@java.lang.Override
public java.lang.String getStatus() {
java.lang.Object ref = status_;
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();
status_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The bytes for status.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStatusBytes() {
java.lang.Object ref = status_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
status_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBNETWORK_FIELD_NUMBER = 307827694;
@SuppressWarnings("serial")
private volatile java.lang.Object subnetwork_ = "";
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return Whether the subnetwork field is set.
*/
@java.lang.Override
public boolean hasSubnetwork() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return The subnetwork.
*/
@java.lang.Override
public java.lang.String getSubnetwork() {
java.lang.Object ref = subnetwork_;
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();
subnetwork_ = s;
return s;
}
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return The bytes for subnetwork.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSubnetworkBytes() {
java.lang.Object ref = subnetwork_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
subnetwork_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USERS_FIELD_NUMBER = 111578632;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList users_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @return A list containing the users.
*/
public com.google.protobuf.ProtocolStringList getUsersList() {
return users_;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @return The count of users.
*/
public int getUsersCount() {
return users_.size();
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param index The index of the element to return.
* @return The users at the given index.
*/
public java.lang.String getUsers(int index) {
return users_.get(index);
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param index The index of the value to return.
* @return The bytes of the users at the given index.
*/
public com.google.protobuf.ByteString getUsersBytes(int index) {
return users_.getByteString(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_ & 0x00000010) != 0)) {
output.writeUInt64(3355, id_);
}
if (((bitField0_ & 0x00000080) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
}
if (((bitField0_ & 0x00000200) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000040) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 97501004, ipv6EndpointType_);
}
for (int i = 0; i < users_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 111578632, users_.getRaw(i));
}
if (((bitField0_ & 0x00004000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_);
}
if (((bitField0_ & 0x00000100) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 178124825, labelFingerprint_);
}
if (((bitField0_ & 0x00010000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_);
}
if (((bitField0_ & 0x00000400) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 264307877, addressType_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 294959552, ipVersion_);
}
if (((bitField0_ & 0x00020000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_);
}
if (((bitField0_ & 0x00002000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 316407070, purpose_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
}
if (((bitField0_ & 0x00001000) != 0)) {
output.writeInt32(453565747, prefixLength_);
}
if (((bitField0_ & 0x00008000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 462920692, address_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327);
if (((bitField0_ & 0x00000800) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 517397843, networkTier_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(97501004, ipv6EndpointType_);
}
{
int dataSize = 0;
for (int i = 0; i < users_.size(); i++) {
dataSize += computeStringSizeNoTag(users_.getRaw(i));
}
size += dataSize;
size += 5 * getUsersList().size();
}
if (((bitField0_ & 0x00004000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_);
}
if (((bitField0_ & 0x00000100) != 0)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(178124825, labelFingerprint_);
}
if (((bitField0_ & 0x00010000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_);
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(264307877, addressType_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(294959552, ipVersion_);
}
if (((bitField0_ & 0x00020000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_);
}
if (((bitField0_ & 0x00002000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(316407070, purpose_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
}
if (((bitField0_ & 0x00001000) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(453565747, prefixLength_);
}
if (((bitField0_ & 0x00008000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(462920692, address_);
}
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__);
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517397843, networkTier_);
}
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.Address)) {
return super.equals(obj);
}
com.google.cloud.compute.v1.Address other = (com.google.cloud.compute.v1.Address) obj;
if (hasAddress() != other.hasAddress()) return false;
if (hasAddress()) {
if (!getAddress().equals(other.getAddress())) return false;
}
if (hasAddressType() != other.hasAddressType()) return false;
if (hasAddressType()) {
if (!getAddressType().equals(other.getAddressType())) return false;
}
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 (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId() != other.getId()) return false;
}
if (hasIpVersion() != other.hasIpVersion()) return false;
if (hasIpVersion()) {
if (!getIpVersion().equals(other.getIpVersion())) return false;
}
if (hasIpv6EndpointType() != other.hasIpv6EndpointType()) return false;
if (hasIpv6EndpointType()) {
if (!getIpv6EndpointType().equals(other.getIpv6EndpointType())) 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 (hasNetworkTier() != other.hasNetworkTier()) return false;
if (hasNetworkTier()) {
if (!getNetworkTier().equals(other.getNetworkTier())) return false;
}
if (hasPrefixLength() != other.hasPrefixLength()) return false;
if (hasPrefixLength()) {
if (getPrefixLength() != other.getPrefixLength()) return false;
}
if (hasPurpose() != other.hasPurpose()) return false;
if (hasPurpose()) {
if (!getPurpose().equals(other.getPurpose())) 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 (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus().equals(other.getStatus())) return false;
}
if (hasSubnetwork() != other.hasSubnetwork()) return false;
if (hasSubnetwork()) {
if (!getSubnetwork().equals(other.getSubnetwork())) return false;
}
if (!getUsersList().equals(other.getUsersList())) 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 (hasAddress()) {
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
}
if (hasAddressType()) {
hash = (37 * hash) + ADDRESS_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getAddressType().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 (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
}
if (hasIpVersion()) {
hash = (37 * hash) + IP_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getIpVersion().hashCode();
}
if (hasIpv6EndpointType()) {
hash = (37 * hash) + IPV6_ENDPOINT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getIpv6EndpointType().hashCode();
}
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 (hasNetworkTier()) {
hash = (37 * hash) + NETWORK_TIER_FIELD_NUMBER;
hash = (53 * hash) + getNetworkTier().hashCode();
}
if (hasPrefixLength()) {
hash = (37 * hash) + PREFIX_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + getPrefixLength();
}
if (hasPurpose()) {
hash = (37 * hash) + PURPOSE_FIELD_NUMBER;
hash = (53 * hash) + getPurpose().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 (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (hasSubnetwork()) {
hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
hash = (53 * hash) + getSubnetwork().hashCode();
}
if (getUsersCount() > 0) {
hash = (37 * hash) + USERS_FIELD_NUMBER;
hash = (53 * hash) + getUsersList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.compute.v1.Address parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Address 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.Address parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Address 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.Address parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Address 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.Address parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Address 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.Address parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Address 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.Address 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.Address 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.Address 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 an IP Address resource. Google Compute Engine has two IP Address resources: * [Global (external and internal)](https://cloud.google.com/compute/docs/reference/rest/v1/globalAddresses) * [Regional (external and internal)](https://cloud.google.com/compute/docs/reference/rest/v1/addresses) For more information, see Reserving a static external IP address.
*
*
* Protobuf type {@code google.cloud.compute.v1.Address}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Address)
com.google.cloud.compute.v1.AddressOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Address_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_Address_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.Address.class,
com.google.cloud.compute.v1.Address.Builder.class);
}
// Construct using com.google.cloud.compute.v1.Address.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
address_ = "";
addressType_ = "";
creationTimestamp_ = "";
description_ = "";
id_ = 0L;
ipVersion_ = "";
ipv6EndpointType_ = "";
kind_ = "";
labelFingerprint_ = "";
internalGetMutableLabels().clear();
name_ = "";
network_ = "";
networkTier_ = "";
prefixLength_ = 0;
purpose_ = "";
region_ = "";
selfLink_ = "";
status_ = "";
subnetwork_ = "";
users_ = com.google.protobuf.LazyStringArrayList.emptyList();
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_Address_descriptor;
}
@java.lang.Override
public com.google.cloud.compute.v1.Address getDefaultInstanceForType() {
return com.google.cloud.compute.v1.Address.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.compute.v1.Address build() {
com.google.cloud.compute.v1.Address result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.compute.v1.Address buildPartial() {
com.google.cloud.compute.v1.Address result = new com.google.cloud.compute.v1.Address(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.compute.v1.Address result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.address_ = address_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.addressType_ = addressType_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.creationTimestamp_ = creationTimestamp_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.description_ = description_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.ipVersion_ = ipVersion_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.ipv6EndpointType_ = ipv6EndpointType_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.kind_ = kind_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.labelFingerprint_ = labelFingerprint_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.network_ = network_;
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.networkTier_ = networkTier_;
to_bitField0_ |= 0x00000800;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.prefixLength_ = prefixLength_;
to_bitField0_ |= 0x00001000;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.purpose_ = purpose_;
to_bitField0_ |= 0x00002000;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.region_ = region_;
to_bitField0_ |= 0x00004000;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
result.selfLink_ = selfLink_;
to_bitField0_ |= 0x00008000;
}
if (((from_bitField0_ & 0x00020000) != 0)) {
result.status_ = status_;
to_bitField0_ |= 0x00010000;
}
if (((from_bitField0_ & 0x00040000) != 0)) {
result.subnetwork_ = subnetwork_;
to_bitField0_ |= 0x00020000;
}
if (((from_bitField0_ & 0x00080000) != 0)) {
users_.makeImmutable();
result.users_ = users_;
}
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.Address) {
return mergeFrom((com.google.cloud.compute.v1.Address) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.compute.v1.Address other) {
if (other == com.google.cloud.compute.v1.Address.getDefaultInstance()) return this;
if (other.hasAddress()) {
address_ = other.address_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasAddressType()) {
addressType_ = other.addressType_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasCreationTimestamp()) {
creationTimestamp_ = other.creationTimestamp_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasDescription()) {
description_ = other.description_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasId()) {
setId(other.getId());
}
if (other.hasIpVersion()) {
ipVersion_ = other.ipVersion_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.hasIpv6EndpointType()) {
ipv6EndpointType_ = other.ipv6EndpointType_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.hasKind()) {
kind_ = other.kind_;
bitField0_ |= 0x00000080;
onChanged();
}
if (other.hasLabelFingerprint()) {
labelFingerprint_ = other.labelFingerprint_;
bitField0_ |= 0x00000100;
onChanged();
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000200;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000400;
onChanged();
}
if (other.hasNetwork()) {
network_ = other.network_;
bitField0_ |= 0x00000800;
onChanged();
}
if (other.hasNetworkTier()) {
networkTier_ = other.networkTier_;
bitField0_ |= 0x00001000;
onChanged();
}
if (other.hasPrefixLength()) {
setPrefixLength(other.getPrefixLength());
}
if (other.hasPurpose()) {
purpose_ = other.purpose_;
bitField0_ |= 0x00004000;
onChanged();
}
if (other.hasRegion()) {
region_ = other.region_;
bitField0_ |= 0x00008000;
onChanged();
}
if (other.hasSelfLink()) {
selfLink_ = other.selfLink_;
bitField0_ |= 0x00010000;
onChanged();
}
if (other.hasStatus()) {
status_ = other.status_;
bitField0_ |= 0x00020000;
onChanged();
}
if (other.hasSubnetwork()) {
subnetwork_ = other.subnetwork_;
bitField0_ |= 0x00040000;
onChanged();
}
if (!other.users_.isEmpty()) {
if (users_.isEmpty()) {
users_ = other.users_;
bitField0_ |= 0x00080000;
} else {
ensureUsersIsMutable();
users_.addAll(other.users_);
}
onChanged();
}
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_ |= 0x00000010;
break;
} // case 26840
case 26336418:
{
kind_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 26336418
case 26989658:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 26989658
case 244202930:
{
creationTimestamp_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 244202930
case 780008034:
{
ipv6EndpointType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 780008034
case 892629058:
{
java.lang.String s = input.readStringRequireUtf8();
ensureUsersIsMutable();
users_.add(s);
break;
} // case 892629058
case 1111570338:
{
region_ = input.readStringRequireUtf8();
bitField0_ |= 0x00008000;
break;
} // case 1111570338
case 1424998602:
{
labelFingerprint_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 1424998602
case 1450082194:
{
status_ = input.readStringRequireUtf8();
bitField0_ |= 0x00020000;
break;
} // case 1450082194
case 1862979954:
{
network_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case 1862979954
case 2114463018:
{
addressType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 2114463018
case -1935290878:
{
ipVersion_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case -1935290878
case -1832345742:
{
subnetwork_ = input.readStringRequireUtf8();
bitField0_ |= 0x00040000;
break;
} // case -1832345742
case -1763710734:
{
purpose_ = input.readStringRequireUtf8();
bitField0_ |= 0x00004000;
break;
} // case -1763710734
case -911466526:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case -911466526
case -666441320:
{
prefixLength_ = input.readInt32();
bitField0_ |= 0x00002000;
break;
} // case -666441320
case -645248918:
{
selfLink_ = input.readStringRequireUtf8();
bitField0_ |= 0x00010000;
break;
} // case -645248918
case -591601758:
{
address_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case -591601758
case -293404678:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000200;
break;
} // case -293404678
case -155784550:
{
networkTier_ = input.readStringRequireUtf8();
bitField0_ |= 0x00001000;
break;
} // case -155784550
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 address_ = "";
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return Whether the address field is set.
*/
public boolean hasAddress() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return The address.
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return The bytes for address.
*/
public com.google.protobuf.ByteString getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @param value The address to set.
* @return This builder for chaining.
*/
public Builder setAddress(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
address_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @return This builder for chaining.
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The static IP address represented by this resource.
*
*
* optional string address = 462920692;
*
* @param value The bytes for address to set.
* @return This builder for chaining.
*/
public Builder setAddressBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
address_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object addressType_ = "";
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return Whether the addressType field is set.
*/
public boolean hasAddressType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return The addressType.
*/
public java.lang.String getAddressType() {
java.lang.Object ref = addressType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
addressType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return The bytes for addressType.
*/
public com.google.protobuf.ByteString getAddressTypeBytes() {
java.lang.Object ref = addressType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
addressType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @param value The addressType to set.
* @return This builder for chaining.
*/
public Builder setAddressType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
addressType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @return This builder for chaining.
*/
public Builder clearAddressType() {
addressType_ = getDefaultInstance().getAddressType();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
* Check the AddressType enum for the list of possible values.
*
*
* optional string address_type = 264307877;
*
* @param value The bytes for addressType to set.
* @return This builder for chaining.
*/
public Builder setAddressTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
addressType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
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_ & 0x00000004) != 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_ |= 0x00000004;
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_ & ~0x00000004);
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_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* An optional description of this resource. Provide this field when you create the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* An optional description of this resource. Provide this field 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 field 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 field 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_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* An optional description of this resource. Provide this field when you create the resource.
*
*
* optional string description = 422937596;
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* An optional description of this resource. Provide this field 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_ |= 0x00000008;
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_ & 0x00000010) != 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_ |= 0x00000010;
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_ & ~0x00000010);
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object ipVersion_ = "";
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return Whether the ipVersion field is set.
*/
public boolean hasIpVersion() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return The ipVersion.
*/
public java.lang.String getIpVersion() {
java.lang.Object ref = ipVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ipVersion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return The bytes for ipVersion.
*/
public com.google.protobuf.ByteString getIpVersionBytes() {
java.lang.Object ref = ipVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ipVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @param value The ipVersion to set.
* @return This builder for chaining.
*/
public Builder setIpVersion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ipVersion_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @return This builder for chaining.
*/
public Builder clearIpVersion() {
ipVersion_ = getDefaultInstance().getIpVersion();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* The IP version that will be used by this address. Valid options are IPV4 or IPV6.
* Check the IpVersion enum for the list of possible values.
*
*
* optional string ip_version = 294959552;
*
* @param value The bytes for ipVersion to set.
* @return This builder for chaining.
*/
public Builder setIpVersionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ipVersion_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private java.lang.Object ipv6EndpointType_ = "";
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return Whether the ipv6EndpointType field is set.
*/
public boolean hasIpv6EndpointType() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return The ipv6EndpointType.
*/
public java.lang.String getIpv6EndpointType() {
java.lang.Object ref = ipv6EndpointType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ipv6EndpointType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return The bytes for ipv6EndpointType.
*/
public com.google.protobuf.ByteString getIpv6EndpointTypeBytes() {
java.lang.Object ref = ipv6EndpointType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ipv6EndpointType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @param value The ipv6EndpointType to set.
* @return This builder for chaining.
*/
public Builder setIpv6EndpointType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ipv6EndpointType_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @return This builder for chaining.
*/
public Builder clearIpv6EndpointType() {
ipv6EndpointType_ = getDefaultInstance().getIpv6EndpointType();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* The endpoint type of this address, which should be VM or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation.
* Check the Ipv6EndpointType enum for the list of possible values.
*
*
* optional string ipv6_endpoint_type = 97501004;
*
* @param value The bytes for ipv6EndpointType to set.
* @return This builder for chaining.
*/
public Builder setIpv6EndpointTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ipv6EndpointType_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private java.lang.Object kind_ = "";
/**
*
*
*
* [Output Only] Type of the resource. Always compute#address for addresses.
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#address for addresses.
*
*
* 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 the resource. Always compute#address for addresses.
*
*
* 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 the resource. Always compute#address for addresses.
*
*
* 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_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#address for addresses.
*
*
* optional string kind = 3292052;
*
* @return This builder for chaining.
*/
public Builder clearKind() {
kind_ = getDefaultInstance().getKind();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#address for addresses.
*
*
* 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_ |= 0x00000080;
onChanged();
return this;
}
private java.lang.Object labelFingerprint_ = "";
/**
*
*
*
* A fingerprint for the labels being applied to this Address, 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 an Address.
*
*
* optional string label_fingerprint = 178124825;
*
* @return Whether the labelFingerprint field is set.
*/
public boolean hasLabelFingerprint() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* A fingerprint for the labels being applied to this Address, 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 an Address.
*
*
* 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 Address, 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 an Address.
*
*
* 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 Address, 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 an Address.
*
*
* 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_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* A fingerprint for the labels being applied to this Address, 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 an Address.
*
*
* optional string label_fingerprint = 178124825;
*
* @return This builder for chaining.
*/
public Builder clearLabelFingerprint() {
labelFingerprint_ = getDefaultInstance().getLabelFingerprint();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* A fingerprint for the labels being applied to this Address, 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 an Address.
*
*
* 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_ |= 0x00000100;
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_ |= 0x00000200;
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_ & ~0x00000200);
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_ |= 0x00000200;
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_ |= 0x00000200;
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_ |= 0x00000200;
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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000400) != 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* 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_ |= 0x00000400;
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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* optional string name = 3373707;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000400);
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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
*
*
* 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_ |= 0x00000400;
onChanged();
return this;
}
private java.lang.Object network_ = "";
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* optional string network = 232872494;
*
* @return Whether the network field is set.
*/
public boolean hasNetwork() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* 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;
}
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* 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;
}
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* 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_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* optional string network = 232872494;
*
* @return This builder for chaining.
*/
public Builder clearNetwork() {
network_ = getDefaultInstance().getNetwork();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*
*
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*
*
* 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_ |= 0x00000800;
onChanged();
return this;
}
private java.lang.Object networkTier_ = "";
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return Whether the networkTier field is set.
*/
public boolean hasNetworkTier() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return The networkTier.
*/
public java.lang.String getNetworkTier() {
java.lang.Object ref = networkTier_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
networkTier_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return The bytes for networkTier.
*/
public com.google.protobuf.ByteString getNetworkTierBytes() {
java.lang.Object ref = networkTier_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
networkTier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @param value The networkTier to set.
* @return This builder for chaining.
*/
public Builder setNetworkTier(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
networkTier_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @return This builder for chaining.
*/
public Builder clearNetworkTier() {
networkTier_ = getDefaultInstance().getNetworkTier();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
return this;
}
/**
*
*
*
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either Standard or Premium Tier. If this field is not specified, it is assumed to be PREMIUM.
* Check the NetworkTier enum for the list of possible values.
*
*
* optional string network_tier = 517397843;
*
* @param value The bytes for networkTier to set.
* @return This builder for chaining.
*/
public Builder setNetworkTierBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
networkTier_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
private int prefixLength_;
/**
*
*
*
* The prefix length if the resource represents an IP range.
*
*
* optional int32 prefix_length = 453565747;
*
* @return Whether the prefixLength field is set.
*/
@java.lang.Override
public boolean hasPrefixLength() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
*
*
* The prefix length if the resource represents an IP range.
*
*
* optional int32 prefix_length = 453565747;
*
* @return The prefixLength.
*/
@java.lang.Override
public int getPrefixLength() {
return prefixLength_;
}
/**
*
*
*
* The prefix length if the resource represents an IP range.
*
*
* optional int32 prefix_length = 453565747;
*
* @param value The prefixLength to set.
* @return This builder for chaining.
*/
public Builder setPrefixLength(int value) {
prefixLength_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* The prefix length if the resource represents an IP range.
*
*
* optional int32 prefix_length = 453565747;
*
* @return This builder for chaining.
*/
public Builder clearPrefixLength() {
bitField0_ = (bitField0_ & ~0x00002000);
prefixLength_ = 0;
onChanged();
return this;
}
private java.lang.Object purpose_ = "";
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return Whether the purpose field is set.
*/
public boolean hasPurpose() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return The purpose.
*/
public java.lang.String getPurpose() {
java.lang.Object ref = purpose_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
purpose_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return The bytes for purpose.
*/
public com.google.protobuf.ByteString getPurposeBytes() {
java.lang.Object ref = purpose_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
purpose_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @param value The purpose to set.
* @return This builder for chaining.
*/
public Builder setPurpose(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
purpose_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @return This builder for chaining.
*/
public Builder clearPurpose() {
purpose_ = getDefaultInstance().getPurpose();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
return this;
}
/**
*
*
*
* The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
* Check the Purpose enum for the list of possible values.
*
*
* optional string purpose = 316407070;
*
* @param value The bytes for purpose to set.
* @return This builder for chaining.
*/
public Builder setPurposeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
purpose_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
private java.lang.Object region_ = "";
/**
*
*
*
* [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* optional string region = 138946292;
*
* @return Whether the region field is set.
*/
public boolean hasRegion() {
return ((bitField0_ & 0x00008000) != 0);
}
/**
*
*
*
* [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* 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] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* 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] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* 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_ |= 0x00008000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* optional string region = 138946292;
*
* @return This builder for chaining.
*/
public Builder clearRegion() {
region_ = getDefaultInstance().getRegion();
bitField0_ = (bitField0_ & ~0x00008000);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. *This field is not applicable to global addresses.*
*
*
* 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_ |= 0x00008000;
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_ & 0x00010000) != 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_ |= 0x00010000;
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_ & ~0x00010000);
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_ |= 0x00010000;
onChanged();
return this;
}
private java.lang.Object status_ = "";
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The status.
*/
public java.lang.String getStatus() {
java.lang.Object ref = status_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
status_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The bytes for status.
*/
public com.google.protobuf.ByteString getStatusBytes() {
java.lang.Object ref = status_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
status_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = getDefaultInstance().getStatus();
bitField0_ = (bitField0_ & ~0x00020000);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @param value The bytes for status to set.
* @return This builder for chaining.
*/
public Builder setStatusBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
status_ = value;
bitField0_ |= 0x00020000;
onChanged();
return this;
}
private java.lang.Object subnetwork_ = "";
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return Whether the subnetwork field is set.
*/
public boolean hasSubnetwork() {
return ((bitField0_ & 0x00040000) != 0);
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return The subnetwork.
*/
public java.lang.String getSubnetwork() {
java.lang.Object ref = subnetwork_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subnetwork_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return The bytes for subnetwork.
*/
public com.google.protobuf.ByteString getSubnetworkBytes() {
java.lang.Object ref = subnetwork_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
subnetwork_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @param value The subnetwork to set.
* @return This builder for chaining.
*/
public Builder setSubnetwork(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subnetwork_ = value;
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @return This builder for chaining.
*/
public Builder clearSubnetwork() {
subnetwork_ = getDefaultInstance().getSubnetwork();
bitField0_ = (bitField0_ & ~0x00040000);
onChanged();
return this;
}
/**
*
*
*
* The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
*
*
* optional string subnetwork = 307827694;
*
* @param value The bytes for subnetwork to set.
* @return This builder for chaining.
*/
public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subnetwork_ = value;
bitField0_ |= 0x00040000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList users_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureUsersIsMutable() {
if (!users_.isModifiable()) {
users_ = new com.google.protobuf.LazyStringArrayList(users_);
}
bitField0_ |= 0x00080000;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @return A list containing the users.
*/
public com.google.protobuf.ProtocolStringList getUsersList() {
users_.makeImmutable();
return users_;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @return The count of users.
*/
public int getUsersCount() {
return users_.size();
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param index The index of the element to return.
* @return The users at the given index.
*/
public java.lang.String getUsers(int index) {
return users_.get(index);
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param index The index of the value to return.
* @return The bytes of the users at the given index.
*/
public com.google.protobuf.ByteString getUsersBytes(int index) {
return users_.getByteString(index);
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param index The index to set the value at.
* @param value The users to set.
* @return This builder for chaining.
*/
public Builder setUsers(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUsersIsMutable();
users_.set(index, value);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param value The users to add.
* @return This builder for chaining.
*/
public Builder addUsers(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUsersIsMutable();
users_.add(value);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param values The users to add.
* @return This builder for chaining.
*/
public Builder addAllUsers(java.lang.Iterable values) {
ensureUsersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, users_);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @return This builder for chaining.
*/
public Builder clearUsers() {
users_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00080000);
;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The URLs of the resources that are using this address.
*
*
* repeated string users = 111578632;
*
* @param value The bytes of the users to add.
* @return This builder for chaining.
*/
public Builder addUsersBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureUsersIsMutable();
users_.add(value);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
@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.Address)
}
// @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Address)
private static final com.google.cloud.compute.v1.Address DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Address();
}
public static com.google.cloud.compute.v1.Address getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Address 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.Address getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy