Class NetworkEndpointGroup (1.7.2)

public final class NetworkEndpointGroup extends GeneratedMessageV3 implements NetworkEndpointGroupOrBuilder

Represents a collection of network endpoints. A network endpoint group (NEG) defines how a set of endpoints should be reached, whether they are reachable, and where they are located. For more information about using NEGs, see Setting up external HTTP(S) Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting up external HTTP(S) Load Balancing with serverless NEGs.

Protobuf type google.cloud.compute.v1.NetworkEndpointGroup

Static Fields

ANNOTATIONS_FIELD_NUMBER

public static final int ANNOTATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

APP_ENGINE_FIELD_NUMBER

public static final int APP_ENGINE_FIELD_NUMBER
Field Value
TypeDescription
int

CLOUD_FUNCTION_FIELD_NUMBER

public static final int CLOUD_FUNCTION_FIELD_NUMBER
Field Value
TypeDescription
int

CLOUD_RUN_FIELD_NUMBER

public static final int CLOUD_RUN_FIELD_NUMBER
Field Value
TypeDescription
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
TypeDescription
int

DEFAULT_PORT_FIELD_NUMBER

public static final int DEFAULT_PORT_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

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_ENDPOINT_TYPE_FIELD_NUMBER

public static final int NETWORK_ENDPOINT_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_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

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

SUBNETWORK_FIELD_NUMBER

public static final int SUBNETWORK_FIELD_NUMBER
Field Value
TypeDescription
int

ZONE_FIELD_NUMBER

public static final int ZONE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static NetworkEndpointGroup getDefaultInstance()
Returns
TypeDescription
NetworkEndpointGroup

getDescriptor()

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

newBuilder()

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

newBuilder(NetworkEndpointGroup prototype)

public static NetworkEndpointGroup.Builder newBuilder(NetworkEndpointGroup prototype)
Parameter
NameDescription
prototypeNetworkEndpointGroup
Returns
TypeDescription
NetworkEndpointGroup.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

containsAnnotations(String key)

public boolean containsAnnotations(String key)

Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

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

getAnnotations()

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
TypeDescription
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Returns
TypeDescription
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Returns
TypeDescription
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getAnnotationsOrThrow(String key)

public String getAnnotationsOrThrow(String key)

Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getAppEngine()

public NetworkEndpointGroupAppEngine getAppEngine()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupAppEngine app_engine = 340788768;

Returns
TypeDescription
NetworkEndpointGroupAppEngine

The appEngine.

getAppEngineOrBuilder()

public NetworkEndpointGroupAppEngineOrBuilder getAppEngineOrBuilder()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupAppEngine app_engine = 340788768;

Returns
TypeDescription
NetworkEndpointGroupAppEngineOrBuilder

getCloudFunction()

public NetworkEndpointGroupCloudFunction getCloudFunction()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupCloudFunction cloud_function = 519893666;

Returns
TypeDescription
NetworkEndpointGroupCloudFunction

The cloudFunction.

getCloudFunctionOrBuilder()

public NetworkEndpointGroupCloudFunctionOrBuilder getCloudFunctionOrBuilder()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupCloudFunction cloud_function = 519893666;

Returns
TypeDescription
NetworkEndpointGroupCloudFunctionOrBuilder

getCloudRun()

public NetworkEndpointGroupCloudRun getCloudRun()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupCloudRun cloud_run = 111060353;

Returns
TypeDescription
NetworkEndpointGroupCloudRun

The cloudRun.

getCloudRunOrBuilder()

public NetworkEndpointGroupCloudRunOrBuilder getCloudRunOrBuilder()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupCloudRun cloud_run = 111060353;

Returns
TypeDescription
NetworkEndpointGroupCloudRunOrBuilder

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 NetworkEndpointGroup getDefaultInstanceForType()
Returns
TypeDescription
NetworkEndpointGroup

getDefaultPort()

public int getDefaultPort()

The default port used if the port number is not specified in the network endpoint.

optional int32 default_port = 423377855;

Returns
TypeDescription
int

The defaultPort.

getDescription()

public String getDescription()

An optional description of this resource. Provide this property 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 property 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.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.

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? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

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? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getNetwork()

public String getNetwork()

The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.

optional string network = 232872494;

Returns
TypeDescription
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.

optional string network = 232872494;

Returns
TypeDescription
ByteString

The bytes for network.

getNetworkEndpointType()

public String getNetworkEndpointType()

Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. Check the NetworkEndpointType enum for the list of possible values.

optional string network_endpoint_type = 118301523;

Returns
TypeDescription
String

The networkEndpointType.

getNetworkEndpointTypeBytes()

public ByteString getNetworkEndpointTypeBytes()

Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. Check the NetworkEndpointType enum for the list of possible values.

optional string network_endpoint_type = 118301523;

Returns
TypeDescription
ByteString

The bytes for networkEndpointType.

getParserForType()

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

getRegion()

public String getRegion()

[Output Only] The URL of the region where the network endpoint group is located.

optional string region = 138946292;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[Output Only] The URL of the region where the network endpoint group is located.

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

getSize()

public int getSize()

[Output only] Number of network endpoints in the network endpoint group.

optional int32 size = 3530753;

Returns
TypeDescription
int

The size.

getSubnetwork()

public String getSubnetwork()

Optional URL of the subnetwork to which all network endpoints in the NEG belong.

optional string subnetwork = 307827694;

Returns
TypeDescription
String

The subnetwork.

getSubnetworkBytes()

public ByteString getSubnetworkBytes()

Optional URL of the subnetwork to which all network endpoints in the NEG belong.

optional string subnetwork = 307827694;

Returns
TypeDescription
ByteString

The bytes for subnetwork.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getZone()

public String getZone()

[Output Only] The URL of the zone where the network endpoint group is located.

optional string zone = 3744684;

Returns
TypeDescription
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

[Output Only] The URL of the zone where the network endpoint group is located.

optional string zone = 3744684;

Returns
TypeDescription
ByteString

The bytes for zone.

hasAppEngine()

public boolean hasAppEngine()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupAppEngine app_engine = 340788768;

Returns
TypeDescription
boolean

Whether the appEngine field is set.

hasCloudFunction()

public boolean hasCloudFunction()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupCloudFunction cloud_function = 519893666;

Returns
TypeDescription
boolean

Whether the cloudFunction field is set.

hasCloudRun()

public boolean hasCloudRun()

Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.

optional .google.cloud.compute.v1.NetworkEndpointGroupCloudRun cloud_run = 111060353;

Returns
TypeDescription
boolean

Whether the cloudRun 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.

hasDefaultPort()

public boolean hasDefaultPort()

The default port used if the port number is not specified in the network endpoint.

optional int32 default_port = 423377855;

Returns
TypeDescription
boolean

Whether the defaultPort field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property 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.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.

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? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasNetwork()

public boolean hasNetwork()

The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.

optional string network = 232872494;

Returns
TypeDescription
boolean

Whether the network field is set.

hasNetworkEndpointType()

public boolean hasNetworkEndpointType()

Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. Check the NetworkEndpointType enum for the list of possible values.

optional string network_endpoint_type = 118301523;

Returns
TypeDescription
boolean

Whether the networkEndpointType field is set.

hasRegion()

public boolean hasRegion()

[Output Only] The URL of the region where the network endpoint group is located.

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.

hasSize()

public boolean hasSize()

[Output only] Number of network endpoints in the network endpoint group.

optional int32 size = 3530753;

Returns
TypeDescription
boolean

Whether the size field is set.

hasSubnetwork()

public boolean hasSubnetwork()

Optional URL of the subnetwork to which all network endpoints in the NEG belong.

optional string subnetwork = 307827694;

Returns
TypeDescription
boolean

Whether the subnetwork field is set.

hasZone()

public boolean hasZone()

[Output Only] The URL of the zone where the network endpoint group is located.

optional string zone = 3744684;

Returns
TypeDescription
boolean

Whether the zone field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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