Class Topic.RetentionConfig.Builder (1.13.8)

public static final class Topic.RetentionConfig.Builder extends GeneratedMessageV3.Builder<Topic.RetentionConfig.Builder> implements Topic.RetentionConfigOrBuilder

The settings for a topic's message retention.

Protobuf type google.cloud.pubsublite.v1.Topic.RetentionConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Topic.RetentionConfig build()
Returns
Type Description
Topic.RetentionConfig

buildPartial()

public Topic.RetentionConfig buildPartial()
Returns
Type Description
Topic.RetentionConfig

clear()

public Topic.RetentionConfig.Builder clear()
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public Topic.RetentionConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides

clearPerPartitionBytes()

public Topic.RetentionConfig.Builder clearPerPartitionBytes()

The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of period.

int64 per_partition_bytes = 1;

Returns
Type Description
Topic.RetentionConfig.Builder

This builder for chaining.

clearPeriod()

public Topic.RetentionConfig.Builder clearPeriod()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
Type Description
Topic.RetentionConfig.Builder

clone()

public Topic.RetentionConfig.Builder clone()
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides

getDefaultInstanceForType()

public Topic.RetentionConfig getDefaultInstanceForType()
Returns
Type Description
Topic.RetentionConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPerPartitionBytes()

public long getPerPartitionBytes()

The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of period.

int64 per_partition_bytes = 1;

Returns
Type Description
long

The perPartitionBytes.

getPeriod()

public Duration getPeriod()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
Type Description
Duration

The period.

getPeriodBuilder()

public Duration.Builder getPeriodBuilder()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
Type Description
Builder

getPeriodOrBuilder()

public DurationOrBuilder getPeriodOrBuilder()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
Type Description
DurationOrBuilder

hasPeriod()

public boolean hasPeriod()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
Type Description
boolean

Whether the period field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Topic.RetentionConfig other)

public Topic.RetentionConfig.Builder mergeFrom(Topic.RetentionConfig other)
Parameter
Name Description
other Topic.RetentionConfig
Returns
Type Description
Topic.RetentionConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Topic.RetentionConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Topic.RetentionConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides

mergePeriod(Duration value)

public Topic.RetentionConfig.Builder mergePeriod(Duration value)

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Parameter
Name Description
value Duration
Returns
Type Description
Topic.RetentionConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setPerPartitionBytes(long value)

public Topic.RetentionConfig.Builder setPerPartitionBytes(long value)

The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of period.

int64 per_partition_bytes = 1;

Parameter
Name Description
value long

The perPartitionBytes to set.

Returns
Type Description
Topic.RetentionConfig.Builder

This builder for chaining.

setPeriod(Duration value)

public Topic.RetentionConfig.Builder setPeriod(Duration value)

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Parameter
Name Description
value Duration
Returns
Type Description
Topic.RetentionConfig.Builder

setPeriod(Duration.Builder builderForValue)

public Topic.RetentionConfig.Builder setPeriod(Duration.Builder builderForValue)

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Topic.RetentionConfig.Builder

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

public Topic.RetentionConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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