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 HttpRoute.Types.HeaderMatch : IMessage<HttpRoute.Types.HeaderMatch>, IEquatable<HttpRoute.Types.HeaderMatch>, IDeepCloneable<HttpRoute.Types.HeaderMatch>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Services v1 API class HttpRoute.Types.HeaderMatch.

Specifies how to select a route rule based on HTTP request headers.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[HeaderMatch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatch), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[HeaderMatch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatch), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[HttpRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types)[HeaderMatch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatch), [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

### HeaderMatch()

    public HeaderMatch()

### HeaderMatch(HeaderMatch)

    public HeaderMatch(HttpRoute.Types.HeaderMatch other)

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

## Properties

### ExactMatch

    public string ExactMatch { get; set; }

The value of the header should match exactly the content of
exact_match.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### HasExactMatch

    public bool HasExactMatch { get; }

Gets whether the "exact_match" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPrefixMatch

    public bool HasPrefixMatch { get; }

Gets whether the "prefix_match" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPresentMatch

    public bool HasPresentMatch { get; }

Gets whether the "present_match" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasRegexMatch

    public bool HasRegexMatch { get; }

Gets whether the "regex_match" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSuffixMatch

    public bool HasSuffixMatch { get; }

Gets whether the "suffix_match" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Header

    public string Header { get; set; }

The name of the HTTP header to match against.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### InvertMatch

    public bool InvertMatch { get; set; }

If specified, the match result will be inverted before checking. Default
value is set to false.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### MatchTypeCase

    public HttpRoute.Types.HeaderMatch.MatchTypeOneofCase MatchTypeCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoutehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatch.MatchTypeOneofCase` |   |

### PrefixMatch

    public string PrefixMatch { get; set; }

The value of the header must start with the contents of prefix_match.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PresentMatch

    public bool PresentMatch { get; set; }

A header with header_name must exist. The match takes place whether or
not the header has a value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### RangeMatch

    public HttpRoute.Types.HeaderMatch.Types.IntegerRange RangeMatch { get; set; }

If specified, the rule will match if the request header value is within
the range.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoutehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatch.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.HttpRoute.Types.HeaderMatch.Types.IntegerRange` |   |

### RegexMatch

    public string RegexMatch { get; set; }

The value of the header must match the regular expression specified in
regex_match. For regular expression grammar, please see:
<https://github.com/google/re2/wiki/Syntax>

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SuffixMatch

    public string SuffixMatch { get; set; }

The value of the header must end with the contents of suffix_match.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |