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

Specifies the policy on how requests are shadowed to a separate mirrored
destination service. The proxy does not wait for responses from the
shadow service. Prior to sending traffic to the shadow service, the
host/authority header is suffixed with -shadow.

Mirroring is currently not supported for Cloud Run destinations.

Generated from protobuf message `google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1 \\ HttpRoute

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ destination` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.HttpRoute.Destination` The destination the requests will be mirrored to. The weight of the destination will be ignored. |
| `↳ mirror_percent` | `float` Optional. The percentage of requests to get mirrored to the desired destination. |

### getDestination

The destination the requests will be mirrored to. The weight of the
destination will be ignored.

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

### hasDestination

### clearDestination

### setDestination

The destination the requests will be mirrored to. The weight of the
destination will be ignored.

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

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

### getMirrorPercent

Optional. The percentage of requests to get mirrored to the desired
destination.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setMirrorPercent

Optional. The percentage of requests to get mirrored to the desired
destination.

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

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