Class Bucket.RetentionPolicy (2.20.1)

public static final class Bucket.RetentionPolicy extends GeneratedMessageV3 implements Bucket.RetentionPolicyOrBuilder

Retention policy properties of a bucket.

Protobuf type google.storage.v2.Bucket.RetentionPolicy

Static Fields

EFFECTIVE_TIME_FIELD_NUMBER

public static final int EFFECTIVE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

IS_LOCKED_FIELD_NUMBER

public static final int IS_LOCKED_FIELD_NUMBER
Field Value
TypeDescription
int

RETENTION_DURATION_FIELD_NUMBER

public static final int RETENTION_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

RETENTION_PERIOD_FIELD_NUMBER

public static final int RETENTION_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Bucket.RetentionPolicy getDefaultInstance()
Returns
TypeDescription
Bucket.RetentionPolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Bucket.RetentionPolicy.Builder newBuilder()
Returns
TypeDescription
Bucket.RetentionPolicy.Builder

newBuilder(Bucket.RetentionPolicy prototype)

public static Bucket.RetentionPolicy.Builder newBuilder(Bucket.RetentionPolicy prototype)
Parameter
NameDescription
prototypeBucket.RetentionPolicy
Returns
TypeDescription
Bucket.RetentionPolicy.Builder

parseDelimitedFrom(InputStream input)

public static Bucket.RetentionPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.RetentionPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Bucket.RetentionPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Bucket.RetentionPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Bucket.RetentionPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Bucket.RetentionPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Bucket.RetentionPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.RetentionPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Bucket.RetentionPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.RetentionPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Bucket.RetentionPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Bucket.RetentionPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.RetentionPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Bucket.RetentionPolicy> parser()
Returns
TypeDescription
Parser<RetentionPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Bucket.RetentionPolicy getDefaultInstanceForType()
Returns
TypeDescription
Bucket.RetentionPolicy

getEffectiveTime()

public Timestamp getEffectiveTime()

Server-determined value that indicates the time from which policy was enforced and effective.

.google.protobuf.Timestamp effective_time = 1;

Returns
TypeDescription
Timestamp

The effectiveTime.

getEffectiveTimeOrBuilder()

public TimestampOrBuilder getEffectiveTimeOrBuilder()

Server-determined value that indicates the time from which policy was enforced and effective.

.google.protobuf.Timestamp effective_time = 1;

Returns
TypeDescription
TimestampOrBuilder

getIsLocked()

public boolean getIsLocked()

Once locked, an object retention policy cannot be modified.

bool is_locked = 2;

Returns
TypeDescription
boolean

The isLocked.

getParserForType()

public Parser<Bucket.RetentionPolicy> getParserForType()
Returns
TypeDescription
Parser<RetentionPolicy>
Overrides

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;

Returns
TypeDescription
Duration

The retentionDuration.

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;

Returns
TypeDescription
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;

Returns
TypeDescription
long

The retentionPeriod.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasEffectiveTime()

public boolean hasEffectiveTime()

Server-determined value that indicates the time from which policy was enforced and effective.

.google.protobuf.Timestamp effective_time = 1;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
boolean

Whether the retentionPeriod field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Bucket.RetentionPolicy.Builder newBuilderForType()
Returns
TypeDescription
Bucket.RetentionPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Bucket.RetentionPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Bucket.RetentionPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Bucket.RetentionPolicy.Builder toBuilder()
Returns
TypeDescription
Bucket.RetentionPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException