Class PutObjectHold.Builder (0.23.0)

public static final class PutObjectHold.Builder extends GeneratedMessage.Builder<PutObjectHold.Builder> implements PutObjectHoldOrBuilder

Describes options to update object hold.

Protobuf type google.cloud.storagebatchoperations.v1.PutObjectHold

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public PutObjectHold build()
Returns
Type Description
PutObjectHold

buildPartial()

public PutObjectHold buildPartial()
Returns
Type Description
PutObjectHold

clear()

public PutObjectHold.Builder clear()
Returns
Type Description
PutObjectHold.Builder
Overrides

clearEventBasedHold()

public PutObjectHold.Builder clearEventBasedHold()

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.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PutObjectHold.Builder

This builder for chaining.

clearTemporaryHold()

public PutObjectHold.Builder clearTemporaryHold()

Required. Updates object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PutObjectHold.Builder

This builder for chaining.

getDefaultInstanceForType()

public PutObjectHold getDefaultInstanceForType()
Returns
Type Description
PutObjectHold

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEventBasedHold()

public PutObjectHold.HoldStatus getEventBasedHold()

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.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PutObjectHold.HoldStatus

The eventBasedHold.

getEventBasedHoldValue()

public int getEventBasedHoldValue()

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.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for eventBasedHold.

getTemporaryHold()

public PutObjectHold.HoldStatus getTemporaryHold()

Required. Updates object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PutObjectHold.HoldStatus

The temporaryHold.

getTemporaryHoldValue()

public int getTemporaryHoldValue()

Required. Updates object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for temporaryHold.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PutObjectHold other)

public PutObjectHold.Builder mergeFrom(PutObjectHold other)
Parameter
Name Description
other PutObjectHold
Returns
Type Description
PutObjectHold.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PutObjectHold.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutObjectHold.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PutObjectHold.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PutObjectHold.Builder
Overrides

setEventBasedHold(PutObjectHold.HoldStatus value)

public PutObjectHold.Builder setEventBasedHold(PutObjectHold.HoldStatus value)

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.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value PutObjectHold.HoldStatus

The eventBasedHold to set.

Returns
Type Description
PutObjectHold.Builder

This builder for chaining.

setEventBasedHoldValue(int value)

public PutObjectHold.Builder setEventBasedHoldValue(int value)

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.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus event_based_hold = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for eventBasedHold to set.

Returns
Type Description
PutObjectHold.Builder

This builder for chaining.

setTemporaryHold(PutObjectHold.HoldStatus value)

public PutObjectHold.Builder setTemporaryHold(PutObjectHold.HoldStatus value)

Required. Updates object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value PutObjectHold.HoldStatus

The temporaryHold to set.

Returns
Type Description
PutObjectHold.Builder

This builder for chaining.

setTemporaryHoldValue(int value)

public PutObjectHold.Builder setTemporaryHoldValue(int value)

Required. Updates object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced.

.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatus temporary_hold = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for temporaryHold to set.

Returns
Type Description
PutObjectHold.Builder

This builder for chaining.