Required. Updates object event based holds state. When object event based
hold is set, object cannot be deleted or replaced. Resets object's time in
the bucket for the purposes of the retention period.
Required. Updates object event based holds state. When object event based
hold is set, object cannot be deleted or replaced. Resets object's time in
the bucket for the purposes of the retention period.
[[["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-08-28 UTC."],[],[],null,["# Interface PutObjectHoldOrBuilder (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/java/docs/reference/google-cloud-storagebatchoperations/latest/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder)\n- [0.10.0](/java/docs/reference/google-cloud-storagebatchoperations/0.10.0/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder)\n- [0.8.0](/java/docs/reference/google-cloud-storagebatchoperations/0.8.0/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder)\n- [0.7.0](/java/docs/reference/google-cloud-storagebatchoperations/0.7.0/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder)\n- [0.4.0](/java/docs/reference/google-cloud-storagebatchoperations/0.4.0/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder)\n- [0.3.0](/java/docs/reference/google-cloud-storagebatchoperations/0.3.0/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder)\n- [0.2.0](/java/docs/reference/google-cloud-storagebatchoperations/0.2.0/com.google.cloud.storagebatchoperations.v1.PutObjectHoldOrBuilder) \n\n public interface PutObjectHoldOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getEventBasedHold()\n\n public abstract PutObjectHold.HoldStatus getEventBasedHold()\n\nRequired. Updates object event based holds state. When object event based\nhold is set, object cannot be deleted or replaced. Resets object's time in\nthe bucket for the purposes of the retention period.\n\n`\n.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getEventBasedHoldValue()\n\n public abstract int getEventBasedHoldValue()\n\nRequired. Updates object event based holds state. When object event based\nhold is set, object cannot be deleted or replaced. Resets object's time in\nthe bucket for the purposes of the retention period.\n\n`\n.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getTemporaryHold()\n\n public abstract PutObjectHold.HoldStatus getTemporaryHold()\n\nRequired. Updates object temporary holds state. When object temporary hold\nis set, object cannot be deleted or replaced.\n\n`\n.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getTemporaryHoldValue()\n\n public abstract int getTemporaryHoldValue()\n\nRequired. Updates object temporary holds state. When object temporary hold\nis set, object cannot be deleted or replaced.\n\n`\n.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];\n`"]]