Class ConsumerPartitionMetadata.Builder

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

public static final class ConsumerPartitionMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<ConsumerPartitionMetadata.Builder> implements ConsumerPartitionMetadataOrBuilder
 Metadata for a consumer group corresponding to a specific partition.
 
Protobuf type google.cloud.managedkafka.v1.ConsumerPartitionMetadata
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ConsumerPartitionMetadata.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<ConsumerPartitionMetadata.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<ConsumerPartitionMetadata.Builder>
    • getDefaultInstanceForType

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

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

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

      public ConsumerPartitionMetadata.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<ConsumerPartitionMetadata.Builder>
    • mergeFrom

    • isInitialized

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

      public ConsumerPartitionMetadata.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<ConsumerPartitionMetadata.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getOffset in interface ConsumerPartitionMetadataOrBuilder
      Returns:
      The offset.
    • setOffset

      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];
      Parameters:
      value - The offset to set.
      Returns:
      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:
      This builder for chaining.
    • 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];
      Specified by:
      getMetadata in interface ConsumerPartitionMetadataOrBuilder
      Returns:
      The metadata.
    • getMetadataBytes

      public com.google.protobuf.ByteString getMetadataBytes()
       Optional. The associated metadata for this partition, or empty if it does
       not exist.
       
      string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMetadataBytes in interface ConsumerPartitionMetadataOrBuilder
      Returns:
      The bytes for metadata.
    • setMetadata

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

      public ConsumerPartitionMetadata.Builder setMetadataBytes(com.google.protobuf.ByteString value)
       Optional. The associated metadata for this partition, or empty if it does
       not exist.
       
      string metadata = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for metadata to set.
      Returns:
      This builder for chaining.