// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/automl/v1beta1/data_stats.proto

package com.google.cloud.automl.v1beta1;

/**
 *
 *
 * <pre>
 * The data statistics of a series of FLOAT64 values.
 * </pre>
 *
 * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats}
 */
public final class Float64Stats extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Float64Stats)
    Float64StatsOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Float64Stats.newBuilder() to construct.
  private Float64Stats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Float64Stats() {
    quantiles_ = emptyDoubleList();
    histogramBuckets_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  private Float64Stats(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 9:
            {
              mean_ = input.readDouble();
              break;
            }
          case 17:
            {
              standardDeviation_ = input.readDouble();
              break;
            }
          case 25:
            {
              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                quantiles_ = newDoubleList();
                mutable_bitField0_ |= 0x00000004;
              }
              quantiles_.addDouble(input.readDouble());
              break;
            }
          case 26:
            {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
                quantiles_ = newDoubleList();
                mutable_bitField0_ |= 0x00000004;
              }
              while (input.getBytesUntilLimit() > 0) {
                quantiles_.addDouble(input.readDouble());
              }
              input.popLimit(limit);
              break;
            }
          case 34:
            {
              if (!((mutable_bitField0_ & 0x00000008) != 0)) {
                histogramBuckets_ =
                    new java.util.ArrayList<
                        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>();
                mutable_bitField0_ |= 0x00000008;
              }
              histogramBuckets_.add(
                  input.readMessage(
                      com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.parser(),
                      extensionRegistry));
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000004) != 0)) {
        quantiles_.makeImmutable(); // C
      }
      if (((mutable_bitField0_ & 0x00000008) != 0)) {
        histogramBuckets_ = java.util.Collections.unmodifiableList(histogramBuckets_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.automl.v1beta1.DataStatsOuterClass
        .internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.automl.v1beta1.DataStatsOuterClass
        .internal_static_google_cloud_automl_v1beta1_Float64Stats_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.automl.v1beta1.Float64Stats.class,
            com.google.cloud.automl.v1beta1.Float64Stats.Builder.class);
  }

  public interface HistogramBucketOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The minimum value of the bucket, inclusive.
     * </pre>
     *
     * <code>double min = 1;</code>
     */
    double getMin();

    /**
     *
     *
     * <pre>
     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
     * which case it's inclusive.
     * </pre>
     *
     * <code>double max = 2;</code>
     */
    double getMax();

    /**
     *
     *
     * <pre>
     * The number of data values that are in the bucket, i.e. are between
     * min and max values.
     * </pre>
     *
     * <code>int64 count = 3;</code>
     */
    long getCount();
  }
  /**
   *
   *
   * <pre>
   * A bucket of a histogram.
   * </pre>
   *
   * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats.HistogramBucket}
   */
  public static final class HistogramBucket extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)
      HistogramBucketOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use HistogramBucket.newBuilder() to construct.
    private HistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private HistogramBucket() {}

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
      return this.unknownFields;
    }

    private HistogramBucket(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 9:
              {
                min_ = input.readDouble();
                break;
              }
            case 17:
              {
                max_ = input.readDouble();
                break;
              }
            case 24:
              {
                count_ = input.readInt64();
                break;
              }
            default:
              {
                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.automl.v1beta1.DataStatsOuterClass
          .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.automl.v1beta1.DataStatsOuterClass
          .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.class,
              com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder.class);
    }

    public static final int MIN_FIELD_NUMBER = 1;
    private double min_;
    /**
     *
     *
     * <pre>
     * The minimum value of the bucket, inclusive.
     * </pre>
     *
     * <code>double min = 1;</code>
     */
    public double getMin() {
      return min_;
    }

    public static final int MAX_FIELD_NUMBER = 2;
    private double max_;
    /**
     *
     *
     * <pre>
     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
     * which case it's inclusive.
     * </pre>
     *
     * <code>double max = 2;</code>
     */
    public double getMax() {
      return max_;
    }

    public static final int COUNT_FIELD_NUMBER = 3;
    private long count_;
    /**
     *
     *
     * <pre>
     * The number of data values that are in the bucket, i.e. are between
     * min and max values.
     * </pre>
     *
     * <code>int64 count = 3;</code>
     */
    public long getCount() {
      return count_;
    }

    private byte memoizedIsInitialized = -1;

    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (min_ != 0D) {
        output.writeDouble(1, min_);
      }
      if (max_ != 0D) {
        output.writeDouble(2, max_);
      }
      if (count_ != 0L) {
        output.writeInt64(3, count_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (min_ != 0D) {
        size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, min_);
      }
      if (max_ != 0D) {
        size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, max_);
      }
      if (count_ != 0L) {
        size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)) {
        return super.equals(obj);
      }
      com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket other =
          (com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) obj;

      if (java.lang.Double.doubleToLongBits(getMin())
          != java.lang.Double.doubleToLongBits(other.getMin())) return false;
      if (java.lang.Double.doubleToLongBits(getMax())
          != java.lang.Double.doubleToLongBits(other.getMax())) return false;
      if (getCount() != other.getCount()) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + MIN_FIELD_NUMBER;
      hash =
          (53 * hash)
              + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMin()));
      hash = (37 * hash) + MAX_FIELD_NUMBER;
      hash =
          (53 * hash)
              + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMax()));
      hash = (37 * hash) + COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseDelimitedFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() {
      return newBuilder();
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     *
     *
     * <pre>
     * A bucket of a histogram.
     * </pre>
     *
     * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats.HistogramBucket}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.automl.v1beta1.DataStatsOuterClass
            .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.automl.v1beta1.DataStatsOuterClass
            .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.class,
                com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder.class);
      }

      // Construct using com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        min_ = 0D;

        max_ = 0D;

        count_ = 0L;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.automl.v1beta1.DataStatsOuterClass
            .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket
          getDefaultInstanceForType() {
        return com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket build() {
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket buildPartial() {
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket result =
            new com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket(this);
        result.min_ = min_;
        result.max_ = max_;
        result.count_ = count_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }

      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
        return super.setField(field, value);
      }

      @java.lang.Override
      public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }

      @java.lang.Override
      public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }

      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index,
          java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }

      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) {
          return mergeFrom((com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket other) {
        if (other
            == com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance())
          return this;
        if (other.getMin() != 0D) {
          setMin(other.getMin());
        }
        if (other.getMax() != 0D) {
          setMax(other.getMax());
        }
        if (other.getCount() != 0L) {
          setCount(other.getCount());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)
                  e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private double min_;
      /**
       *
       *
       * <pre>
       * The minimum value of the bucket, inclusive.
       * </pre>
       *
       * <code>double min = 1;</code>
       */
      public double getMin() {
        return min_;
      }
      /**
       *
       *
       * <pre>
       * The minimum value of the bucket, inclusive.
       * </pre>
       *
       * <code>double min = 1;</code>
       */
      public Builder setMin(double value) {

        min_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The minimum value of the bucket, inclusive.
       * </pre>
       *
       * <code>double min = 1;</code>
       */
      public Builder clearMin() {

        min_ = 0D;
        onChanged();
        return this;
      }

      private double max_;
      /**
       *
       *
       * <pre>
       * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
       * which case it's inclusive.
       * </pre>
       *
       * <code>double max = 2;</code>
       */
      public double getMax() {
        return max_;
      }
      /**
       *
       *
       * <pre>
       * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
       * which case it's inclusive.
       * </pre>
       *
       * <code>double max = 2;</code>
       */
      public Builder setMax(double value) {

        max_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
       * which case it's inclusive.
       * </pre>
       *
       * <code>double max = 2;</code>
       */
      public Builder clearMax() {

        max_ = 0D;
        onChanged();
        return this;
      }

      private long count_;
      /**
       *
       *
       * <pre>
       * The number of data values that are in the bucket, i.e. are between
       * min and max values.
       * </pre>
       *
       * <code>int64 count = 3;</code>
       */
      public long getCount() {
        return count_;
      }
      /**
       *
       *
       * <pre>
       * The number of data values that are in the bucket, i.e. are between
       * min and max values.
       * </pre>
       *
       * <code>int64 count = 3;</code>
       */
      public Builder setCount(long value) {

        count_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The number of data values that are in the bucket, i.e. are between
       * min and max values.
       * </pre>
       *
       * <code>int64 count = 3;</code>
       */
      public Builder clearCount() {

        count_ = 0L;
        onChanged();
        return this;
      }

      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }

      // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)
    private static final com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket();
    }

    public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<HistogramBucket> PARSER =
        new com.google.protobuf.AbstractParser<HistogramBucket>() {
          @java.lang.Override
          public HistogramBucket parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            return new HistogramBucket(input, extensionRegistry);
          }
        };

    public static com.google.protobuf.Parser<HistogramBucket> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<HistogramBucket> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int bitField0_;
  public static final int MEAN_FIELD_NUMBER = 1;
  private double mean_;
  /**
   *
   *
   * <pre>
   * The mean of the series.
   * </pre>
   *
   * <code>double mean = 1;</code>
   */
  public double getMean() {
    return mean_;
  }

  public static final int STANDARD_DEVIATION_FIELD_NUMBER = 2;
  private double standardDeviation_;
  /**
   *
   *
   * <pre>
   * The standard deviation of the series.
   * </pre>
   *
   * <code>double standard_deviation = 2;</code>
   */
  public double getStandardDeviation() {
    return standardDeviation_;
  }

  public static final int QUANTILES_FIELD_NUMBER = 3;
  private com.google.protobuf.Internal.DoubleList quantiles_;
  /**
   *
   *
   * <pre>
   * Ordered from 0 to k k-quantile values of the data series of n values.
   * The value at index i is, approximately, the i*n/k-th smallest value in the
   * series; for i = 0 and i = k these are, respectively, the min and max
   * values.
   * </pre>
   *
   * <code>repeated double quantiles = 3;</code>
   */
  public java.util.List<java.lang.Double> getQuantilesList() {
    return quantiles_;
  }
  /**
   *
   *
   * <pre>
   * Ordered from 0 to k k-quantile values of the data series of n values.
   * The value at index i is, approximately, the i*n/k-th smallest value in the
   * series; for i = 0 and i = k these are, respectively, the min and max
   * values.
   * </pre>
   *
   * <code>repeated double quantiles = 3;</code>
   */
  public int getQuantilesCount() {
    return quantiles_.size();
  }
  /**
   *
   *
   * <pre>
   * Ordered from 0 to k k-quantile values of the data series of n values.
   * The value at index i is, approximately, the i*n/k-th smallest value in the
   * series; for i = 0 and i = k these are, respectively, the min and max
   * values.
   * </pre>
   *
   * <code>repeated double quantiles = 3;</code>
   */
  public double getQuantiles(int index) {
    return quantiles_.getDouble(index);
  }

  private int quantilesMemoizedSerializedSize = -1;

  public static final int HISTOGRAM_BUCKETS_FIELD_NUMBER = 4;
  private java.util.List<com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>
      histogramBuckets_;
  /**
   *
   *
   * <pre>
   * Histogram buckets of the data series. Sorted by the min value of the
   * bucket, ascendingly, and the number of the buckets is dynamically
   * generated. The buckets are non-overlapping and completely cover whole
   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
   * the last one being `"Infinity"`.
   * </pre>
   *
   * <code>repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
   * </code>
   */
  public java.util.List<com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>
      getHistogramBucketsList() {
    return histogramBuckets_;
  }
  /**
   *
   *
   * <pre>
   * Histogram buckets of the data series. Sorted by the min value of the
   * bucket, ascendingly, and the number of the buckets is dynamically
   * generated. The buckets are non-overlapping and completely cover whole
   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
   * the last one being `"Infinity"`.
   * </pre>
   *
   * <code>repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
   * </code>
   */
  public java.util.List<
          ? extends com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder>
      getHistogramBucketsOrBuilderList() {
    return histogramBuckets_;
  }
  /**
   *
   *
   * <pre>
   * Histogram buckets of the data series. Sorted by the min value of the
   * bucket, ascendingly, and the number of the buckets is dynamically
   * generated. The buckets are non-overlapping and completely cover whole
   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
   * the last one being `"Infinity"`.
   * </pre>
   *
   * <code>repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
   * </code>
   */
  public int getHistogramBucketsCount() {
    return histogramBuckets_.size();
  }
  /**
   *
   *
   * <pre>
   * Histogram buckets of the data series. Sorted by the min value of the
   * bucket, ascendingly, and the number of the buckets is dynamically
   * generated. The buckets are non-overlapping and completely cover whole
   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
   * the last one being `"Infinity"`.
   * </pre>
   *
   * <code>repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
   * </code>
   */
  public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket getHistogramBuckets(
      int index) {
    return histogramBuckets_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Histogram buckets of the data series. Sorted by the min value of the
   * bucket, ascendingly, and the number of the buckets is dynamically
   * generated. The buckets are non-overlapping and completely cover whole
   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
   * the last one being `"Infinity"`.
   * </pre>
   *
   * <code>repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
   * </code>
   */
  public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder
      getHistogramBucketsOrBuilder(int index) {
    return histogramBuckets_.get(index);
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    getSerializedSize();
    if (mean_ != 0D) {
      output.writeDouble(1, mean_);
    }
    if (standardDeviation_ != 0D) {
      output.writeDouble(2, standardDeviation_);
    }
    if (getQuantilesList().size() > 0) {
      output.writeUInt32NoTag(26);
      output.writeUInt32NoTag(quantilesMemoizedSerializedSize);
    }
    for (int i = 0; i < quantiles_.size(); i++) {
      output.writeDoubleNoTag(quantiles_.getDouble(i));
    }
    for (int i = 0; i < histogramBuckets_.size(); i++) {
      output.writeMessage(4, histogramBuckets_.get(i));
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (mean_ != 0D) {
      size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, mean_);
    }
    if (standardDeviation_ != 0D) {
      size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, standardDeviation_);
    }
    {
      int dataSize = 0;
      dataSize = 8 * getQuantilesList().size();
      size += dataSize;
      if (!getQuantilesList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
      }
      quantilesMemoizedSerializedSize = dataSize;
    }
    for (int i = 0; i < histogramBuckets_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, histogramBuckets_.get(i));
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.automl.v1beta1.Float64Stats)) {
      return super.equals(obj);
    }
    com.google.cloud.automl.v1beta1.Float64Stats other =
        (com.google.cloud.automl.v1beta1.Float64Stats) obj;

    if (java.lang.Double.doubleToLongBits(getMean())
        != java.lang.Double.doubleToLongBits(other.getMean())) return false;
    if (java.lang.Double.doubleToLongBits(getStandardDeviation())
        != java.lang.Double.doubleToLongBits(other.getStandardDeviation())) return false;
    if (!getQuantilesList().equals(other.getQuantilesList())) return false;
    if (!getHistogramBucketsList().equals(other.getHistogramBucketsList())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + MEAN_FIELD_NUMBER;
    hash =
        (53 * hash)
            + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMean()));
    hash = (37 * hash) + STANDARD_DEVIATION_FIELD_NUMBER;
    hash =
        (53 * hash)
            + com.google.protobuf.Internal.hashLong(
                java.lang.Double.doubleToLongBits(getStandardDeviation()));
    if (getQuantilesCount() > 0) {
      hash = (37 * hash) + QUANTILES_FIELD_NUMBER;
      hash = (53 * hash) + getQuantilesList().hashCode();
    }
    if (getHistogramBucketsCount() > 0) {
      hash = (37 * hash) + HISTOGRAM_BUCKETS_FIELD_NUMBER;
      hash = (53 * hash) + getHistogramBucketsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.automl.v1beta1.Float64Stats prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * The data statistics of a series of FLOAT64 values.
   * </pre>
   *
   * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Float64Stats)
      com.google.cloud.automl.v1beta1.Float64StatsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.automl.v1beta1.DataStatsOuterClass
          .internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.automl.v1beta1.DataStatsOuterClass
          .internal_static_google_cloud_automl_v1beta1_Float64Stats_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.automl.v1beta1.Float64Stats.class,
              com.google.cloud.automl.v1beta1.Float64Stats.Builder.class);
    }

    // Construct using com.google.cloud.automl.v1beta1.Float64Stats.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
        getHistogramBucketsFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      mean_ = 0D;

      standardDeviation_ = 0D;

      quantiles_ = emptyDoubleList();
      bitField0_ = (bitField0_ & ~0x00000004);
      if (histogramBucketsBuilder_ == null) {
        histogramBuckets_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
      } else {
        histogramBucketsBuilder_.clear();
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.automl.v1beta1.DataStatsOuterClass
          .internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.automl.v1beta1.Float64Stats getDefaultInstanceForType() {
      return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.automl.v1beta1.Float64Stats build() {
      com.google.cloud.automl.v1beta1.Float64Stats result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.automl.v1beta1.Float64Stats buildPartial() {
      com.google.cloud.automl.v1beta1.Float64Stats result =
          new com.google.cloud.automl.v1beta1.Float64Stats(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.mean_ = mean_;
      result.standardDeviation_ = standardDeviation_;
      if (((bitField0_ & 0x00000004) != 0)) {
        quantiles_.makeImmutable();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.quantiles_ = quantiles_;
      if (histogramBucketsBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)) {
          histogramBuckets_ = java.util.Collections.unmodifiableList(histogramBuckets_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.histogramBuckets_ = histogramBuckets_;
      } else {
        result.histogramBuckets_ = histogramBucketsBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.automl.v1beta1.Float64Stats) {
        return mergeFrom((com.google.cloud.automl.v1beta1.Float64Stats) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.automl.v1beta1.Float64Stats other) {
      if (other == com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance()) return this;
      if (other.getMean() != 0D) {
        setMean(other.getMean());
      }
      if (other.getStandardDeviation() != 0D) {
        setStandardDeviation(other.getStandardDeviation());
      }
      if (!other.quantiles_.isEmpty()) {
        if (quantiles_.isEmpty()) {
          quantiles_ = other.quantiles_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureQuantilesIsMutable();
          quantiles_.addAll(other.quantiles_);
        }
        onChanged();
      }
      if (histogramBucketsBuilder_ == null) {
        if (!other.histogramBuckets_.isEmpty()) {
          if (histogramBuckets_.isEmpty()) {
            histogramBuckets_ = other.histogramBuckets_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureHistogramBucketsIsMutable();
            histogramBuckets_.addAll(other.histogramBuckets_);
          }
          onChanged();
        }
      } else {
        if (!other.histogramBuckets_.isEmpty()) {
          if (histogramBucketsBuilder_.isEmpty()) {
            histogramBucketsBuilder_.dispose();
            histogramBucketsBuilder_ = null;
            histogramBuckets_ = other.histogramBuckets_;
            bitField0_ = (bitField0_ & ~0x00000008);
            histogramBucketsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getHistogramBucketsFieldBuilder()
                    : null;
          } else {
            histogramBucketsBuilder_.addAllMessages(other.histogramBuckets_);
          }
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.cloud.automl.v1beta1.Float64Stats parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.automl.v1beta1.Float64Stats) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private double mean_;
    /**
     *
     *
     * <pre>
     * The mean of the series.
     * </pre>
     *
     * <code>double mean = 1;</code>
     */
    public double getMean() {
      return mean_;
    }
    /**
     *
     *
     * <pre>
     * The mean of the series.
     * </pre>
     *
     * <code>double mean = 1;</code>
     */
    public Builder setMean(double value) {

      mean_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The mean of the series.
     * </pre>
     *
     * <code>double mean = 1;</code>
     */
    public Builder clearMean() {

      mean_ = 0D;
      onChanged();
      return this;
    }

    private double standardDeviation_;
    /**
     *
     *
     * <pre>
     * The standard deviation of the series.
     * </pre>
     *
     * <code>double standard_deviation = 2;</code>
     */
    public double getStandardDeviation() {
      return standardDeviation_;
    }
    /**
     *
     *
     * <pre>
     * The standard deviation of the series.
     * </pre>
     *
     * <code>double standard_deviation = 2;</code>
     */
    public Builder setStandardDeviation(double value) {

      standardDeviation_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The standard deviation of the series.
     * </pre>
     *
     * <code>double standard_deviation = 2;</code>
     */
    public Builder clearStandardDeviation() {

      standardDeviation_ = 0D;
      onChanged();
      return this;
    }

    private com.google.protobuf.Internal.DoubleList quantiles_ = emptyDoubleList();

    private void ensureQuantilesIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        quantiles_ = mutableCopy(quantiles_);
        bitField0_ |= 0x00000004;
      }
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public java.util.List<java.lang.Double> getQuantilesList() {
      return ((bitField0_ & 0x00000004) != 0)
          ? java.util.Collections.unmodifiableList(quantiles_)
          : quantiles_;
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public int getQuantilesCount() {
      return quantiles_.size();
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public double getQuantiles(int index) {
      return quantiles_.getDouble(index);
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public Builder setQuantiles(int index, double value) {
      ensureQuantilesIsMutable();
      quantiles_.setDouble(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public Builder addQuantiles(double value) {
      ensureQuantilesIsMutable();
      quantiles_.addDouble(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public Builder addAllQuantiles(java.lang.Iterable<? extends java.lang.Double> values) {
      ensureQuantilesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, quantiles_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Ordered from 0 to k k-quantile values of the data series of n values.
     * The value at index i is, approximately, the i*n/k-th smallest value in the
     * series; for i = 0 and i = k these are, respectively, the min and max
     * values.
     * </pre>
     *
     * <code>repeated double quantiles = 3;</code>
     */
    public Builder clearQuantiles() {
      quantiles_ = emptyDoubleList();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>
        histogramBuckets_ = java.util.Collections.emptyList();

    private void ensureHistogramBucketsIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        histogramBuckets_ =
            new java.util.ArrayList<com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>(
                histogramBuckets_);
        bitField0_ |= 0x00000008;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket,
            com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder,
            com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder>
        histogramBucketsBuilder_;

    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public java.util.List<com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>
        getHistogramBucketsList() {
      if (histogramBucketsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(histogramBuckets_);
      } else {
        return histogramBucketsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public int getHistogramBucketsCount() {
      if (histogramBucketsBuilder_ == null) {
        return histogramBuckets_.size();
      } else {
        return histogramBucketsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket getHistogramBuckets(
        int index) {
      if (histogramBucketsBuilder_ == null) {
        return histogramBuckets_.get(index);
      } else {
        return histogramBucketsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder setHistogramBuckets(
        int index, com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket value) {
      if (histogramBucketsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.set(index, value);
        onChanged();
      } else {
        histogramBucketsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder setHistogramBuckets(
        int index,
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder builderForValue) {
      if (histogramBucketsBuilder_ == null) {
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.set(index, builderForValue.build());
        onChanged();
      } else {
        histogramBucketsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder addHistogramBuckets(
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket value) {
      if (histogramBucketsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.add(value);
        onChanged();
      } else {
        histogramBucketsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder addHistogramBuckets(
        int index, com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket value) {
      if (histogramBucketsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.add(index, value);
        onChanged();
      } else {
        histogramBucketsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder addHistogramBuckets(
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder builderForValue) {
      if (histogramBucketsBuilder_ == null) {
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.add(builderForValue.build());
        onChanged();
      } else {
        histogramBucketsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder addHistogramBuckets(
        int index,
        com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder builderForValue) {
      if (histogramBucketsBuilder_ == null) {
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.add(index, builderForValue.build());
        onChanged();
      } else {
        histogramBucketsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder addAllHistogramBuckets(
        java.lang.Iterable<? extends com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>
            values) {
      if (histogramBucketsBuilder_ == null) {
        ensureHistogramBucketsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, histogramBuckets_);
        onChanged();
      } else {
        histogramBucketsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder clearHistogramBuckets() {
      if (histogramBucketsBuilder_ == null) {
        histogramBuckets_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        histogramBucketsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public Builder removeHistogramBuckets(int index) {
      if (histogramBucketsBuilder_ == null) {
        ensureHistogramBucketsIsMutable();
        histogramBuckets_.remove(index);
        onChanged();
      } else {
        histogramBucketsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder
        getHistogramBucketsBuilder(int index) {
      return getHistogramBucketsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder
        getHistogramBucketsOrBuilder(int index) {
      if (histogramBucketsBuilder_ == null) {
        return histogramBuckets_.get(index);
      } else {
        return histogramBucketsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public java.util.List<
            ? extends com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder>
        getHistogramBucketsOrBuilderList() {
      if (histogramBucketsBuilder_ != null) {
        return histogramBucketsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(histogramBuckets_);
      }
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder
        addHistogramBucketsBuilder() {
      return getHistogramBucketsFieldBuilder()
          .addBuilder(
              com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder
        addHistogramBucketsBuilder(int index) {
      return getHistogramBucketsFieldBuilder()
          .addBuilder(
              index,
              com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Histogram buckets of the data series. Sorted by the min value of the
     * bucket, ascendingly, and the number of the buckets is dynamically
     * generated. The buckets are non-overlapping and completely cover whole
     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
     * the last one being `"Infinity"`.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4;
     * </code>
     */
    public java.util.List<com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder>
        getHistogramBucketsBuilderList() {
      return getHistogramBucketsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket,
            com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder,
            com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder>
        getHistogramBucketsFieldBuilder() {
      if (histogramBucketsBuilder_ == null) {
        histogramBucketsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket,
                com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder,
                com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder>(
                histogramBuckets_,
                ((bitField0_ & 0x00000008) != 0),
                getParentForChildren(),
                isClean());
        histogramBuckets_ = null;
      }
      return histogramBucketsBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Float64Stats)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Float64Stats)
  private static final com.google.cloud.automl.v1beta1.Float64Stats DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Float64Stats();
  }

  public static com.google.cloud.automl.v1beta1.Float64Stats getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Float64Stats> PARSER =
      new com.google.protobuf.AbstractParser<Float64Stats>() {
        @java.lang.Override
        public Float64Stats parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new Float64Stats(input, extensionRegistry);
        }
      };

  public static com.google.protobuf.Parser<Float64Stats> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Float64Stats> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.automl.v1beta1.Float64Stats getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
