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 RestoreObjectOptions

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

Options for RestoreObject operations.

## Inheritance

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

## 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

## Properties

### CopySourceAcl

    public bool? CopySourceAcl { get; set; }

If true, the source object's access controls will be copied to the restored object,
unless the bucket has UBLA enabled, in which case the restore operation will fail.
Otherwise, the bucket's default object ACL will be used.

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

### EncryptionKey

    public EncryptionKey EncryptionKey { get; set; }

The encryption key to use for this operation. If this property is null, the [EncryptionKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.StorageClient#Google_Cloud_Storage_V1_StorageClient_EncryptionKey)
will be used instead. Use [None](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.EncryptionKey#Google_Cloud_Storage_V1_EncryptionKey_None) to remove encryption headers from this request.

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

### IfGenerationMatch

    public long? IfGenerationMatch { get; set; }

Makes the operation conditional on whether the object's current generation
matches the given value. Setting to 0 makes the operation succeed only if
there are no live versions of the object.

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

**Remarks** Note that the generation value passed to the restore operations (a) specifies the exact generation
that should be restored, whereas this value (b) is a constraint on the current generation of the object
for the operation to succeed. Effectively, this means restore version (a) if current generation is (b).

### IfGenerationNotMatch

    public long? IfGenerationNotMatch { get; set; }

Makes the operation conditional on whether the object's live generation
does not match the given value. If no live object exists, the precondition
fails. Setting to 0 makes the operation succeed only if there is a live
version of the object.

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

**Remarks** Note that the generation value passed to the restore operations (a) specifies the exact generation
that should be restored, whereas this value (b) is a constraint on the current generation of the object
for the operation to succeed. Effectively, this means restore version (a) if current generation is not (b).

### IfMetagenerationMatch

    public long? IfMetagenerationMatch { get; set; }

Makes the operation conditional on whether the object's current
metageneration matches the given value.

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

**Remarks** Note that the generation value passed to the restore operations (a) specifies the exact generation
that should be restored, whereas this value (b) is a constraint on the current metageneration of the object
for the operation to succeed. Effectively, this means restore version (a) if current metageneration is (b).

### IfMetagenerationNotMatch

    public long? IfMetagenerationNotMatch { get; set; }

Makes the operation conditional on whether the object's current
metageneration does not match the given value.

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

**Remarks** Note that the generation value passed to the restore operations (a) specifies the exact generation
that should be restored, whereas this value (b) is a constraint on the current metageneration of the object
for the operation to succeed. Effectively, this means restore version (a) if current metageneration is (b).

### Projection

    public Projection? Projection { get; set; }

The projection of the restored object to return. Note the whole object will be restored,
except for the object's access controls, see [CopySourceAcl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.RestoreObjectOptions#Google_Cloud_Storage_V1_RestoreObjectOptions_CopySourceAcl) for that. This only affects
what information is returned when restoration is successful.

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

### RetryOptions

    public RetryOptions RetryOptions { get; set; }

Options to pass custom retry configuration for each API request.

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

### UserProject

    public string UserProject { get; set; }

If set, this is the ID of the project which will be billed for the request.
The caller must have suitable permissions for the project being billed.

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