public static final class Bucket.RetentionPolicy.Builder extends GeneratedMessageV3.Builder<Bucket.RetentionPolicy.Builder> implements Bucket.RetentionPolicyOrBuilder
Retention policy properties of a bucket.
Protobuf type google.storage.v2.Bucket.RetentionPolicy
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Bucket.RetentionPolicy.BuilderImplements
Bucket.RetentionPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Bucket.RetentionPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field |
FieldDescriptor |
value |
Object |
Type | Description |
Bucket.RetentionPolicy.Builder |
build()
public Bucket.RetentionPolicy build()
Type | Description |
Bucket.RetentionPolicy |
buildPartial()
public Bucket.RetentionPolicy buildPartial()
Type | Description |
Bucket.RetentionPolicy |
clear()
public Bucket.RetentionPolicy.Builder clear()
Type | Description |
Bucket.RetentionPolicy.Builder |
clearEffectiveTime()
public Bucket.RetentionPolicy.Builder clearEffectiveTime()
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Type | Description |
Bucket.RetentionPolicy.Builder |
clearField(Descriptors.FieldDescriptor field)
public Bucket.RetentionPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field |
FieldDescriptor |
Type | Description |
Bucket.RetentionPolicy.Builder |
clearIsLocked()
public Bucket.RetentionPolicy.Builder clearIsLocked()
Once locked, an object retention policy cannot be modified.
bool is_locked = 2;
Type | Description |
Bucket.RetentionPolicy.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Bucket.RetentionPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof |
OneofDescriptor |
Type | Description |
Bucket.RetentionPolicy.Builder |
clearRetentionDuration()
public Bucket.RetentionPolicy.Builder clearRetentionDuration()
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Type | Description |
Bucket.RetentionPolicy.Builder |
clearRetentionPeriod()
public Bucket.RetentionPolicy.Builder clearRetentionPeriod()
The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.
optional int64 retention_period = 3;
Type | Description |
Bucket.RetentionPolicy.Builder |
This builder for chaining. |
clone()
public Bucket.RetentionPolicy.Builder clone()
Type | Description |
Bucket.RetentionPolicy.Builder |
getDefaultInstanceForType()
public Bucket.RetentionPolicy getDefaultInstanceForType()
Type | Description |
Bucket.RetentionPolicy |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getEffectiveTime()
public Timestamp getEffectiveTime()
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Type | Description |
Timestamp |
The effectiveTime. |
getEffectiveTimeBuilder()
public Timestamp.Builder getEffectiveTimeBuilder()
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Type | Description |
Builder |
getEffectiveTimeOrBuilder()
public TimestampOrBuilder getEffectiveTimeOrBuilder()
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Type | Description |
TimestampOrBuilder |
getIsLocked()
public boolean getIsLocked()
Once locked, an object retention policy cannot be modified.
bool is_locked = 2;
Type | Description |
boolean |
The isLocked. |
getRetentionDuration()
public Duration getRetentionDuration()
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Type | Description |
Duration |
The retentionDuration. |
getRetentionDurationBuilder()
public Duration.Builder getRetentionDurationBuilder()
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Type | Description |
Builder |
getRetentionDurationOrBuilder()
public DurationOrBuilder getRetentionDurationOrBuilder()
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Type | Description |
DurationOrBuilder |
getRetentionPeriod()
public long getRetentionPeriod()
The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.
optional int64 retention_period = 3;
Type | Description |
long |
The retentionPeriod. |
hasEffectiveTime()
public boolean hasEffectiveTime()
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Type | Description |
boolean |
Whether the effectiveTime field is set. |
hasRetentionDuration()
public boolean hasRetentionDuration()
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Type | Description |
boolean |
Whether the retentionDuration field is set. |
hasRetentionPeriod()
public boolean hasRetentionPeriod()
The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.
optional int64 retention_period = 3;
Type | Description |
boolean |
Whether the retentionPeriod field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeEffectiveTime(Timestamp value)
public Bucket.RetentionPolicy.Builder mergeEffectiveTime(Timestamp value)
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Name | Description |
value |
Timestamp |
Type | Description |
Bucket.RetentionPolicy.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Bucket.RetentionPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Type | Description |
Bucket.RetentionPolicy.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Bucket.RetentionPolicy.Builder mergeFrom(Message other)
Name | Description |
other |
Message |
Type | Description |
Bucket.RetentionPolicy.Builder |
mergeFrom(Bucket.RetentionPolicy other)
public Bucket.RetentionPolicy.Builder mergeFrom(Bucket.RetentionPolicy other)
Name | Description |
other |
Bucket.RetentionPolicy |
Type | Description |
Bucket.RetentionPolicy.Builder |
mergeRetentionDuration(Duration value)
public Bucket.RetentionPolicy.Builder mergeRetentionDuration(Duration value)
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Name | Description |
value |
Duration |
Type | Description |
Bucket.RetentionPolicy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Bucket.RetentionPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields |
UnknownFieldSet |
Type | Description |
Bucket.RetentionPolicy.Builder |
setEffectiveTime(Timestamp value)
public Bucket.RetentionPolicy.Builder setEffectiveTime(Timestamp value)
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Name | Description |
value |
Timestamp |
Type | Description |
Bucket.RetentionPolicy.Builder |
setEffectiveTime(Timestamp.Builder builderForValue)
public Bucket.RetentionPolicy.Builder setEffectiveTime(Timestamp.Builder builderForValue)
Server-determined value that indicates the time from which policy was enforced and effective.
.google.protobuf.Timestamp effective_time = 1;
Name | Description |
builderForValue |
Builder |
Type | Description |
Bucket.RetentionPolicy.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Bucket.RetentionPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field |
FieldDescriptor |
value |
Object |
Type | Description |
Bucket.RetentionPolicy.Builder |
setIsLocked(boolean value)
public Bucket.RetentionPolicy.Builder setIsLocked(boolean value)
Once locked, an object retention policy cannot be modified.
bool is_locked = 2;
Name | Description |
value |
boolean The isLocked to set. |
Type | Description |
Bucket.RetentionPolicy.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Bucket.RetentionPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Type | Description |
Bucket.RetentionPolicy.Builder |
setRetentionDuration(Duration value)
public Bucket.RetentionPolicy.Builder setRetentionDuration(Duration value)
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Name | Description |
value |
Duration |
Type | Description |
Bucket.RetentionPolicy.Builder |
setRetentionDuration(Duration.Builder builderForValue)
public Bucket.RetentionPolicy.Builder setRetentionDuration(Duration.Builder builderForValue)
The duration that objects need to be retained. Retention duration must be
greater than zero and less than 100 years. Note that enforcement of
retention periods less than a day is not guaranteed. Such periods should
only be used for testing purposes. Any nanos
value specified will be
rounded down to the nearest second.
.google.protobuf.Duration retention_duration = 4;
Name | Description |
builderForValue |
Builder |
Type | Description |
Bucket.RetentionPolicy.Builder |
setRetentionPeriod(long value)
public Bucket.RetentionPolicy.Builder setRetentionPeriod(long value)
The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.
optional int64 retention_period = 3;
Name | Description |
value |
long The retentionPeriod to set. |
Type | Description |
Bucket.RetentionPolicy.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Bucket.RetentionPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields |
UnknownFieldSet |
Type | Description |
Bucket.RetentionPolicy.Builder |