5.0.0 (latest) 4.16.0 4.15.0 4.14.0 4.13.0 4.11.0 4.10.0 4.9.0 4.8.0 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.7.0 3.6.0 3.5.0 3.4.0

    public sealed class RetryTiming

Reference documentation and code samples for the Google Cloud Storage v1 API class RetryTiming.

Options to control the delays between attempts when retrying failed API requests. This class is immutable.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RetryTiming

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Storage.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1)

## Assembly

Google.Cloud.Storage.V1.dll

## Constructors

### RetryTiming(TimeSpan, TimeSpan, double)

    public RetryTiming(TimeSpan initialBackoff, TimeSpan maxBackoff, double backoffMultiplier)

Creates an instance with the specified values.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `initialBackoff` | `https://learn.microsoft.com/dotnet/api/system.timespan` Initial backoff for retry. Must be non-negative. |
| `maxBackoff` | `https://learn.microsoft.com/dotnet/api/system.timespan` Maximum backoff for retry. Must be greater than or equal to `initialBackoff`. |
| `backoffMultiplier` | `https://learn.microsoft.com/dotnet/api/system.double` Backoff multiplier for retry. Must be greater than or equal to 1.0. |

## Properties

### BackoffMultiplier

    public double BackoffMultiplier { get; }

The multiplier to apply to the previous backoff on each iteration, leading to exponential backoff.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.double` |   |

### Default

    public static RetryTiming Default { get; }

Returns the retry timing configurations all set to default.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming` |   |

### DefaultBackoffMultiplier

    public static double DefaultBackoffMultiplier { get; }

The default maximum backoff multiplier to be applied on each iteration. The default is 2.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.double` |   |

### DefaultInitialBackoff

    public static TimeSpan DefaultInitialBackoff { get; }

The default initial backoff time between the first attempt and the first retry. The default is 1 second.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.timespan` |   |

### DefaultMaxBackoff

    public static TimeSpan DefaultMaxBackoff { get; }

The default maximum backoff time between retries. The default is 32 seconds.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.timespan` |   |

### InitialBackoff

    public TimeSpan InitialBackoff { get; }

The backoff time between the first attempt and the first retry.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.timespan` |   |

### MaxBackoff

    public TimeSpan MaxBackoff { get; }

Maximum backoff time between retries.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.timespan` |   |

## Methods

### WithBackoffMultiplier(double)

    public RetryTiming WithBackoffMultiplier(double backoffMultiplier)

Returns the existing retry timings configurations using the specified backoff multiplier.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `backoffMultiplier` | `https://learn.microsoft.com/dotnet/api/system.double` The new value for [BackoffMultiplier](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming#Google_Cloud_Storage_V1_RetryTiming_BackoffMultiplier). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming` | A new instance based on the existing values, but with the specified backoff multiplier. |

### WithInitialBackoff(TimeSpan)

    public RetryTiming WithInitialBackoff(TimeSpan initialBackoff)

Returns a new instance with the same values as the current instance, but with the specified initial backoff.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `initialBackoff` | `https://learn.microsoft.com/dotnet/api/system.timespan` The new value for [InitialBackoff](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming#Google_Cloud_Storage_V1_RetryTiming_InitialBackoff). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming` | A new instance based on the existing values, but with the specified initial backoff. |

### WithMaxBackoff(TimeSpan)

    public RetryTiming WithMaxBackoff(TimeSpan maxBackoff)

Returns the existing retry timings configurations using the specified maximum backoff.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `maxBackoff` | `https://learn.microsoft.com/dotnet/api/system.timespan` The new value for [MaxBackoff](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming#Google_Cloud_Storage_V1_RetryTiming_MaxBackoff). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RetryTiming` | A new instance based on the existing values, but with the specified max backoff. |