1.6.0 (latest) 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class EndpointMatcher.Types.MetadataLabelMatcher : IMessage<EndpointMatcher.Types.MetadataLabelMatcher>, IEquatable<EndpointMatcher.Types.MetadataLabelMatcher>, IDeepCloneable<EndpointMatcher.Types.MetadataLabelMatcher>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Services v1 API class EndpointMatcher.Types.MetadataLabelMatcher.

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> EndpointMatcher.Types.MetadataLabelMatcher

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[EndpointMatcher](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types)[MetadataLabelMatcher](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[EndpointMatcher](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types)[MetadataLabelMatcher](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[EndpointMatcher](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types)[MetadataLabelMatcher](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.NetworkServices.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1)

## Assembly

Google.Cloud.NetworkServices.V1.dll

## Constructors

### MetadataLabelMatcher()

    public MetadataLabelMatcher()

### MetadataLabelMatcher(MetadataLabelMatcher)

    public MetadataLabelMatcher(EndpointMatcher.Types.MetadataLabelMatcher other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher` |

## Properties

### MetadataLabelMatchCriteria

    public EndpointMatcher.Types.MetadataLabelMatcher.Types.MetadataLabelMatchCriteria MetadataLabelMatchCriteria { get; set; }

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), pick up the one with older creation time.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher.Types.MetadataLabelMatchCriteria` |   |

### MetadataLabels

    public RepeatedField<EndpointMatcher.Types.MetadataLabelMatcher.Types.MetadataLabels> MetadataLabels { get; }

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).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointMatcher.Types.MetadataLabelMatcher.Types.MetadataLabels` |   |