Class ConsumerGroup.Builder (0.4.0)

public static final class ConsumerGroup.Builder extends GeneratedMessageV3.Builder<ConsumerGroup.Builder> implements ConsumerGroupOrBuilder

A Kafka consumer group in a given cluster.

Protobuf type google.cloud.managedkafka.v1.ConsumerGroup

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ConsumerGroup build()
Returns
Type Description
ConsumerGroup

buildPartial()

public ConsumerGroup buildPartial()
Returns
Type Description
ConsumerGroup

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public ConsumerGroup.Builder clearName()

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ConsumerGroup.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTopics()

public ConsumerGroup.Builder clearTopics()
Returns
Type Description
ConsumerGroup.Builder

clone()

public ConsumerGroup.Builder clone()
Returns
Type Description
ConsumerGroup.Builder
Overrides

containsTopics(String key)

public boolean containsTopics(String key)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public ConsumerGroup getDefaultInstanceForType()
Returns
Type Description
ConsumerGroup

getDescriptorForType()

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

getMutableTopics() (deprecated)

public Map<String,ConsumerTopicMetadata> getMutableTopics()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,ConsumerTopicMetadata>

getName()

public String getName()

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getTopics() (deprecated)

public Map<String,ConsumerTopicMetadata> getTopics()

Use #getTopicsMap() instead.

Returns
Type Description
Map<String,ConsumerTopicMetadata>

getTopicsCount()

public int getTopicsCount()

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getTopicsMap()

public Map<String,ConsumerTopicMetadata> getTopicsMap()

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,ConsumerTopicMetadata>

getTopicsOrDefault(String key, ConsumerTopicMetadata defaultValue)

public ConsumerTopicMetadata getTopicsOrDefault(String key, ConsumerTopicMetadata defaultValue)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue ConsumerTopicMetadata
Returns
Type Description
ConsumerTopicMetadata

getTopicsOrThrow(String key)

public ConsumerTopicMetadata getTopicsOrThrow(String key)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
ConsumerTopicMetadata

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ConsumerGroup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllTopics(Map<String,ConsumerTopicMetadata> values)

public ConsumerGroup.Builder putAllTopics(Map<String,ConsumerTopicMetadata> values)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,ConsumerTopicMetadata>
Returns
Type Description
ConsumerGroup.Builder

putTopics(String key, ConsumerTopicMetadata value)

public ConsumerGroup.Builder putTopics(String key, ConsumerTopicMetadata value)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value ConsumerTopicMetadata
Returns
Type Description
ConsumerGroup.Builder

putTopicsBuilderIfAbsent(String key)

public ConsumerTopicMetadata.Builder putTopicsBuilderIfAbsent(String key)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
ConsumerTopicMetadata.Builder

removeTopics(String key)

public ConsumerGroup.Builder removeTopics(String key)

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

map<string, .google.cloud.managedkafka.v1.ConsumerTopicMetadata> topics = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
ConsumerGroup.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public ConsumerGroup.Builder setName(String value)

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ConsumerGroup.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ConsumerGroup.Builder setNameBytes(ByteString value)

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ConsumerGroup.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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