Class ExpirationPolicy.Builder (1.127.3)

public static final class ExpirationPolicy.Builder extends GeneratedMessageV3.Builder<ExpirationPolicy.Builder> implements ExpirationPolicyOrBuilder

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

Protobuf type google.pubsub.v1.ExpirationPolicy

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ExpirationPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

build()

public ExpirationPolicy build()
Returns
TypeDescription
ExpirationPolicy

buildPartial()

public ExpirationPolicy buildPartial()
Returns
TypeDescription
ExpirationPolicy

clear()

public ExpirationPolicy.Builder clear()
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ExpirationPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ExpirationPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

clearTtl()

public ExpirationPolicy.Builder clearTtl()

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
TypeDescription
ExpirationPolicy.Builder

clone()

public ExpirationPolicy.Builder clone()
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

getDefaultInstanceForType()

public ExpirationPolicy getDefaultInstanceForType()
Returns
TypeDescription
ExpirationPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
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
TypeDescription
Duration

The ttl.

getTtlBuilder()

public Duration.Builder getTtlBuilder()

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
TypeDescription
Builder

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
TypeDescription
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
TypeDescription
boolean

Whether the ttl field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ExpirationPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ExpirationPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

mergeFrom(ExpirationPolicy other)

public ExpirationPolicy.Builder mergeFrom(ExpirationPolicy other)
Parameter
NameDescription
otherExpirationPolicy
Returns
TypeDescription
ExpirationPolicy.Builder

mergeTtl(Duration value)

public ExpirationPolicy.Builder mergeTtl(Duration value)

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];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
ExpirationPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ExpirationPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ExpirationPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

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

public ExpirationPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides

setTtl(Duration value)

public ExpirationPolicy.Builder setTtl(Duration value)

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];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
ExpirationPolicy.Builder

setTtl(Duration.Builder builderForValue)

public ExpirationPolicy.Builder setTtl(Duration.Builder builderForValue)

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];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ExpirationPolicy.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ExpirationPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ExpirationPolicy.Builder
Overrides