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 DeleteBucketOptions

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

Options for `DeleteBucket` operations.

## Inheritance

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

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

### DeleteObjects

    public bool? DeleteObjects { get; set; }

If set to true, all objects within the bucket will be deleted before attempting
to delete the bucket itself.

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

**Remarks**
This is a best-effort attempt, with no guarantees of atomicity:
it's entirely possible for the operation to fail having deleted some objects
but not all of them. If a precondition is specified, it is checked before deleting any
objects, and applied again when deleting the bucket, but is not checked while deleting
the objects. The behavior is unspecified if objects are modified, added or deleted while
this operation is taking place.


The objects are deleted sequentially. If you need to delete buckets with many objects, you
may wish to implement a parallel solution in application code instead of using this option.


If [UserProject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.DeleteBucketOptions#Google_Cloud_Storage_V1_DeleteBucketOptions_UserProject) is set, that project will be billed for all operations.

### IfMetagenerationMatch

    public long? IfMetagenerationMatch { get; set; }

Precondition for deletion: the bucket is only deleted if its
meta-generation matches the given value.

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

### IfMetagenerationNotMatch

    public long? IfMetagenerationNotMatch { get; set; }

Precondition for deletion: the bucket is only deleted if its
meta-generation does not match the given value.

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

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