Class Address (1.11.0)

public final class Address extends GeneratedMessageV3 implements AddressOrBuilder

Represents an IP Address resource. Google Compute Engine has two IP Address resources: * Global (external and internal) * Regional (external and internal) For more information, see Reserving a static external IP address.

Protobuf type google.cloud.compute.v1.Address

Implements

AddressOrBuilder

Static Fields

ADDRESS_FIELD_NUMBER

public static final int ADDRESS_FIELD_NUMBER
Field Value
TypeDescription
int

ADDRESS_TYPE_FIELD_NUMBER

public static final int ADDRESS_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

IP_VERSION_FIELD_NUMBER

public static final int IP_VERSION_FIELD_NUMBER
Field Value
TypeDescription
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_FIELD_NUMBER
Field Value
TypeDescription
int

NETWORK_TIER_FIELD_NUMBER

public static final int NETWORK_TIER_FIELD_NUMBER
Field Value
TypeDescription
int

PREFIX_LENGTH_FIELD_NUMBER

public static final int PREFIX_LENGTH_FIELD_NUMBER
Field Value
TypeDescription
int

PURPOSE_FIELD_NUMBER

public static final int PURPOSE_FIELD_NUMBER
Field Value
TypeDescription
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
TypeDescription
int

SUBNETWORK_FIELD_NUMBER

public static final int SUBNETWORK_FIELD_NUMBER
Field Value
TypeDescription
int

USERS_FIELD_NUMBER

public static final int USERS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Address getDefaultInstance()
Returns
TypeDescription
Address

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Address.Builder newBuilder()
Returns
TypeDescription
Address.Builder

newBuilder(Address prototype)

public static Address.Builder newBuilder(Address prototype)
Parameter
NameDescription
prototypeAddress
Returns
TypeDescription
Address.Builder

parseDelimitedFrom(InputStream input)

public static Address parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Address
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Address parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Address
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Address parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Address
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Address parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Address
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Address parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Address
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Address parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Address
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Address parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Address
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Address parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Address
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Address parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Address
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Address parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Address
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Address parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Address
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Address parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Address
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Address> parser()
Returns
TypeDescription
Parser<Address>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAddress()

public String getAddress()

The static IP address represented by this resource.

optional string address = 462920692;

Returns
TypeDescription
String

The address.

getAddressBytes()

public ByteString getAddressBytes()

The static IP address represented by this resource.

optional string address = 462920692;

Returns
TypeDescription
ByteString

The bytes for address.

getAddressType()

public String getAddressType()

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;

Returns
TypeDescription
String

The addressType.

getAddressTypeBytes()

public ByteString getAddressTypeBytes()

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;

Returns
TypeDescription
ByteString

The bytes for addressType.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public Address getDefaultInstanceForType()
Returns
TypeDescription
Address

getDescription()

public String getDescription()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getIpVersion()

public String getIpVersion()

The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address. Check the IpVersion enum for the list of possible values.

optional string ip_version = 294959552;

Returns
TypeDescription
String

The ipVersion.

getIpVersionBytes()

public ByteString getIpVersionBytes()

The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address. Check the IpVersion enum for the list of possible values.

optional string ip_version = 294959552;

Returns
TypeDescription
ByteString

The bytes for ipVersion.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#address for addresses.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#address for addresses.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getName()

public String getName()

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?. 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;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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?. 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;

Returns
TypeDescription
ByteString

The bytes for name.

getNetwork()

public String getNetwork()

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;

Returns
TypeDescription
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

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;

Returns
TypeDescription
ByteString

The bytes for network.

getNetworkTier()

public String getNetworkTier()

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;

Returns
TypeDescription
String

The networkTier.

getNetworkTierBytes()

public ByteString getNetworkTierBytes()

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;

Returns
TypeDescription
ByteString

The bytes for networkTier.

getParserForType()

public Parser<Address> getParserForType()
Returns
TypeDescription
Parser<Address>
Overrides

getPrefixLength()

public int getPrefixLength()

The prefix length if the resource represents an IP range.

optional int32 prefix_length = 453565747;

Returns
TypeDescription
int

The prefixLength.

getPurpose()

public String getPurpose()

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 IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources. Not currently available publicly. - 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;

Returns
TypeDescription
String

The purpose.

getPurposeBytes()

public ByteString getPurposeBytes()

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 IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources. Not currently available publicly. - 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;

Returns
TypeDescription
ByteString

The bytes for purpose.

getRegion()

public String getRegion()

[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;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[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;

Returns
TypeDescription
ByteString

The bytes for region.

public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStatus()

public String getStatus()

[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;

Returns
TypeDescription
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

[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;

Returns
TypeDescription
ByteString

The bytes for status.

getSubnetwork()

public String getSubnetwork()

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;

Returns
TypeDescription
String

The subnetwork.

getSubnetworkBytes()

public ByteString getSubnetworkBytes()

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;

Returns
TypeDescription
ByteString

The bytes for subnetwork.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUsers(int index)

public String getUsers(int index)

[Output Only] The URLs of the resources that are using this address.

repeated string users = 111578632;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The users at the given index.

getUsersBytes(int index)

public ByteString getUsersBytes(int index)

[Output Only] The URLs of the resources that are using this address.

repeated string users = 111578632;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the users at the given index.

getUsersCount()

public int getUsersCount()

[Output Only] The URLs of the resources that are using this address.

repeated string users = 111578632;

Returns
TypeDescription
int

The count of users.

getUsersList()

public ProtocolStringList getUsersList()

[Output Only] The URLs of the resources that are using this address.

repeated string users = 111578632;

Returns
TypeDescription
ProtocolStringList

A list containing the users.

hasAddress()

public boolean hasAddress()

The static IP address represented by this resource.

optional string address = 462920692;

Returns
TypeDescription
boolean

Whether the address field is set.

hasAddressType()

public boolean hasAddressType()

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;

Returns
TypeDescription
boolean

Whether the addressType field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasIpVersion()

public boolean hasIpVersion()

The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address. Check the IpVersion enum for the list of possible values.

optional string ip_version = 294959552;

Returns
TypeDescription
boolean

Whether the ipVersion field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#address for addresses.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasName()

public boolean hasName()

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?. 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;

Returns
TypeDescription
boolean

Whether the name field is set.

hasNetwork()

public boolean hasNetwork()

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;

Returns
TypeDescription
boolean

Whether the network field is set.

hasNetworkTier()

public boolean hasNetworkTier()

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;

Returns
TypeDescription
boolean

Whether the networkTier field is set.

hasPrefixLength()

public boolean hasPrefixLength()

The prefix length if the resource represents an IP range.

optional int32 prefix_length = 453565747;

Returns
TypeDescription
boolean

Whether the prefixLength field is set.

hasPurpose()

public boolean hasPurpose()

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 IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources. Not currently available publicly. - 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;

Returns
TypeDescription
boolean

Whether the purpose field is set.

hasRegion()

public boolean hasRegion()

[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;

Returns
TypeDescription
boolean

Whether the region field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasStatus()

public boolean hasStatus()

[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;

Returns
TypeDescription
boolean

Whether the status field is set.

hasSubnetwork()

public boolean hasSubnetwork()

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;

Returns
TypeDescription
boolean

Whether the subnetwork field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Address.Builder newBuilderForType()
Returns
TypeDescription
Address.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Address.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Address.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Address.Builder toBuilder()
Returns
TypeDescription
Address.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException