# Google Cloud Network Services V1 Client - Class RouteMatch (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 RouteMatch.

Criteria for matching traffic. A RouteMatch will be considered to match
when all supplied fields match.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ method` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.MethodMatch` Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods. |
| `↳ headers` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.HeaderMatch>` Optional. Specifies a collection of headers to match. |

### getMethod

Optional. A gRPC method to match against. If this field is empty or
omitted, will match all methods.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.MethodMatch|null` |   |

### hasMethod

### clearMethod

### setMethod

Optional. A gRPC method to match against. If this field is empty or
omitted, will match all methods.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.MethodMatch` |

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

### getHeaders

Optional. Specifies a collection of headers to match.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.HeaderMatch>` |   |

### setHeaders

Optional. Specifies a collection of headers to match.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.HeaderMatch>` |

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