Class Object.Retention.Builder (2.53.0)

public static final class Object.Retention.Builder extends GeneratedMessageV3.Builder<Object.Retention.Builder> implements Object.RetentionOrBuilder

Specifies retention parameters of the object. Objects under retention cannot be deleted or overwritten until their retention expires.

Protobuf type google.storage.v2.Object.Retention

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Object.Retention build()
Returns
Type Description
Object.Retention

buildPartial()

public Object.Retention buildPartial()
Returns
Type Description
Object.Retention

clear()

public Object.Retention.Builder clear()
Returns
Type Description
Object.Retention.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearMode()

public Object.Retention.Builder clearMode()

Optional. The mode of the Retention.

.google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Object.Retention.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRetainUntilTime()

public Object.Retention.Builder clearRetainUntilTime()

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Object.Retention.Builder

clone()

public Object.Retention.Builder clone()
Returns
Type Description
Object.Retention.Builder
Overrides

getDefaultInstanceForType()

public Object.Retention getDefaultInstanceForType()
Returns
Type Description
Object.Retention

getDescriptorForType()

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

getMode()

public Object.Retention.Mode getMode()

Optional. The mode of the Retention.

.google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Object.Retention.Mode

The mode.

getModeValue()

public int getModeValue()

Optional. The mode of the Retention.

.google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for mode.

getRetainUntilTime()

public Timestamp getRetainUntilTime()

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The retainUntilTime.

getRetainUntilTimeBuilder()

public Timestamp.Builder getRetainUntilTimeBuilder()

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getRetainUntilTimeOrBuilder()

public TimestampOrBuilder getRetainUntilTimeOrBuilder()

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

hasRetainUntilTime()

public boolean hasRetainUntilTime()

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the retainUntilTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Object.Retention other)

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

mergeRetainUntilTime(Timestamp value)

public Object.Retention.Builder mergeRetainUntilTime(Timestamp value)

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Object.Retention.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Object.Retention.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Object.Retention.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

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

setMode(Object.Retention.Mode value)

public Object.Retention.Builder setMode(Object.Retention.Mode value)

Optional. The mode of the Retention.

.google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Object.Retention.Mode

The mode to set.

Returns
Type Description
Object.Retention.Builder

This builder for chaining.

setModeValue(int value)

public Object.Retention.Builder setModeValue(int value)

Optional. The mode of the Retention.

.google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
Object.Retention.Builder

This builder for chaining.

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

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

setRetainUntilTime(Timestamp value)

public Object.Retention.Builder setRetainUntilTime(Timestamp value)

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Object.Retention.Builder

setRetainUntilTime(Timestamp.Builder builderForValue)

public Object.Retention.Builder setRetainUntilTime(Timestamp.Builder builderForValue)

Optional. The timestamp that the object needs to be retained until. Value cannot be set in the past or more than 100 years in the future.

.google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Object.Retention.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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