# Google Cloud Storage Transfer V1 Client - Class OverwriteWhen (2.4.0)

2.4.0 (latest) 2.3.2 2.2.1 2.1.1 2.0.2 1.5.0 1.4.5 1.3.1 1.2.0 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Storage Transfer V1 Client class OverwriteWhen.

Specifies when to overwrite an object in the sink when an object with
matching name is found in the source.

Protobuf type `google.storagetransfer.v1.TransferOptions.OverwriteWhen`

## Namespace

Google \\ Cloud \\ StorageTransfer \\ V1 \\ TransferOptions

## Methods

### static::name

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` |

### static::value

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `mixed` |

## Constants

### OVERWRITE_WHEN_UNSPECIFIED

    Value: 0

Overwrite behavior is unspecified.

Generated from protobuf enum `OVERWRITE_WHEN_UNSPECIFIED = 0;`

### DIFFERENT

    Value: 1

Overwrites destination objects with the source objects, only if the
objects have the same name but different HTTP ETags or checksum values.

Generated from protobuf enum `DIFFERENT = 1;`

### NEVER

    Value: 2

Never overwrites a destination object if a source object has the
same name. In this case, the source object is not transferred.

Generated from protobuf enum `NEVER = 2;`

### ALWAYS

    Value: 3

Always overwrite the destination object with the source object, even if
the HTTP Etags or checksum values are the same.

Generated from protobuf enum `ALWAYS = 3;`