Class Distribution.BucketOptions.Explicit.Builder

  • All Implemented Interfaces:
    Distribution.BucketOptions.ExplicitOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    Distribution.BucketOptions.Explicit

    public static final class Distribution.BucketOptions.Explicit.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<Distribution.BucketOptions.Explicit.Builder>
    implements Distribution.BucketOptions.ExplicitOrBuilder
     Specifies a set of buckets with arbitrary widths.
    
     There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
     boundaries:
    
     Upper bound (0 <= i < N-1):     bounds[i]
     Lower bound (1 <= i < N);       bounds[i - 1]
    
     The `bounds` field must contain at least one element. If `bounds` has
     only one element, then there are no finite buckets, and that single
     element is the common boundary of the overflow and underflow buckets.
     
    Protobuf type google.api.Distribution.BucketOptions.Explicit
    • Method Detail

      • 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<Distribution.BucketOptions.Explicit.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<Distribution.BucketOptions.Explicit.Builder>
      • getDefaultInstanceForType

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

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

        public Distribution.BucketOptions.Explicit buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public Distribution.BucketOptions.Explicit.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                              throws java.io.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<Distribution.BucketOptions.Explicit.Builder>
        Throws:
        java.io.IOException
      • getBounds

        public double getBounds​(int index)
         The values must be monotonically increasing.
         
        repeated double bounds = 1;
        Specified by:
        getBounds in interface Distribution.BucketOptions.ExplicitOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The bounds at the given index.
      • setBounds

        public Distribution.BucketOptions.Explicit.Builder setBounds​(int index,
                                                                     double value)
         The values must be monotonically increasing.
         
        repeated double bounds = 1;
        Parameters:
        index - The index to set the value at.
        value - The bounds to set.
        Returns:
        This builder for chaining.
      • addBounds

        public Distribution.BucketOptions.Explicit.Builder addBounds​(double value)
         The values must be monotonically increasing.
         
        repeated double bounds = 1;
        Parameters:
        value - The bounds to add.
        Returns:
        This builder for chaining.
      • addAllBounds

        public Distribution.BucketOptions.Explicit.Builder addAllBounds​(java.lang.Iterable<? extends java.lang.Double> values)
         The values must be monotonically increasing.
         
        repeated double bounds = 1;
        Parameters:
        values - The bounds to add.
        Returns:
        This builder for chaining.