# Google Cloud Network Services V1 Client - Class HeaderMatch (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class HeaderMatch.

A match against a collection of headers.

Generated from protobuf message `google.cloud.networkservices.v1.GrpcRoute.HeaderMatch`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1 \\ GrpcRoute

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` Optional. Specifies how to match against the value of the header. If not specified, a default value of EXACT is used. |
| `↳ key` | `string` Required. The key of the header. |
| `↳ value` | `string` Required. The value of the header. |

### getType

Optional. Specifies how to match against the value of the header. If not
specified, a default value of EXACT is used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.HeaderMatch.Type). |

### setType

Optional. Specifies how to match against the value of the header. If not
specified, a default value of EXACT is used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.HeaderMatch.Type). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKey

Required. The key of the header.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKey

Required. The key of the header.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getValue

Required. The value of the header.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setValue

Required. The value of the header.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |