Class ConsumerGroup.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
com.google.cloud.managedkafka.v1.ConsumerGroup.Builder
All Implemented Interfaces:
ConsumerGroupOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ConsumerGroup

public static final class ConsumerGroup.Builder extends com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder> implements ConsumerGroupOrBuilder
 A Kafka consumer group in a given cluster.
 
Protobuf type google.cloud.managedkafka.v1.ConsumerGroup
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
    • clear

      public ConsumerGroup.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
    • getDefaultInstanceForType

      public ConsumerGroup getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ConsumerGroup build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ConsumerGroup buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ConsumerGroup.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ConsumerGroup.Builder>
    • mergeFrom

      public ConsumerGroup.Builder mergeFrom(ConsumerGroup other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ConsumerGroup.Builder>
    • mergeFrom

      public ConsumerGroup.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ConsumerGroup.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getName in interface ConsumerGroupOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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];
      Specified by:
      getNameBytes in interface ConsumerGroupOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setNameBytes

      public ConsumerGroup.Builder setNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getTopicsCount

      public int getTopicsCount()
      Description copied from interface: ConsumerGroupOrBuilder
       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];
      Specified by:
      getTopicsCount in interface ConsumerGroupOrBuilder
    • containsTopics

      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];
      Specified by:
      containsTopics in interface ConsumerGroupOrBuilder
    • getTopics

      Deprecated.
      Use getTopicsMap() instead.
      Specified by:
      getTopics in interface ConsumerGroupOrBuilder
    • 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];
      Specified by:
      getTopicsMap in interface ConsumerGroupOrBuilder
    • getTopicsOrDefault

      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];
      Specified by:
      getTopicsOrDefault in interface ConsumerGroupOrBuilder
    • getTopicsOrThrow

      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];
      Specified by:
      getTopicsOrThrow in interface ConsumerGroupOrBuilder
    • clearTopics

      public ConsumerGroup.Builder clearTopics()
    • removeTopics

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

      @Deprecated public Map<String,ConsumerTopicMetadata> getMutableTopics()
      Deprecated.
      Use alternate mutation accessors instead.
    • putTopics

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

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

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