# Interface HttpRoute.HeaderMatchOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatchOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatchOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatchOrBuilder)

    public static interface HttpRoute.HeaderMatchOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getExactMatch()

    public abstract String getExactMatch()

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

`string exact_match = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The exactMatch. |

### getExactMatchBytes()

    public abstract ByteString getExactMatchBytes()

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

`string exact_match = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for exactMatch. |

### getHeader()

    public abstract String getHeader()

The name of the HTTP header to match against.

`string header = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The header. |

### getHeaderBytes()

    public abstract ByteString getHeaderBytes()

The name of the HTTP header to match against.

`string header = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for header. |

### getInvertMatch()

    public abstract boolean getInvertMatch()

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

`bool invert_match = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The invertMatch. |

### getMatchTypeCase()

    public abstract HttpRoute.HeaderMatch.MatchTypeCase getMatchTypeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.MatchTypeCase` |   |

### getPrefixMatch()

    public abstract String getPrefixMatch()

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

`string prefix_match = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The prefixMatch. |

### getPrefixMatchBytes()

    public abstract ByteString getPrefixMatchBytes()

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

`string prefix_match = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for prefixMatch. |

### getPresentMatch()

    public abstract boolean getPresentMatch()

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

`bool present_match = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The presentMatch. |

### getRangeMatch()

    public abstract HttpRoute.HeaderMatch.IntegerRange getRangeMatch()

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

`
.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange` | The rangeMatch. |

### getRangeMatchOrBuilder()

    public abstract HttpRoute.HeaderMatch.IntegerRangeOrBuilder getRangeMatchOrBuilder()

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

`
.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeOrBuilder` |   |

### getRegexMatch()

    public abstract String getRegexMatch()

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>

`string regex_match = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The regexMatch. |

### getRegexMatchBytes()

    public abstract ByteString getRegexMatchBytes()

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>

`string regex_match = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for regexMatch. |

### getSuffixMatch()

    public abstract String getSuffixMatch()

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

`string suffix_match = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The suffixMatch. |

### getSuffixMatchBytes()

    public abstract ByteString getSuffixMatchBytes()

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

`string suffix_match = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for suffixMatch. |

### hasExactMatch()

    public abstract boolean hasExactMatch()

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

`string exact_match = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the exactMatch field is set. |

### hasPrefixMatch()

    public abstract boolean hasPrefixMatch()

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

`string prefix_match = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the prefixMatch field is set. |

### hasPresentMatch()

    public abstract boolean hasPresentMatch()

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

`bool present_match = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the presentMatch field is set. |

### hasRangeMatch()

    public abstract boolean hasRangeMatch()

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

`
.google.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the rangeMatch field is set. |

### hasRegexMatch()

    public abstract boolean hasRegexMatch()

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>

`string regex_match = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the regexMatch field is set. |

### hasSuffixMatch()

    public abstract boolean hasSuffixMatch()

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

`string suffix_match = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the suffixMatch field is set. |