Reference documentation and code samples for the Storage Transfer Service V1 API module Google::Cloud::StorageTransfer::V1::TransferOptions::OverwriteWhen.
Specifies when to overwrite an object in the sink when an object with
matching name is found in the source.
Constants
OVERWRITE_WHEN_UNSPECIFIED
value: 0 Overwrite behavior is unspecified.
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.
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.
ALWAYS
value: 3 Always overwrite the destination object with the source object, even if
the HTTP Etags or checksum values are the same.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Storage Transfer Service V1 API - Module Google::Cloud::StorageTransfer::V1::TransferOptions::OverwriteWhen (v1.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.0 (latest)](/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [1.5.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.5.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [1.4.1](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.4.1/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [1.3.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.3.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [1.2.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.2.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [1.1.1](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.1.1/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [1.0.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/1.0.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.10.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.10.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.9.2](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.9.2/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.8.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.8.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.7.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.7.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.6.1](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.6.1/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.5.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.5.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.4.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.4.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.3.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.3.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.2.0](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.2.0/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen)\n- [0.1.2](/ruby/docs/reference/google-cloud-storage_transfer-v1/0.1.2/Google-Cloud-StorageTransfer-V1-TransferOptions-OverwriteWhen) \nReference documentation and code samples for the Storage Transfer Service V1 API module Google::Cloud::StorageTransfer::V1::TransferOptions::OverwriteWhen.\n\nSpecifies when to overwrite an object in the sink when an object with\nmatching name is found in the source.\n\nConstants\n---------\n\n### OVERWRITE_WHEN_UNSPECIFIED\n\n**value:** 0 \nOverwrite behavior is unspecified.\n\n### DIFFERENT\n\n**value:** 1 \nOverwrites destination objects with the source objects, only if the\nobjects have the same name but different HTTP ETags or checksum values.\n\n### NEVER\n\n**value:** 2 \nNever overwrites a destination object if a source object has the\nsame name. In this case, the source object is not transferred.\n\n### ALWAYS\n\n**value:** 3 \nAlways overwrite the destination object with the source object, even if\nthe HTTP Etags or checksum values are the same."]]