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

The specification for fault injection introduced into traffic to test the
resiliency of clients to destination service failure. As part of fault
injection, when clients send requests to a destination, delays can be
introduced by client proxy on a percentage of requests before sending those
requests to the destination service. Similarly requests can be aborted by
client proxy for a percentage of requests.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ delay` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.HttpRoute.FaultInjectionPolicy.Delay` The specification for injecting delay to client requests. |
| `↳ abort` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.HttpRoute.FaultInjectionPolicy.Abort` The specification for aborting to client requests. |

### getDelay

The specification for injecting delay to client requests.

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

### hasDelay

### clearDelay

### setDelay

The specification for injecting delay to client requests.

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

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

### getAbort

The specification for aborting to client requests.

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

### hasAbort

### clearAbort

### setAbort

The specification for aborting to client requests.

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

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