Class Topic.PartitionConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
com.google.cloud.pubsublite.proto.Topic.PartitionConfig.Builder
All Implemented Interfaces:
Topic.PartitionConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Topic.PartitionConfig

public static final class Topic.PartitionConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder> implements Topic.PartitionConfigOrBuilder
 The settings for a topic's partitions.
 
Protobuf type google.cloud.pubsublite.v1.Topic.PartitionConfig
  • Method Details

    • getDescriptor

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

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

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

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

      public Topic.PartitionConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • setField

      public Topic.PartitionConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • clearField

      public Topic.PartitionConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • clearOneof

      public Topic.PartitionConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • setRepeatedField

      public Topic.PartitionConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • addRepeatedField

      public Topic.PartitionConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • mergeFrom

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

    • isInitialized

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

      public Topic.PartitionConfig.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<Topic.PartitionConfig.Builder>
      Throws:
      IOException
    • getDimensionCase

      public Topic.PartitionConfig.DimensionCase getDimensionCase()
      Specified by:
      getDimensionCase in interface Topic.PartitionConfigOrBuilder
    • clearDimension

      public Topic.PartitionConfig.Builder clearDimension()
    • getCount

      public long getCount()
       The number of partitions in the topic. Must be at least 1.
      
       Once a topic has been created the number of partitions can be increased
       but not decreased. Message ordering is not guaranteed across a topic
       resize. For more information see
       https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
       
      int64 count = 1;
      Specified by:
      getCount in interface Topic.PartitionConfigOrBuilder
      Returns:
      The count.
    • setCount

      public Topic.PartitionConfig.Builder setCount(long value)
       The number of partitions in the topic. Must be at least 1.
      
       Once a topic has been created the number of partitions can be increased
       but not decreased. Message ordering is not guaranteed across a topic
       resize. For more information see
       https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
       
      int64 count = 1;
      Parameters:
      value - The count to set.
      Returns:
      This builder for chaining.
    • clearCount

      public Topic.PartitionConfig.Builder clearCount()
       The number of partitions in the topic. Must be at least 1.
      
       Once a topic has been created the number of partitions can be increased
       but not decreased. Message ordering is not guaranteed across a topic
       resize. For more information see
       https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
       
      int64 count = 1;
      Returns:
      This builder for chaining.
    • hasScale

      @Deprecated public boolean hasScale()
      Deprecated.
      google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138
       DEPRECATED: Use capacity instead which can express a superset of
       configurations.
      
       Every partition in the topic is allocated throughput equivalent to
       `scale` times the standard partition throughput (4 MiB/s). This is also
       reflected in the cost of this topic; a topic with `scale` of 2 and
       count of 10 is charged for 20 partitions. This value must be in the
       range [1,4].
       
      int32 scale = 2 [deprecated = true];
      Specified by:
      hasScale in interface Topic.PartitionConfigOrBuilder
      Returns:
      Whether the scale field is set.
    • getScale

      @Deprecated public int getScale()
      Deprecated.
      google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138
       DEPRECATED: Use capacity instead which can express a superset of
       configurations.
      
       Every partition in the topic is allocated throughput equivalent to
       `scale` times the standard partition throughput (4 MiB/s). This is also
       reflected in the cost of this topic; a topic with `scale` of 2 and
       count of 10 is charged for 20 partitions. This value must be in the
       range [1,4].
       
      int32 scale = 2 [deprecated = true];
      Specified by:
      getScale in interface Topic.PartitionConfigOrBuilder
      Returns:
      The scale.
    • setScale

      @Deprecated public Topic.PartitionConfig.Builder setScale(int value)
      Deprecated.
      google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138
       DEPRECATED: Use capacity instead which can express a superset of
       configurations.
      
       Every partition in the topic is allocated throughput equivalent to
       `scale` times the standard partition throughput (4 MiB/s). This is also
       reflected in the cost of this topic; a topic with `scale` of 2 and
       count of 10 is charged for 20 partitions. This value must be in the
       range [1,4].
       
      int32 scale = 2 [deprecated = true];
      Parameters:
      value - The scale to set.
      Returns:
      This builder for chaining.
    • clearScale

      Deprecated.
      google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138
       DEPRECATED: Use capacity instead which can express a superset of
       configurations.
      
       Every partition in the topic is allocated throughput equivalent to
       `scale` times the standard partition throughput (4 MiB/s). This is also
       reflected in the cost of this topic; a topic with `scale` of 2 and
       count of 10 is charged for 20 partitions. This value must be in the
       range [1,4].
       
      int32 scale = 2 [deprecated = true];
      Returns:
      This builder for chaining.
    • hasCapacity

      public boolean hasCapacity()
       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
      Specified by:
      hasCapacity in interface Topic.PartitionConfigOrBuilder
      Returns:
      Whether the capacity field is set.
    • getCapacity

      public Topic.PartitionConfig.Capacity getCapacity()
       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
      Specified by:
      getCapacity in interface Topic.PartitionConfigOrBuilder
      Returns:
      The capacity.
    • setCapacity

       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
    • setCapacity

       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
    • mergeCapacity

       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
    • clearCapacity

      public Topic.PartitionConfig.Builder clearCapacity()
       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
    • getCapacityBuilder

      public Topic.PartitionConfig.Capacity.Builder getCapacityBuilder()
       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
    • getCapacityOrBuilder

      public Topic.PartitionConfig.CapacityOrBuilder getCapacityOrBuilder()
       The capacity configuration.
       
      .google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;
      Specified by:
      getCapacityOrBuilder in interface Topic.PartitionConfigOrBuilder
    • setUnknownFields

      public final Topic.PartitionConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>
    • mergeUnknownFields

      public final Topic.PartitionConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder>