Class ObjectRetention.Builder (0.22.0)

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public ObjectRetention.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
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.

clone()

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

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public ObjectRetention.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
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.

setUnknownFields(UnknownFieldSet unknownFields)

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