# Storage Transfer v1 API - Class TransferOptions (2.10.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.10.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.9.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.8.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.7.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.6.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.5.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.4.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.3.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.2.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.1.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/2.0.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/1.2.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/1.1.0/Google.Cloud.StorageTransfer.V1.TransferOptions)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/1.0.0/Google.Cloud.StorageTransfer.V1.TransferOptions)

    public sealed class TransferOptions : IMessage<TransferOptions>, IEquatable<TransferOptions>, IDeepCloneable<TransferOptions>, IBufferMessage, IMessage

Reference documentation and code samples for the Storage Transfer v1 API class TransferOptions.

TransferOptions define the actions to be performed on objects in a transfer.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TransferOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TransferOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TransferOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## 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.StorageTransfer.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1)

## Assembly

Google.Cloud.StorageTransfer.V1.dll

## Constructors

### TransferOptions()

    public TransferOptions()

### TransferOptions(TransferOptions)

    public TransferOptions(TransferOptions other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions` |

## Properties

### DeleteObjectsFromSourceAfterTransfer

    public bool DeleteObjectsFromSourceAfterTransfer { get; set; }

Whether objects should be deleted from the source after they are
transferred to the sink.

**Note:** This option and
\[delete_objects_unique_in_sink\]\[google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink\]
are mutually exclusive.

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

### DeleteObjectsUniqueInSink

    public bool DeleteObjectsUniqueInSink { get; set; }

Whether objects that exist only in the sink should be deleted.

**Note:** This option and
\[delete_objects_from_source_after_transfer\]\[google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer\]
are mutually exclusive.

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

### MetadataOptions

    public MetadataOptions MetadataOptions { get; set; }

Represents the selected metadata options for a transfer job.

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

### OverwriteObjectsAlreadyExistingInSink

    public bool OverwriteObjectsAlreadyExistingInSink { get; set; }

When to overwrite objects that already exist in the sink. The default is
that only objects that are different from the source are overwritten. If
true, all objects in the sink whose name matches an object in the source
are overwritten with the source object.

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

### OverwriteWhen

    public TransferOptions.Types.OverwriteWhen OverwriteWhen { get; set; }

When to overwrite objects that already exist in the sink. If not set,
overwrite behavior is determined by
\[overwrite_objects_already_existing_in_sink\]\[google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageTransfer.V1/latest/Google.Cloud.StorageTransfer.V1.TransferOptions.Types.OverwriteWhen` |   |