Class DistributionValue.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DistributionValueOrBuilder, Cloneable
    Enclosing class:
    DistributionValue

    public static final class DistributionValue.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DistributionValue.Builder>
    implements DistributionValueOrBuilder
     Distribution contains summary statistics for a population of values. It
     optionally contains a histogram representing the distribution of those
     values across a set of buckets.
     
    Protobuf type opencensus.proto.metrics.v1.DistributionValue
    • Method Detail

      • 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<DistributionValue.Builder>
      • clear

        public DistributionValue.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<DistributionValue.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<DistributionValue.Builder>
      • getDefaultInstanceForType

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

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

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

        public DistributionValue.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<DistributionValue.Builder>
      • setField

        public DistributionValue.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<DistributionValue.Builder>
      • clearField

        public DistributionValue.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<DistributionValue.Builder>
      • clearOneof

        public DistributionValue.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<DistributionValue.Builder>
      • setRepeatedField

        public DistributionValue.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<DistributionValue.Builder>
      • addRepeatedField

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

        public DistributionValue.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<DistributionValue.Builder>
      • isInitialized

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

        public DistributionValue.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<DistributionValue.Builder>
        Throws:
        IOException
      • getCount

        public long getCount()
         The number of values in the population. Must be non-negative. This value
         must equal the sum of the values in bucket_counts if a histogram is
         provided.
         
        int64 count = 1;
        Specified by:
        getCount in interface DistributionValueOrBuilder
        Returns:
        The count.
      • setCount

        public DistributionValue.Builder setCount​(long value)
         The number of values in the population. Must be non-negative. This value
         must equal the sum of the values in bucket_counts if a histogram is
         provided.
         
        int64 count = 1;
        Parameters:
        value - The count to set.
        Returns:
        This builder for chaining.
      • clearCount

        public DistributionValue.Builder clearCount()
         The number of values in the population. Must be non-negative. This value
         must equal the sum of the values in bucket_counts if a histogram is
         provided.
         
        int64 count = 1;
        Returns:
        This builder for chaining.
      • getSum

        public double getSum()
         The sum of the values in the population. If count is zero then this field
         must be zero.
         
        double sum = 2;
        Specified by:
        getSum in interface DistributionValueOrBuilder
        Returns:
        The sum.
      • setSum

        public DistributionValue.Builder setSum​(double value)
         The sum of the values in the population. If count is zero then this field
         must be zero.
         
        double sum = 2;
        Parameters:
        value - The sum to set.
        Returns:
        This builder for chaining.
      • clearSum

        public DistributionValue.Builder clearSum()
         The sum of the values in the population. If count is zero then this field
         must be zero.
         
        double sum = 2;
        Returns:
        This builder for chaining.
      • getSumOfSquaredDeviation

        public double getSumOfSquaredDeviation()
         The sum of squared deviations from the mean of the values in the
         population. For values x_i this is:
             Sum[i=1..n]((x_i - mean)^2)
         Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
         describes Welford's method for accumulating this sum in one pass.
         If count is zero then this field must be zero.
         
        double sum_of_squared_deviation = 3;
        Specified by:
        getSumOfSquaredDeviation in interface DistributionValueOrBuilder
        Returns:
        The sumOfSquaredDeviation.
      • setSumOfSquaredDeviation

        public DistributionValue.Builder setSumOfSquaredDeviation​(double value)
         The sum of squared deviations from the mean of the values in the
         population. For values x_i this is:
             Sum[i=1..n]((x_i - mean)^2)
         Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
         describes Welford's method for accumulating this sum in one pass.
         If count is zero then this field must be zero.
         
        double sum_of_squared_deviation = 3;
        Parameters:
        value - The sumOfSquaredDeviation to set.
        Returns:
        This builder for chaining.
      • clearSumOfSquaredDeviation

        public DistributionValue.Builder clearSumOfSquaredDeviation()
         The sum of squared deviations from the mean of the values in the
         population. For values x_i this is:
             Sum[i=1..n]((x_i - mean)^2)
         Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
         describes Welford's method for accumulating this sum in one pass.
         If count is zero then this field must be zero.
         
        double sum_of_squared_deviation = 3;
        Returns:
        This builder for chaining.
      • hasBucketOptions

        public boolean hasBucketOptions()
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
        Specified by:
        hasBucketOptions in interface DistributionValueOrBuilder
        Returns:
        Whether the bucketOptions field is set.
      • getBucketOptions

        public DistributionValue.BucketOptions getBucketOptions()
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
        Specified by:
        getBucketOptions in interface DistributionValueOrBuilder
        Returns:
        The bucketOptions.
      • setBucketOptions

        public DistributionValue.Builder setBucketOptions​(DistributionValue.BucketOptions value)
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
      • setBucketOptions

        public DistributionValue.Builder setBucketOptions​(DistributionValue.BucketOptions.Builder builderForValue)
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
      • mergeBucketOptions

        public DistributionValue.Builder mergeBucketOptions​(DistributionValue.BucketOptions value)
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
      • clearBucketOptions

        public DistributionValue.Builder clearBucketOptions()
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
      • getBucketOptionsBuilder

        public DistributionValue.BucketOptions.Builder getBucketOptionsBuilder()
         Don't change bucket boundaries within a TimeSeries if your backend doesn't
         support this.
         TODO(issue #152): consider not required to send bucket options for
         optimization.
         
        .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
      • getBucketsList

        public List<DistributionValue.Bucket> getBucketsList()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsList in interface DistributionValueOrBuilder
      • getBucketsCount

        public int getBucketsCount()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsCount in interface DistributionValueOrBuilder
      • getBuckets

        public DistributionValue.Bucket getBuckets​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBuckets in interface DistributionValueOrBuilder
      • setBuckets

        public DistributionValue.Builder setBuckets​(int index,
                                                    DistributionValue.Bucket value)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • setBuckets

        public DistributionValue.Builder setBuckets​(int index,
                                                    DistributionValue.Bucket.Builder builderForValue)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • addBuckets

        public DistributionValue.Builder addBuckets​(DistributionValue.Bucket value)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • addBuckets

        public DistributionValue.Builder addBuckets​(int index,
                                                    DistributionValue.Bucket value)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • addBuckets

        public DistributionValue.Builder addBuckets​(DistributionValue.Bucket.Builder builderForValue)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • addBuckets

        public DistributionValue.Builder addBuckets​(int index,
                                                    DistributionValue.Bucket.Builder builderForValue)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • addAllBuckets

        public DistributionValue.Builder addAllBuckets​(Iterable<? extends DistributionValue.Bucket> values)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • clearBuckets

        public DistributionValue.Builder clearBuckets()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • removeBuckets

        public DistributionValue.Builder removeBuckets​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • getBucketsBuilder

        public DistributionValue.Bucket.Builder getBucketsBuilder​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • getBucketsOrBuilder

        public DistributionValue.BucketOrBuilder getBucketsOrBuilder​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsOrBuilder in interface DistributionValueOrBuilder
      • getBucketsOrBuilderList

        public List<? extends DistributionValue.BucketOrBuilder> getBucketsOrBuilderList()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
        Specified by:
        getBucketsOrBuilderList in interface DistributionValueOrBuilder
      • addBucketsBuilder

        public DistributionValue.Bucket.Builder addBucketsBuilder()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • addBucketsBuilder

        public DistributionValue.Bucket.Builder addBucketsBuilder​(int index)
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • getBucketsBuilderList

        public List<DistributionValue.Bucket.Builder> getBucketsBuilderList()
         If the distribution does not have a histogram, then omit this field.
         If there is a histogram, then the sum of the values in the Bucket counts
         must equal the value in the count field of the distribution.
         
        repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
      • setUnknownFields

        public final DistributionValue.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<DistributionValue.Builder>
      • mergeUnknownFields

        public final DistributionValue.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<DistributionValue.Builder>