Class PutObjectHold.Builder (0.2.0)

public static final class PutObjectHold.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PutObjectHold.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PutObjectHold.Builder
Overrides

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.

clearField(Descriptors.FieldDescriptor field)

public PutObjectHold.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PutObjectHold.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public PutObjectHold.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PutObjectHold.Builder
Overrides

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.

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PutObjectHold.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
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.

setField(Descriptors.FieldDescriptor field, Object value)

public PutObjectHold.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PutObjectHold.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PutObjectHold.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PutObjectHold.Builder
Overrides

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.

setUnknownFields(UnknownFieldSet unknownFields)

public final PutObjectHold.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PutObjectHold.Builder
Overrides