Class EndpointMatcher.MetadataLabelMatcher.Builder (0.8.0)

public static final class EndpointMatcher.MetadataLabelMatcher.Builder extends GeneratedMessageV3.Builder<EndpointMatcher.MetadataLabelMatcher.Builder> implements EndpointMatcher.MetadataLabelMatcherOrBuilder

The matcher that is based on node metadata presented by xDS clients.

Protobuf type google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher

Static Methods

getDescriptor()

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

Methods

addAllMetadataLabels(Iterable<? extends EndpointMatcher.MetadataLabelMatcher.MetadataLabels> values)

public EndpointMatcher.MetadataLabelMatcher.Builder addAllMetadataLabels(Iterable<? extends EndpointMatcher.MetadataLabelMatcher.MetadataLabels> values)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels>
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

addMetadataLabels(EndpointMatcher.MetadataLabelMatcher.MetadataLabels value)

public EndpointMatcher.MetadataLabelMatcher.Builder addMetadataLabels(EndpointMatcher.MetadataLabelMatcher.MetadataLabels value)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
value EndpointMatcher.MetadataLabelMatcher.MetadataLabels
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

addMetadataLabels(EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder builderForValue)

public EndpointMatcher.MetadataLabelMatcher.Builder addMetadataLabels(EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder builderForValue)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
builderForValue EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

addMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels value)

public EndpointMatcher.MetadataLabelMatcher.Builder addMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels value)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameters
Name Description
index int
value EndpointMatcher.MetadataLabelMatcher.MetadataLabels
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

addMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder builderForValue)

public EndpointMatcher.MetadataLabelMatcher.Builder addMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder builderForValue)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameters
Name Description
index int
builderForValue EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

addMetadataLabelsBuilder()

public EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder addMetadataLabelsBuilder()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder

addMetadataLabelsBuilder(int index)

public EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder addMetadataLabelsBuilder(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public EndpointMatcher.MetadataLabelMatcher build()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher

buildPartial()

public EndpointMatcher.MetadataLabelMatcher buildPartial()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher

clear()

public EndpointMatcher.MetadataLabelMatcher.Builder clear()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearMetadataLabelMatchCriteria()

public EndpointMatcher.MetadataLabelMatcher.Builder clearMetadataLabelMatchCriteria()

Specifies how matching should be done.

Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here.

The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>.

If a client with label <A:1> connects, the config from P1 will be selected.

If a client with label <A:1,B:1> connects, the config from P2 will be selected.

If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected.

If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), an error will be thrown.

.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;

Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

This builder for chaining.

clearMetadataLabels()

public EndpointMatcher.MetadataLabelMatcher.Builder clearMetadataLabels()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public EndpointMatcher.MetadataLabelMatcher.Builder clone()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

getDefaultInstanceForType()

public EndpointMatcher.MetadataLabelMatcher getDefaultInstanceForType()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMetadataLabelMatchCriteria()

public EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria getMetadataLabelMatchCriteria()

Specifies how matching should be done.

Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here.

The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>.

If a client with label <A:1> connects, the config from P1 will be selected.

If a client with label <A:1,B:1> connects, the config from P2 will be selected.

If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected.

If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), an error will be thrown.

.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;

Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria

The metadataLabelMatchCriteria.

getMetadataLabelMatchCriteriaValue()

public int getMetadataLabelMatchCriteriaValue()

Specifies how matching should be done.

Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here.

The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>.

If a client with label <A:1> connects, the config from P1 will be selected.

If a client with label <A:1,B:1> connects, the config from P2 will be selected.

If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected.

If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), an error will be thrown.

.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;

Returns
Type Description
int

The enum numeric value on the wire for metadataLabelMatchCriteria.

getMetadataLabels(int index)

public EndpointMatcher.MetadataLabelMatcher.MetadataLabels getMetadataLabels(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.MetadataLabels

getMetadataLabelsBuilder(int index)

public EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder getMetadataLabelsBuilder(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder

getMetadataLabelsBuilderList()

public List<EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder> getMetadataLabelsBuilderList()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Returns
Type Description
List<Builder>

getMetadataLabelsCount()

public int getMetadataLabelsCount()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Returns
Type Description
int

getMetadataLabelsList()

public List<EndpointMatcher.MetadataLabelMatcher.MetadataLabels> getMetadataLabelsList()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Returns
Type Description
List<MetadataLabels>

getMetadataLabelsOrBuilder(int index)

public EndpointMatcher.MetadataLabelMatcher.MetadataLabelsOrBuilder getMetadataLabelsOrBuilder(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.MetadataLabelsOrBuilder

getMetadataLabelsOrBuilderList()

public List<? extends EndpointMatcher.MetadataLabelMatcher.MetadataLabelsOrBuilder> getMetadataLabelsOrBuilderList()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Returns
Type Description
List<? extends com.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelsOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(EndpointMatcher.MetadataLabelMatcher other)

public EndpointMatcher.MetadataLabelMatcher.Builder mergeFrom(EndpointMatcher.MetadataLabelMatcher other)
Parameter
Name Description
other EndpointMatcher.MetadataLabelMatcher
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EndpointMatcher.MetadataLabelMatcher.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public EndpointMatcher.MetadataLabelMatcher.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EndpointMatcher.MetadataLabelMatcher.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

removeMetadataLabels(int index)

public EndpointMatcher.MetadataLabelMatcher.Builder removeMetadataLabels(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public EndpointMatcher.MetadataLabelMatcher.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

setMetadataLabelMatchCriteria(EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria value)

public EndpointMatcher.MetadataLabelMatcher.Builder setMetadataLabelMatchCriteria(EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria value)

Specifies how matching should be done.

Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here.

The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>.

If a client with label <A:1> connects, the config from P1 will be selected.

If a client with label <A:1,B:1> connects, the config from P2 will be selected.

If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected.

If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), an error will be thrown.

.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;

Parameter
Name Description
value EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria

The metadataLabelMatchCriteria to set.

Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

This builder for chaining.

setMetadataLabelMatchCriteriaValue(int value)

public EndpointMatcher.MetadataLabelMatcher.Builder setMetadataLabelMatchCriteriaValue(int value)

Specifies how matching should be done.

Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here.

The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>.

If a client with label <A:1> connects, the config from P1 will be selected.

If a client with label <A:1,B:1> connects, the config from P2 will be selected.

If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected.

If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), an error will be thrown.

.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for metadataLabelMatchCriteria to set.

Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

This builder for chaining.

setMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels value)

public EndpointMatcher.MetadataLabelMatcher.Builder setMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels value)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameters
Name Description
index int
value EndpointMatcher.MetadataLabelMatcher.MetadataLabels
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

setMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder builderForValue)

public EndpointMatcher.MetadataLabelMatcher.Builder setMetadataLabels(int index, EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder builderForValue)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).

repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;

Parameters
Name Description
index int
builderForValue EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public EndpointMatcher.MetadataLabelMatcher.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final EndpointMatcher.MetadataLabelMatcher.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides