Class ExpirationPolicy (1.132.0)

public final class ExpirationPolicy extends GeneratedMessageV3 implements ExpirationPolicyOrBuilder

A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).

Protobuf type google.pubsub.v1.ExpirationPolicy

Static Fields

TTL_FIELD_NUMBER

public static final int TTL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ExpirationPolicy getDefaultInstance()
Returns
Type Description
ExpirationPolicy

getDescriptor()

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

newBuilder()

public static ExpirationPolicy.Builder newBuilder()
Returns
Type Description
ExpirationPolicy.Builder

newBuilder(ExpirationPolicy prototype)

public static ExpirationPolicy.Builder newBuilder(ExpirationPolicy prototype)
Parameter
Name Description
prototype ExpirationPolicy
Returns
Type Description
ExpirationPolicy.Builder

parseDelimitedFrom(InputStream input)

public static ExpirationPolicy parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ExpirationPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ExpirationPolicy parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ExpirationPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ExpirationPolicy parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ExpirationPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ExpirationPolicy parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ExpirationPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ExpirationPolicy parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ExpirationPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ExpirationPolicy parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ExpirationPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExpirationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ExpirationPolicy> parser()
Returns
Type Description
Parser<ExpirationPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public ExpirationPolicy getDefaultInstanceForType()
Returns
Type Description
ExpirationPolicy

getParserForType()

public Parser<ExpirationPolicy> getParserForType()
Returns
Type Description
Parser<ExpirationPolicy>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTtl()

public Duration getTtl()

Optional. Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. The definition of "activity" depends on the type of the associated resource. The minimum and maximum allowed values for ttl depend on the type of the associated resource, as well. If ttl is not set, the associated resource never expires.

.google.protobuf.Duration ttl = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The ttl.

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

Optional. Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. The definition of "activity" depends on the type of the associated resource. The minimum and maximum allowed values for ttl depend on the type of the associated resource, as well. If ttl is not set, the associated resource never expires.

.google.protobuf.Duration ttl = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

hasTtl()

public boolean hasTtl()

Optional. Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. The definition of "activity" depends on the type of the associated resource. The minimum and maximum allowed values for ttl depend on the type of the associated resource, as well. If ttl is not set, the associated resource never expires.

.google.protobuf.Duration ttl = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the ttl field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ExpirationPolicy.Builder newBuilderForType()
Returns
Type Description
ExpirationPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ExpirationPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ExpirationPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ExpirationPolicy.Builder toBuilder()
Returns
Type Description
ExpirationPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException