Class ConsumerPartitionMetadata.Builder (0.39.0)

public static final class ConsumerPartitionMetadata.Builder extends GeneratedMessage.Builder<ConsumerPartitionMetadata.Builder> implements ConsumerPartitionMetadataOrBuilder

Metadata for a consumer group corresponding to a specific partition.

Protobuf type google.cloud.managedkafka.v1.ConsumerPartitionMetadata

Static Methods

getDescriptor()

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

Methods

build()

public ConsumerPartitionMetadata build()
Returns
Type Description
ConsumerPartitionMetadata

buildPartial()

public ConsumerPartitionMetadata buildPartial()
Returns
Type Description
ConsumerPartitionMetadata

clear()

public ConsumerPartitionMetadata.Builder clear()
Returns
Type Description
ConsumerPartitionMetadata.Builder
Overrides

clearMetadata()

public ConsumerPartitionMetadata.Builder clearMetadata()

Optional. The associated metadata for this partition, or empty if it does not exist.

string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConsumerPartitionMetadata.Builder

This builder for chaining.

clearOffset()

public ConsumerPartitionMetadata.Builder clearOffset()

Required. The current offset for this partition, or 0 if no offset has been committed.

int64 offset = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ConsumerPartitionMetadata.Builder

This builder for chaining.

getDefaultInstanceForType()

public ConsumerPartitionMetadata getDefaultInstanceForType()
Returns
Type Description
ConsumerPartitionMetadata

getDescriptorForType()

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

getMetadata()

public String getMetadata()

Optional. The associated metadata for this partition, or empty if it does not exist.

string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The metadata.

getMetadataBytes()

public ByteString getMetadataBytes()

Optional. The associated metadata for this partition, or empty if it does not exist.

string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for metadata.

getOffset()

public long getOffset()

Required. The current offset for this partition, or 0 if no offset has been committed.

int64 offset = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
long

The offset.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ConsumerPartitionMetadata other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setMetadata(String value)

public ConsumerPartitionMetadata.Builder setMetadata(String value)

Optional. The associated metadata for this partition, or empty if it does not exist.

string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The metadata to set.

Returns
Type Description
ConsumerPartitionMetadata.Builder

This builder for chaining.

setMetadataBytes(ByteString value)

public ConsumerPartitionMetadata.Builder setMetadataBytes(ByteString value)

Optional. The associated metadata for this partition, or empty if it does not exist.

string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for metadata to set.

Returns
Type Description
ConsumerPartitionMetadata.Builder

This builder for chaining.

setOffset(long value)

public ConsumerPartitionMetadata.Builder setOffset(long value)

Required. The current offset for this partition, or 0 if no offset has been committed.

int64 offset = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value long

The offset to set.

Returns
Type Description
ConsumerPartitionMetadata.Builder

This builder for chaining.