# 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 on a percentage of requests before sending those requests to the
destination service. Similarly requests from clients can be aborted by for
a percentage of requests.

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

## Namespace

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

## 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.GrpcRoute.FaultInjectionPolicy.Delay` The specification for injecting delay to client requests. |
| `↳ abort` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GrpcRoute.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.GrpcRoute.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.GrpcRoute.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.GrpcRoute.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.GrpcRoute.FaultInjectionPolicy.Abort` |

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