Class EndpointMatcher.MetadataLabelMatcher (0.9.0)

public static final class EndpointMatcher.MetadataLabelMatcher extends GeneratedMessageV3 implements EndpointMatcher.MetadataLabelMatcherOrBuilder

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

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > EndpointMatcher.MetadataLabelMatcher

Static Fields

METADATA_LABELS_FIELD_NUMBER

public static final int METADATA_LABELS_FIELD_NUMBER
Field Value
Type Description
int

METADATA_LABEL_MATCH_CRITERIA_FIELD_NUMBER

public static final int METADATA_LABEL_MATCH_CRITERIA_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EndpointMatcher.MetadataLabelMatcher getDefaultInstance()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher

getDescriptor()

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

newBuilder()

public static EndpointMatcher.MetadataLabelMatcher.Builder newBuilder()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

newBuilder(EndpointMatcher.MetadataLabelMatcher prototype)

public static EndpointMatcher.MetadataLabelMatcher.Builder newBuilder(EndpointMatcher.MetadataLabelMatcher prototype)
Parameter
Name Description
prototype EndpointMatcher.MetadataLabelMatcher
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

parseDelimitedFrom(InputStream input)

public static EndpointMatcher.MetadataLabelMatcher parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EndpointMatcher.MetadataLabelMatcher parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EndpointMatcher.MetadataLabelMatcher parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EndpointMatcher.MetadataLabelMatcher> parser()
Returns
Type Description
Parser<MetadataLabelMatcher>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

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

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>

getParserForType()

public Parser<EndpointMatcher.MetadataLabelMatcher> getParserForType()
Returns
Type Description
Parser<MetadataLabelMatcher>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EndpointMatcher.MetadataLabelMatcher.Builder newBuilderForType()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EndpointMatcher.MetadataLabelMatcher.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public EndpointMatcher.MetadataLabelMatcher.Builder toBuilder()
Returns
Type Description
EndpointMatcher.MetadataLabelMatcher.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException