Class NetworkEndpointGroup.Builder (1.91.0)

public static final class NetworkEndpointGroup.Builder extends GeneratedMessageV3.Builder<NetworkEndpointGroup.Builder> 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 for different use cases, seeNetwork endpoint groups overview.

Protobuf type google.cloud.compute.v1.NetworkEndpointGroup

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NetworkEndpointGroup.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NetworkEndpointGroup.Builder
Overrides

build()

public NetworkEndpointGroup build()
Returns
Type Description
NetworkEndpointGroup

buildPartial()

public NetworkEndpointGroup buildPartial()
Returns
Type Description
NetworkEndpointGroup

clear()

public NetworkEndpointGroup.Builder clear()
Returns
Type Description
NetworkEndpointGroup.Builder
Overrides

clearAnnotations()

public NetworkEndpointGroup.Builder clearAnnotations()
Returns
Type Description
NetworkEndpointGroup.Builder

clearAppEngine()

public NetworkEndpointGroup.Builder clearAppEngine()

Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set.

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

Returns
Type Description
NetworkEndpointGroup.Builder

clearCloudFunction()

public NetworkEndpointGroup.Builder clearCloudFunction()

Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set.

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

Returns
Type Description
NetworkEndpointGroup.Builder

clearCloudRun()

public NetworkEndpointGroup.Builder clearCloudRun()

Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set.

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

Returns
Type Description
NetworkEndpointGroup.Builder

clearCreationTimestamp()

public NetworkEndpointGroup.Builder clearCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearDefaultPort()

public NetworkEndpointGroup.Builder clearDefaultPort()

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

Optional. If the network endpoint type is either GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified.

optional int32 default_port = 423377855;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearDescription()

public NetworkEndpointGroup.Builder clearDescription()

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

optional string description = 422937596;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public NetworkEndpointGroup.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
NetworkEndpointGroup.Builder
Overrides

clearId()

public NetworkEndpointGroup.Builder clearId()

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

optional uint64 id = 3355;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearKind()

public NetworkEndpointGroup.Builder clearKind()

Output only. [Output Only] Type of the resource. Alwayscompute#networkEndpointGroup for network endpoint group.

optional string kind = 3292052;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearName()

public NetworkEndpointGroup.Builder clearName()

Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. 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
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearNetwork()

public NetworkEndpointGroup.Builder clearNetwork()

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
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearNetworkEndpointType()

public NetworkEndpointGroup.Builder clearNetworkEndpointType()

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

optional string network_endpoint_type = 118301523;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NetworkEndpointGroup.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
NetworkEndpointGroup.Builder
Overrides

clearPscData()

public NetworkEndpointGroup.Builder clearPscData()

Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT.

optional .google.cloud.compute.v1.NetworkEndpointGroupPscData psc_data = 71937481;

Returns
Type Description
NetworkEndpointGroup.Builder

clearPscTargetService()

public NetworkEndpointGroup.Builder clearPscTargetService()

The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: asia-northeast3-cloudkms.googleapis.com.

Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT.

optional string psc_target_service = 269132134;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearRegion()

public NetworkEndpointGroup.Builder clearRegion()

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

optional string region = 138946292;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

public NetworkEndpointGroup.Builder clearSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearSize()

public NetworkEndpointGroup.Builder clearSize()

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

optional int32 size = 3530753;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearSubnetwork()

public NetworkEndpointGroup.Builder clearSubnetwork()

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

optional string subnetwork = 307827694;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clearZone()

public NetworkEndpointGroup.Builder clearZone()

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

optional string zone = 3744684;

Returns
Type Description
NetworkEndpointGroup.Builder

This builder for chaining.

clone()

public NetworkEndpointGroup.Builder clone()
Returns
Type Description
NetworkEndpointGroup.Builder
Overrides

containsAnnotations(String key)

public boolean containsAnnotations(String key)

Optional. Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotations() (deprecated)

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

Optional. Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Returns
Type Description
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

Optional. Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

Optional. Metadata defined as annotations on the network endpoint group.

map<string, string> annotations = 112032548;

Parameters
Name Description
key