// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/distribution.proto

package com.google.api;

/**
 * <pre>
 * `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.
 * The summary statistics are the count, mean, sum of the squared deviation from
 * the mean, the minimum, and the maximum of the set of population of values.
 * The histogram is based on a sequence of buckets and gives a count of values
 * that fall into each bucket. The boundaries of the buckets are given either
 * explicitly or by formulas for buckets of fixed or exponentially increasing
 * widths.
 * Although it is not forbidden, it is generally a bad idea to include
 * non-finite values (infinities or NaNs) in the population of values, as this
 * will render the `mean` and `sum_of_squared_deviation` fields meaningless.
 * </pre>
 *
 * Protobuf type {@code google.api.Distribution}
 */
public  final class Distribution extends
    com.google.protobuf.GeneratedMessageLite<
        Distribution, Distribution.Builder> implements
    // @@protoc_insertion_point(message_implements:google.api.Distribution)
    DistributionOrBuilder {
  private Distribution() {
    bucketCounts_ = emptyLongList();
    exemplars_ = emptyProtobufList();
  }
  public interface RangeOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.api.Distribution.Range)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <pre>
     * The minimum of the population values.
     * </pre>
     *
     * <code>double min = 1;</code>
     * @return The min.
     */
    double getMin();

    /**
     * <pre>
     * The maximum of the population values.
     * </pre>
     *
     * <code>double max = 2;</code>
     * @return The max.
     */
    double getMax();
  }
  /**
   * <pre>
   * The range of the population values.
   * </pre>
   *
   * Protobuf type {@code google.api.Distribution.Range}
   */
  public  static final class Range extends
      com.google.protobuf.GeneratedMessageLite<
          Range, Range.Builder> implements
      // @@protoc_insertion_point(message_implements:google.api.Distribution.Range)
      RangeOrBuilder {
    private Range() {
    }
    public static final int MIN_FIELD_NUMBER = 1;
    private double min_;
    /**
     * <pre>
     * The minimum of the population values.
     * </pre>
     *
     * <code>double min = 1;</code>
     * @return The min.
     */
    @java.lang.Override
    public double getMin() {
      return min_;
    }
    /**
     * <pre>
     * The minimum of the population values.
     * </pre>
     *
     * <code>double min = 1;</code>
     * @param value The min to set.
     */
    private void setMin(double value) {
      
      min_ = value;
    }
    /**
     * <pre>
     * The minimum of the population values.
     * </pre>
     *
     * <code>double min = 1;</code>
     */
    private void clearMin() {
      
      min_ = 0D;
    }

    public static final int MAX_FIELD_NUMBER = 2;
    private double max_;
    /**
     * <pre>
     * The maximum of the population values.
     * </pre>
     *
     * <code>double max = 2;</code>
     * @return The max.
     */
    @java.lang.Override
    public double getMax() {
      return max_;
    }
    /**
     * <pre>
     * The maximum of the population values.
     * </pre>
     *
     * <code>double max = 2;</code>
     * @param value The max to set.
     */
    private void setMax(double value) {
      
      max_ = value;
    }
    /**
     * <pre>
     * The maximum of the population values.
     * </pre>
     *
     * <code>double max = 2;</code>
     */
    private void clearMax() {
      
      max_ = 0D;
    }

    public static com.google.api.Distribution.Range parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.Range parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.Range parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.Range parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.Range parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.Range parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.Range parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.Range parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Distribution.Range parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.Range parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Distribution.Range parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.Range parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return (Builder) DEFAULT_INSTANCE.createBuilder();
    }
    public static Builder newBuilder(com.google.api.Distribution.Range prototype) {
      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
    }

    /**
     * <pre>
     * The range of the population values.
     * </pre>
     *
     * Protobuf type {@code google.api.Distribution.Range}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          com.google.api.Distribution.Range, Builder> implements
        // @@protoc_insertion_point(builder_implements:google.api.Distribution.Range)
        com.google.api.Distribution.RangeOrBuilder {
      // Construct using com.google.api.Distribution.Range.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <pre>
       * The minimum of the population values.
       * </pre>
       *
       * <code>double min = 1;</code>
       * @return The min.
       */
      @java.lang.Override
      public double getMin() {
        return instance.getMin();
      }
      /**
       * <pre>
       * The minimum of the population values.
       * </pre>
       *
       * <code>double min = 1;</code>
       * @param value The min to set.
       * @return This builder for chaining.
       */
      public Builder setMin(double value) {
        copyOnWrite();
        instance.setMin(value);
        return this;
      }
      /**
       * <pre>
       * The minimum of the population values.
       * </pre>
       *
       * <code>double min = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearMin() {
        copyOnWrite();
        instance.clearMin();
        return this;
      }

      /**
       * <pre>
       * The maximum of the population values.
       * </pre>
       *
       * <code>double max = 2;</code>
       * @return The max.
       */
      @java.lang.Override
      public double getMax() {
        return instance.getMax();
      }
      /**
       * <pre>
       * The maximum of the population values.
       * </pre>
       *
       * <code>double max = 2;</code>
       * @param value The max to set.
       * @return This builder for chaining.
       */
      public Builder setMax(double value) {
        copyOnWrite();
        instance.setMax(value);
        return this;
      }
      /**
       * <pre>
       * The maximum of the population values.
       * </pre>
       *
       * <code>double max = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearMax() {
        copyOnWrite();
        instance.clearMax();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:google.api.Distribution.Range)
    }
    @java.lang.Override
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new com.google.api.Distribution.Range();
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case BUILD_MESSAGE_INFO: {
            java.lang.Object[] objects = new java.lang.Object[] {
              "min_",
              "max_",
            };
            java.lang.String info =
                "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0000\u0002\u0000" +
                "";
            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          com.google.protobuf.Parser<com.google.api.Distribution.Range> parser = PARSER;
          if (parser == null) {
            synchronized (com.google.api.Distribution.Range.class) {
              parser = PARSER;
              if (parser == null) {
                parser =
                    new DefaultInstanceBasedParser<com.google.api.Distribution.Range>(
                        DEFAULT_INSTANCE);
                PARSER = parser;
              }
            }
          }
          return parser;
      }
      case GET_MEMOIZED_IS_INITIALIZED: {
        return (byte) 1;
      }
      case SET_MEMOIZED_IS_INITIALIZED: {
        return null;
      }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:google.api.Distribution.Range)
    private static final com.google.api.Distribution.Range DEFAULT_INSTANCE;
    static {
      Range defaultInstance = new Range();
      // New instances are implicitly immutable so no need to make
      // immutable.
      DEFAULT_INSTANCE = defaultInstance;
      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
        Range.class, defaultInstance);
    }

    public static com.google.api.Distribution.Range getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Range> PARSER;

    public static com.google.protobuf.Parser<Range> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface BucketOptionsOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     * @return Whether the linearBuckets field is set.
     */
    boolean hasLinearBuckets();
    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     * @return The linearBuckets.
     */
    com.google.api.Distribution.BucketOptions.Linear getLinearBuckets();

    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     * @return Whether the exponentialBuckets field is set.
     */
    boolean hasExponentialBuckets();
    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     * @return The exponentialBuckets.
     */
    com.google.api.Distribution.BucketOptions.Exponential getExponentialBuckets();

    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     * @return Whether the explicitBuckets field is set.
     */
    boolean hasExplicitBuckets();
    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     * @return The explicitBuckets.
     */
    com.google.api.Distribution.BucketOptions.Explicit getExplicitBuckets();

    public com.google.api.Distribution.BucketOptions.OptionsCase getOptionsCase();
  }
  /**
   * <pre>
   * `BucketOptions` describes the bucket boundaries used to create a histogram
   * for the distribution. The buckets can be in a linear sequence, an
   * exponential sequence, or each bucket can be specified explicitly.
   * `BucketOptions` does not include the number of values in each bucket.
   * A bucket has an inclusive lower bound and exclusive upper bound for the
   * values that are counted for that bucket. The upper bound of a bucket must
   * be strictly greater than the lower bound. The sequence of N buckets for a
   * distribution consists of an underflow bucket (number 0), zero or more
   * finite buckets (number 1 through N - 2) and an overflow bucket (number N -
   * 1). The buckets are contiguous: the lower bound of bucket i (i &gt; 0) is the
   * same as the upper bound of bucket i - 1. The buckets span the whole range
   * of finite values: lower bound of the underflow bucket is -infinity and the
   * upper bound of the overflow bucket is +infinity. The finite buckets are
   * so-called because both bounds are finite.
   * </pre>
   *
   * Protobuf type {@code google.api.Distribution.BucketOptions}
   */
  public  static final class BucketOptions extends
      com.google.protobuf.GeneratedMessageLite<
          BucketOptions, BucketOptions.Builder> implements
      // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions)
      BucketOptionsOrBuilder {
    private BucketOptions() {
    }
    public interface LinearOrBuilder extends
        // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Linear)
        com.google.protobuf.MessageLiteOrBuilder {

      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       * @return The numFiniteBuckets.
       */
      int getNumFiniteBuckets();

      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double width = 2;</code>
       * @return The width.
       */
      double getWidth();

      /**
       * <pre>
       * Lower bound of the first bucket.
       * </pre>
       *
       * <code>double offset = 3;</code>
       * @return The offset.
       */
      double getOffset();
    }
    /**
     * <pre>
     * Specifies a linear sequence of buckets that all have the same width
     * (except overflow and underflow). Each bucket represents a constant
     * absolute uncertainty on the specific value in the bucket.
     * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
     * following boundaries:
     *    Upper bound (0 &lt;= i &lt; N-1):     offset + (width * i).
     *    Lower bound (1 &lt;= i &lt; N):       offset + (width * (i - 1)).
     * </pre>
     *
     * Protobuf type {@code google.api.Distribution.BucketOptions.Linear}
     */
    public  static final class Linear extends
        com.google.protobuf.GeneratedMessageLite<
            Linear, Linear.Builder> implements
        // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Linear)
        LinearOrBuilder {
      private Linear() {
      }
      public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1;
      private int numFiniteBuckets_;
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       * @return The numFiniteBuckets.
       */
      @java.lang.Override
      public int getNumFiniteBuckets() {
        return numFiniteBuckets_;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       * @param value The numFiniteBuckets to set.
       */
      private void setNumFiniteBuckets(int value) {
        
        numFiniteBuckets_ = value;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       */
      private void clearNumFiniteBuckets() {
        
        numFiniteBuckets_ = 0;
      }

      public static final int WIDTH_FIELD_NUMBER = 2;
      private double width_;
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double width = 2;</code>
       * @return The width.
       */
      @java.lang.Override
      public double getWidth() {
        return width_;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double width = 2;</code>
       * @param value The width to set.
       */
      private void setWidth(double value) {
        
        width_ = value;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double width = 2;</code>
       */
      private void clearWidth() {
        
        width_ = 0D;
      }

      public static final int OFFSET_FIELD_NUMBER = 3;
      private double offset_;
      /**
       * <pre>
       * Lower bound of the first bucket.
       * </pre>
       *
       * <code>double offset = 3;</code>
       * @return The offset.
       */
      @java.lang.Override
      public double getOffset() {
        return offset_;
      }
      /**
       * <pre>
       * Lower bound of the first bucket.
       * </pre>
       *
       * <code>double offset = 3;</code>
       * @param value The offset to set.
       */
      private void setOffset(double value) {
        
        offset_ = value;
      }
      /**
       * <pre>
       * Lower bound of the first bucket.
       * </pre>
       *
       * <code>double offset = 3;</code>
       */
      private void clearOffset() {
        
        offset_ = 0D;
      }

      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return parseDelimitedFrom(DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input, extensionRegistry);
      }

      public static Builder newBuilder() {
        return (Builder) DEFAULT_INSTANCE.createBuilder();
      }
      public static Builder newBuilder(com.google.api.Distribution.BucketOptions.Linear prototype) {
        return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
      }

      /**
       * <pre>
       * Specifies a linear sequence of buckets that all have the same width
       * (except overflow and underflow). Each bucket represents a constant
       * absolute uncertainty on the specific value in the bucket.
       * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
       * following boundaries:
       *    Upper bound (0 &lt;= i &lt; N-1):     offset + (width * i).
       *    Lower bound (1 &lt;= i &lt; N):       offset + (width * (i - 1)).
       * </pre>
       *
       * Protobuf type {@code google.api.Distribution.BucketOptions.Linear}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageLite.Builder<
            com.google.api.Distribution.BucketOptions.Linear, Builder> implements
          // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Linear)
          com.google.api.Distribution.BucketOptions.LinearOrBuilder {
        // Construct using com.google.api.Distribution.BucketOptions.Linear.newBuilder()
        private Builder() {
          super(DEFAULT_INSTANCE);
        }


        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>int32 num_finite_buckets = 1;</code>
         * @return The numFiniteBuckets.
         */
        @java.lang.Override
        public int getNumFiniteBuckets() {
          return instance.getNumFiniteBuckets();
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>int32 num_finite_buckets = 1;</code>
         * @param value The numFiniteBuckets to set.
         * @return This builder for chaining.
         */
        public Builder setNumFiniteBuckets(int value) {
          copyOnWrite();
          instance.setNumFiniteBuckets(value);
          return this;
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>int32 num_finite_buckets = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearNumFiniteBuckets() {
          copyOnWrite();
          instance.clearNumFiniteBuckets();
          return this;
        }

        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>double width = 2;</code>
         * @return The width.
         */
        @java.lang.Override
        public double getWidth() {
          return instance.getWidth();
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>double width = 2;</code>
         * @param value The width to set.
         * @return This builder for chaining.
         */
        public Builder setWidth(double value) {
          copyOnWrite();
          instance.setWidth(value);
          return this;
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>double width = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearWidth() {
          copyOnWrite();
          instance.clearWidth();
          return this;
        }

        /**
         * <pre>
         * Lower bound of the first bucket.
         * </pre>
         *
         * <code>double offset = 3;</code>
         * @return The offset.
         */
        @java.lang.Override
        public double getOffset() {
          return instance.getOffset();
        }
        /**
         * <pre>
         * Lower bound of the first bucket.
         * </pre>
         *
         * <code>double offset = 3;</code>
         * @param value The offset to set.
         * @return This builder for chaining.
         */
        public Builder setOffset(double value) {
          copyOnWrite();
          instance.setOffset(value);
          return this;
        }
        /**
         * <pre>
         * Lower bound of the first bucket.
         * </pre>
         *
         * <code>double offset = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearOffset() {
          copyOnWrite();
          instance.clearOffset();
          return this;
        }

        // @@protoc_insertion_point(builder_scope:google.api.Distribution.BucketOptions.Linear)
      }
      @java.lang.Override
      @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
      protected final java.lang.Object dynamicMethod(
          com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
          java.lang.Object arg0, java.lang.Object arg1) {
        switch (method) {
          case NEW_MUTABLE_INSTANCE: {
            return new com.google.api.Distribution.BucketOptions.Linear();
          }
          case NEW_BUILDER: {
            return new Builder();
          }
          case BUILD_MESSAGE_INFO: {
              java.lang.Object[] objects = new java.lang.Object[] {
                "numFiniteBuckets_",
                "width_",
                "offset_",
              };
              java.lang.String info =
                  "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0004\u0002\u0000" +
                  "\u0003\u0000";
              return newMessageInfo(DEFAULT_INSTANCE, info, objects);
          }
          // fall through
          case GET_DEFAULT_INSTANCE: {
            return DEFAULT_INSTANCE;
          }
          case GET_PARSER: {
            com.google.protobuf.Parser<com.google.api.Distribution.BucketOptions.Linear> parser = PARSER;
            if (parser == null) {
              synchronized (com.google.api.Distribution.BucketOptions.Linear.class) {
                parser = PARSER;
                if (parser == null) {
                  parser =
                      new DefaultInstanceBasedParser<com.google.api.Distribution.BucketOptions.Linear>(
                          DEFAULT_INSTANCE);
                  PARSER = parser;
                }
              }
            }
            return parser;
        }
        case GET_MEMOIZED_IS_INITIALIZED: {
          return (byte) 1;
        }
        case SET_MEMOIZED_IS_INITIALIZED: {
          return null;
        }
        }
        throw new UnsupportedOperationException();
      }


      // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Linear)
      private static final com.google.api.Distribution.BucketOptions.Linear DEFAULT_INSTANCE;
      static {
        Linear defaultInstance = new Linear();
        // New instances are implicitly immutable so no need to make
        // immutable.
        DEFAULT_INSTANCE = defaultInstance;
        com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
          Linear.class, defaultInstance);
      }

      public static com.google.api.Distribution.BucketOptions.Linear getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static volatile com.google.protobuf.Parser<Linear> PARSER;

      public static com.google.protobuf.Parser<Linear> parser() {
        return DEFAULT_INSTANCE.getParserForType();
      }
    }

    public interface ExponentialOrBuilder extends
        // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Exponential)
        com.google.protobuf.MessageLiteOrBuilder {

      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       * @return The numFiniteBuckets.
       */
      int getNumFiniteBuckets();

      /**
       * <pre>
       * Must be greater than 1.
       * </pre>
       *
       * <code>double growth_factor = 2;</code>
       * @return The growthFactor.
       */
      double getGrowthFactor();

      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double scale = 3;</code>
       * @return The scale.
       */
      double getScale();
    }
    /**
     * <pre>
     * Specifies an exponential sequence of buckets that have a width that is
     * proportional to the value of the lower bound. Each bucket represents a
     * constant relative uncertainty on a specific value in the bucket.
     * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
     * following boundaries:
     *    Upper bound (0 &lt;= i &lt; N-1):     scale * (growth_factor ^ i).
     *    Lower bound (1 &lt;= i &lt; N):       scale * (growth_factor ^ (i - 1)).
     * </pre>
     *
     * Protobuf type {@code google.api.Distribution.BucketOptions.Exponential}
     */
    public  static final class Exponential extends
        com.google.protobuf.GeneratedMessageLite<
            Exponential, Exponential.Builder> implements
        // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Exponential)
        ExponentialOrBuilder {
      private Exponential() {
      }
      public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1;
      private int numFiniteBuckets_;
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       * @return The numFiniteBuckets.
       */
      @java.lang.Override
      public int getNumFiniteBuckets() {
        return numFiniteBuckets_;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       * @param value The numFiniteBuckets to set.
       */
      private void setNumFiniteBuckets(int value) {
        
        numFiniteBuckets_ = value;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>int32 num_finite_buckets = 1;</code>
       */
      private void clearNumFiniteBuckets() {
        
        numFiniteBuckets_ = 0;
      }

      public static final int GROWTH_FACTOR_FIELD_NUMBER = 2;
      private double growthFactor_;
      /**
       * <pre>
       * Must be greater than 1.
       * </pre>
       *
       * <code>double growth_factor = 2;</code>
       * @return The growthFactor.
       */
      @java.lang.Override
      public double getGrowthFactor() {
        return growthFactor_;
      }
      /**
       * <pre>
       * Must be greater than 1.
       * </pre>
       *
       * <code>double growth_factor = 2;</code>
       * @param value The growthFactor to set.
       */
      private void setGrowthFactor(double value) {
        
        growthFactor_ = value;
      }
      /**
       * <pre>
       * Must be greater than 1.
       * </pre>
       *
       * <code>double growth_factor = 2;</code>
       */
      private void clearGrowthFactor() {
        
        growthFactor_ = 0D;
      }

      public static final int SCALE_FIELD_NUMBER = 3;
      private double scale_;
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double scale = 3;</code>
       * @return The scale.
       */
      @java.lang.Override
      public double getScale() {
        return scale_;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double scale = 3;</code>
       * @param value The scale to set.
       */
      private void setScale(double value) {
        
        scale_ = value;
      }
      /**
       * <pre>
       * Must be greater than 0.
       * </pre>
       *
       * <code>double scale = 3;</code>
       */
      private void clearScale() {
        
        scale_ = 0D;
      }

      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return parseDelimitedFrom(DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input, extensionRegistry);
      }

      public static Builder newBuilder() {
        return (Builder) DEFAULT_INSTANCE.createBuilder();
      }
      public static Builder newBuilder(com.google.api.Distribution.BucketOptions.Exponential prototype) {
        return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
      }

      /**
       * <pre>
       * Specifies an exponential sequence of buckets that have a width that is
       * proportional to the value of the lower bound. Each bucket represents a
       * constant relative uncertainty on a specific value in the bucket.
       * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
       * following boundaries:
       *    Upper bound (0 &lt;= i &lt; N-1):     scale * (growth_factor ^ i).
       *    Lower bound (1 &lt;= i &lt; N):       scale * (growth_factor ^ (i - 1)).
       * </pre>
       *
       * Protobuf type {@code google.api.Distribution.BucketOptions.Exponential}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageLite.Builder<
            com.google.api.Distribution.BucketOptions.Exponential, Builder> implements
          // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Exponential)
          com.google.api.Distribution.BucketOptions.ExponentialOrBuilder {
        // Construct using com.google.api.Distribution.BucketOptions.Exponential.newBuilder()
        private Builder() {
          super(DEFAULT_INSTANCE);
        }


        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>int32 num_finite_buckets = 1;</code>
         * @return The numFiniteBuckets.
         */
        @java.lang.Override
        public int getNumFiniteBuckets() {
          return instance.getNumFiniteBuckets();
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>int32 num_finite_buckets = 1;</code>
         * @param value The numFiniteBuckets to set.
         * @return This builder for chaining.
         */
        public Builder setNumFiniteBuckets(int value) {
          copyOnWrite();
          instance.setNumFiniteBuckets(value);
          return this;
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>int32 num_finite_buckets = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearNumFiniteBuckets() {
          copyOnWrite();
          instance.clearNumFiniteBuckets();
          return this;
        }

        /**
         * <pre>
         * Must be greater than 1.
         * </pre>
         *
         * <code>double growth_factor = 2;</code>
         * @return The growthFactor.
         */
        @java.lang.Override
        public double getGrowthFactor() {
          return instance.getGrowthFactor();
        }
        /**
         * <pre>
         * Must be greater than 1.
         * </pre>
         *
         * <code>double growth_factor = 2;</code>
         * @param value The growthFactor to set.
         * @return This builder for chaining.
         */
        public Builder setGrowthFactor(double value) {
          copyOnWrite();
          instance.setGrowthFactor(value);
          return this;
        }
        /**
         * <pre>
         * Must be greater than 1.
         * </pre>
         *
         * <code>double growth_factor = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearGrowthFactor() {
          copyOnWrite();
          instance.clearGrowthFactor();
          return this;
        }

        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>double scale = 3;</code>
         * @return The scale.
         */
        @java.lang.Override
        public double getScale() {
          return instance.getScale();
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>double scale = 3;</code>
         * @param value The scale to set.
         * @return This builder for chaining.
         */
        public Builder setScale(double value) {
          copyOnWrite();
          instance.setScale(value);
          return this;
        }
        /**
         * <pre>
         * Must be greater than 0.
         * </pre>
         *
         * <code>double scale = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearScale() {
          copyOnWrite();
          instance.clearScale();
          return this;
        }

        // @@protoc_insertion_point(builder_scope:google.api.Distribution.BucketOptions.Exponential)
      }
      @java.lang.Override
      @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
      protected final java.lang.Object dynamicMethod(
          com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
          java.lang.Object arg0, java.lang.Object arg1) {
        switch (method) {
          case NEW_MUTABLE_INSTANCE: {
            return new com.google.api.Distribution.BucketOptions.Exponential();
          }
          case NEW_BUILDER: {
            return new Builder();
          }
          case BUILD_MESSAGE_INFO: {
              java.lang.Object[] objects = new java.lang.Object[] {
                "numFiniteBuckets_",
                "growthFactor_",
                "scale_",
              };
              java.lang.String info =
                  "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0004\u0002\u0000" +
                  "\u0003\u0000";
              return newMessageInfo(DEFAULT_INSTANCE, info, objects);
          }
          // fall through
          case GET_DEFAULT_INSTANCE: {
            return DEFAULT_INSTANCE;
          }
          case GET_PARSER: {
            com.google.protobuf.Parser<com.google.api.Distribution.BucketOptions.Exponential> parser = PARSER;
            if (parser == null) {
              synchronized (com.google.api.Distribution.BucketOptions.Exponential.class) {
                parser = PARSER;
                if (parser == null) {
                  parser =
                      new DefaultInstanceBasedParser<com.google.api.Distribution.BucketOptions.Exponential>(
                          DEFAULT_INSTANCE);
                  PARSER = parser;
                }
              }
            }
            return parser;
        }
        case GET_MEMOIZED_IS_INITIALIZED: {
          return (byte) 1;
        }
        case SET_MEMOIZED_IS_INITIALIZED: {
          return null;
        }
        }
        throw new UnsupportedOperationException();
      }


      // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Exponential)
      private static final com.google.api.Distribution.BucketOptions.Exponential DEFAULT_INSTANCE;
      static {
        Exponential defaultInstance = new Exponential();
        // New instances are implicitly immutable so no need to make
        // immutable.
        DEFAULT_INSTANCE = defaultInstance;
        com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
          Exponential.class, defaultInstance);
      }

      public static com.google.api.Distribution.BucketOptions.Exponential getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static volatile com.google.protobuf.Parser<Exponential> PARSER;

      public static com.google.protobuf.Parser<Exponential> parser() {
        return DEFAULT_INSTANCE.getParserForType();
      }
    }

    public interface ExplicitOrBuilder extends
        // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Explicit)
        com.google.protobuf.MessageLiteOrBuilder {

      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @return A list containing the bounds.
       */
      java.util.List<java.lang.Double> getBoundsList();
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @return The count of bounds.
       */
      int getBoundsCount();
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @param index The index of the element to return.
       * @return The bounds at the given index.
       */
      double getBounds(int index);
    }
    /**
     * <pre>
     * Specifies a set of buckets with arbitrary widths.
     * There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
     * boundaries:
     *    Upper bound (0 &lt;= i &lt; N-1):     bounds[i]
     *    Lower bound (1 &lt;= i &lt; 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.
     * </pre>
     *
     * Protobuf type {@code google.api.Distribution.BucketOptions.Explicit}
     */
    public  static final class Explicit extends
        com.google.protobuf.GeneratedMessageLite<
            Explicit, Explicit.Builder> implements
        // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Explicit)
        ExplicitOrBuilder {
      private Explicit() {
        bounds_ = emptyDoubleList();
      }
      public static final int BOUNDS_FIELD_NUMBER = 1;
      private com.google.protobuf.Internal.DoubleList bounds_;
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @return A list containing the bounds.
       */
      @java.lang.Override
      public java.util.List<java.lang.Double>
          getBoundsList() {
        return bounds_;
      }
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @return The count of bounds.
       */
      @java.lang.Override
      public int getBoundsCount() {
        return bounds_.size();
      }
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @param index The index of the element to return.
       * @return The bounds at the given index.
       */
      @java.lang.Override
      public double getBounds(int index) {
        return bounds_.getDouble(index);
      }
      private int boundsMemoizedSerializedSize = -1;
      private void ensureBoundsIsMutable() {
        com.google.protobuf.Internal.DoubleList tmp = bounds_;
        if (!tmp.isModifiable()) {
          bounds_ =
              com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
         }
      }
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @param index The index to set the value at.
       * @param value The bounds to set.
       */
      private void setBounds(
          int index, double value) {
        ensureBoundsIsMutable();
        bounds_.setDouble(index, value);
      }
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @param value The bounds to add.
       */
      private void addBounds(double value) {
        ensureBoundsIsMutable();
        bounds_.addDouble(value);
      }
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       * @param values The bounds to add.
       */
      private void addAllBounds(
          java.lang.Iterable<? extends java.lang.Double> values) {
        ensureBoundsIsMutable();
        com.google.protobuf.AbstractMessageLite.addAll(
            values, bounds_);
      }
      /**
       * <pre>
       * The values must be monotonically increasing.
       * </pre>
       *
       * <code>repeated double bounds = 1;</code>
       */
      private void clearBounds() {
        bounds_ = emptyDoubleList();
      }

      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, data, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return parseDelimitedFrom(DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input);
      }
      public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageLite.parseFrom(
            DEFAULT_INSTANCE, input, extensionRegistry);
      }

      public static Builder newBuilder() {
        return (Builder) DEFAULT_INSTANCE.createBuilder();
      }
      public static Builder newBuilder(com.google.api.Distribution.BucketOptions.Explicit prototype) {
        return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
      }

      /**
       * <pre>
       * Specifies a set of buckets with arbitrary widths.
       * There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
       * boundaries:
       *    Upper bound (0 &lt;= i &lt; N-1):     bounds[i]
       *    Lower bound (1 &lt;= i &lt; 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.
       * </pre>
       *
       * Protobuf type {@code google.api.Distribution.BucketOptions.Explicit}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageLite.Builder<
            com.google.api.Distribution.BucketOptions.Explicit, Builder> implements
          // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Explicit)
          com.google.api.Distribution.BucketOptions.ExplicitOrBuilder {
        // Construct using com.google.api.Distribution.BucketOptions.Explicit.newBuilder()
        private Builder() {
          super(DEFAULT_INSTANCE);
        }


        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @return A list containing the bounds.
         */
        @java.lang.Override
        public java.util.List<java.lang.Double>
            getBoundsList() {
          return java.util.Collections.unmodifiableList(
              instance.getBoundsList());
        }
        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @return The count of bounds.
         */
        @java.lang.Override
        public int getBoundsCount() {
          return instance.getBoundsCount();
        }
        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @param index The index of the element to return.
         * @return The bounds at the given index.
         */
        @java.lang.Override
        public double getBounds(int index) {
          return instance.getBounds(index);
        }
        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @param value The bounds to set.
         * @return This builder for chaining.
         */
        public Builder setBounds(
            int index, double value) {
          copyOnWrite();
          instance.setBounds(index, value);
          return this;
        }
        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @param value The bounds to add.
         * @return This builder for chaining.
         */
        public Builder addBounds(double value) {
          copyOnWrite();
          instance.addBounds(value);
          return this;
        }
        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @param values The bounds to add.
         * @return This builder for chaining.
         */
        public Builder addAllBounds(
            java.lang.Iterable<? extends java.lang.Double> values) {
          copyOnWrite();
          instance.addAllBounds(values);
          return this;
        }
        /**
         * <pre>
         * The values must be monotonically increasing.
         * </pre>
         *
         * <code>repeated double bounds = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearBounds() {
          copyOnWrite();
          instance.clearBounds();
          return this;
        }

        // @@protoc_insertion_point(builder_scope:google.api.Distribution.BucketOptions.Explicit)
      }
      @java.lang.Override
      @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
      protected final java.lang.Object dynamicMethod(
          com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
          java.lang.Object arg0, java.lang.Object arg1) {
        switch (method) {
          case NEW_MUTABLE_INSTANCE: {
            return new com.google.api.Distribution.BucketOptions.Explicit();
          }
          case NEW_BUILDER: {
            return new Builder();
          }
          case BUILD_MESSAGE_INFO: {
              java.lang.Object[] objects = new java.lang.Object[] {
                "bounds_",
              };
              java.lang.String info =
                  "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001#";
              return newMessageInfo(DEFAULT_INSTANCE, info, objects);
          }
          // fall through
          case GET_DEFAULT_INSTANCE: {
            return DEFAULT_INSTANCE;
          }
          case GET_PARSER: {
            com.google.protobuf.Parser<com.google.api.Distribution.BucketOptions.Explicit> parser = PARSER;
            if (parser == null) {
              synchronized (com.google.api.Distribution.BucketOptions.Explicit.class) {
                parser = PARSER;
                if (parser == null) {
                  parser =
                      new DefaultInstanceBasedParser<com.google.api.Distribution.BucketOptions.Explicit>(
                          DEFAULT_INSTANCE);
                  PARSER = parser;
                }
              }
            }
            return parser;
        }
        case GET_MEMOIZED_IS_INITIALIZED: {
          return (byte) 1;
        }
        case SET_MEMOIZED_IS_INITIALIZED: {
          return null;
        }
        }
        throw new UnsupportedOperationException();
      }


      // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Explicit)
      private static final com.google.api.Distribution.BucketOptions.Explicit DEFAULT_INSTANCE;
      static {
        Explicit defaultInstance = new Explicit();
        // New instances are implicitly immutable so no need to make
        // immutable.
        DEFAULT_INSTANCE = defaultInstance;
        com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
          Explicit.class, defaultInstance);
      }

      public static com.google.api.Distribution.BucketOptions.Explicit getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static volatile com.google.protobuf.Parser<Explicit> PARSER;

      public static com.google.protobuf.Parser<Explicit> parser() {
        return DEFAULT_INSTANCE.getParserForType();
      }
    }

    private int optionsCase_ = 0;
    private java.lang.Object options_;
    public enum OptionsCase {
      LINEAR_BUCKETS(1),
      EXPONENTIAL_BUCKETS(2),
      EXPLICIT_BUCKETS(3),
      OPTIONS_NOT_SET(0);
      private final int value;
      private OptionsCase(int value) {
        this.value = value;
      }
      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static OptionsCase valueOf(int value) {
        return forNumber(value);
      }

      public static OptionsCase forNumber(int value) {
        switch (value) {
          case 1: return LINEAR_BUCKETS;
          case 2: return EXPONENTIAL_BUCKETS;
          case 3: return EXPLICIT_BUCKETS;
          case 0: return OPTIONS_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    @java.lang.Override
    public OptionsCase
    getOptionsCase() {
      return OptionsCase.forNumber(
          optionsCase_);
    }

    private void clearOptions() {
      optionsCase_ = 0;
      options_ = null;
    }

    public static final int LINEAR_BUCKETS_FIELD_NUMBER = 1;
    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     */
    @java.lang.Override
    public boolean hasLinearBuckets() {
      return optionsCase_ == 1;
    }
    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     */
    @java.lang.Override
    public com.google.api.Distribution.BucketOptions.Linear getLinearBuckets() {
      if (optionsCase_ == 1) {
         return (com.google.api.Distribution.BucketOptions.Linear) options_;
      }
      return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance();
    }
    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     */
    private void setLinearBuckets(com.google.api.Distribution.BucketOptions.Linear value) {
      value.getClass();
  options_ = value;
      optionsCase_ = 1;
    }
    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     */
    private void mergeLinearBuckets(com.google.api.Distribution.BucketOptions.Linear value) {
      value.getClass();
  if (optionsCase_ == 1 &&
          options_ != com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance()) {
        options_ = com.google.api.Distribution.BucketOptions.Linear.newBuilder((com.google.api.Distribution.BucketOptions.Linear) options_)
            .mergeFrom(value).buildPartial();
      } else {
        options_ = value;
      }
      optionsCase_ = 1;
    }
    /**
     * <pre>
     * The linear bucket.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
     */
    private void clearLinearBuckets() {
      if (optionsCase_ == 1) {
        optionsCase_ = 0;
        options_ = null;
      }
    }

    public static final int EXPONENTIAL_BUCKETS_FIELD_NUMBER = 2;
    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     */
    @java.lang.Override
    public boolean hasExponentialBuckets() {
      return optionsCase_ == 2;
    }
    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     */
    @java.lang.Override
    public com.google.api.Distribution.BucketOptions.Exponential getExponentialBuckets() {
      if (optionsCase_ == 2) {
         return (com.google.api.Distribution.BucketOptions.Exponential) options_;
      }
      return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance();
    }
    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     */
    private void setExponentialBuckets(com.google.api.Distribution.BucketOptions.Exponential value) {
      value.getClass();
  options_ = value;
      optionsCase_ = 2;
    }
    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     */
    private void mergeExponentialBuckets(com.google.api.Distribution.BucketOptions.Exponential value) {
      value.getClass();
  if (optionsCase_ == 2 &&
          options_ != com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance()) {
        options_ = com.google.api.Distribution.BucketOptions.Exponential.newBuilder((com.google.api.Distribution.BucketOptions.Exponential) options_)
            .mergeFrom(value).buildPartial();
      } else {
        options_ = value;
      }
      optionsCase_ = 2;
    }
    /**
     * <pre>
     * The exponential buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
     */
    private void clearExponentialBuckets() {
      if (optionsCase_ == 2) {
        optionsCase_ = 0;
        options_ = null;
      }
    }

    public static final int EXPLICIT_BUCKETS_FIELD_NUMBER = 3;
    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     */
    @java.lang.Override
    public boolean hasExplicitBuckets() {
      return optionsCase_ == 3;
    }
    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     */
    @java.lang.Override
    public com.google.api.Distribution.BucketOptions.Explicit getExplicitBuckets() {
      if (optionsCase_ == 3) {
         return (com.google.api.Distribution.BucketOptions.Explicit) options_;
      }
      return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance();
    }
    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     */
    private void setExplicitBuckets(com.google.api.Distribution.BucketOptions.Explicit value) {
      value.getClass();
  options_ = value;
      optionsCase_ = 3;
    }
    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     */
    private void mergeExplicitBuckets(com.google.api.Distribution.BucketOptions.Explicit value) {
      value.getClass();
  if (optionsCase_ == 3 &&
          options_ != com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance()) {
        options_ = com.google.api.Distribution.BucketOptions.Explicit.newBuilder((com.google.api.Distribution.BucketOptions.Explicit) options_)
            .mergeFrom(value).buildPartial();
      } else {
        options_ = value;
      }
      optionsCase_ = 3;
    }
    /**
     * <pre>
     * The explicit buckets.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
     */
    private void clearExplicitBuckets() {
      if (optionsCase_ == 3) {
        optionsCase_ = 0;
        options_ = null;
      }
    }

    public static com.google.api.Distribution.BucketOptions parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Distribution.BucketOptions parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.BucketOptions parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.BucketOptions parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return (Builder) DEFAULT_INSTANCE.createBuilder();
    }
    public static Builder newBuilder(com.google.api.Distribution.BucketOptions prototype) {
      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
    }

    /**
     * <pre>
     * `BucketOptions` describes the bucket boundaries used to create a histogram
     * for the distribution. The buckets can be in a linear sequence, an
     * exponential sequence, or each bucket can be specified explicitly.
     * `BucketOptions` does not include the number of values in each bucket.
     * A bucket has an inclusive lower bound and exclusive upper bound for the
     * values that are counted for that bucket. The upper bound of a bucket must
     * be strictly greater than the lower bound. The sequence of N buckets for a
     * distribution consists of an underflow bucket (number 0), zero or more
     * finite buckets (number 1 through N - 2) and an overflow bucket (number N -
     * 1). The buckets are contiguous: the lower bound of bucket i (i &gt; 0) is the
     * same as the upper bound of bucket i - 1. The buckets span the whole range
     * of finite values: lower bound of the underflow bucket is -infinity and the
     * upper bound of the overflow bucket is +infinity. The finite buckets are
     * so-called because both bounds are finite.
     * </pre>
     *
     * Protobuf type {@code google.api.Distribution.BucketOptions}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          com.google.api.Distribution.BucketOptions, Builder> implements
        // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions)
        com.google.api.Distribution.BucketOptionsOrBuilder {
      // Construct using com.google.api.Distribution.BucketOptions.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }

      @java.lang.Override
      public OptionsCase
          getOptionsCase() {
        return instance.getOptionsCase();
      }

      public Builder clearOptions() {
        copyOnWrite();
        instance.clearOptions();
        return this;
      }


      /**
       * <pre>
       * The linear bucket.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
       */
      @java.lang.Override
      public boolean hasLinearBuckets() {
        return instance.hasLinearBuckets();
      }
      /**
       * <pre>
       * The linear bucket.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
       */
      @java.lang.Override
      public com.google.api.Distribution.BucketOptions.Linear getLinearBuckets() {
        return instance.getLinearBuckets();
      }
      /**
       * <pre>
       * The linear bucket.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
       */
      public Builder setLinearBuckets(com.google.api.Distribution.BucketOptions.Linear value) {
        copyOnWrite();
        instance.setLinearBuckets(value);
        return this;
      }
      /**
       * <pre>
       * The linear bucket.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
       */
      public Builder setLinearBuckets(
          com.google.api.Distribution.BucketOptions.Linear.Builder builderForValue) {
        copyOnWrite();
        instance.setLinearBuckets(builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * The linear bucket.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
       */
      public Builder mergeLinearBuckets(com.google.api.Distribution.BucketOptions.Linear value) {
        copyOnWrite();
        instance.mergeLinearBuckets(value);
        return this;
      }
      /**
       * <pre>
       * The linear bucket.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code>
       */
      public Builder clearLinearBuckets() {
        copyOnWrite();
        instance.clearLinearBuckets();
        return this;
      }

      /**
       * <pre>
       * The exponential buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
       */
      @java.lang.Override
      public boolean hasExponentialBuckets() {
        return instance.hasExponentialBuckets();
      }
      /**
       * <pre>
       * The exponential buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
       */
      @java.lang.Override
      public com.google.api.Distribution.BucketOptions.Exponential getExponentialBuckets() {
        return instance.getExponentialBuckets();
      }
      /**
       * <pre>
       * The exponential buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
       */
      public Builder setExponentialBuckets(com.google.api.Distribution.BucketOptions.Exponential value) {
        copyOnWrite();
        instance.setExponentialBuckets(value);
        return this;
      }
      /**
       * <pre>
       * The exponential buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
       */
      public Builder setExponentialBuckets(
          com.google.api.Distribution.BucketOptions.Exponential.Builder builderForValue) {
        copyOnWrite();
        instance.setExponentialBuckets(builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * The exponential buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
       */
      public Builder mergeExponentialBuckets(com.google.api.Distribution.BucketOptions.Exponential value) {
        copyOnWrite();
        instance.mergeExponentialBuckets(value);
        return this;
      }
      /**
       * <pre>
       * The exponential buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code>
       */
      public Builder clearExponentialBuckets() {
        copyOnWrite();
        instance.clearExponentialBuckets();
        return this;
      }

      /**
       * <pre>
       * The explicit buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
       */
      @java.lang.Override
      public boolean hasExplicitBuckets() {
        return instance.hasExplicitBuckets();
      }
      /**
       * <pre>
       * The explicit buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
       */
      @java.lang.Override
      public com.google.api.Distribution.BucketOptions.Explicit getExplicitBuckets() {
        return instance.getExplicitBuckets();
      }
      /**
       * <pre>
       * The explicit buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
       */
      public Builder setExplicitBuckets(com.google.api.Distribution.BucketOptions.Explicit value) {
        copyOnWrite();
        instance.setExplicitBuckets(value);
        return this;
      }
      /**
       * <pre>
       * The explicit buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
       */
      public Builder setExplicitBuckets(
          com.google.api.Distribution.BucketOptions.Explicit.Builder builderForValue) {
        copyOnWrite();
        instance.setExplicitBuckets(builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * The explicit buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
       */
      public Builder mergeExplicitBuckets(com.google.api.Distribution.BucketOptions.Explicit value) {
        copyOnWrite();
        instance.mergeExplicitBuckets(value);
        return this;
      }
      /**
       * <pre>
       * The explicit buckets.
       * </pre>
       *
       * <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code>
       */
      public Builder clearExplicitBuckets() {
        copyOnWrite();
        instance.clearExplicitBuckets();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:google.api.Distribution.BucketOptions)
    }
    @java.lang.Override
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new com.google.api.Distribution.BucketOptions();
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case BUILD_MESSAGE_INFO: {
            java.lang.Object[] objects = new java.lang.Object[] {
              "options_",
              "optionsCase_",
              com.google.api.Distribution.BucketOptions.Linear.class,
              com.google.api.Distribution.BucketOptions.Exponential.class,
              com.google.api.Distribution.BucketOptions.Explicit.class,
            };
            java.lang.String info =
                "\u0000\u0003\u0001\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001<\u0000\u0002<" +
                "\u0000\u0003<\u0000";
            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          com.google.protobuf.Parser<com.google.api.Distribution.BucketOptions> parser = PARSER;
          if (parser == null) {
            synchronized (com.google.api.Distribution.BucketOptions.class) {
              parser = PARSER;
              if (parser == null) {
                parser =
                    new DefaultInstanceBasedParser<com.google.api.Distribution.BucketOptions>(
                        DEFAULT_INSTANCE);
                PARSER = parser;
              }
            }
          }
          return parser;
      }
      case GET_MEMOIZED_IS_INITIALIZED: {
        return (byte) 1;
      }
      case SET_MEMOIZED_IS_INITIALIZED: {
        return null;
      }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions)
    private static final com.google.api.Distribution.BucketOptions DEFAULT_INSTANCE;
    static {
      BucketOptions defaultInstance = new BucketOptions();
      // New instances are implicitly immutable so no need to make
      // immutable.
      DEFAULT_INSTANCE = defaultInstance;
      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
        BucketOptions.class, defaultInstance);
    }

    public static com.google.api.Distribution.BucketOptions getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<BucketOptions> PARSER;

    public static com.google.protobuf.Parser<BucketOptions> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface ExemplarOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.api.Distribution.Exemplar)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <pre>
     * Value of the exemplar point. This value determines to which bucket the
     * exemplar belongs.
     * </pre>
     *
     * <code>double value = 1;</code>
     * @return The value.
     */
    double getValue();

    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     * @return Whether the timestamp field is set.
     */
    boolean hasTimestamp();
    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     * @return The timestamp.
     */
    com.google.protobuf.Timestamp getTimestamp();

    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    java.util.List<com.google.protobuf.Any> 
        getAttachmentsList();
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    com.google.protobuf.Any getAttachments(int index);
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    int getAttachmentsCount();
  }
  /**
   * <pre>
   * Exemplars are example points that may be used to annotate aggregated
   * distribution values. They are metadata that gives information about a
   * particular value added to a Distribution bucket, such as a trace ID that
   * was active when a value was added. They may contain further information,
   * such as a example values and timestamps, origin, etc.
   * </pre>
   *
   * Protobuf type {@code google.api.Distribution.Exemplar}
   */
  public  static final class Exemplar extends
      com.google.protobuf.GeneratedMessageLite<
          Exemplar, Exemplar.Builder> implements
      // @@protoc_insertion_point(message_implements:google.api.Distribution.Exemplar)
      ExemplarOrBuilder {
    private Exemplar() {
      attachments_ = emptyProtobufList();
    }
    public static final int VALUE_FIELD_NUMBER = 1;
    private double value_;
    /**
     * <pre>
     * Value of the exemplar point. This value determines to which bucket the
     * exemplar belongs.
     * </pre>
     *
     * <code>double value = 1;</code>
     * @return The value.
     */
    @java.lang.Override
    public double getValue() {
      return value_;
    }
    /**
     * <pre>
     * Value of the exemplar point. This value determines to which bucket the
     * exemplar belongs.
     * </pre>
     *
     * <code>double value = 1;</code>
     * @param value The value to set.
     */
    private void setValue(double value) {
      
      value_ = value;
    }
    /**
     * <pre>
     * Value of the exemplar point. This value determines to which bucket the
     * exemplar belongs.
     * </pre>
     *
     * <code>double value = 1;</code>
     */
    private void clearValue() {
      
      value_ = 0D;
    }

    public static final int TIMESTAMP_FIELD_NUMBER = 2;
    private com.google.protobuf.Timestamp timestamp_;
    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     */
    @java.lang.Override
    public boolean hasTimestamp() {
      return timestamp_ != null;
    }
    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     */
    @java.lang.Override
    public com.google.protobuf.Timestamp getTimestamp() {
      return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
    }
    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     */
    private void setTimestamp(com.google.protobuf.Timestamp value) {
      value.getClass();
  timestamp_ = value;
      
      }
    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     */
    @java.lang.SuppressWarnings({"ReferenceEquality"})
    private void mergeTimestamp(com.google.protobuf.Timestamp value) {
      value.getClass();
  if (timestamp_ != null &&
          timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
        timestamp_ =
          com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
      } else {
        timestamp_ = value;
      }
      
    }
    /**
     * <pre>
     * The observation (sampling) time of the above value.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp timestamp = 2;</code>
     */
    private void clearTimestamp() {  timestamp_ = null;
      
    }

    public static final int ATTACHMENTS_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.Any> attachments_;
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    @java.lang.Override
    public java.util.List<com.google.protobuf.Any> getAttachmentsList() {
      return attachments_;
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    public java.util.List<? extends com.google.protobuf.AnyOrBuilder> 
        getAttachmentsOrBuilderList() {
      return attachments_;
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    @java.lang.Override
    public int getAttachmentsCount() {
      return attachments_.size();
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    @java.lang.Override
    public com.google.protobuf.Any getAttachments(int index) {
      return attachments_.get(index);
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    public com.google.protobuf.AnyOrBuilder getAttachmentsOrBuilder(
        int index) {
      return attachments_.get(index);
    }
    private void ensureAttachmentsIsMutable() {
      com.google.protobuf.Internal.ProtobufList<com.google.protobuf.Any> tmp = attachments_;
      if (!tmp.isModifiable()) {
        attachments_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
       }
    }

    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    private void setAttachments(
        int index, com.google.protobuf.Any value) {
      value.getClass();
  ensureAttachmentsIsMutable();
      attachments_.set(index, value);
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    private void addAttachments(com.google.protobuf.Any value) {
      value.getClass();
  ensureAttachmentsIsMutable();
      attachments_.add(value);
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    private void addAttachments(
        int index, com.google.protobuf.Any value) {
      value.getClass();
  ensureAttachmentsIsMutable();
      attachments_.add(index, value);
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    private void addAllAttachments(
        java.lang.Iterable<? extends com.google.protobuf.Any> values) {
      ensureAttachmentsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, attachments_);
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    private void clearAttachments() {
      attachments_ = emptyProtobufList();
    }
    /**
     * <pre>
     * Contextual information about the example value. Examples are:
     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
     *   Literal string: type.googleapis.com/google.protobuf.StringValue
     *   Labels dropped during aggregation:
     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
     * There may be only a single attachment of any given message type in a
     * single exemplar, and this is enforced by the system.
     * </pre>
     *
     * <code>repeated .google.protobuf.Any attachments = 3;</code>
     */
    private void removeAttachments(int index) {
      ensureAttachmentsIsMutable();
      attachments_.remove(index);
    }

    public static com.google.api.Distribution.Exemplar parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Distribution.Exemplar parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.Exemplar parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Distribution.Exemplar parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return (Builder) DEFAULT_INSTANCE.createBuilder();
    }
    public static Builder newBuilder(com.google.api.Distribution.Exemplar prototype) {
      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
    }

    /**
     * <pre>
     * Exemplars are example points that may be used to annotate aggregated
     * distribution values. They are metadata that gives information about a
     * particular value added to a Distribution bucket, such as a trace ID that
     * was active when a value was added. They may contain further information,
     * such as a example values and timestamps, origin, etc.
     * </pre>
     *
     * Protobuf type {@code google.api.Distribution.Exemplar}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          com.google.api.Distribution.Exemplar, Builder> implements
        // @@protoc_insertion_point(builder_implements:google.api.Distribution.Exemplar)
        com.google.api.Distribution.ExemplarOrBuilder {
      // Construct using com.google.api.Distribution.Exemplar.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <pre>
       * Value of the exemplar point. This value determines to which bucket the
       * exemplar belongs.
       * </pre>
       *
       * <code>double value = 1;</code>
       * @return The value.
       */
      @java.lang.Override
      public double getValue() {
        return instance.getValue();
      }
      /**
       * <pre>
       * Value of the exemplar point. This value determines to which bucket the
       * exemplar belongs.
       * </pre>
       *
       * <code>double value = 1;</code>
       * @param value The value to set.
       * @return This builder for chaining.
       */
      public Builder setValue(double value) {
        copyOnWrite();
        instance.setValue(value);
        return this;
      }
      /**
       * <pre>
       * Value of the exemplar point. This value determines to which bucket the
       * exemplar belongs.
       * </pre>
       *
       * <code>double value = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearValue() {
        copyOnWrite();
        instance.clearValue();
        return this;
      }

      /**
       * <pre>
       * The observation (sampling) time of the above value.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp timestamp = 2;</code>
       */
      @java.lang.Override
      public boolean hasTimestamp() {
        return instance.hasTimestamp();
      }
      /**
       * <pre>
       * The observation (sampling) time of the above value.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp timestamp = 2;</code>
       */
      @java.lang.Override
      public com.google.protobuf.Timestamp getTimestamp() {
        return instance.getTimestamp();
      }
      /**
       * <pre>
       * The observation (sampling) time of the above value.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp timestamp = 2;</code>
       */
      public Builder setTimestamp(com.google.protobuf.Timestamp value) {
        copyOnWrite();
        instance.setTimestamp(value);
        return this;
        }
      /**
       * <pre>
       * The observation (sampling) time of the above value.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp timestamp = 2;</code>
       */
      public Builder setTimestamp(
          com.google.protobuf.Timestamp.Builder builderForValue) {
        copyOnWrite();
        instance.setTimestamp(builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * The observation (sampling) time of the above value.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp timestamp = 2;</code>
       */
      public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
        copyOnWrite();
        instance.mergeTimestamp(value);
        return this;
      }
      /**
       * <pre>
       * The observation (sampling) time of the above value.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp timestamp = 2;</code>
       */
      public Builder clearTimestamp() {  copyOnWrite();
        instance.clearTimestamp();
        return this;
      }

      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      @java.lang.Override
      public java.util.List<com.google.protobuf.Any> getAttachmentsList() {
        return java.util.Collections.unmodifiableList(
            instance.getAttachmentsList());
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      @java.lang.Override
      public int getAttachmentsCount() {
        return instance.getAttachmentsCount();
      }/**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      @java.lang.Override
      public com.google.protobuf.Any getAttachments(int index) {
        return instance.getAttachments(index);
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder setAttachments(
          int index, com.google.protobuf.Any value) {
        copyOnWrite();
        instance.setAttachments(index, value);
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder setAttachments(
          int index, com.google.protobuf.Any.Builder builderForValue) {
        copyOnWrite();
        instance.setAttachments(index,
            builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder addAttachments(com.google.protobuf.Any value) {
        copyOnWrite();
        instance.addAttachments(value);
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder addAttachments(
          int index, com.google.protobuf.Any value) {
        copyOnWrite();
        instance.addAttachments(index, value);
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder addAttachments(
          com.google.protobuf.Any.Builder builderForValue) {
        copyOnWrite();
        instance.addAttachments(builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder addAttachments(
          int index, com.google.protobuf.Any.Builder builderForValue) {
        copyOnWrite();
        instance.addAttachments(index,
            builderForValue.build());
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder addAllAttachments(
          java.lang.Iterable<? extends com.google.protobuf.Any> values) {
        copyOnWrite();
        instance.addAllAttachments(values);
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder clearAttachments() {
        copyOnWrite();
        instance.clearAttachments();
        return this;
      }
      /**
       * <pre>
       * Contextual information about the example value. Examples are:
       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
       *   Literal string: type.googleapis.com/google.protobuf.StringValue
       *   Labels dropped during aggregation:
       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
       * There may be only a single attachment of any given message type in a
       * single exemplar, and this is enforced by the system.
       * </pre>
       *
       * <code>repeated .google.protobuf.Any attachments = 3;</code>
       */
      public Builder removeAttachments(int index) {
        copyOnWrite();
        instance.removeAttachments(index);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:google.api.Distribution.Exemplar)
    }
    @java.lang.Override
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new com.google.api.Distribution.Exemplar();
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case BUILD_MESSAGE_INFO: {
            java.lang.Object[] objects = new java.lang.Object[] {
              "value_",
              "timestamp_",
              "attachments_",
              com.google.protobuf.Any.class,
            };
            java.lang.String info =
                "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u0000\u0002\t" +
                "\u0003\u001b";
            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          com.google.protobuf.Parser<com.google.api.Distribution.Exemplar> parser = PARSER;
          if (parser == null) {
            synchronized (com.google.api.Distribution.Exemplar.class) {
              parser = PARSER;
              if (parser == null) {
                parser =
                    new DefaultInstanceBasedParser<com.google.api.Distribution.Exemplar>(
                        DEFAULT_INSTANCE);
                PARSER = parser;
              }
            }
          }
          return parser;
      }
      case GET_MEMOIZED_IS_INITIALIZED: {
        return (byte) 1;
      }
      case SET_MEMOIZED_IS_INITIALIZED: {
        return null;
      }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:google.api.Distribution.Exemplar)
    private static final com.google.api.Distribution.Exemplar DEFAULT_INSTANCE;
    static {
      Exemplar defaultInstance = new Exemplar();
      // New instances are implicitly immutable so no need to make
      // immutable.
      DEFAULT_INSTANCE = defaultInstance;
      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
        Exemplar.class, defaultInstance);
    }

    public static com.google.api.Distribution.Exemplar getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Exemplar> PARSER;

    public static com.google.protobuf.Parser<Exemplar> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public static final int COUNT_FIELD_NUMBER = 1;
  private long count_;
  /**
   * <pre>
   * 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.
   * </pre>
   *
   * <code>int64 count = 1;</code>
   * @return The count.
   */
  @java.lang.Override
  public long getCount() {
    return count_;
  }
  /**
   * <pre>
   * 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.
   * </pre>
   *
   * <code>int64 count = 1;</code>
   * @param value The count to set.
   */
  private void setCount(long value) {
    
    count_ = value;
  }
  /**
   * <pre>
   * 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.
   * </pre>
   *
   * <code>int64 count = 1;</code>
   */
  private void clearCount() {
    
    count_ = 0L;
  }

  public static final int MEAN_FIELD_NUMBER = 2;
  private double mean_;
  /**
   * <pre>
   * The arithmetic mean of the values in the population. If `count` is zero
   * then this field must be zero.
   * </pre>
   *
   * <code>double mean = 2;</code>
   * @return The mean.
   */
  @java.lang.Override
  public double getMean() {
    return mean_;
  }
  /**
   * <pre>
   * The arithmetic mean of the values in the population. If `count` is zero
   * then this field must be zero.
   * </pre>
   *
   * <code>double mean = 2;</code>
   * @param value The mean to set.
   */
  private void setMean(double value) {
    
    mean_ = value;
  }
  /**
   * <pre>
   * The arithmetic mean of the values in the population. If `count` is zero
   * then this field must be zero.
   * </pre>
   *
   * <code>double mean = 2;</code>
   */
  private void clearMean() {
    
    mean_ = 0D;
  }

  public static final int SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER = 3;
  private double sumOfSquaredDeviation_;
  /**
   * <pre>
   * 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 232, 3rd edition
   * describes Welford's method for accumulating this sum in one pass.
   * If `count` is zero then this field must be zero.
   * </pre>
   *
   * <code>double sum_of_squared_deviation = 3;</code>
   * @return The sumOfSquaredDeviation.
   */
  @java.lang.Override
  public double getSumOfSquaredDeviation() {
    return sumOfSquaredDeviation_;
  }
  /**
   * <pre>
   * 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 232, 3rd edition
   * describes Welford's method for accumulating this sum in one pass.
   * If `count` is zero then this field must be zero.
   * </pre>
   *
   * <code>double sum_of_squared_deviation = 3;</code>
   * @param value The sumOfSquaredDeviation to set.
   */
  private void setSumOfSquaredDeviation(double value) {
    
    sumOfSquaredDeviation_ = value;
  }
  /**
   * <pre>
   * 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 232, 3rd edition
   * describes Welford's method for accumulating this sum in one pass.
   * If `count` is zero then this field must be zero.
   * </pre>
   *
   * <code>double sum_of_squared_deviation = 3;</code>
   */
  private void clearSumOfSquaredDeviation() {
    
    sumOfSquaredDeviation_ = 0D;
  }

  public static final int RANGE_FIELD_NUMBER = 4;
  private com.google.api.Distribution.Range range_;
  /**
   * <pre>
   * If specified, contains the range of the population values. The field
   * must not be present if the `count` is zero.
   * </pre>
   *
   * <code>.google.api.Distribution.Range range = 4;</code>
   */
  @java.lang.Override
  public boolean hasRange() {
    return range_ != null;
  }
  /**
   * <pre>
   * If specified, contains the range of the population values. The field
   * must not be present if the `count` is zero.
   * </pre>
   *
   * <code>.google.api.Distribution.Range range = 4;</code>
   */
  @java.lang.Override
  public com.google.api.Distribution.Range getRange() {
    return range_ == null ? com.google.api.Distribution.Range.getDefaultInstance() : range_;
  }
  /**
   * <pre>
   * If specified, contains the range of the population values. The field
   * must not be present if the `count` is zero.
   * </pre>
   *
   * <code>.google.api.Distribution.Range range = 4;</code>
   */
  private void setRange(com.google.api.Distribution.Range value) {
    value.getClass();
  range_ = value;
    
    }
  /**
   * <pre>
   * If specified, contains the range of the population values. The field
   * must not be present if the `count` is zero.
   * </pre>
   *
   * <code>.google.api.Distribution.Range range = 4;</code>
   */
  @java.lang.SuppressWarnings({"ReferenceEquality"})
  private void mergeRange(com.google.api.Distribution.Range value) {
    value.getClass();
  if (range_ != null &&
        range_ != com.google.api.Distribution.Range.getDefaultInstance()) {
      range_ =
        com.google.api.Distribution.Range.newBuilder(range_).mergeFrom(value).buildPartial();
    } else {
      range_ = value;
    }
    
  }
  /**
   * <pre>
   * If specified, contains the range of the population values. The field
   * must not be present if the `count` is zero.
   * </pre>
   *
   * <code>.google.api.Distribution.Range range = 4;</code>
   */
  private void clearRange() {  range_ = null;
    
  }

  public static final int BUCKET_OPTIONS_FIELD_NUMBER = 6;
  private com.google.api.Distribution.BucketOptions bucketOptions_;
  /**
   * <pre>
   * Defines the histogram bucket boundaries. If the distribution does not
   * contain a histogram, then omit this field.
   * </pre>
   *
   * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
   */
  @java.lang.Override
  public boolean hasBucketOptions() {
    return bucketOptions_ != null;
  }
  /**
   * <pre>
   * Defines the histogram bucket boundaries. If the distribution does not
   * contain a histogram, then omit this field.
   * </pre>
   *
   * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
   */
  @java.lang.Override
  public com.google.api.Distribution.BucketOptions getBucketOptions() {
    return bucketOptions_ == null ? com.google.api.Distribution.BucketOptions.getDefaultInstance() : bucketOptions_;
  }
  /**
   * <pre>
   * Defines the histogram bucket boundaries. If the distribution does not
   * contain a histogram, then omit this field.
   * </pre>
   *
   * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
   */
  private void setBucketOptions(com.google.api.Distribution.BucketOptions value) {
    value.getClass();
  bucketOptions_ = value;
    
    }
  /**
   * <pre>
   * Defines the histogram bucket boundaries. If the distribution does not
   * contain a histogram, then omit this field.
   * </pre>
   *
   * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
   */
  @java.lang.SuppressWarnings({"ReferenceEquality"})
  private void mergeBucketOptions(com.google.api.Distribution.BucketOptions value) {
    value.getClass();
  if (bucketOptions_ != null &&
        bucketOptions_ != com.google.api.Distribution.BucketOptions.getDefaultInstance()) {
      bucketOptions_ =
        com.google.api.Distribution.BucketOptions.newBuilder(bucketOptions_).mergeFrom(value).buildPartial();
    } else {
      bucketOptions_ = value;
    }
    
  }
  /**
   * <pre>
   * Defines the histogram bucket boundaries. If the distribution does not
   * contain a histogram, then omit this field.
   * </pre>
   *
   * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
   */
  private void clearBucketOptions() {  bucketOptions_ = null;
    
  }

  public static final int BUCKET_COUNTS_FIELD_NUMBER = 7;
  private com.google.protobuf.Internal.LongList bucketCounts_;
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   * @return A list containing the bucketCounts.
   */
  @java.lang.Override
  public java.util.List<java.lang.Long>
      getBucketCountsList() {
    return bucketCounts_;
  }
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   * @return The count of bucketCounts.
   */
  @java.lang.Override
  public int getBucketCountsCount() {
    return bucketCounts_.size();
  }
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   * @param index The index of the element to return.
   * @return The bucketCounts at the given index.
   */
  @java.lang.Override
  public long getBucketCounts(int index) {
    return bucketCounts_.getLong(index);
  }
  private int bucketCountsMemoizedSerializedSize = -1;
  private void ensureBucketCountsIsMutable() {
    com.google.protobuf.Internal.LongList tmp = bucketCounts_;
    if (!tmp.isModifiable()) {
      bucketCounts_ =
          com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
     }
  }
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   * @param index The index to set the value at.
   * @param value The bucketCounts to set.
   */
  private void setBucketCounts(
      int index, long value) {
    ensureBucketCountsIsMutable();
    bucketCounts_.setLong(index, value);
  }
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   * @param value The bucketCounts to add.
   */
  private void addBucketCounts(long value) {
    ensureBucketCountsIsMutable();
    bucketCounts_.addLong(value);
  }
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   * @param values The bucketCounts to add.
   */
  private void addAllBucketCounts(
      java.lang.Iterable<? extends java.lang.Long> values) {
    ensureBucketCountsIsMutable();
    com.google.protobuf.AbstractMessageLite.addAll(
        values, bucketCounts_);
  }
  /**
   * <pre>
   * The number of values in each bucket of the histogram, as described in
   * `bucket_options`. If the distribution does not have a histogram, then omit
   * this field. If there is a histogram, then the sum of the values in
   * `bucket_counts` must equal the value in the `count` field of the
   * distribution.
   * If present, `bucket_counts` should contain N values, where N is the number
   * of buckets specified in `bucket_options`. If you supply fewer than N
   * values, the remaining values are assumed to be 0.
   * The order of the values in `bucket_counts` follows the bucket numbering
   * schemes described for the three bucket types. The first value must be the
   * count for the underflow bucket (number 0). The next N-2 values are the
   * counts for the finite buckets (number 1 through N-2). The N'th value in
   * `bucket_counts` is the count for the overflow bucket (number N-1).
   * </pre>
   *
   * <code>repeated int64 bucket_counts = 7;</code>
   */
  private void clearBucketCounts() {
    bucketCounts_ = emptyLongList();
  }

  public static final int EXEMPLARS_FIELD_NUMBER = 10;
  private com.google.protobuf.Internal.ProtobufList<com.google.api.Distribution.Exemplar> exemplars_;
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.api.Distribution.Exemplar> getExemplarsList() {
    return exemplars_;
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  public java.util.List<? extends com.google.api.Distribution.ExemplarOrBuilder> 
      getExemplarsOrBuilderList() {
    return exemplars_;
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  @java.lang.Override
  public int getExemplarsCount() {
    return exemplars_.size();
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  @java.lang.Override
  public com.google.api.Distribution.Exemplar getExemplars(int index) {
    return exemplars_.get(index);
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  public com.google.api.Distribution.ExemplarOrBuilder getExemplarsOrBuilder(
      int index) {
    return exemplars_.get(index);
  }
  private void ensureExemplarsIsMutable() {
    com.google.protobuf.Internal.ProtobufList<com.google.api.Distribution.Exemplar> tmp = exemplars_;
    if (!tmp.isModifiable()) {
      exemplars_ =
          com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
     }
  }

  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  private void setExemplars(
      int index, com.google.api.Distribution.Exemplar value) {
    value.getClass();
  ensureExemplarsIsMutable();
    exemplars_.set(index, value);
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  private void addExemplars(com.google.api.Distribution.Exemplar value) {
    value.getClass();
  ensureExemplarsIsMutable();
    exemplars_.add(value);
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  private void addExemplars(
      int index, com.google.api.Distribution.Exemplar value) {
    value.getClass();
  ensureExemplarsIsMutable();
    exemplars_.add(index, value);
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  private void addAllExemplars(
      java.lang.Iterable<? extends com.google.api.Distribution.Exemplar> values) {
    ensureExemplarsIsMutable();
    com.google.protobuf.AbstractMessageLite.addAll(
        values, exemplars_);
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  private void clearExemplars() {
    exemplars_ = emptyProtobufList();
  }
  /**
   * <pre>
   * Must be in increasing order of `value` field.
   * </pre>
   *
   * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
   */
  private void removeExemplars(int index) {
    ensureExemplarsIsMutable();
    exemplars_.remove(index);
  }

  public static com.google.api.Distribution parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.api.Distribution parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.api.Distribution parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.api.Distribution parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.api.Distribution parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.api.Distribution parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.api.Distribution parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.api.Distribution parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.api.Distribution parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static com.google.api.Distribution parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.api.Distribution parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.api.Distribution parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return (Builder) DEFAULT_INSTANCE.createBuilder();
  }
  public static Builder newBuilder(com.google.api.Distribution prototype) {
    return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * <pre>
   * `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.
   * The summary statistics are the count, mean, sum of the squared deviation from
   * the mean, the minimum, and the maximum of the set of population of values.
   * The histogram is based on a sequence of buckets and gives a count of values
   * that fall into each bucket. The boundaries of the buckets are given either
   * explicitly or by formulas for buckets of fixed or exponentially increasing
   * widths.
   * Although it is not forbidden, it is generally a bad idea to include
   * non-finite values (infinities or NaNs) in the population of values, as this
   * will render the `mean` and `sum_of_squared_deviation` fields meaningless.
   * </pre>
   *
   * Protobuf type {@code google.api.Distribution}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        com.google.api.Distribution, Builder> implements
      // @@protoc_insertion_point(builder_implements:google.api.Distribution)
      com.google.api.DistributionOrBuilder {
    // Construct using com.google.api.Distribution.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <pre>
     * 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.
     * </pre>
     *
     * <code>int64 count = 1;</code>
     * @return The count.
     */
    @java.lang.Override
    public long getCount() {
      return instance.getCount();
    }
    /**
     * <pre>
     * 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.
     * </pre>
     *
     * <code>int64 count = 1;</code>
     * @param value The count to set.
     * @return This builder for chaining.
     */
    public Builder setCount(long value) {
      copyOnWrite();
      instance.setCount(value);
      return this;
    }
    /**
     * <pre>
     * 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.
     * </pre>
     *
     * <code>int64 count = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearCount() {
      copyOnWrite();
      instance.clearCount();
      return this;
    }

    /**
     * <pre>
     * The arithmetic mean of the values in the population. If `count` is zero
     * then this field must be zero.
     * </pre>
     *
     * <code>double mean = 2;</code>
     * @return The mean.
     */
    @java.lang.Override
    public double getMean() {
      return instance.getMean();
    }
    /**
     * <pre>
     * The arithmetic mean of the values in the population. If `count` is zero
     * then this field must be zero.
     * </pre>
     *
     * <code>double mean = 2;</code>
     * @param value The mean to set.
     * @return This builder for chaining.
     */
    public Builder setMean(double value) {
      copyOnWrite();
      instance.setMean(value);
      return this;
    }
    /**
     * <pre>
     * The arithmetic mean of the values in the population. If `count` is zero
     * then this field must be zero.
     * </pre>
     *
     * <code>double mean = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearMean() {
      copyOnWrite();
      instance.clearMean();
      return this;
    }

    /**
     * <pre>
     * 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 232, 3rd edition
     * describes Welford's method for accumulating this sum in one pass.
     * If `count` is zero then this field must be zero.
     * </pre>
     *
     * <code>double sum_of_squared_deviation = 3;</code>
     * @return The sumOfSquaredDeviation.
     */
    @java.lang.Override
    public double getSumOfSquaredDeviation() {
      return instance.getSumOfSquaredDeviation();
    }
    /**
     * <pre>
     * 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 232, 3rd edition
     * describes Welford's method for accumulating this sum in one pass.
     * If `count` is zero then this field must be zero.
     * </pre>
     *
     * <code>double sum_of_squared_deviation = 3;</code>
     * @param value The sumOfSquaredDeviation to set.
     * @return This builder for chaining.
     */
    public Builder setSumOfSquaredDeviation(double value) {
      copyOnWrite();
      instance.setSumOfSquaredDeviation(value);
      return this;
    }
    /**
     * <pre>
     * 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 232, 3rd edition
     * describes Welford's method for accumulating this sum in one pass.
     * If `count` is zero then this field must be zero.
     * </pre>
     *
     * <code>double sum_of_squared_deviation = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearSumOfSquaredDeviation() {
      copyOnWrite();
      instance.clearSumOfSquaredDeviation();
      return this;
    }

    /**
     * <pre>
     * If specified, contains the range of the population values. The field
     * must not be present if the `count` is zero.
     * </pre>
     *
     * <code>.google.api.Distribution.Range range = 4;</code>
     */
    @java.lang.Override
    public boolean hasRange() {
      return instance.hasRange();
    }
    /**
     * <pre>
     * If specified, contains the range of the population values. The field
     * must not be present if the `count` is zero.
     * </pre>
     *
     * <code>.google.api.Distribution.Range range = 4;</code>
     */
    @java.lang.Override
    public com.google.api.Distribution.Range getRange() {
      return instance.getRange();
    }
    /**
     * <pre>
     * If specified, contains the range of the population values. The field
     * must not be present if the `count` is zero.
     * </pre>
     *
     * <code>.google.api.Distribution.Range range = 4;</code>
     */
    public Builder setRange(com.google.api.Distribution.Range value) {
      copyOnWrite();
      instance.setRange(value);
      return this;
      }
    /**
     * <pre>
     * If specified, contains the range of the population values. The field
     * must not be present if the `count` is zero.
     * </pre>
     *
     * <code>.google.api.Distribution.Range range = 4;</code>
     */
    public Builder setRange(
        com.google.api.Distribution.Range.Builder builderForValue) {
      copyOnWrite();
      instance.setRange(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * If specified, contains the range of the population values. The field
     * must not be present if the `count` is zero.
     * </pre>
     *
     * <code>.google.api.Distribution.Range range = 4;</code>
     */
    public Builder mergeRange(com.google.api.Distribution.Range value) {
      copyOnWrite();
      instance.mergeRange(value);
      return this;
    }
    /**
     * <pre>
     * If specified, contains the range of the population values. The field
     * must not be present if the `count` is zero.
     * </pre>
     *
     * <code>.google.api.Distribution.Range range = 4;</code>
     */
    public Builder clearRange() {  copyOnWrite();
      instance.clearRange();
      return this;
    }

    /**
     * <pre>
     * Defines the histogram bucket boundaries. If the distribution does not
     * contain a histogram, then omit this field.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
     */
    @java.lang.Override
    public boolean hasBucketOptions() {
      return instance.hasBucketOptions();
    }
    /**
     * <pre>
     * Defines the histogram bucket boundaries. If the distribution does not
     * contain a histogram, then omit this field.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
     */
    @java.lang.Override
    public com.google.api.Distribution.BucketOptions getBucketOptions() {
      return instance.getBucketOptions();
    }
    /**
     * <pre>
     * Defines the histogram bucket boundaries. If the distribution does not
     * contain a histogram, then omit this field.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
     */
    public Builder setBucketOptions(com.google.api.Distribution.BucketOptions value) {
      copyOnWrite();
      instance.setBucketOptions(value);
      return this;
      }
    /**
     * <pre>
     * Defines the histogram bucket boundaries. If the distribution does not
     * contain a histogram, then omit this field.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
     */
    public Builder setBucketOptions(
        com.google.api.Distribution.BucketOptions.Builder builderForValue) {
      copyOnWrite();
      instance.setBucketOptions(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Defines the histogram bucket boundaries. If the distribution does not
     * contain a histogram, then omit this field.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
     */
    public Builder mergeBucketOptions(com.google.api.Distribution.BucketOptions value) {
      copyOnWrite();
      instance.mergeBucketOptions(value);
      return this;
    }
    /**
     * <pre>
     * Defines the histogram bucket boundaries. If the distribution does not
     * contain a histogram, then omit this field.
     * </pre>
     *
     * <code>.google.api.Distribution.BucketOptions bucket_options = 6;</code>
     */
    public Builder clearBucketOptions() {  copyOnWrite();
      instance.clearBucketOptions();
      return this;
    }

    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @return A list containing the bucketCounts.
     */
    @java.lang.Override
    public java.util.List<java.lang.Long>
        getBucketCountsList() {
      return java.util.Collections.unmodifiableList(
          instance.getBucketCountsList());
    }
    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @return The count of bucketCounts.
     */
    @java.lang.Override
    public int getBucketCountsCount() {
      return instance.getBucketCountsCount();
    }
    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @param index The index of the element to return.
     * @return The bucketCounts at the given index.
     */
    @java.lang.Override
    public long getBucketCounts(int index) {
      return instance.getBucketCounts(index);
    }
    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @param value The bucketCounts to set.
     * @return This builder for chaining.
     */
    public Builder setBucketCounts(
        int index, long value) {
      copyOnWrite();
      instance.setBucketCounts(index, value);
      return this;
    }
    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @param value The bucketCounts to add.
     * @return This builder for chaining.
     */
    public Builder addBucketCounts(long value) {
      copyOnWrite();
      instance.addBucketCounts(value);
      return this;
    }
    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @param values The bucketCounts to add.
     * @return This builder for chaining.
     */
    public Builder addAllBucketCounts(
        java.lang.Iterable<? extends java.lang.Long> values) {
      copyOnWrite();
      instance.addAllBucketCounts(values);
      return this;
    }
    /**
     * <pre>
     * The number of values in each bucket of the histogram, as described in
     * `bucket_options`. If the distribution does not have a histogram, then omit
     * this field. If there is a histogram, then the sum of the values in
     * `bucket_counts` must equal the value in the `count` field of the
     * distribution.
     * If present, `bucket_counts` should contain N values, where N is the number
     * of buckets specified in `bucket_options`. If you supply fewer than N
     * values, the remaining values are assumed to be 0.
     * The order of the values in `bucket_counts` follows the bucket numbering
     * schemes described for the three bucket types. The first value must be the
     * count for the underflow bucket (number 0). The next N-2 values are the
     * counts for the finite buckets (number 1 through N-2). The N'th value in
     * `bucket_counts` is the count for the overflow bucket (number N-1).
     * </pre>
     *
     * <code>repeated int64 bucket_counts = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearBucketCounts() {
      copyOnWrite();
      instance.clearBucketCounts();
      return this;
    }

    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    @java.lang.Override
    public java.util.List<com.google.api.Distribution.Exemplar> getExemplarsList() {
      return java.util.Collections.unmodifiableList(
          instance.getExemplarsList());
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    @java.lang.Override
    public int getExemplarsCount() {
      return instance.getExemplarsCount();
    }/**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    @java.lang.Override
    public com.google.api.Distribution.Exemplar getExemplars(int index) {
      return instance.getExemplars(index);
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder setExemplars(
        int index, com.google.api.Distribution.Exemplar value) {
      copyOnWrite();
      instance.setExemplars(index, value);
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder setExemplars(
        int index, com.google.api.Distribution.Exemplar.Builder builderForValue) {
      copyOnWrite();
      instance.setExemplars(index,
          builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder addExemplars(com.google.api.Distribution.Exemplar value) {
      copyOnWrite();
      instance.addExemplars(value);
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder addExemplars(
        int index, com.google.api.Distribution.Exemplar value) {
      copyOnWrite();
      instance.addExemplars(index, value);
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder addExemplars(
        com.google.api.Distribution.Exemplar.Builder builderForValue) {
      copyOnWrite();
      instance.addExemplars(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder addExemplars(
        int index, com.google.api.Distribution.Exemplar.Builder builderForValue) {
      copyOnWrite();
      instance.addExemplars(index,
          builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder addAllExemplars(
        java.lang.Iterable<? extends com.google.api.Distribution.Exemplar> values) {
      copyOnWrite();
      instance.addAllExemplars(values);
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder clearExemplars() {
      copyOnWrite();
      instance.clearExemplars();
      return this;
    }
    /**
     * <pre>
     * Must be in increasing order of `value` field.
     * </pre>
     *
     * <code>repeated .google.api.Distribution.Exemplar exemplars = 10;</code>
     */
    public Builder removeExemplars(int index) {
      copyOnWrite();
      instance.removeExemplars(index);
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.api.Distribution)
  }
  @java.lang.Override
  @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
  protected final java.lang.Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      java.lang.Object arg0, java.lang.Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new com.google.api.Distribution();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "count_",
            "mean_",
            "sumOfSquaredDeviation_",
            "range_",
            "bucketOptions_",
            "bucketCounts_",
            "exemplars_",
            com.google.api.Distribution.Exemplar.class,
          };
          java.lang.String info =
              "\u0000\u0007\u0000\u0000\u0001\n\u0007\u0000\u0002\u0000\u0001\u0002\u0002\u0000" +
              "\u0003\u0000\u0004\t\u0006\t\u0007%\n\u001b";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser<com.google.api.Distribution> parser = PARSER;
        if (parser == null) {
          synchronized (com.google.api.Distribution.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser<com.google.api.Distribution>(
                      DEFAULT_INSTANCE);
              PARSER = parser;
            }
          }
        }
        return parser;
    }
    case GET_MEMOIZED_IS_INITIALIZED: {
      return (byte) 1;
    }
    case SET_MEMOIZED_IS_INITIALIZED: {
      return null;
    }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:google.api.Distribution)
  private static final com.google.api.Distribution DEFAULT_INSTANCE;
  static {
    Distribution defaultInstance = new Distribution();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      Distribution.class, defaultInstance);
  }

  public static com.google.api.Distribution getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static volatile com.google.protobuf.Parser<Distribution> PARSER;

  public static com.google.protobuf.Parser<Distribution> parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}

