Class ObjectRetention.Builder (0.23.0)

public static final class ObjectRetention.Builder extends GeneratedMessage.Builder<ObjectRetention.Builder> implements ObjectRetentionOrBuilder

Describes options for object retention update.

Protobuf type google.cloud.storagebatchoperations.v1.ObjectRetention

Static Methods

getDescriptor()

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

Methods

build()

public ObjectRetention build()
Returns
Type Description
ObjectRetention

buildPartial()

public ObjectRetention buildPartial()
Returns
Type Description
ObjectRetention

clear()

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

clearRetainUntilTime()

public ObjectRetention.Builder clearRetainUntilTime()

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

optional string retain_until_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ObjectRetention.Builder

This builder for chaining.

clearRetentionMode()

public ObjectRetention.Builder clearRetentionMode()

Required. The retention mode of the object.

optional .google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode retention_mode = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ObjectRetention.Builder

This builder for chaining.

getDefaultInstanceForType()

public ObjectRetention getDefaultInstanceForType()
Returns
Type Description
ObjectRetention

getDescriptorForType()

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

getRetainUntilTime()

public String getRetainUntilTime()

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

optional string retain_until_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The retainUntilTime.

getRetainUntilTimeBytes()

public ByteString getRetainUntilTimeBytes()

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

optional string retain_until_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for retainUntilTime.

getRetentionMode()

public ObjectRetention.RetentionMode getRetentionMode()

Required. The retention mode of the object.

optional .google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode retention_mode = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ObjectRetention.RetentionMode

The retentionMode.

getRetentionModeValue()

public int getRetentionModeValue()

Required. The retention mode of the object.

optional .google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode retention_mode = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for retentionMode.

hasRetainUntilTime()

public boolean hasRetainUntilTime()

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

optional string retain_until_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the retainUntilTime field is set.

hasRetentionMode()

public boolean hasRetentionMode()

Required. The retention mode of the object.

optional .google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode retention_mode = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the retentionMode field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ObjectRetention other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setRetainUntilTime(String value)

public ObjectRetention.Builder setRetainUntilTime(String value)

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

optional string retain_until_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The retainUntilTime to set.

Returns
Type Description
ObjectRetention.Builder

This builder for chaining.

setRetainUntilTimeBytes(ByteString value)

public ObjectRetention.Builder setRetainUntilTimeBytes(ByteString value)

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

optional string retain_until_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for retainUntilTime to set.

Returns
Type Description
ObjectRetention.Builder

This builder for chaining.

setRetentionMode(ObjectRetention.RetentionMode value)

public ObjectRetention.Builder setRetentionMode(ObjectRetention.RetentionMode value)

Required. The retention mode of the object.

optional .google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode retention_mode = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ObjectRetention.RetentionMode

The retentionMode to set.

Returns
Type Description
ObjectRetention.Builder

This builder for chaining.

setRetentionModeValue(int value)

public ObjectRetention.Builder setRetentionModeValue(int value)

Required. The retention mode of the object.

optional .google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode retention_mode = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
ObjectRetention.Builder

This builder for chaining.