# Class GenerativeServiceRetryPolicy (2.30.0-rc)

The retry policy for [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection).

## Functions

### clone() const

Creates a new instance of the policy, reset to the initial state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::unique_ptr< GenerativeServiceRetryPolicy >` |   |

### OnFailure(Status const \&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `status` | `Status const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### OnFailure(Status const \&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `status` | `Status const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### IsExhausted() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### IsExhausted() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### IsPermanentFailure(Status const \&) const

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `status` | `Status const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### IsPermanentFailure(Status const \&) const

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `status` | `Status const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |