Class Object.Retention.Builder (2.62.1)

public static final class Object.Retention.Builder extends GeneratedMessage.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

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

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.

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

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

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.

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