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

package com.google.cloud.automl.v1beta1;

public final class ClassificationProto {
  private ClassificationProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * <pre>
   * Type of the classification problem.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.automl.v1beta1.ClassificationType}
   */
  public enum ClassificationType
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <pre>
     * Should not be used, an un-set enum has this value by default.
     * </pre>
     *
     * <code>CLASSIFICATION_TYPE_UNSPECIFIED = 0;</code>
     */
    CLASSIFICATION_TYPE_UNSPECIFIED(0),
    /**
     * <pre>
     * At most one label is allowed per example.
     * </pre>
     *
     * <code>MULTICLASS = 1;</code>
     */
    MULTICLASS(1),
    /**
     * <pre>
     * Multiple labels are allowed for one example.
     * </pre>
     *
     * <code>MULTILABEL = 2;</code>
     */
    MULTILABEL(2),
    UNRECOGNIZED(-1),
    ;

    /**
     * <pre>
     * Should not be used, an un-set enum has this value by default.
     * </pre>
     *
     * <code>CLASSIFICATION_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int CLASSIFICATION_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     * <pre>
     * At most one label is allowed per example.
     * </pre>
     *
     * <code>MULTICLASS = 1;</code>
     */
    public static final int MULTICLASS_VALUE = 1;
    /**
     * <pre>
     * Multiple labels are allowed for one example.
     * </pre>
     *
     * <code>MULTILABEL = 2;</code>
     */
    public static final int MULTILABEL_VALUE = 2;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ClassificationType valueOf(int value) {
      return forNumber(value);
    }

    public static ClassificationType forNumber(int value) {
      switch (value) {
        case 0: return CLASSIFICATION_TYPE_UNSPECIFIED;
        case 1: return MULTICLASS;
        case 2: return MULTILABEL;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<ClassificationType>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        ClassificationType> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<ClassificationType>() {
            public ClassificationType findValueByNumber(int number) {
              return ClassificationType.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor().getEnumTypes().get(0);
    }

    private static final ClassificationType[] VALUES = values();

    public static ClassificationType valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private ClassificationType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1beta1.ClassificationType)
  }

  public interface ClassificationAnnotationOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationAnnotation)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
     * means greater confidence that the annotation is positive. If a user
     * approves an annotation as negative or positive, the score value remains
     * unchanged. If a user creates an annotation, the score is 0 for negative or
     * 1 for positive.
     * </pre>
     *
     * <code>float score = 1;</code>
     */
    float getScore();
  }
  /**
   * <pre>
   * Contains annotation details specific to classification.
   * </pre>
   *
   * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationAnnotation}
   */
  public  static final class ClassificationAnnotation extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationAnnotation)
      ClassificationAnnotationOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ClassificationAnnotation.newBuilder() to construct.
    private ClassificationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ClassificationAnnotation() {
      score_ = 0F;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ClassificationAnnotation(
        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 13: {

              score_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownFieldProto3(
                  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.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor;
    }

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

    public static final int SCORE_FIELD_NUMBER = 1;
    private float score_;
    /**
     * <pre>
     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
     * means greater confidence that the annotation is positive. If a user
     * approves an annotation as negative or positive, the score value remains
     * unchanged. If a user creates an annotation, the score is 0 for negative or
     * 1 for positive.
     * </pre>
     *
     * <code>float score = 1;</code>
     */
    public float getScore() {
      return score_;
    }

    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 (score_ != 0F) {
        output.writeFloat(1, score_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (score_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, score_);
      }
      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.ClassificationProto.ClassificationAnnotation)) {
        return super.equals(obj);
      }
      com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation other = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) obj;

      boolean result = true;
      result = result && (
          java.lang.Float.floatToIntBits(getScore())
          == java.lang.Float.floatToIntBits(
              other.getScore()));
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + SCORE_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getScore());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation 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.ClassificationProto.ClassificationAnnotation 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>
     * Contains annotation details specific to classification.
     * </pre>
     *
     * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationAnnotation}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationAnnotation)
        com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor;
      }

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

      // Construct using com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.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();
        score_ = 0F;

        return this;
      }

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

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

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

      @java.lang.Override
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation buildPartial() {
        com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation result = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation(this);
        result.score_ = score_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) {
          return mergeFrom((com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation other) {
        if (other == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.getDefaultInstance()) return this;
        if (other.getScore() != 0F) {
          setScore(other.getScore());
        }
        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.ClassificationProto.ClassificationAnnotation parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private float score_ ;
      /**
       * <pre>
       * Output only. A confidence estimate between 0.0 and 1.0. A higher value
       * means greater confidence that the annotation is positive. If a user
       * approves an annotation as negative or positive, the score value remains
       * unchanged. If a user creates an annotation, the score is 0 for negative or
       * 1 for positive.
       * </pre>
       *
       * <code>float score = 1;</code>
       */
      public float getScore() {
        return score_;
      }
      /**
       * <pre>
       * Output only. A confidence estimate between 0.0 and 1.0. A higher value
       * means greater confidence that the annotation is positive. If a user
       * approves an annotation as negative or positive, the score value remains
       * unchanged. If a user creates an annotation, the score is 0 for negative or
       * 1 for positive.
       * </pre>
       *
       * <code>float score = 1;</code>
       */
      public Builder setScore(float value) {
        
        score_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. A confidence estimate between 0.0 and 1.0. A higher value
       * means greater confidence that the annotation is positive. If a user
       * approves an annotation as negative or positive, the score value remains
       * unchanged. If a user creates an annotation, the score is 0 for negative or
       * 1 for positive.
       * </pre>
       *
       * <code>float score = 1;</code>
       */
      public Builder clearScore() {
        
        score_ = 0F;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(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.ClassificationAnnotation)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationAnnotation)
    private static final com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation();
    }

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

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

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

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

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

  }

  public interface ClassificationEvaluationMetricsOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Output only. The Area under precision recall curve metric.
     * </pre>
     *
     * <code>float au_prc = 1;</code>
     */
    float getAuPrc();

    /**
     * <pre>
     * Output only. The Area under precision recall curve metric based on priors.
     * </pre>
     *
     * <code>float base_au_prc = 2;</code>
     */
    float getBaseAuPrc();

    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> 
        getConfidenceMetricsEntryList();
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry getConfidenceMetricsEntry(int index);
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    int getConfidenceMetricsEntryCount();
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    java.util.List<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder> 
        getConfidenceMetricsEntryOrBuilderList();
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder getConfidenceMetricsEntryOrBuilder(
        int index);

    /**
     * <pre>
     * Output only. Confusion matrix of the evaluation.
     * Only set for MULTICLASS classification problems where number
     * of labels is no more than 10.
     * Only set for model level evaluation, not for evaluation per label.
     * </pre>
     *
     * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
     */
    boolean hasConfusionMatrix();
    /**
     * <pre>
     * Output only. Confusion matrix of the evaluation.
     * Only set for MULTICLASS classification problems where number
     * of labels is no more than 10.
     * Only set for model level evaluation, not for evaluation per label.
     * </pre>
     *
     * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
     */
    com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix getConfusionMatrix();
    /**
     * <pre>
     * Output only. Confusion matrix of the evaluation.
     * Only set for MULTICLASS classification problems where number
     * of labels is no more than 10.
     * Only set for model level evaluation, not for evaluation per label.
     * </pre>
     *
     * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
     */
    com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder getConfusionMatrixOrBuilder();

    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    java.util.List<java.lang.String>
        getAnnotationSpecIdList();
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    int getAnnotationSpecIdCount();
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    java.lang.String getAnnotationSpecId(int index);
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    com.google.protobuf.ByteString
        getAnnotationSpecIdBytes(int index);
  }
  /**
   * <pre>
   * Model evaluation metrics for classification problems.
   * Visible only to v1beta1
   * </pre>
   *
   * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics}
   */
  public  static final class ClassificationEvaluationMetrics extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics)
      ClassificationEvaluationMetricsOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ClassificationEvaluationMetrics.newBuilder() to construct.
    private ClassificationEvaluationMetrics(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ClassificationEvaluationMetrics() {
      auPrc_ = 0F;
      baseAuPrc_ = 0F;
      confidenceMetricsEntry_ = java.util.Collections.emptyList();
      annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ClassificationEvaluationMetrics(
        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 13: {

              auPrc_ = input.readFloat();
              break;
            }
            case 21: {

              baseAuPrc_ = input.readFloat();
              break;
            }
            case 26: {
              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
                confidenceMetricsEntry_ = new java.util.ArrayList<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry>();
                mutable_bitField0_ |= 0x00000004;
              }
              confidenceMetricsEntry_.add(
                  input.readMessage(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.parser(), extensionRegistry));
              break;
            }
            case 34: {
              com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder subBuilder = null;
              if (confusionMatrix_ != null) {
                subBuilder = confusionMatrix_.toBuilder();
              }
              confusionMatrix_ = input.readMessage(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(confusionMatrix_);
                confusionMatrix_ = subBuilder.buildPartial();
              }

              break;
            }
            case 42: {
              java.lang.String s = input.readStringRequireUtf8();
              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
                annotationSpecId_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000010;
              }
              annotationSpecId_.add(s);
              break;
            }
            default: {
              if (!parseUnknownFieldProto3(
                  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) == 0x00000004)) {
          confidenceMetricsEntry_ = java.util.Collections.unmodifiableList(confidenceMetricsEntry_);
        }
        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
          annotationSpecId_ = annotationSpecId_.getUnmodifiableView();
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor;
    }

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

    public interface ConfidenceMetricsEntryOrBuilder extends
        // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <pre>
       * Output only. The confidence threshold value used to compute the metrics.
       * </pre>
       *
       * <code>float confidence_threshold = 1;</code>
       */
      float getConfidenceThreshold();

      /**
       * <pre>
       * Output only. Recall under the given confidence threshold.
       * </pre>
       *
       * <code>float recall = 2;</code>
       */
      float getRecall();

      /**
       * <pre>
       * Output only. Precision under the given confidence threshold.
       * </pre>
       *
       * <code>float precision = 3;</code>
       */
      float getPrecision();

      /**
       * <pre>
       * Output only. The harmonic mean of recall and precision.
       * </pre>
       *
       * <code>float f1_score = 4;</code>
       */
      float getF1Score();

      /**
       * <pre>
       * Output only. The recall when only considering the label that has the
       * highest prediction score and not below the confidence threshold for each
       * example.
       * </pre>
       *
       * <code>float recall_at1 = 5;</code>
       */
      float getRecallAt1();

      /**
       * <pre>
       * Output only. The precision when only considering the label that has the
       * highest predictionscore and not below the confidence threshold for each
       * example.
       * </pre>
       *
       * <code>float precision_at1 = 6;</code>
       */
      float getPrecisionAt1();

      /**
       * <pre>
       * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
       * </pre>
       *
       * <code>float f1_score_at1 = 7;</code>
       */
      float getF1ScoreAt1();
    }
    /**
     * <pre>
     * Metrics for a single confidence threshold.
     * </pre>
     *
     * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry}
     */
    public  static final class ConfidenceMetricsEntry extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)
        ConfidenceMetricsEntryOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use ConfidenceMetricsEntry.newBuilder() to construct.
      private ConfidenceMetricsEntry(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private ConfidenceMetricsEntry() {
        confidenceThreshold_ = 0F;
        recall_ = 0F;
        precision_ = 0F;
        f1Score_ = 0F;
        recallAt1_ = 0F;
        precisionAt1_ = 0F;
        f1ScoreAt1_ = 0F;
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private ConfidenceMetricsEntry(
          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 13: {

                confidenceThreshold_ = input.readFloat();
                break;
              }
              case 21: {

                recall_ = input.readFloat();
                break;
              }
              case 29: {

                precision_ = input.readFloat();
                break;
              }
              case 37: {

                f1Score_ = input.readFloat();
                break;
              }
              case 45: {

                recallAt1_ = input.readFloat();
                break;
              }
              case 53: {

                precisionAt1_ = input.readFloat();
                break;
              }
              case 61: {

                f1ScoreAt1_ = input.readFloat();
                break;
              }
              default: {
                if (!parseUnknownFieldProto3(
                    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.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.class, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder.class);
      }

      public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1;
      private float confidenceThreshold_;
      /**
       * <pre>
       * Output only. The confidence threshold value used to compute the metrics.
       * </pre>
       *
       * <code>float confidence_threshold = 1;</code>
       */
      public float getConfidenceThreshold() {
        return confidenceThreshold_;
      }

      public static final int RECALL_FIELD_NUMBER = 2;
      private float recall_;
      /**
       * <pre>
       * Output only. Recall under the given confidence threshold.
       * </pre>
       *
       * <code>float recall = 2;</code>
       */
      public float getRecall() {
        return recall_;
      }

      public static final int PRECISION_FIELD_NUMBER = 3;
      private float precision_;
      /**
       * <pre>
       * Output only. Precision under the given confidence threshold.
       * </pre>
       *
       * <code>float precision = 3;</code>
       */
      public float getPrecision() {
        return precision_;
      }

      public static final int F1_SCORE_FIELD_NUMBER = 4;
      private float f1Score_;
      /**
       * <pre>
       * Output only. The harmonic mean of recall and precision.
       * </pre>
       *
       * <code>float f1_score = 4;</code>
       */
      public float getF1Score() {
        return f1Score_;
      }

      public static final int RECALL_AT1_FIELD_NUMBER = 5;
      private float recallAt1_;
      /**
       * <pre>
       * Output only. The recall when only considering the label that has the
       * highest prediction score and not below the confidence threshold for each
       * example.
       * </pre>
       *
       * <code>float recall_at1 = 5;</code>
       */
      public float getRecallAt1() {
        return recallAt1_;
      }

      public static final int PRECISION_AT1_FIELD_NUMBER = 6;
      private float precisionAt1_;
      /**
       * <pre>
       * Output only. The precision when only considering the label that has the
       * highest predictionscore and not below the confidence threshold for each
       * example.
       * </pre>
       *
       * <code>float precision_at1 = 6;</code>
       */
      public float getPrecisionAt1() {
        return precisionAt1_;
      }

      public static final int F1_SCORE_AT1_FIELD_NUMBER = 7;
      private float f1ScoreAt1_;
      /**
       * <pre>
       * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
       * </pre>
       *
       * <code>float f1_score_at1 = 7;</code>
       */
      public float getF1ScoreAt1() {
        return f1ScoreAt1_;
      }

      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 (confidenceThreshold_ != 0F) {
          output.writeFloat(1, confidenceThreshold_);
        }
        if (recall_ != 0F) {
          output.writeFloat(2, recall_);
        }
        if (precision_ != 0F) {
          output.writeFloat(3, precision_);
        }
        if (f1Score_ != 0F) {
          output.writeFloat(4, f1Score_);
        }
        if (recallAt1_ != 0F) {
          output.writeFloat(5, recallAt1_);
        }
        if (precisionAt1_ != 0F) {
          output.writeFloat(6, precisionAt1_);
        }
        if (f1ScoreAt1_ != 0F) {
          output.writeFloat(7, f1ScoreAt1_);
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        if (confidenceThreshold_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(1, confidenceThreshold_);
        }
        if (recall_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(2, recall_);
        }
        if (precision_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(3, precision_);
        }
        if (f1Score_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(4, f1Score_);
        }
        if (recallAt1_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(5, recallAt1_);
        }
        if (precisionAt1_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(6, precisionAt1_);
        }
        if (f1ScoreAt1_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(7, f1ScoreAt1_);
        }
        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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)) {
          return super.equals(obj);
        }
        com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry other = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) obj;

        boolean result = true;
        result = result && (
            java.lang.Float.floatToIntBits(getConfidenceThreshold())
            == java.lang.Float.floatToIntBits(
                other.getConfidenceThreshold()));
        result = result && (
            java.lang.Float.floatToIntBits(getRecall())
            == java.lang.Float.floatToIntBits(
                other.getRecall()));
        result = result && (
            java.lang.Float.floatToIntBits(getPrecision())
            == java.lang.Float.floatToIntBits(
                other.getPrecision()));
        result = result && (
            java.lang.Float.floatToIntBits(getF1Score())
            == java.lang.Float.floatToIntBits(
                other.getF1Score()));
        result = result && (
            java.lang.Float.floatToIntBits(getRecallAt1())
            == java.lang.Float.floatToIntBits(
                other.getRecallAt1()));
        result = result && (
            java.lang.Float.floatToIntBits(getPrecisionAt1())
            == java.lang.Float.floatToIntBits(
                other.getPrecisionAt1()));
        result = result && (
            java.lang.Float.floatToIntBits(getF1ScoreAt1())
            == java.lang.Float.floatToIntBits(
                other.getF1ScoreAt1()));
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + CONFIDENCE_THRESHOLD_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getConfidenceThreshold());
        hash = (37 * hash) + RECALL_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getRecall());
        hash = (37 * hash) + PRECISION_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getPrecision());
        hash = (37 * hash) + F1_SCORE_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getF1Score());
        hash = (37 * hash) + RECALL_AT1_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getRecallAt1());
        hash = (37 * hash) + PRECISION_AT1_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getPrecisionAt1());
        hash = (37 * hash) + F1_SCORE_AT1_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getF1ScoreAt1());
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry 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>
       * Metrics for a single confidence threshold.
       * </pre>
       *
       * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.class, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder.class);
        }

        // Construct using com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.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();
          confidenceThreshold_ = 0F;

          recall_ = 0F;

          precision_ = 0F;

          f1Score_ = 0F;

          recallAt1_ = 0F;

          precisionAt1_ = 0F;

          f1ScoreAt1_ = 0F;

          return this;
        }

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

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

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

        @java.lang.Override
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry buildPartial() {
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry result = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry(this);
          result.confidenceThreshold_ = confidenceThreshold_;
          result.recall_ = recall_;
          result.precision_ = precision_;
          result.f1Score_ = f1Score_;
          result.recallAt1_ = recallAt1_;
          result.precisionAt1_ = precisionAt1_;
          result.f1ScoreAt1_ = f1ScoreAt1_;
          onBuilt();
          return result;
        }

        @java.lang.Override
        public Builder clone() {
          return (Builder) super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return (Builder) super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return (Builder) super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return (Builder) super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) {
            return mergeFrom((com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry other) {
          if (other == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.getDefaultInstance()) return this;
          if (other.getConfidenceThreshold() != 0F) {
            setConfidenceThreshold(other.getConfidenceThreshold());
          }
          if (other.getRecall() != 0F) {
            setRecall(other.getRecall());
          }
          if (other.getPrecision() != 0F) {
            setPrecision(other.getPrecision());
          }
          if (other.getF1Score() != 0F) {
            setF1Score(other.getF1Score());
          }
          if (other.getRecallAt1() != 0F) {
            setRecallAt1(other.getRecallAt1());
          }
          if (other.getPrecisionAt1() != 0F) {
            setPrecisionAt1(other.getPrecisionAt1());
          }
          if (other.getF1ScoreAt1() != 0F) {
            setF1ScoreAt1(other.getF1ScoreAt1());
          }
          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.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private float confidenceThreshold_ ;
        /**
         * <pre>
         * Output only. The confidence threshold value used to compute the metrics.
         * </pre>
         *
         * <code>float confidence_threshold = 1;</code>
         */
        public float getConfidenceThreshold() {
          return confidenceThreshold_;
        }
        /**
         * <pre>
         * Output only. The confidence threshold value used to compute the metrics.
         * </pre>
         *
         * <code>float confidence_threshold = 1;</code>
         */
        public Builder setConfidenceThreshold(float value) {
          
          confidenceThreshold_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. The confidence threshold value used to compute the metrics.
         * </pre>
         *
         * <code>float confidence_threshold = 1;</code>
         */
        public Builder clearConfidenceThreshold() {
          
          confidenceThreshold_ = 0F;
          onChanged();
          return this;
        }

        private float recall_ ;
        /**
         * <pre>
         * Output only. Recall under the given confidence threshold.
         * </pre>
         *
         * <code>float recall = 2;</code>
         */
        public float getRecall() {
          return recall_;
        }
        /**
         * <pre>
         * Output only. Recall under the given confidence threshold.
         * </pre>
         *
         * <code>float recall = 2;</code>
         */
        public Builder setRecall(float value) {
          
          recall_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. Recall under the given confidence threshold.
         * </pre>
         *
         * <code>float recall = 2;</code>
         */
        public Builder clearRecall() {
          
          recall_ = 0F;
          onChanged();
          return this;
        }

        private float precision_ ;
        /**
         * <pre>
         * Output only. Precision under the given confidence threshold.
         * </pre>
         *
         * <code>float precision = 3;</code>
         */
        public float getPrecision() {
          return precision_;
        }
        /**
         * <pre>
         * Output only. Precision under the given confidence threshold.
         * </pre>
         *
         * <code>float precision = 3;</code>
         */
        public Builder setPrecision(float value) {
          
          precision_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. Precision under the given confidence threshold.
         * </pre>
         *
         * <code>float precision = 3;</code>
         */
        public Builder clearPrecision() {
          
          precision_ = 0F;
          onChanged();
          return this;
        }

        private float f1Score_ ;
        /**
         * <pre>
         * Output only. The harmonic mean of recall and precision.
         * </pre>
         *
         * <code>float f1_score = 4;</code>
         */
        public float getF1Score() {
          return f1Score_;
        }
        /**
         * <pre>
         * Output only. The harmonic mean of recall and precision.
         * </pre>
         *
         * <code>float f1_score = 4;</code>
         */
        public Builder setF1Score(float value) {
          
          f1Score_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. The harmonic mean of recall and precision.
         * </pre>
         *
         * <code>float f1_score = 4;</code>
         */
        public Builder clearF1Score() {
          
          f1Score_ = 0F;
          onChanged();
          return this;
        }

        private float recallAt1_ ;
        /**
         * <pre>
         * Output only. The recall when only considering the label that has the
         * highest prediction score and not below the confidence threshold for each
         * example.
         * </pre>
         *
         * <code>float recall_at1 = 5;</code>
         */
        public float getRecallAt1() {
          return recallAt1_;
        }
        /**
         * <pre>
         * Output only. The recall when only considering the label that has the
         * highest prediction score and not below the confidence threshold for each
         * example.
         * </pre>
         *
         * <code>float recall_at1 = 5;</code>
         */
        public Builder setRecallAt1(float value) {
          
          recallAt1_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. The recall when only considering the label that has the
         * highest prediction score and not below the confidence threshold for each
         * example.
         * </pre>
         *
         * <code>float recall_at1 = 5;</code>
         */
        public Builder clearRecallAt1() {
          
          recallAt1_ = 0F;
          onChanged();
          return this;
        }

        private float precisionAt1_ ;
        /**
         * <pre>
         * Output only. The precision when only considering the label that has the
         * highest predictionscore and not below the confidence threshold for each
         * example.
         * </pre>
         *
         * <code>float precision_at1 = 6;</code>
         */
        public float getPrecisionAt1() {
          return precisionAt1_;
        }
        /**
         * <pre>
         * Output only. The precision when only considering the label that has the
         * highest predictionscore and not below the confidence threshold for each
         * example.
         * </pre>
         *
         * <code>float precision_at1 = 6;</code>
         */
        public Builder setPrecisionAt1(float value) {
          
          precisionAt1_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. The precision when only considering the label that has the
         * highest predictionscore and not below the confidence threshold for each
         * example.
         * </pre>
         *
         * <code>float precision_at1 = 6;</code>
         */
        public Builder clearPrecisionAt1() {
          
          precisionAt1_ = 0F;
          onChanged();
          return this;
        }

        private float f1ScoreAt1_ ;
        /**
         * <pre>
         * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
         * </pre>
         *
         * <code>float f1_score_at1 = 7;</code>
         */
        public float getF1ScoreAt1() {
          return f1ScoreAt1_;
        }
        /**
         * <pre>
         * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
         * </pre>
         *
         * <code>float f1_score_at1 = 7;</code>
         */
        public Builder setF1ScoreAt1(float value) {
          
          f1ScoreAt1_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
         * </pre>
         *
         * <code>float f1_score_at1 = 7;</code>
         */
        public Builder clearF1ScoreAt1() {
          
          f1ScoreAt1_ = 0F;
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFieldsProto3(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.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)
      }

      // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry)
      private static final com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry();
      }

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

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

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

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

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

    }

    public interface ConfusionMatrixOrBuilder extends
        // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      java.util.List<java.lang.String>
          getAnnotationSpecIdList();
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      int getAnnotationSpecIdCount();
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      java.lang.String getAnnotationSpecId(int index);
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      com.google.protobuf.ByteString
          getAnnotationSpecIdBytes(int index);

      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row> 
          getRowList();
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row getRow(int index);
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      int getRowCount();
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      java.util.List<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> 
          getRowOrBuilderList();
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder getRowOrBuilder(
          int index);
    }
    /**
     * <pre>
     * Confusion matrix of the model running the classification.
     * </pre>
     *
     * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix}
     */
    public  static final class ConfusionMatrix extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix)
        ConfusionMatrixOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use ConfusionMatrix.newBuilder() to construct.
      private ConfusionMatrix(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private ConfusionMatrix() {
        annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        row_ = java.util.Collections.emptyList();
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private ConfusionMatrix(
          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 10: {
                java.lang.String s = input.readStringRequireUtf8();
                if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                  annotationSpecId_ = new com.google.protobuf.LazyStringArrayList();
                  mutable_bitField0_ |= 0x00000001;
                }
                annotationSpecId_.add(s);
                break;
              }
              case 18: {
                if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
                  row_ = new java.util.ArrayList<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row>();
                  mutable_bitField0_ |= 0x00000002;
                }
                row_.add(
                    input.readMessage(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.parser(), extensionRegistry));
                break;
              }
              default: {
                if (!parseUnknownFieldProto3(
                    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_ & 0x00000001) == 0x00000001)) {
            annotationSpecId_ = annotationSpecId_.getUnmodifiableView();
          }
          if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
            row_ = java.util.Collections.unmodifiableList(row_);
          }
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.class, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder.class);
      }

      public interface RowOrBuilder extends
          // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row)
          com.google.protobuf.MessageOrBuilder {

        /**
         * <pre>
         * Output only. Value of the specific cell in the confusion matrix.
         * The number of values each row is equal to the size of
         * annotatin_spec_id.
         * </pre>
         *
         * <code>repeated int32 example_count = 1;</code>
         */
        java.util.List<java.lang.Integer> getExampleCountList();
        /**
         * <pre>
         * Output only. Value of the specific cell in the confusion matrix.
         * The number of values each row is equal to the size of
         * annotatin_spec_id.
         * </pre>
         *
         * <code>repeated int32 example_count = 1;</code>
         */
        int getExampleCountCount();
        /**
         * <pre>
         * Output only. Value of the specific cell in the confusion matrix.
         * The number of values each row is equal to the size of
         * annotatin_spec_id.
         * </pre>
         *
         * <code>repeated int32 example_count = 1;</code>
         */
        int getExampleCount(int index);
      }
      /**
       * <pre>
       * Output only. A row in the confusion matrix.
       * </pre>
       *
       * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row}
       */
      public  static final class Row extends
          com.google.protobuf.GeneratedMessageV3 implements
          // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row)
          RowOrBuilder {
      private static final long serialVersionUID = 0L;
        // Use Row.newBuilder() to construct.
        private Row(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
          super(builder);
        }
        private Row() {
          exampleCount_ = java.util.Collections.emptyList();
        }

        @java.lang.Override
        public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
          return this.unknownFields;
        }
        private Row(
            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 8: {
                  if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                    exampleCount_ = new java.util.ArrayList<java.lang.Integer>();
                    mutable_bitField0_ |= 0x00000001;
                  }
                  exampleCount_.add(input.readInt32());
                  break;
                }
                case 10: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
                    exampleCount_ = new java.util.ArrayList<java.lang.Integer>();
                    mutable_bitField0_ |= 0x00000001;
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    exampleCount_.add(input.readInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                default: {
                  if (!parseUnknownFieldProto3(
                      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_ & 0x00000001) == 0x00000001)) {
              exampleCount_ = java.util.Collections.unmodifiableList(exampleCount_);
            }
            this.unknownFields = unknownFields.build();
            makeExtensionsImmutable();
          }
        }
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.class, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder.class);
        }

        public static final int EXAMPLE_COUNT_FIELD_NUMBER = 1;
        private java.util.List<java.lang.Integer> exampleCount_;
        /**
         * <pre>
         * Output only. Value of the specific cell in the confusion matrix.
         * The number of values each row is equal to the size of
         * annotatin_spec_id.
         * </pre>
         *
         * <code>repeated int32 example_count = 1;</code>
         */
        public java.util.List<java.lang.Integer>
            getExampleCountList() {
          return exampleCount_;
        }
        /**
         * <pre>
         * Output only. Value of the specific cell in the confusion matrix.
         * The number of values each row is equal to the size of
         * annotatin_spec_id.
         * </pre>
         *
         * <code>repeated int32 example_count = 1;</code>
         */
        public int getExampleCountCount() {
          return exampleCount_.size();
        }
        /**
         * <pre>
         * Output only. Value of the specific cell in the confusion matrix.
         * The number of values each row is equal to the size of
         * annotatin_spec_id.
         * </pre>
         *
         * <code>repeated int32 example_count = 1;</code>
         */
        public int getExampleCount(int index) {
          return exampleCount_.get(index);
        }
        private int exampleCountMemoizedSerializedSize = -1;

        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 (getExampleCountList().size() > 0) {
            output.writeUInt32NoTag(10);
            output.writeUInt32NoTag(exampleCountMemoizedSerializedSize);
          }
          for (int i = 0; i < exampleCount_.size(); i++) {
            output.writeInt32NoTag(exampleCount_.get(i));
          }
          unknownFields.writeTo(output);
        }

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

          size = 0;
          {
            int dataSize = 0;
            for (int i = 0; i < exampleCount_.size(); i++) {
              dataSize += com.google.protobuf.CodedOutputStream
                .computeInt32SizeNoTag(exampleCount_.get(i));
            }
            size += dataSize;
            if (!getExampleCountList().isEmpty()) {
              size += 1;
              size += com.google.protobuf.CodedOutputStream
                  .computeInt32SizeNoTag(dataSize);
            }
            exampleCountMemoizedSerializedSize = dataSize;
          }
          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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row)) {
            return super.equals(obj);
          }
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row other = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row) obj;

          boolean result = true;
          result = result && getExampleCountList()
              .equals(other.getExampleCountList());
          result = result && unknownFields.equals(other.unknownFields);
          return result;
        }

        @java.lang.Override
        public int hashCode() {
          if (memoizedHashCode != 0) {
            return memoizedHashCode;
          }
          int hash = 41;
          hash = (19 * hash) + getDescriptor().hashCode();
          if (getExampleCountCount() > 0) {
            hash = (37 * hash) + EXAMPLE_COUNT_FIELD_NUMBER;
            hash = (53 * hash) + getExampleCountList().hashCode();
          }
          hash = (29 * hash) + unknownFields.hashCode();
          memoizedHashCode = hash;
          return hash;
        }

        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row parseFrom(
            java.nio.ByteBuffer data)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return PARSER.parseFrom(data);
        }
        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row parseFrom(
            com.google.protobuf.ByteString data)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return PARSER.parseFrom(data);
        }
        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row parseFrom(byte[] data)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return PARSER.parseFrom(data);
        }
        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row parseFrom(java.io.InputStream input)
            throws java.io.IOException {
          return com.google.protobuf.GeneratedMessageV3
              .parseWithIOException(PARSER, input);
        }
        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row parseDelimitedFrom(java.io.InputStream input)
            throws java.io.IOException {
          return com.google.protobuf.GeneratedMessageV3
              .parseDelimitedWithIOException(PARSER, input);
        }
        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row 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>
         * Output only. A row in the confusion matrix.
         * </pre>
         *
         * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row}
         */
        public static final class Builder extends
            com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
            // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row)
            com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder {
          public static final com.google.protobuf.Descriptors.Descriptor
              getDescriptor() {
            return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor;
          }

          @java.lang.Override
          protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
              internalGetFieldAccessorTable() {
            return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable
                .ensureFieldAccessorsInitialized(
                    com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.class, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder.class);
          }

          // Construct using com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.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();
            exampleCount_ = java.util.Collections.emptyList();
            bitField0_ = (bitField0_ & ~0x00000001);
            return this;
          }

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

          @java.lang.Override
          public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row getDefaultInstanceForType() {
            return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance();
          }

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

          @java.lang.Override
          public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row buildPartial() {
            com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row result = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row(this);
            int from_bitField0_ = bitField0_;
            if (((bitField0_ & 0x00000001) == 0x00000001)) {
              exampleCount_ = java.util.Collections.unmodifiableList(exampleCount_);
              bitField0_ = (bitField0_ & ~0x00000001);
            }
            result.exampleCount_ = exampleCount_;
            onBuilt();
            return result;
          }

          @java.lang.Override
          public Builder clone() {
            return (Builder) super.clone();
          }
          @java.lang.Override
          public Builder setField(
              com.google.protobuf.Descriptors.FieldDescriptor field,
              java.lang.Object value) {
            return (Builder) super.setField(field, value);
          }
          @java.lang.Override
          public Builder clearField(
              com.google.protobuf.Descriptors.FieldDescriptor field) {
            return (Builder) super.clearField(field);
          }
          @java.lang.Override
          public Builder clearOneof(
              com.google.protobuf.Descriptors.OneofDescriptor oneof) {
            return (Builder) super.clearOneof(oneof);
          }
          @java.lang.Override
          public Builder setRepeatedField(
              com.google.protobuf.Descriptors.FieldDescriptor field,
              int index, java.lang.Object value) {
            return (Builder) super.setRepeatedField(field, index, value);
          }
          @java.lang.Override
          public Builder addRepeatedField(
              com.google.protobuf.Descriptors.FieldDescriptor field,
              java.lang.Object value) {
            return (Builder) super.addRepeatedField(field, value);
          }
          @java.lang.Override
          public Builder mergeFrom(com.google.protobuf.Message other) {
            if (other instanceof com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row) {
              return mergeFrom((com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row)other);
            } else {
              super.mergeFrom(other);
              return this;
            }
          }

          public Builder mergeFrom(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row other) {
            if (other == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance()) return this;
            if (!other.exampleCount_.isEmpty()) {
              if (exampleCount_.isEmpty()) {
                exampleCount_ = other.exampleCount_;
                bitField0_ = (bitField0_ & ~0x00000001);
              } else {
                ensureExampleCountIsMutable();
                exampleCount_.addAll(other.exampleCount_);
              }
              onChanged();
            }
            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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row parsedMessage = null;
            try {
              parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
              parsedMessage = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row) e.getUnfinishedMessage();
              throw e.unwrapIOException();
            } finally {
              if (parsedMessage != null) {
                mergeFrom(parsedMessage);
              }
            }
            return this;
          }
          private int bitField0_;

          private java.util.List<java.lang.Integer> exampleCount_ = java.util.Collections.emptyList();
          private void ensureExampleCountIsMutable() {
            if (!((bitField0_ & 0x00000001) == 0x00000001)) {
              exampleCount_ = new java.util.ArrayList<java.lang.Integer>(exampleCount_);
              bitField0_ |= 0x00000001;
             }
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public java.util.List<java.lang.Integer>
              getExampleCountList() {
            return java.util.Collections.unmodifiableList(exampleCount_);
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public int getExampleCountCount() {
            return exampleCount_.size();
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public int getExampleCount(int index) {
            return exampleCount_.get(index);
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public Builder setExampleCount(
              int index, int value) {
            ensureExampleCountIsMutable();
            exampleCount_.set(index, value);
            onChanged();
            return this;
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public Builder addExampleCount(int value) {
            ensureExampleCountIsMutable();
            exampleCount_.add(value);
            onChanged();
            return this;
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public Builder addAllExampleCount(
              java.lang.Iterable<? extends java.lang.Integer> values) {
            ensureExampleCountIsMutable();
            com.google.protobuf.AbstractMessageLite.Builder.addAll(
                values, exampleCount_);
            onChanged();
            return this;
          }
          /**
           * <pre>
           * Output only. Value of the specific cell in the confusion matrix.
           * The number of values each row is equal to the size of
           * annotatin_spec_id.
           * </pre>
           *
           * <code>repeated int32 example_count = 1;</code>
           */
          public Builder clearExampleCount() {
            exampleCount_ = java.util.Collections.emptyList();
            bitField0_ = (bitField0_ & ~0x00000001);
            onChanged();
            return this;
          }
          @java.lang.Override
          public final Builder setUnknownFields(
              final com.google.protobuf.UnknownFieldSet unknownFields) {
            return super.setUnknownFieldsProto3(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.ClassificationEvaluationMetrics.ConfusionMatrix.Row)
        }

        // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row)
        private static final com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row DEFAULT_INSTANCE;
        static {
          DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row();
        }

        public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row getDefaultInstance() {
          return DEFAULT_INSTANCE;
        }

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

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

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

        @java.lang.Override
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row getDefaultInstanceForType() {
          return DEFAULT_INSTANCE;
        }

      }

      public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 1;
      private com.google.protobuf.LazyStringList annotationSpecId_;
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getAnnotationSpecIdList() {
        return annotationSpecId_;
      }
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      public int getAnnotationSpecIdCount() {
        return annotationSpecId_.size();
      }
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      public java.lang.String getAnnotationSpecId(int index) {
        return annotationSpecId_.get(index);
      }
      /**
       * <pre>
       * Output only. IDs of the annotation specs used in the confusion matrix.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getAnnotationSpecIdBytes(int index) {
        return annotationSpecId_.getByteString(index);
      }

      public static final int ROW_FIELD_NUMBER = 2;
      private java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row> row_;
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      public java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row> getRowList() {
        return row_;
      }
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      public java.util.List<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> 
          getRowOrBuilderList() {
        return row_;
      }
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      public int getRowCount() {
        return row_.size();
      }
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row getRow(int index) {
        return row_.get(index);
      }
      /**
       * <pre>
       * Output only. Rows in the confusion matrix. The number of rows is equal to
       * the size of `annotation_spec_id`.
       * `row[i].value[j]` is the number of examples that have ground truth of the
       * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
       * the model being evaluated.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder getRowOrBuilder(
          int index) {
        return row_.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 {
        for (int i = 0; i < annotationSpecId_.size(); i++) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecId_.getRaw(i));
        }
        for (int i = 0; i < row_.size(); i++) {
          output.writeMessage(2, row_.get(i));
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        {
          int dataSize = 0;
          for (int i = 0; i < annotationSpecId_.size(); i++) {
            dataSize += computeStringSizeNoTag(annotationSpecId_.getRaw(i));
          }
          size += dataSize;
          size += 1 * getAnnotationSpecIdList().size();
        }
        for (int i = 0; i < row_.size(); i++) {
          size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(2, row_.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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix)) {
          return super.equals(obj);
        }
        com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix other = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix) obj;

        boolean result = true;
        result = result && getAnnotationSpecIdList()
            .equals(other.getAnnotationSpecIdList());
        result = result && getRowList()
            .equals(other.getRowList());
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (getAnnotationSpecIdCount() > 0) {
          hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER;
          hash = (53 * hash) + getAnnotationSpecIdList().hashCode();
        }
        if (getRowCount() > 0) {
          hash = (37 * hash) + ROW_FIELD_NUMBER;
          hash = (53 * hash) + getRowList().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix 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>
       * Confusion matrix of the model running the classification.
       * </pre>
       *
       * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix)
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.class, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder.class);
        }

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

        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
            getRowFieldBuilder();
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000001);
          if (rowBuilder_ == null) {
            row_ = java.util.Collections.emptyList();
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            rowBuilder_.clear();
          }
          return this;
        }

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

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

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

        @java.lang.Override
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix buildPartial() {
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix result = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix(this);
          int from_bitField0_ = bitField0_;
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            annotationSpecId_ = annotationSpecId_.getUnmodifiableView();
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.annotationSpecId_ = annotationSpecId_;
          if (rowBuilder_ == null) {
            if (((bitField0_ & 0x00000002) == 0x00000002)) {
              row_ = java.util.Collections.unmodifiableList(row_);
              bitField0_ = (bitField0_ & ~0x00000002);
            }
            result.row_ = row_;
          } else {
            result.row_ = rowBuilder_.build();
          }
          onBuilt();
          return result;
        }

        @java.lang.Override
        public Builder clone() {
          return (Builder) super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return (Builder) super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return (Builder) super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return (Builder) super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix) {
            return mergeFrom((com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix other) {
          if (other == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.getDefaultInstance()) return this;
          if (!other.annotationSpecId_.isEmpty()) {
            if (annotationSpecId_.isEmpty()) {
              annotationSpecId_ = other.annotationSpecId_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureAnnotationSpecIdIsMutable();
              annotationSpecId_.addAll(other.annotationSpecId_);
            }
            onChanged();
          }
          if (rowBuilder_ == null) {
            if (!other.row_.isEmpty()) {
              if (row_.isEmpty()) {
                row_ = other.row_;
                bitField0_ = (bitField0_ & ~0x00000002);
              } else {
                ensureRowIsMutable();
                row_.addAll(other.row_);
              }
              onChanged();
            }
          } else {
            if (!other.row_.isEmpty()) {
              if (rowBuilder_.isEmpty()) {
                rowBuilder_.dispose();
                rowBuilder_ = null;
                row_ = other.row_;
                bitField0_ = (bitField0_ & ~0x00000002);
                rowBuilder_ = 
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                     getRowFieldBuilder() : null;
              } else {
                rowBuilder_.addAllMessages(other.row_);
              }
            }
          }
          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.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;

        private com.google.protobuf.LazyStringList annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        private void ensureAnnotationSpecIdIsMutable() {
          if (!((bitField0_ & 0x00000001) == 0x00000001)) {
            annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(annotationSpecId_);
            bitField0_ |= 0x00000001;
           }
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public com.google.protobuf.ProtocolStringList
            getAnnotationSpecIdList() {
          return annotationSpecId_.getUnmodifiableView();
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public int getAnnotationSpecIdCount() {
          return annotationSpecId_.size();
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public java.lang.String getAnnotationSpecId(int index) {
          return annotationSpecId_.get(index);
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public com.google.protobuf.ByteString
            getAnnotationSpecIdBytes(int index) {
          return annotationSpecId_.getByteString(index);
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public Builder setAnnotationSpecId(
            int index, java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  ensureAnnotationSpecIdIsMutable();
          annotationSpecId_.set(index, value);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public Builder addAnnotationSpecId(
            java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  ensureAnnotationSpecIdIsMutable();
          annotationSpecId_.add(value);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public Builder addAllAnnotationSpecId(
            java.lang.Iterable<java.lang.String> values) {
          ensureAnnotationSpecIdIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, annotationSpecId_);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public Builder clearAnnotationSpecId() {
          annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Output only. IDs of the annotation specs used in the confusion matrix.
         * </pre>
         *
         * <code>repeated string annotation_spec_id = 1;</code>
         */
        public Builder addAnnotationSpecIdBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
          ensureAnnotationSpecIdIsMutable();
          annotationSpecId_.add(value);
          onChanged();
          return this;
        }

        private java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row> row_ =
          java.util.Collections.emptyList();
        private void ensureRowIsMutable() {
          if (!((bitField0_ & 0x00000002) == 0x00000002)) {
            row_ = new java.util.ArrayList<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row>(row_);
            bitField0_ |= 0x00000002;
           }
        }

        private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> rowBuilder_;

        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row> getRowList() {
          if (rowBuilder_ == null) {
            return java.util.Collections.unmodifiableList(row_);
          } else {
            return rowBuilder_.getMessageList();
          }
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public int getRowCount() {
          if (rowBuilder_ == null) {
            return row_.size();
          } else {
            return rowBuilder_.getCount();
          }
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row getRow(int index) {
          if (rowBuilder_ == null) {
            return row_.get(index);
          } else {
            return rowBuilder_.getMessage(index);
          }
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder setRow(
            int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row value) {
          if (rowBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            ensureRowIsMutable();
            row_.set(index, value);
            onChanged();
          } else {
            rowBuilder_.setMessage(index, value);
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder setRow(
            int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder builderForValue) {
          if (rowBuilder_ == null) {
            ensureRowIsMutable();
            row_.set(index, builderForValue.build());
            onChanged();
          } else {
            rowBuilder_.setMessage(index, builderForValue.build());
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder addRow(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row value) {
          if (rowBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            ensureRowIsMutable();
            row_.add(value);
            onChanged();
          } else {
            rowBuilder_.addMessage(value);
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder addRow(
            int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row value) {
          if (rowBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            ensureRowIsMutable();
            row_.add(index, value);
            onChanged();
          } else {
            rowBuilder_.addMessage(index, value);
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder addRow(
            com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder builderForValue) {
          if (rowBuilder_ == null) {
            ensureRowIsMutable();
            row_.add(builderForValue.build());
            onChanged();
          } else {
            rowBuilder_.addMessage(builderForValue.build());
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder addRow(
            int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder builderForValue) {
          if (rowBuilder_ == null) {
            ensureRowIsMutable();
            row_.add(index, builderForValue.build());
            onChanged();
          } else {
            rowBuilder_.addMessage(index, builderForValue.build());
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder addAllRow(
            java.lang.Iterable<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row> values) {
          if (rowBuilder_ == null) {
            ensureRowIsMutable();
            com.google.protobuf.AbstractMessageLite.Builder.addAll(
                values, row_);
            onChanged();
          } else {
            rowBuilder_.addAllMessages(values);
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder clearRow() {
          if (rowBuilder_ == null) {
            row_ = java.util.Collections.emptyList();
            bitField0_ = (bitField0_ & ~0x00000002);
            onChanged();
          } else {
            rowBuilder_.clear();
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public Builder removeRow(int index) {
          if (rowBuilder_ == null) {
            ensureRowIsMutable();
            row_.remove(index);
            onChanged();
          } else {
            rowBuilder_.remove(index);
          }
          return this;
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder getRowBuilder(
            int index) {
          return getRowFieldBuilder().getBuilder(index);
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder getRowOrBuilder(
            int index) {
          if (rowBuilder_ == null) {
            return row_.get(index);  } else {
            return rowBuilder_.getMessageOrBuilder(index);
          }
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public java.util.List<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> 
             getRowOrBuilderList() {
          if (rowBuilder_ != null) {
            return rowBuilder_.getMessageOrBuilderList();
          } else {
            return java.util.Collections.unmodifiableList(row_);
          }
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder addRowBuilder() {
          return getRowFieldBuilder().addBuilder(
              com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance());
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder addRowBuilder(
            int index) {
          return getRowFieldBuilder().addBuilder(
              index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance());
        }
        /**
         * <pre>
         * Output only. Rows in the confusion matrix. The number of rows is equal to
         * the size of `annotation_spec_id`.
         * `row[i].value[j]` is the number of examples that have ground truth of the
         * `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
         * the model being evaluated.
         * </pre>
         *
         * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2;</code>
         */
        public java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder> 
             getRowBuilderList() {
          return getRowFieldBuilder().getBuilderList();
        }
        private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> 
            getRowFieldBuilder() {
          if (rowBuilder_ == null) {
            rowBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder>(
                    row_,
                    ((bitField0_ & 0x00000002) == 0x00000002),
                    getParentForChildren(),
                    isClean());
            row_ = null;
          }
          return rowBuilder_;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFieldsProto3(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.ClassificationEvaluationMetrics.ConfusionMatrix)
      }

      // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix)
      private static final com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix();
      }

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

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

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

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

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

    }

    private int bitField0_;
    public static final int AU_PRC_FIELD_NUMBER = 1;
    private float auPrc_;
    /**
     * <pre>
     * Output only. The Area under precision recall curve metric.
     * </pre>
     *
     * <code>float au_prc = 1;</code>
     */
    public float getAuPrc() {
      return auPrc_;
    }

    public static final int BASE_AU_PRC_FIELD_NUMBER = 2;
    private float baseAuPrc_;
    /**
     * <pre>
     * Output only. The Area under precision recall curve metric based on priors.
     * </pre>
     *
     * <code>float base_au_prc = 2;</code>
     */
    public float getBaseAuPrc() {
      return baseAuPrc_;
    }

    public static final int CONFIDENCE_METRICS_ENTRY_FIELD_NUMBER = 3;
    private java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> confidenceMetricsEntry_;
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    public java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> getConfidenceMetricsEntryList() {
      return confidenceMetricsEntry_;
    }
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    public java.util.List<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder> 
        getConfidenceMetricsEntryOrBuilderList() {
      return confidenceMetricsEntry_;
    }
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    public int getConfidenceMetricsEntryCount() {
      return confidenceMetricsEntry_.size();
    }
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry getConfidenceMetricsEntry(int index) {
      return confidenceMetricsEntry_.get(index);
    }
    /**
     * <pre>
     * Output only. Metrics that have confidence thresholds.
     * Precision-recall curve can be derived from it.
     * </pre>
     *
     * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
     */
    public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder getConfidenceMetricsEntryOrBuilder(
        int index) {
      return confidenceMetricsEntry_.get(index);
    }

    public static final int CONFUSION_MATRIX_FIELD_NUMBER = 4;
    private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix confusionMatrix_;
    /**
     * <pre>
     * Output only. Confusion matrix of the evaluation.
     * Only set for MULTICLASS classification problems where number
     * of labels is no more than 10.
     * Only set for model level evaluation, not for evaluation per label.
     * </pre>
     *
     * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
     */
    public boolean hasConfusionMatrix() {
      return confusionMatrix_ != null;
    }
    /**
     * <pre>
     * Output only. Confusion matrix of the evaluation.
     * Only set for MULTICLASS classification problems where number
     * of labels is no more than 10.
     * Only set for model level evaluation, not for evaluation per label.
     * </pre>
     *
     * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
     */
    public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix getConfusionMatrix() {
      return confusionMatrix_ == null ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.getDefaultInstance() : confusionMatrix_;
    }
    /**
     * <pre>
     * Output only. Confusion matrix of the evaluation.
     * Only set for MULTICLASS classification problems where number
     * of labels is no more than 10.
     * Only set for model level evaluation, not for evaluation per label.
     * </pre>
     *
     * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
     */
    public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder getConfusionMatrixOrBuilder() {
      return getConfusionMatrix();
    }

    public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 5;
    private com.google.protobuf.LazyStringList annotationSpecId_;
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getAnnotationSpecIdList() {
      return annotationSpecId_;
    }
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    public int getAnnotationSpecIdCount() {
      return annotationSpecId_.size();
    }
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    public java.lang.String getAnnotationSpecId(int index) {
      return annotationSpecId_.get(index);
    }
    /**
     * <pre>
     * Output only. The annotation spec ids used for this evaluation.
     * </pre>
     *
     * <code>repeated string annotation_spec_id = 5;</code>
     */
    public com.google.protobuf.ByteString
        getAnnotationSpecIdBytes(int index) {
      return annotationSpecId_.getByteString(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 {
      if (auPrc_ != 0F) {
        output.writeFloat(1, auPrc_);
      }
      if (baseAuPrc_ != 0F) {
        output.writeFloat(2, baseAuPrc_);
      }
      for (int i = 0; i < confidenceMetricsEntry_.size(); i++) {
        output.writeMessage(3, confidenceMetricsEntry_.get(i));
      }
      if (confusionMatrix_ != null) {
        output.writeMessage(4, getConfusionMatrix());
      }
      for (int i = 0; i < annotationSpecId_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, annotationSpecId_.getRaw(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (auPrc_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, auPrc_);
      }
      if (baseAuPrc_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, baseAuPrc_);
      }
      for (int i = 0; i < confidenceMetricsEntry_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, confidenceMetricsEntry_.get(i));
      }
      if (confusionMatrix_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getConfusionMatrix());
      }
      {
        int dataSize = 0;
        for (int i = 0; i < annotationSpecId_.size(); i++) {
          dataSize += computeStringSizeNoTag(annotationSpecId_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getAnnotationSpecIdList().size();
      }
      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.ClassificationProto.ClassificationEvaluationMetrics)) {
        return super.equals(obj);
      }
      com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics other = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) obj;

      boolean result = true;
      result = result && (
          java.lang.Float.floatToIntBits(getAuPrc())
          == java.lang.Float.floatToIntBits(
              other.getAuPrc()));
      result = result && (
          java.lang.Float.floatToIntBits(getBaseAuPrc())
          == java.lang.Float.floatToIntBits(
              other.getBaseAuPrc()));
      result = result && getConfidenceMetricsEntryList()
          .equals(other.getConfidenceMetricsEntryList());
      result = result && (hasConfusionMatrix() == other.hasConfusionMatrix());
      if (hasConfusionMatrix()) {
        result = result && getConfusionMatrix()
            .equals(other.getConfusionMatrix());
      }
      result = result && getAnnotationSpecIdList()
          .equals(other.getAnnotationSpecIdList());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + AU_PRC_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getAuPrc());
      hash = (37 * hash) + BASE_AU_PRC_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getBaseAuPrc());
      if (getConfidenceMetricsEntryCount() > 0) {
        hash = (37 * hash) + CONFIDENCE_METRICS_ENTRY_FIELD_NUMBER;
        hash = (53 * hash) + getConfidenceMetricsEntryList().hashCode();
      }
      if (hasConfusionMatrix()) {
        hash = (37 * hash) + CONFUSION_MATRIX_FIELD_NUMBER;
        hash = (53 * hash) + getConfusionMatrix().hashCode();
      }
      if (getAnnotationSpecIdCount() > 0) {
        hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER;
        hash = (53 * hash) + getAnnotationSpecIdList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics 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.ClassificationProto.ClassificationEvaluationMetrics 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>
     * Model evaluation metrics for classification problems.
     * Visible only to v1beta1
     * </pre>
     *
     * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics)
        com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetricsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.cloud.automl.v1beta1.ClassificationProto.internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor;
      }

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

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

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getConfidenceMetricsEntryFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        auPrc_ = 0F;

        baseAuPrc_ = 0F;

        if (confidenceMetricsEntryBuilder_ == null) {
          confidenceMetricsEntry_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          confidenceMetricsEntryBuilder_.clear();
        }
        if (confusionMatrixBuilder_ == null) {
          confusionMatrix_ = null;
        } else {
          confusionMatrix_ = null;
          confusionMatrixBuilder_ = null;
        }
        annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }

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

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

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

      @java.lang.Override
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics buildPartial() {
        com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics result = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        result.auPrc_ = auPrc_;
        result.baseAuPrc_ = baseAuPrc_;
        if (confidenceMetricsEntryBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004)) {
            confidenceMetricsEntry_ = java.util.Collections.unmodifiableList(confidenceMetricsEntry_);
            bitField0_ = (bitField0_ & ~0x00000004);
          }
          result.confidenceMetricsEntry_ = confidenceMetricsEntry_;
        } else {
          result.confidenceMetricsEntry_ = confidenceMetricsEntryBuilder_.build();
        }
        if (confusionMatrixBuilder_ == null) {
          result.confusionMatrix_ = confusionMatrix_;
        } else {
          result.confusionMatrix_ = confusionMatrixBuilder_.build();
        }
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          annotationSpecId_ = annotationSpecId_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.annotationSpecId_ = annotationSpecId_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) {
          return mergeFrom((com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics other) {
        if (other == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.getDefaultInstance()) return this;
        if (other.getAuPrc() != 0F) {
          setAuPrc(other.getAuPrc());
        }
        if (other.getBaseAuPrc() != 0F) {
          setBaseAuPrc(other.getBaseAuPrc());
        }
        if (confidenceMetricsEntryBuilder_ == null) {
          if (!other.confidenceMetricsEntry_.isEmpty()) {
            if (confidenceMetricsEntry_.isEmpty()) {
              confidenceMetricsEntry_ = other.confidenceMetricsEntry_;
              bitField0_ = (bitField0_ & ~0x00000004);
            } else {
              ensureConfidenceMetricsEntryIsMutable();
              confidenceMetricsEntry_.addAll(other.confidenceMetricsEntry_);
            }
            onChanged();
          }
        } else {
          if (!other.confidenceMetricsEntry_.isEmpty()) {
            if (confidenceMetricsEntryBuilder_.isEmpty()) {
              confidenceMetricsEntryBuilder_.dispose();
              confidenceMetricsEntryBuilder_ = null;
              confidenceMetricsEntry_ = other.confidenceMetricsEntry_;
              bitField0_ = (bitField0_ & ~0x00000004);
              confidenceMetricsEntryBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getConfidenceMetricsEntryFieldBuilder() : null;
            } else {
              confidenceMetricsEntryBuilder_.addAllMessages(other.confidenceMetricsEntry_);
            }
          }
        }
        if (other.hasConfusionMatrix()) {
          mergeConfusionMatrix(other.getConfusionMatrix());
        }
        if (!other.annotationSpecId_.isEmpty()) {
          if (annotationSpecId_.isEmpty()) {
            annotationSpecId_ = other.annotationSpecId_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureAnnotationSpecIdIsMutable();
            annotationSpecId_.addAll(other.annotationSpecId_);
          }
          onChanged();
        }
        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.ClassificationProto.ClassificationEvaluationMetrics parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private float auPrc_ ;
      /**
       * <pre>
       * Output only. The Area under precision recall curve metric.
       * </pre>
       *
       * <code>float au_prc = 1;</code>
       */
      public float getAuPrc() {
        return auPrc_;
      }
      /**
       * <pre>
       * Output only. The Area under precision recall curve metric.
       * </pre>
       *
       * <code>float au_prc = 1;</code>
       */
      public Builder setAuPrc(float value) {
        
        auPrc_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. The Area under precision recall curve metric.
       * </pre>
       *
       * <code>float au_prc = 1;</code>
       */
      public Builder clearAuPrc() {
        
        auPrc_ = 0F;
        onChanged();
        return this;
      }

      private float baseAuPrc_ ;
      /**
       * <pre>
       * Output only. The Area under precision recall curve metric based on priors.
       * </pre>
       *
       * <code>float base_au_prc = 2;</code>
       */
      public float getBaseAuPrc() {
        return baseAuPrc_;
      }
      /**
       * <pre>
       * Output only. The Area under precision recall curve metric based on priors.
       * </pre>
       *
       * <code>float base_au_prc = 2;</code>
       */
      public Builder setBaseAuPrc(float value) {
        
        baseAuPrc_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. The Area under precision recall curve metric based on priors.
       * </pre>
       *
       * <code>float base_au_prc = 2;</code>
       */
      public Builder clearBaseAuPrc() {
        
        baseAuPrc_ = 0F;
        onChanged();
        return this;
      }

      private java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> confidenceMetricsEntry_ =
        java.util.Collections.emptyList();
      private void ensureConfidenceMetricsEntryIsMutable() {
        if (!((bitField0_ & 0x00000004) == 0x00000004)) {
          confidenceMetricsEntry_ = new java.util.ArrayList<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry>(confidenceMetricsEntry_);
          bitField0_ |= 0x00000004;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder> confidenceMetricsEntryBuilder_;

      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> getConfidenceMetricsEntryList() {
        if (confidenceMetricsEntryBuilder_ == null) {
          return java.util.Collections.unmodifiableList(confidenceMetricsEntry_);
        } else {
          return confidenceMetricsEntryBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public int getConfidenceMetricsEntryCount() {
        if (confidenceMetricsEntryBuilder_ == null) {
          return confidenceMetricsEntry_.size();
        } else {
          return confidenceMetricsEntryBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry getConfidenceMetricsEntry(int index) {
        if (confidenceMetricsEntryBuilder_ == null) {
          return confidenceMetricsEntry_.get(index);
        } else {
          return confidenceMetricsEntryBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder setConfidenceMetricsEntry(
          int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry value) {
        if (confidenceMetricsEntryBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.set(index, value);
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder setConfidenceMetricsEntry(
          int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder builderForValue) {
        if (confidenceMetricsEntryBuilder_ == null) {
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.set(index, builderForValue.build());
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder addConfidenceMetricsEntry(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry value) {
        if (confidenceMetricsEntryBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.add(value);
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder addConfidenceMetricsEntry(
          int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry value) {
        if (confidenceMetricsEntryBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.add(index, value);
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder addConfidenceMetricsEntry(
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder builderForValue) {
        if (confidenceMetricsEntryBuilder_ == null) {
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.add(builderForValue.build());
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder addConfidenceMetricsEntry(
          int index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder builderForValue) {
        if (confidenceMetricsEntryBuilder_ == null) {
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.add(index, builderForValue.build());
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder addAllConfidenceMetricsEntry(
          java.lang.Iterable<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> values) {
        if (confidenceMetricsEntryBuilder_ == null) {
          ensureConfidenceMetricsEntryIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, confidenceMetricsEntry_);
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder clearConfidenceMetricsEntry() {
        if (confidenceMetricsEntryBuilder_ == null) {
          confidenceMetricsEntry_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000004);
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public Builder removeConfidenceMetricsEntry(int index) {
        if (confidenceMetricsEntryBuilder_ == null) {
          ensureConfidenceMetricsEntryIsMutable();
          confidenceMetricsEntry_.remove(index);
          onChanged();
        } else {
          confidenceMetricsEntryBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder getConfidenceMetricsEntryBuilder(
          int index) {
        return getConfidenceMetricsEntryFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder getConfidenceMetricsEntryOrBuilder(
          int index) {
        if (confidenceMetricsEntryBuilder_ == null) {
          return confidenceMetricsEntry_.get(index);  } else {
          return confidenceMetricsEntryBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public java.util.List<? extends com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder> 
           getConfidenceMetricsEntryOrBuilderList() {
        if (confidenceMetricsEntryBuilder_ != null) {
          return confidenceMetricsEntryBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(confidenceMetricsEntry_);
        }
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder addConfidenceMetricsEntryBuilder() {
        return getConfidenceMetricsEntryFieldBuilder().addBuilder(
            com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.getDefaultInstance());
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder addConfidenceMetricsEntryBuilder(
          int index) {
        return getConfidenceMetricsEntryFieldBuilder().addBuilder(
            index, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.getDefaultInstance());
      }
      /**
       * <pre>
       * Output only. Metrics that have confidence thresholds.
       * Precision-recall curve can be derived from it.
       * </pre>
       *
       * <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
       */
      public java.util.List<com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder> 
           getConfidenceMetricsEntryBuilderList() {
        return getConfidenceMetricsEntryFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder> 
          getConfidenceMetricsEntryFieldBuilder() {
        if (confidenceMetricsEntryBuilder_ == null) {
          confidenceMetricsEntryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder>(
                  confidenceMetricsEntry_,
                  ((bitField0_ & 0x00000004) == 0x00000004),
                  getParentForChildren(),
                  isClean());
          confidenceMetricsEntry_ = null;
        }
        return confidenceMetricsEntryBuilder_;
      }

      private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix confusionMatrix_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder> confusionMatrixBuilder_;
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public boolean hasConfusionMatrix() {
        return confusionMatrixBuilder_ != null || confusionMatrix_ != null;
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix getConfusionMatrix() {
        if (confusionMatrixBuilder_ == null) {
          return confusionMatrix_ == null ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.getDefaultInstance() : confusionMatrix_;
        } else {
          return confusionMatrixBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public Builder setConfusionMatrix(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix value) {
        if (confusionMatrixBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          confusionMatrix_ = value;
          onChanged();
        } else {
          confusionMatrixBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public Builder setConfusionMatrix(
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder builderForValue) {
        if (confusionMatrixBuilder_ == null) {
          confusionMatrix_ = builderForValue.build();
          onChanged();
        } else {
          confusionMatrixBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public Builder mergeConfusionMatrix(com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix value) {
        if (confusionMatrixBuilder_ == null) {
          if (confusionMatrix_ != null) {
            confusionMatrix_ =
              com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.newBuilder(confusionMatrix_).mergeFrom(value).buildPartial();
          } else {
            confusionMatrix_ = value;
          }
          onChanged();
        } else {
          confusionMatrixBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public Builder clearConfusionMatrix() {
        if (confusionMatrixBuilder_ == null) {
          confusionMatrix_ = null;
          onChanged();
        } else {
          confusionMatrix_ = null;
          confusionMatrixBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder getConfusionMatrixBuilder() {
        
        onChanged();
        return getConfusionMatrixFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder getConfusionMatrixOrBuilder() {
        if (confusionMatrixBuilder_ != null) {
          return confusionMatrixBuilder_.getMessageOrBuilder();
        } else {
          return confusionMatrix_ == null ?
              com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.getDefaultInstance() : confusionMatrix_;
        }
      }
      /**
       * <pre>
       * Output only. Confusion matrix of the evaluation.
       * Only set for MULTICLASS classification problems where number
       * of labels is no more than 10.
       * Only set for model level evaluation, not for evaluation per label.
       * </pre>
       *
       * <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder> 
          getConfusionMatrixFieldBuilder() {
        if (confusionMatrixBuilder_ == null) {
          confusionMatrixBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder>(
                  getConfusionMatrix(),
                  getParentForChildren(),
                  isClean());
          confusionMatrix_ = null;
        }
        return confusionMatrixBuilder_;
      }

      private com.google.protobuf.LazyStringList annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureAnnotationSpecIdIsMutable() {
        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
          annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(annotationSpecId_);
          bitField0_ |= 0x00000010;
         }
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getAnnotationSpecIdList() {
        return annotationSpecId_.getUnmodifiableView();
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public int getAnnotationSpecIdCount() {
        return annotationSpecId_.size();
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public java.lang.String getAnnotationSpecId(int index) {
        return annotationSpecId_.get(index);
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public com.google.protobuf.ByteString
          getAnnotationSpecIdBytes(int index) {
        return annotationSpecId_.getByteString(index);
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public Builder setAnnotationSpecId(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAnnotationSpecIdIsMutable();
        annotationSpecId_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public Builder addAnnotationSpecId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAnnotationSpecIdIsMutable();
        annotationSpecId_.add(value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public Builder addAllAnnotationSpecId(
          java.lang.Iterable<java.lang.String> values) {
        ensureAnnotationSpecIdIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, annotationSpecId_);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public Builder clearAnnotationSpecId() {
        annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Output only. The annotation spec ids used for this evaluation.
       * </pre>
       *
       * <code>repeated string annotation_spec_id = 5;</code>
       */
      public Builder addAnnotationSpecIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        ensureAnnotationSpecIdIsMutable();
        annotationSpecId_.add(value);
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(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.ClassificationEvaluationMetrics)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics)
    private static final com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics();
    }

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

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

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

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

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

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n0google/cloud/automl/v1beta1/classifica" +
      "tion.proto\022\033google.cloud.automl.v1beta1\032" +
      "\034google/api/annotations.proto\")\n\030Classif" +
      "icationAnnotation\022\r\n\005score\030\001 \001(\002\"\235\005\n\037Cla" +
      "ssificationEvaluationMetrics\022\016\n\006au_prc\030\001" +
      " \001(\002\022\023\n\013base_au_prc\030\002 \001(\002\022u\n\030confidence_" +
      "metrics_entry\030\003 \003(\0132S.google.cloud.autom" +
      "l.v1beta1.ClassificationEvaluationMetric" +
      "s.ConfidenceMetricsEntry\022f\n\020confusion_ma" +
      "trix\030\004 \001(\0132L.google.cloud.automl.v1beta1" +
      ".ClassificationEvaluationMetrics.Confusi" +
      "onMatrix\022\032\n\022annotation_spec_id\030\005 \003(\t\032\254\001\n" +
      "\026ConfidenceMetricsEntry\022\034\n\024confidence_th" +
      "reshold\030\001 \001(\002\022\016\n\006recall\030\002 \001(\002\022\021\n\tprecisi" +
      "on\030\003 \001(\002\022\020\n\010f1_score\030\004 \001(\002\022\022\n\nrecall_at1" +
      "\030\005 \001(\002\022\025\n\rprecision_at1\030\006 \001(\002\022\024\n\014f1_scor" +
      "e_at1\030\007 \001(\002\032\252\001\n\017ConfusionMatrix\022\032\n\022annot" +
      "ation_spec_id\030\001 \003(\t\022]\n\003row\030\002 \003(\0132P.googl" +
      "e.cloud.automl.v1beta1.ClassificationEva" +
      "luationMetrics.ConfusionMatrix.Row\032\034\n\003Ro" +
      "w\022\025\n\rexample_count\030\001 \003(\005*Y\n\022Classificati" +
      "onType\022#\n\037CLASSIFICATION_TYPE_UNSPECIFIE" +
      "D\020\000\022\016\n\nMULTICLASS\020\001\022\016\n\nMULTILABEL\020\002By\n\037c" +
      "om.google.cloud.automl.v1beta1B\023Classifi" +
      "cationProtoZAgoogle.golang.org/genproto/" +
      "googleapis/cloud/automl/v1beta1;automlb\006" +
      "proto3"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          com.google.api.AnnotationsProto.getDescriptor(),
        }, assigner);
    internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor,
        new java.lang.String[] { "Score", });
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor,
        new java.lang.String[] { "AuPrc", "BaseAuPrc", "ConfidenceMetricsEntry", "ConfusionMatrix", "AnnotationSpecId", });
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor =
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor.getNestedTypes().get(0);
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor,
        new java.lang.String[] { "ConfidenceThreshold", "Recall", "Precision", "F1Score", "RecallAt1", "PrecisionAt1", "F1ScoreAt1", });
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor =
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor.getNestedTypes().get(1);
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor,
        new java.lang.String[] { "AnnotationSpecId", "Row", });
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor =
      internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor.getNestedTypes().get(0);
    internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor,
        new java.lang.String[] { "ExampleCount", });
    com.google.api.AnnotationsProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
