// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/contrib/boosted_trees/proto/learner.proto

package tensorflow.boosted_trees.learner;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface TreeRegularizationConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Classic L1/L2.
     * </pre>
     *
     * <code>float l1 = 1;</code>
     */
    float getL1();

    /**
     * <code>float l2 = 2;</code>
     */
    float getL2();

    /**
     * <pre>
     * Tree complexity penalizes overall model complexity effectively
     * limiting how deep the tree can grow in regions with small gain.
     * </pre>
     *
     * <code>float tree_complexity = 3;</code>
     */
    float getTreeComplexity();
  }
  /**
   * <pre>
   * Tree regularization config.
   * </pre>
   *
   * Protobuf type {@code tensorflow.boosted_trees.learner.TreeRegularizationConfig}
   */
  public  static final class TreeRegularizationConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
      TreeRegularizationConfigOrBuilder {
    // Use TreeRegularizationConfig.newBuilder() to construct.
    private TreeRegularizationConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private TreeRegularizationConfig() {
      l1_ = 0F;
      l2_ = 0F;
      treeComplexity_ = 0F;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private TreeRegularizationConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 13: {

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

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

              treeComplexity_ = input.readFloat();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.class, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder.class);
    }

    public static final int L1_FIELD_NUMBER = 1;
    private float l1_;
    /**
     * <pre>
     * Classic L1/L2.
     * </pre>
     *
     * <code>float l1 = 1;</code>
     */
    public float getL1() {
      return l1_;
    }

    public static final int L2_FIELD_NUMBER = 2;
    private float l2_;
    /**
     * <code>float l2 = 2;</code>
     */
    public float getL2() {
      return l2_;
    }

    public static final int TREE_COMPLEXITY_FIELD_NUMBER = 3;
    private float treeComplexity_;
    /**
     * <pre>
     * Tree complexity penalizes overall model complexity effectively
     * limiting how deep the tree can grow in regions with small gain.
     * </pre>
     *
     * <code>float tree_complexity = 3;</code>
     */
    public float getTreeComplexity() {
      return treeComplexity_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (l1_ != 0F) {
        output.writeFloat(1, l1_);
      }
      if (l2_ != 0F) {
        output.writeFloat(2, l2_);
      }
      if (treeComplexity_ != 0F) {
        output.writeFloat(3, treeComplexity_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (l1_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, l1_);
      }
      if (l2_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, l2_);
      }
      if (treeComplexity_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(3, treeComplexity_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig other = (tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig) obj;

      boolean result = true;
      result = result && (
          java.lang.Float.floatToIntBits(getL1())
          == java.lang.Float.floatToIntBits(
              other.getL1()));
      result = result && (
          java.lang.Float.floatToIntBits(getL2())
          == java.lang.Float.floatToIntBits(
              other.getL2()));
      result = result && (
          java.lang.Float.floatToIntBits(getTreeComplexity())
          == java.lang.Float.floatToIntBits(
              other.getTreeComplexity()));
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + L1_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getL1());
      hash = (37 * hash) + L2_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getL2());
      hash = (37 * hash) + TREE_COMPLEXITY_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getTreeComplexity());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig 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 tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig 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 tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * Tree regularization config.
     * </pre>
     *
     * Protobuf type {@code tensorflow.boosted_trees.learner.TreeRegularizationConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
        tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.class, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        l1_ = 0F;

        l2_ = 0F;

        treeComplexity_ = 0F;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig build() {
        tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig result = new tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig(this);
        result.l1_ = l1_;
        result.l2_ = l2_;
        result.treeComplexity_ = treeComplexity_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance()) return this;
        if (other.getL1() != 0F) {
          setL1(other.getL1());
        }
        if (other.getL2() != 0F) {
          setL2(other.getL2());
        }
        if (other.getTreeComplexity() != 0F) {
          setTreeComplexity(other.getTreeComplexity());
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private float l1_ ;
      /**
       * <pre>
       * Classic L1/L2.
       * </pre>
       *
       * <code>float l1 = 1;</code>
       */
      public float getL1() {
        return l1_;
      }
      /**
       * <pre>
       * Classic L1/L2.
       * </pre>
       *
       * <code>float l1 = 1;</code>
       */
      public Builder setL1(float value) {
        
        l1_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Classic L1/L2.
       * </pre>
       *
       * <code>float l1 = 1;</code>
       */
      public Builder clearL1() {
        
        l1_ = 0F;
        onChanged();
        return this;
      }

      private float l2_ ;
      /**
       * <code>float l2 = 2;</code>
       */
      public float getL2() {
        return l2_;
      }
      /**
       * <code>float l2 = 2;</code>
       */
      public Builder setL2(float value) {
        
        l2_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>float l2 = 2;</code>
       */
      public Builder clearL2() {
        
        l2_ = 0F;
        onChanged();
        return this;
      }

      private float treeComplexity_ ;
      /**
       * <pre>
       * Tree complexity penalizes overall model complexity effectively
       * limiting how deep the tree can grow in regions with small gain.
       * </pre>
       *
       * <code>float tree_complexity = 3;</code>
       */
      public float getTreeComplexity() {
        return treeComplexity_;
      }
      /**
       * <pre>
       * Tree complexity penalizes overall model complexity effectively
       * limiting how deep the tree can grow in regions with small gain.
       * </pre>
       *
       * <code>float tree_complexity = 3;</code>
       */
      public Builder setTreeComplexity(float value) {
        
        treeComplexity_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Tree complexity penalizes overall model complexity effectively
       * limiting how deep the tree can grow in regions with small gain.
       * </pre>
       *
       * <code>float tree_complexity = 3;</code>
       */
      public Builder clearTreeComplexity() {
        
        treeComplexity_ = 0F;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.TreeRegularizationConfig)
    private static final tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface TreeConstraintsConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Maximum depth of the trees. The default value is 6 if not specified.
     * </pre>
     *
     * <code>uint32 max_tree_depth = 1;</code>
     */
    int getMaxTreeDepth();

    /**
     * <pre>
     * Min hessian weight per node.
     * </pre>
     *
     * <code>float min_node_weight = 2;</code>
     */
    float getMinNodeWeight();

    /**
     * <pre>
     * Maximum number of unique features used in the tree. Zero means there is no
     * limit.
     * </pre>
     *
     * <code>int64 max_number_of_unique_feature_columns = 3;</code>
     */
    long getMaxNumberOfUniqueFeatureColumns();
  }
  /**
   * <pre>
   * Tree constraints config.
   * </pre>
   *
   * Protobuf type {@code tensorflow.boosted_trees.learner.TreeConstraintsConfig}
   */
  public  static final class TreeConstraintsConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
      TreeConstraintsConfigOrBuilder {
    // Use TreeConstraintsConfig.newBuilder() to construct.
    private TreeConstraintsConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private TreeConstraintsConfig() {
      maxTreeDepth_ = 0;
      minNodeWeight_ = 0F;
      maxNumberOfUniqueFeatureColumns_ = 0L;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private TreeConstraintsConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 8: {

              maxTreeDepth_ = input.readUInt32();
              break;
            }
            case 21: {

              minNodeWeight_ = input.readFloat();
              break;
            }
            case 24: {

              maxNumberOfUniqueFeatureColumns_ = input.readInt64();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.class, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder.class);
    }

    public static final int MAX_TREE_DEPTH_FIELD_NUMBER = 1;
    private int maxTreeDepth_;
    /**
     * <pre>
     * Maximum depth of the trees. The default value is 6 if not specified.
     * </pre>
     *
     * <code>uint32 max_tree_depth = 1;</code>
     */
    public int getMaxTreeDepth() {
      return maxTreeDepth_;
    }

    public static final int MIN_NODE_WEIGHT_FIELD_NUMBER = 2;
    private float minNodeWeight_;
    /**
     * <pre>
     * Min hessian weight per node.
     * </pre>
     *
     * <code>float min_node_weight = 2;</code>
     */
    public float getMinNodeWeight() {
      return minNodeWeight_;
    }

    public static final int MAX_NUMBER_OF_UNIQUE_FEATURE_COLUMNS_FIELD_NUMBER = 3;
    private long maxNumberOfUniqueFeatureColumns_;
    /**
     * <pre>
     * Maximum number of unique features used in the tree. Zero means there is no
     * limit.
     * </pre>
     *
     * <code>int64 max_number_of_unique_feature_columns = 3;</code>
     */
    public long getMaxNumberOfUniqueFeatureColumns() {
      return maxNumberOfUniqueFeatureColumns_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (maxTreeDepth_ != 0) {
        output.writeUInt32(1, maxTreeDepth_);
      }
      if (minNodeWeight_ != 0F) {
        output.writeFloat(2, minNodeWeight_);
      }
      if (maxNumberOfUniqueFeatureColumns_ != 0L) {
        output.writeInt64(3, maxNumberOfUniqueFeatureColumns_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (maxTreeDepth_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, maxTreeDepth_);
      }
      if (minNodeWeight_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, minNodeWeight_);
      }
      if (maxNumberOfUniqueFeatureColumns_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, maxNumberOfUniqueFeatureColumns_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig other = (tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig) obj;

      boolean result = true;
      result = result && (getMaxTreeDepth()
          == other.getMaxTreeDepth());
      result = result && (
          java.lang.Float.floatToIntBits(getMinNodeWeight())
          == java.lang.Float.floatToIntBits(
              other.getMinNodeWeight()));
      result = result && (getMaxNumberOfUniqueFeatureColumns()
          == other.getMaxNumberOfUniqueFeatureColumns());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + MAX_TREE_DEPTH_FIELD_NUMBER;
      hash = (53 * hash) + getMaxTreeDepth();
      hash = (37 * hash) + MIN_NODE_WEIGHT_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getMinNodeWeight());
      hash = (37 * hash) + MAX_NUMBER_OF_UNIQUE_FEATURE_COLUMNS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getMaxNumberOfUniqueFeatureColumns());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig 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 tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig 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 tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * Tree constraints config.
     * </pre>
     *
     * Protobuf type {@code tensorflow.boosted_trees.learner.TreeConstraintsConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
        tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.class, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        maxTreeDepth_ = 0;

        minNodeWeight_ = 0F;

        maxNumberOfUniqueFeatureColumns_ = 0L;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig build() {
        tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig result = new tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig(this);
        result.maxTreeDepth_ = maxTreeDepth_;
        result.minNodeWeight_ = minNodeWeight_;
        result.maxNumberOfUniqueFeatureColumns_ = maxNumberOfUniqueFeatureColumns_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance()) return this;
        if (other.getMaxTreeDepth() != 0) {
          setMaxTreeDepth(other.getMaxTreeDepth());
        }
        if (other.getMinNodeWeight() != 0F) {
          setMinNodeWeight(other.getMinNodeWeight());
        }
        if (other.getMaxNumberOfUniqueFeatureColumns() != 0L) {
          setMaxNumberOfUniqueFeatureColumns(other.getMaxNumberOfUniqueFeatureColumns());
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int maxTreeDepth_ ;
      /**
       * <pre>
       * Maximum depth of the trees. The default value is 6 if not specified.
       * </pre>
       *
       * <code>uint32 max_tree_depth = 1;</code>
       */
      public int getMaxTreeDepth() {
        return maxTreeDepth_;
      }
      /**
       * <pre>
       * Maximum depth of the trees. The default value is 6 if not specified.
       * </pre>
       *
       * <code>uint32 max_tree_depth = 1;</code>
       */
      public Builder setMaxTreeDepth(int value) {
        
        maxTreeDepth_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Maximum depth of the trees. The default value is 6 if not specified.
       * </pre>
       *
       * <code>uint32 max_tree_depth = 1;</code>
       */
      public Builder clearMaxTreeDepth() {
        
        maxTreeDepth_ = 0;
        onChanged();
        return this;
      }

      private float minNodeWeight_ ;
      /**
       * <pre>
       * Min hessian weight per node.
       * </pre>
       *
       * <code>float min_node_weight = 2;</code>
       */
      public float getMinNodeWeight() {
        return minNodeWeight_;
      }
      /**
       * <pre>
       * Min hessian weight per node.
       * </pre>
       *
       * <code>float min_node_weight = 2;</code>
       */
      public Builder setMinNodeWeight(float value) {
        
        minNodeWeight_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Min hessian weight per node.
       * </pre>
       *
       * <code>float min_node_weight = 2;</code>
       */
      public Builder clearMinNodeWeight() {
        
        minNodeWeight_ = 0F;
        onChanged();
        return this;
      }

      private long maxNumberOfUniqueFeatureColumns_ ;
      /**
       * <pre>
       * Maximum number of unique features used in the tree. Zero means there is no
       * limit.
       * </pre>
       *
       * <code>int64 max_number_of_unique_feature_columns = 3;</code>
       */
      public long getMaxNumberOfUniqueFeatureColumns() {
        return maxNumberOfUniqueFeatureColumns_;
      }
      /**
       * <pre>
       * Maximum number of unique features used in the tree. Zero means there is no
       * limit.
       * </pre>
       *
       * <code>int64 max_number_of_unique_feature_columns = 3;</code>
       */
      public Builder setMaxNumberOfUniqueFeatureColumns(long value) {
        
        maxNumberOfUniqueFeatureColumns_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Maximum number of unique features used in the tree. Zero means there is no
       * limit.
       * </pre>
       *
       * <code>int64 max_number_of_unique_feature_columns = 3;</code>
       */
      public Builder clearMaxNumberOfUniqueFeatureColumns() {
        
        maxNumberOfUniqueFeatureColumns_ = 0L;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.TreeConstraintsConfig)
    private static final tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LearningRateConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getFixed();
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder getFixedOrBuilder();

    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDropout();
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder getDropoutOrBuilder();

    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getLineSearch();
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder getLineSearchOrBuilder();

    public tensorflow.boosted_trees.learner.Learner.LearningRateConfig.TunerCase getTunerCase();
  }
  /**
   * <pre>
   * LearningRateConfig describes all supported learning rate tuners.
   * </pre>
   *
   * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateConfig}
   */
  public  static final class LearningRateConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateConfig)
      LearningRateConfigOrBuilder {
    // Use LearningRateConfig.newBuilder() to construct.
    private LearningRateConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private LearningRateConfig() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private LearningRateConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder subBuilder = null;
              if (tunerCase_ == 1) {
                subBuilder = ((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_).toBuilder();
              }
              tuner_ =
                  input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_);
                tuner_ = subBuilder.buildPartial();
              }
              tunerCase_ = 1;
              break;
            }
            case 18: {
              tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder subBuilder = null;
              if (tunerCase_ == 2) {
                subBuilder = ((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_).toBuilder();
              }
              tuner_ =
                  input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_);
                tuner_ = subBuilder.buildPartial();
              }
              tunerCase_ = 2;
              break;
            }
            case 26: {
              tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder subBuilder = null;
              if (tunerCase_ == 3) {
                subBuilder = ((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_).toBuilder();
              }
              tuner_ =
                  input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_);
                tuner_ = subBuilder.buildPartial();
              }
              tunerCase_ = 3;
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.LearningRateConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder.class);
    }

    private int tunerCase_ = 0;
    private java.lang.Object tuner_;
    public enum TunerCase
        implements com.google.protobuf.Internal.EnumLite {
      FIXED(1),
      DROPOUT(2),
      LINE_SEARCH(3),
      TUNER_NOT_SET(0);
      private final int value;
      private TunerCase(int value) {
        this.value = value;
      }
      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static TunerCase valueOf(int value) {
        return forNumber(value);
      }

      public static TunerCase forNumber(int value) {
        switch (value) {
          case 1: return FIXED;
          case 2: return DROPOUT;
          case 3: return LINE_SEARCH;
          case 0: return TUNER_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public TunerCase
    getTunerCase() {
      return TunerCase.forNumber(
          tunerCase_);
    }

    public static final int FIXED_FIELD_NUMBER = 1;
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getFixed() {
      if (tunerCase_ == 1) {
         return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
      }
      return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
    }
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder getFixedOrBuilder() {
      if (tunerCase_ == 1) {
         return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
      }
      return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
    }

    public static final int DROPOUT_FIELD_NUMBER = 2;
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDropout() {
      if (tunerCase_ == 2) {
         return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
      }
      return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
    }
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder getDropoutOrBuilder() {
      if (tunerCase_ == 2) {
         return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
      }
      return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
    }

    public static final int LINE_SEARCH_FIELD_NUMBER = 3;
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getLineSearch() {
      if (tunerCase_ == 3) {
         return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
      }
      return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
    }
    /**
     * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder getLineSearchOrBuilder() {
      if (tunerCase_ == 3) {
         return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
      }
      return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (tunerCase_ == 1) {
        output.writeMessage(1, (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_);
      }
      if (tunerCase_ == 2) {
        output.writeMessage(2, (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_);
      }
      if (tunerCase_ == 3) {
        output.writeMessage(3, (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (tunerCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_);
      }
      if (tunerCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_);
      }
      if (tunerCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.LearningRateConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.LearningRateConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateConfig) obj;

      boolean result = true;
      result = result && getTunerCase().equals(
          other.getTunerCase());
      if (!result) return false;
      switch (tunerCase_) {
        case 1:
          result = result && getFixed()
              .equals(other.getFixed());
          break;
        case 2:
          result = result && getDropout()
              .equals(other.getDropout());
          break;
        case 3:
          result = result && getLineSearch()
              .equals(other.getLineSearch());
          break;
        case 0:
        default:
      }
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (tunerCase_) {
        case 1:
          hash = (37 * hash) + FIXED_FIELD_NUMBER;
          hash = (53 * hash) + getFixed().hashCode();
          break;
        case 2:
          hash = (37 * hash) + DROPOUT_FIELD_NUMBER;
          hash = (53 * hash) + getDropout().hashCode();
          break;
        case 3:
          hash = (37 * hash) + LINE_SEARCH_FIELD_NUMBER;
          hash = (53 * hash) + getLineSearch().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * LearningRateConfig describes all supported learning rate tuners.
     * </pre>
     *
     * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateConfig)
        tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.LearningRateConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.LearningRateConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        tunerCase_ = 0;
        tuner_ = null;
        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateConfig build() {
        tensorflow.boosted_trees.learner.Learner.LearningRateConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.LearningRateConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateConfig(this);
        if (tunerCase_ == 1) {
          if (fixedBuilder_ == null) {
            result.tuner_ = tuner_;
          } else {
            result.tuner_ = fixedBuilder_.build();
          }
        }
        if (tunerCase_ == 2) {
          if (dropoutBuilder_ == null) {
            result.tuner_ = tuner_;
          } else {
            result.tuner_ = dropoutBuilder_.build();
          }
        }
        if (tunerCase_ == 3) {
          if (lineSearchBuilder_ == null) {
            result.tuner_ = tuner_;
          } else {
            result.tuner_ = lineSearchBuilder_.build();
          }
        }
        result.tunerCase_ = tunerCase_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance()) return this;
        switch (other.getTunerCase()) {
          case FIXED: {
            mergeFixed(other.getFixed());
            break;
          }
          case DROPOUT: {
            mergeDropout(other.getDropout());
            break;
          }
          case LINE_SEARCH: {
            mergeLineSearch(other.getLineSearch());
            break;
          }
          case TUNER_NOT_SET: {
            break;
          }
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.LearningRateConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int tunerCase_ = 0;
      private java.lang.Object tuner_;
      public TunerCase
          getTunerCase() {
        return TunerCase.forNumber(
            tunerCase_);
      }

      public Builder clearTuner() {
        tunerCase_ = 0;
        tuner_ = null;
        onChanged();
        return this;
      }


      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder> fixedBuilder_;
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getFixed() {
        if (fixedBuilder_ == null) {
          if (tunerCase_ == 1) {
            return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
        } else {
          if (tunerCase_ == 1) {
            return fixedBuilder_.getMessage();
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
        }
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public Builder setFixed(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig value) {
        if (fixedBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          tuner_ = value;
          onChanged();
        } else {
          fixedBuilder_.setMessage(value);
        }
        tunerCase_ = 1;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public Builder setFixed(
          tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder builderForValue) {
        if (fixedBuilder_ == null) {
          tuner_ = builderForValue.build();
          onChanged();
        } else {
          fixedBuilder_.setMessage(builderForValue.build());
        }
        tunerCase_ = 1;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public Builder mergeFixed(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig value) {
        if (fixedBuilder_ == null) {
          if (tunerCase_ == 1 &&
              tuner_ != tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance()) {
            tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.newBuilder((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_)
                .mergeFrom(value).buildPartial();
          } else {
            tuner_ = value;
          }
          onChanged();
        } else {
          if (tunerCase_ == 1) {
            fixedBuilder_.mergeFrom(value);
          }
          fixedBuilder_.setMessage(value);
        }
        tunerCase_ = 1;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public Builder clearFixed() {
        if (fixedBuilder_ == null) {
          if (tunerCase_ == 1) {
            tunerCase_ = 0;
            tuner_ = null;
            onChanged();
          }
        } else {
          if (tunerCase_ == 1) {
            tunerCase_ = 0;
            tuner_ = null;
          }
          fixedBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder getFixedBuilder() {
        return getFixedFieldBuilder().getBuilder();
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder getFixedOrBuilder() {
        if ((tunerCase_ == 1) && (fixedBuilder_ != null)) {
          return fixedBuilder_.getMessageOrBuilder();
        } else {
          if (tunerCase_ == 1) {
            return (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_;
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
        }
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateFixedConfig fixed = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder> 
          getFixedFieldBuilder() {
        if (fixedBuilder_ == null) {
          if (!(tunerCase_ == 1)) {
            tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
          }
          fixedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder>(
                  (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) tuner_,
                  getParentForChildren(),
                  isClean());
          tuner_ = null;
        }
        tunerCase_ = 1;
        onChanged();;
        return fixedBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder> dropoutBuilder_;
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDropout() {
        if (dropoutBuilder_ == null) {
          if (tunerCase_ == 2) {
            return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
        } else {
          if (tunerCase_ == 2) {
            return dropoutBuilder_.getMessage();
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
        }
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public Builder setDropout(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig value) {
        if (dropoutBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          tuner_ = value;
          onChanged();
        } else {
          dropoutBuilder_.setMessage(value);
        }
        tunerCase_ = 2;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public Builder setDropout(
          tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder builderForValue) {
        if (dropoutBuilder_ == null) {
          tuner_ = builderForValue.build();
          onChanged();
        } else {
          dropoutBuilder_.setMessage(builderForValue.build());
        }
        tunerCase_ = 2;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public Builder mergeDropout(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig value) {
        if (dropoutBuilder_ == null) {
          if (tunerCase_ == 2 &&
              tuner_ != tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance()) {
            tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.newBuilder((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_)
                .mergeFrom(value).buildPartial();
          } else {
            tuner_ = value;
          }
          onChanged();
        } else {
          if (tunerCase_ == 2) {
            dropoutBuilder_.mergeFrom(value);
          }
          dropoutBuilder_.setMessage(value);
        }
        tunerCase_ = 2;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public Builder clearDropout() {
        if (dropoutBuilder_ == null) {
          if (tunerCase_ == 2) {
            tunerCase_ = 0;
            tuner_ = null;
            onChanged();
          }
        } else {
          if (tunerCase_ == 2) {
            tunerCase_ = 0;
            tuner_ = null;
          }
          dropoutBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder getDropoutBuilder() {
        return getDropoutFieldBuilder().getBuilder();
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder getDropoutOrBuilder() {
        if ((tunerCase_ == 2) && (dropoutBuilder_ != null)) {
          return dropoutBuilder_.getMessageOrBuilder();
        } else {
          if (tunerCase_ == 2) {
            return (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_;
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
        }
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig dropout = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder> 
          getDropoutFieldBuilder() {
        if (dropoutBuilder_ == null) {
          if (!(tunerCase_ == 2)) {
            tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
          }
          dropoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder>(
                  (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) tuner_,
                  getParentForChildren(),
                  isClean());
          tuner_ = null;
        }
        tunerCase_ = 2;
        onChanged();;
        return dropoutBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder> lineSearchBuilder_;
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getLineSearch() {
        if (lineSearchBuilder_ == null) {
          if (tunerCase_ == 3) {
            return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
        } else {
          if (tunerCase_ == 3) {
            return lineSearchBuilder_.getMessage();
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
        }
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public Builder setLineSearch(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig value) {
        if (lineSearchBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          tuner_ = value;
          onChanged();
        } else {
          lineSearchBuilder_.setMessage(value);
        }
        tunerCase_ = 3;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public Builder setLineSearch(
          tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder builderForValue) {
        if (lineSearchBuilder_ == null) {
          tuner_ = builderForValue.build();
          onChanged();
        } else {
          lineSearchBuilder_.setMessage(builderForValue.build());
        }
        tunerCase_ = 3;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public Builder mergeLineSearch(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig value) {
        if (lineSearchBuilder_ == null) {
          if (tunerCase_ == 3 &&
              tuner_ != tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance()) {
            tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.newBuilder((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_)
                .mergeFrom(value).buildPartial();
          } else {
            tuner_ = value;
          }
          onChanged();
        } else {
          if (tunerCase_ == 3) {
            lineSearchBuilder_.mergeFrom(value);
          }
          lineSearchBuilder_.setMessage(value);
        }
        tunerCase_ = 3;
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public Builder clearLineSearch() {
        if (lineSearchBuilder_ == null) {
          if (tunerCase_ == 3) {
            tunerCase_ = 0;
            tuner_ = null;
            onChanged();
          }
        } else {
          if (tunerCase_ == 3) {
            tunerCase_ = 0;
            tuner_ = null;
          }
          lineSearchBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder getLineSearchBuilder() {
        return getLineSearchFieldBuilder().getBuilder();
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder getLineSearchOrBuilder() {
        if ((tunerCase_ == 3) && (lineSearchBuilder_ != null)) {
          return lineSearchBuilder_.getMessageOrBuilder();
        } else {
          if (tunerCase_ == 3) {
            return (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_;
          }
          return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
        }
      }
      /**
       * <code>.tensorflow.boosted_trees.learner.LearningRateLineSearchConfig line_search = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder> 
          getLineSearchFieldBuilder() {
        if (lineSearchBuilder_ == null) {
          if (!(tunerCase_ == 3)) {
            tuner_ = tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
          }
          lineSearchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder>(
                  (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) tuner_,
                  getParentForChildren(),
                  isClean());
          tuner_ = null;
        }
        tunerCase_ = 3;
        onChanged();;
        return lineSearchBuilder_;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateConfig)
    private static final tensorflow.boosted_trees.learner.Learner.LearningRateConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.LearningRateConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LearningRateFixedConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>float learning_rate = 1;</code>
     */
    float getLearningRate();
  }
  /**
   * <pre>
   * Config for a fixed learning rate.
   * </pre>
   *
   * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateFixedConfig}
   */
  public  static final class LearningRateFixedConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
      LearningRateFixedConfigOrBuilder {
    // Use LearningRateFixedConfig.newBuilder() to construct.
    private LearningRateFixedConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private LearningRateFixedConfig() {
      learningRate_ = 0F;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private LearningRateFixedConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 13: {

              learningRate_ = input.readFloat();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder.class);
    }

    public static final int LEARNING_RATE_FIELD_NUMBER = 1;
    private float learningRate_;
    /**
     * <code>float learning_rate = 1;</code>
     */
    public float getLearningRate() {
      return learningRate_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (learningRate_ != 0F) {
        output.writeFloat(1, learningRate_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (learningRate_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, learningRate_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) obj;

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

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

    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * Config for a fixed learning rate.
     * </pre>
     *
     * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateFixedConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
        tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        learningRate_ = 0F;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig build() {
        tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig(this);
        result.learningRate_ = learningRate_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig.getDefaultInstance()) return this;
        if (other.getLearningRate() != 0F) {
          setLearningRate(other.getLearningRate());
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private float learningRate_ ;
      /**
       * <code>float learning_rate = 1;</code>
       */
      public float getLearningRate() {
        return learningRate_;
      }
      /**
       * <code>float learning_rate = 1;</code>
       */
      public Builder setLearningRate(float value) {
        
        learningRate_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>float learning_rate = 1;</code>
       */
      public Builder clearLearningRate() {
        
        learningRate_ = 0F;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateFixedConfig)
    private static final tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.LearningRateFixedConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LearningRateLineSearchConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Max learning rate. Must be strictly positive.
     * </pre>
     *
     * <code>float max_learning_rate = 1;</code>
     */
    float getMaxLearningRate();

    /**
     * <pre>
     * Number of learning rate values to consider between [0, max_learning_rate).
     * </pre>
     *
     * <code>int32 num_steps = 2;</code>
     */
    int getNumSteps();
  }
  /**
   * <pre>
   * Config for a tuned learning rate.
   * </pre>
   *
   * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateLineSearchConfig}
   */
  public  static final class LearningRateLineSearchConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
      LearningRateLineSearchConfigOrBuilder {
    // Use LearningRateLineSearchConfig.newBuilder() to construct.
    private LearningRateLineSearchConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private LearningRateLineSearchConfig() {
      maxLearningRate_ = 0F;
      numSteps_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private LearningRateLineSearchConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 13: {

              maxLearningRate_ = input.readFloat();
              break;
            }
            case 16: {

              numSteps_ = input.readInt32();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder.class);
    }

    public static final int MAX_LEARNING_RATE_FIELD_NUMBER = 1;
    private float maxLearningRate_;
    /**
     * <pre>
     * Max learning rate. Must be strictly positive.
     * </pre>
     *
     * <code>float max_learning_rate = 1;</code>
     */
    public float getMaxLearningRate() {
      return maxLearningRate_;
    }

    public static final int NUM_STEPS_FIELD_NUMBER = 2;
    private int numSteps_;
    /**
     * <pre>
     * Number of learning rate values to consider between [0, max_learning_rate).
     * </pre>
     *
     * <code>int32 num_steps = 2;</code>
     */
    public int getNumSteps() {
      return numSteps_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (maxLearningRate_ != 0F) {
        output.writeFloat(1, maxLearningRate_);
      }
      if (numSteps_ != 0) {
        output.writeInt32(2, numSteps_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (maxLearningRate_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, maxLearningRate_);
      }
      if (numSteps_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, numSteps_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) obj;

      boolean result = true;
      result = result && (
          java.lang.Float.floatToIntBits(getMaxLearningRate())
          == java.lang.Float.floatToIntBits(
              other.getMaxLearningRate()));
      result = result && (getNumSteps()
          == other.getNumSteps());
      return result;
    }

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

    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * Config for a tuned learning rate.
     * </pre>
     *
     * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateLineSearchConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
        tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        maxLearningRate_ = 0F;

        numSteps_ = 0;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig build() {
        tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig(this);
        result.maxLearningRate_ = maxLearningRate_;
        result.numSteps_ = numSteps_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig.getDefaultInstance()) return this;
        if (other.getMaxLearningRate() != 0F) {
          setMaxLearningRate(other.getMaxLearningRate());
        }
        if (other.getNumSteps() != 0) {
          setNumSteps(other.getNumSteps());
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private float maxLearningRate_ ;
      /**
       * <pre>
       * Max learning rate. Must be strictly positive.
       * </pre>
       *
       * <code>float max_learning_rate = 1;</code>
       */
      public float getMaxLearningRate() {
        return maxLearningRate_;
      }
      /**
       * <pre>
       * Max learning rate. Must be strictly positive.
       * </pre>
       *
       * <code>float max_learning_rate = 1;</code>
       */
      public Builder setMaxLearningRate(float value) {
        
        maxLearningRate_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Max learning rate. Must be strictly positive.
       * </pre>
       *
       * <code>float max_learning_rate = 1;</code>
       */
      public Builder clearMaxLearningRate() {
        
        maxLearningRate_ = 0F;
        onChanged();
        return this;
      }

      private int numSteps_ ;
      /**
       * <pre>
       * Number of learning rate values to consider between [0, max_learning_rate).
       * </pre>
       *
       * <code>int32 num_steps = 2;</code>
       */
      public int getNumSteps() {
        return numSteps_;
      }
      /**
       * <pre>
       * Number of learning rate values to consider between [0, max_learning_rate).
       * </pre>
       *
       * <code>int32 num_steps = 2;</code>
       */
      public Builder setNumSteps(int value) {
        
        numSteps_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Number of learning rate values to consider between [0, max_learning_rate).
       * </pre>
       *
       * <code>int32 num_steps = 2;</code>
       */
      public Builder clearNumSteps() {
        
        numSteps_ = 0;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateLineSearchConfig)
    private static final tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.LearningRateLineSearchConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface AveragingConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.AveragingConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>float average_last_n_trees = 1;</code>
     */
    float getAverageLastNTrees();

    /**
     * <pre>
     * Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
     * ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
     * last half of the trees are averaged etc.
     * </pre>
     *
     * <code>float average_last_percent_trees = 2;</code>
     */
    float getAverageLastPercentTrees();

    public tensorflow.boosted_trees.learner.Learner.AveragingConfig.ConfigCase getConfigCase();
  }
  /**
   * <pre>
   * When we have a sequence of trees 1, 2, 3 ... n, these essentially represent
   * weights updates in functional space, and thus we can use averaging of weight
   * updates to achieve better performance. For example, we can say that our final
   * ensemble will be an average of ensembles of tree 1, and ensemble of tree 1
   * and tree 2 etc .. ensemble of all trees.
   * Note that this averaging will apply ONLY DURING PREDICTION. The training
   * stays the same.
   * </pre>
   *
   * Protobuf type {@code tensorflow.boosted_trees.learner.AveragingConfig}
   */
  public  static final class AveragingConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.AveragingConfig)
      AveragingConfigOrBuilder {
    // Use AveragingConfig.newBuilder() to construct.
    private AveragingConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private AveragingConfig() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private AveragingConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 13: {
              configCase_ = 1;
              config_ = input.readFloat();
              break;
            }
            case 21: {
              configCase_ = 2;
              config_ = input.readFloat();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.AveragingConfig.class, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder.class);
    }

    private int configCase_ = 0;
    private java.lang.Object config_;
    public enum ConfigCase
        implements com.google.protobuf.Internal.EnumLite {
      AVERAGE_LAST_N_TREES(1),
      AVERAGE_LAST_PERCENT_TREES(2),
      CONFIG_NOT_SET(0);
      private final int value;
      private ConfigCase(int value) {
        this.value = value;
      }
      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static ConfigCase valueOf(int value) {
        return forNumber(value);
      }

      public static ConfigCase forNumber(int value) {
        switch (value) {
          case 1: return AVERAGE_LAST_N_TREES;
          case 2: return AVERAGE_LAST_PERCENT_TREES;
          case 0: return CONFIG_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public ConfigCase
    getConfigCase() {
      return ConfigCase.forNumber(
          configCase_);
    }

    public static final int AVERAGE_LAST_N_TREES_FIELD_NUMBER = 1;
    /**
     * <code>float average_last_n_trees = 1;</code>
     */
    public float getAverageLastNTrees() {
      if (configCase_ == 1) {
        return (java.lang.Float) config_;
      }
      return 0F;
    }

    public static final int AVERAGE_LAST_PERCENT_TREES_FIELD_NUMBER = 2;
    /**
     * <pre>
     * Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
     * ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
     * last half of the trees are averaged etc.
     * </pre>
     *
     * <code>float average_last_percent_trees = 2;</code>
     */
    public float getAverageLastPercentTrees() {
      if (configCase_ == 2) {
        return (java.lang.Float) config_;
      }
      return 0F;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (configCase_ == 1) {
        output.writeFloat(
            1, (float)((java.lang.Float) config_));
      }
      if (configCase_ == 2) {
        output.writeFloat(
            2, (float)((java.lang.Float) config_));
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (configCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(
              1, (float)((java.lang.Float) config_));
      }
      if (configCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(
              2, (float)((java.lang.Float) config_));
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.AveragingConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.AveragingConfig other = (tensorflow.boosted_trees.learner.Learner.AveragingConfig) obj;

      boolean result = true;
      result = result && getConfigCase().equals(
          other.getConfigCase());
      if (!result) return false;
      switch (configCase_) {
        case 1:
          result = result && (
              java.lang.Float.floatToIntBits(getAverageLastNTrees())
              == java.lang.Float.floatToIntBits(
                  other.getAverageLastNTrees()));
          break;
        case 2:
          result = result && (
              java.lang.Float.floatToIntBits(getAverageLastPercentTrees())
              == java.lang.Float.floatToIntBits(
                  other.getAverageLastPercentTrees()));
          break;
        case 0:
        default:
      }
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (configCase_) {
        case 1:
          hash = (37 * hash) + AVERAGE_LAST_N_TREES_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(
              getAverageLastNTrees());
          break;
        case 2:
          hash = (37 * hash) + AVERAGE_LAST_PERCENT_TREES_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(
              getAverageLastPercentTrees());
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig 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 tensorflow.boosted_trees.learner.Learner.AveragingConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig 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 tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.AveragingConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * When we have a sequence of trees 1, 2, 3 ... n, these essentially represent
     * weights updates in functional space, and thus we can use averaging of weight
     * updates to achieve better performance. For example, we can say that our final
     * ensemble will be an average of ensembles of tree 1, and ensemble of tree 1
     * and tree 2 etc .. ensemble of all trees.
     * Note that this averaging will apply ONLY DURING PREDICTION. The training
     * stays the same.
     * </pre>
     *
     * Protobuf type {@code tensorflow.boosted_trees.learner.AveragingConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.AveragingConfig)
        tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.AveragingConfig.class, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.AveragingConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        configCase_ = 0;
        config_ = null;
        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.AveragingConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.AveragingConfig build() {
        tensorflow.boosted_trees.learner.Learner.AveragingConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.AveragingConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.AveragingConfig result = new tensorflow.boosted_trees.learner.Learner.AveragingConfig(this);
        if (configCase_ == 1) {
          result.config_ = config_;
        }
        if (configCase_ == 2) {
          result.config_ = config_;
        }
        result.configCase_ = configCase_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.AveragingConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.AveragingConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.AveragingConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance()) return this;
        switch (other.getConfigCase()) {
          case AVERAGE_LAST_N_TREES: {
            setAverageLastNTrees(other.getAverageLastNTrees());
            break;
          }
          case AVERAGE_LAST_PERCENT_TREES: {
            setAverageLastPercentTrees(other.getAverageLastPercentTrees());
            break;
          }
          case CONFIG_NOT_SET: {
            break;
          }
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.AveragingConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.AveragingConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int configCase_ = 0;
      private java.lang.Object config_;
      public ConfigCase
          getConfigCase() {
        return ConfigCase.forNumber(
            configCase_);
      }

      public Builder clearConfig() {
        configCase_ = 0;
        config_ = null;
        onChanged();
        return this;
      }


      /**
       * <code>float average_last_n_trees = 1;</code>
       */
      public float getAverageLastNTrees() {
        if (configCase_ == 1) {
          return (java.lang.Float) config_;
        }
        return 0F;
      }
      /**
       * <code>float average_last_n_trees = 1;</code>
       */
      public Builder setAverageLastNTrees(float value) {
        configCase_ = 1;
        config_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>float average_last_n_trees = 1;</code>
       */
      public Builder clearAverageLastNTrees() {
        if (configCase_ == 1) {
          configCase_ = 0;
          config_ = null;
          onChanged();
        }
        return this;
      }

      /**
       * <pre>
       * Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
       * ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
       * last half of the trees are averaged etc.
       * </pre>
       *
       * <code>float average_last_percent_trees = 2;</code>
       */
      public float getAverageLastPercentTrees() {
        if (configCase_ == 2) {
          return (java.lang.Float) config_;
        }
        return 0F;
      }
      /**
       * <pre>
       * Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
       * ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
       * last half of the trees are averaged etc.
       * </pre>
       *
       * <code>float average_last_percent_trees = 2;</code>
       */
      public Builder setAverageLastPercentTrees(float value) {
        configCase_ = 2;
        config_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Between 0 and 1. If set to 1.0, we are averaging ensembles of tree 1,
       * ensemble of tree 1 and tree 2, etc ensemble of all trees. If set to 0.5,
       * last half of the trees are averaged etc.
       * </pre>
       *
       * <code>float average_last_percent_trees = 2;</code>
       */
      public Builder clearAverageLastPercentTrees() {
        if (configCase_ == 2) {
          configCase_ = 0;
          config_ = null;
          onChanged();
        }
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.AveragingConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.AveragingConfig)
    private static final tensorflow.boosted_trees.learner.Learner.AveragingConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.AveragingConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.AveragingConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.AveragingConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LearningRateDropoutDrivenConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Probability of dropping each tree in an existing so far ensemble.
     * </pre>
     *
     * <code>float dropout_probability = 1;</code>
     */
    float getDropoutProbability();

    /**
     * <pre>
     * When trees are built after dropout happen, they don't "advance" to the
     * optimal solution, they just rearrange the path. However you can still
     * choose to skip dropout periodically, to allow a new tree that "advances"
     * to be added.
     * For example, if running for 200 steps with probability of dropout 1/100,
     * you would expect the dropout to start happening for sure for all iterations
     * after 100. However you can add probability_of_skipping_dropout of 0.1, this
     * way iterations 100-200 will include approx 90 iterations of dropout and 10
     * iterations of normal steps.Set it to 0 if you want just keep building
     * the refinement trees after dropout kicks in.
     * </pre>
     *
     * <code>float probability_of_skipping_dropout = 2;</code>
     */
    float getProbabilityOfSkippingDropout();

    /**
     * <pre>
     * Between 0 and 1.
     * </pre>
     *
     * <code>float learning_rate = 3;</code>
     */
    float getLearningRate();
  }
  /**
   * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig}
   */
  public  static final class LearningRateDropoutDrivenConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
      LearningRateDropoutDrivenConfigOrBuilder {
    // Use LearningRateDropoutDrivenConfig.newBuilder() to construct.
    private LearningRateDropoutDrivenConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private LearningRateDropoutDrivenConfig() {
      dropoutProbability_ = 0F;
      probabilityOfSkippingDropout_ = 0F;
      learningRate_ = 0F;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private LearningRateDropoutDrivenConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 13: {

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

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

              learningRate_ = input.readFloat();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder.class);
    }

    public static final int DROPOUT_PROBABILITY_FIELD_NUMBER = 1;
    private float dropoutProbability_;
    /**
     * <pre>
     * Probability of dropping each tree in an existing so far ensemble.
     * </pre>
     *
     * <code>float dropout_probability = 1;</code>
     */
    public float getDropoutProbability() {
      return dropoutProbability_;
    }

    public static final int PROBABILITY_OF_SKIPPING_DROPOUT_FIELD_NUMBER = 2;
    private float probabilityOfSkippingDropout_;
    /**
     * <pre>
     * When trees are built after dropout happen, they don't "advance" to the
     * optimal solution, they just rearrange the path. However you can still
     * choose to skip dropout periodically, to allow a new tree that "advances"
     * to be added.
     * For example, if running for 200 steps with probability of dropout 1/100,
     * you would expect the dropout to start happening for sure for all iterations
     * after 100. However you can add probability_of_skipping_dropout of 0.1, this
     * way iterations 100-200 will include approx 90 iterations of dropout and 10
     * iterations of normal steps.Set it to 0 if you want just keep building
     * the refinement trees after dropout kicks in.
     * </pre>
     *
     * <code>float probability_of_skipping_dropout = 2;</code>
     */
    public float getProbabilityOfSkippingDropout() {
      return probabilityOfSkippingDropout_;
    }

    public static final int LEARNING_RATE_FIELD_NUMBER = 3;
    private float learningRate_;
    /**
     * <pre>
     * Between 0 and 1.
     * </pre>
     *
     * <code>float learning_rate = 3;</code>
     */
    public float getLearningRate() {
      return learningRate_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (dropoutProbability_ != 0F) {
        output.writeFloat(1, dropoutProbability_);
      }
      if (probabilityOfSkippingDropout_ != 0F) {
        output.writeFloat(2, probabilityOfSkippingDropout_);
      }
      if (learningRate_ != 0F) {
        output.writeFloat(3, learningRate_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (dropoutProbability_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, dropoutProbability_);
      }
      if (probabilityOfSkippingDropout_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, probabilityOfSkippingDropout_);
      }
      if (learningRate_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(3, learningRate_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig other = (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) obj;

      boolean result = true;
      result = result && (
          java.lang.Float.floatToIntBits(getDropoutProbability())
          == java.lang.Float.floatToIntBits(
              other.getDropoutProbability()));
      result = result && (
          java.lang.Float.floatToIntBits(getProbabilityOfSkippingDropout())
          == java.lang.Float.floatToIntBits(
              other.getProbabilityOfSkippingDropout()));
      result = result && (
          java.lang.Float.floatToIntBits(getLearningRate())
          == java.lang.Float.floatToIntBits(
              other.getLearningRate()));
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + DROPOUT_PROBABILITY_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getDropoutProbability());
      hash = (37 * hash) + PROBABILITY_OF_SKIPPING_DROPOUT_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getProbabilityOfSkippingDropout());
      hash = (37 * hash) + LEARNING_RATE_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(
          getLearningRate());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig 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 tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * Protobuf type {@code tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
        tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.class, tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        dropoutProbability_ = 0F;

        probabilityOfSkippingDropout_ = 0F;

        learningRate_ = 0F;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig build() {
        tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig result = new tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig(this);
        result.dropoutProbability_ = dropoutProbability_;
        result.probabilityOfSkippingDropout_ = probabilityOfSkippingDropout_;
        result.learningRate_ = learningRate_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig.getDefaultInstance()) return this;
        if (other.getDropoutProbability() != 0F) {
          setDropoutProbability(other.getDropoutProbability());
        }
        if (other.getProbabilityOfSkippingDropout() != 0F) {
          setProbabilityOfSkippingDropout(other.getProbabilityOfSkippingDropout());
        }
        if (other.getLearningRate() != 0F) {
          setLearningRate(other.getLearningRate());
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private float dropoutProbability_ ;
      /**
       * <pre>
       * Probability of dropping each tree in an existing so far ensemble.
       * </pre>
       *
       * <code>float dropout_probability = 1;</code>
       */
      public float getDropoutProbability() {
        return dropoutProbability_;
      }
      /**
       * <pre>
       * Probability of dropping each tree in an existing so far ensemble.
       * </pre>
       *
       * <code>float dropout_probability = 1;</code>
       */
      public Builder setDropoutProbability(float value) {
        
        dropoutProbability_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Probability of dropping each tree in an existing so far ensemble.
       * </pre>
       *
       * <code>float dropout_probability = 1;</code>
       */
      public Builder clearDropoutProbability() {
        
        dropoutProbability_ = 0F;
        onChanged();
        return this;
      }

      private float probabilityOfSkippingDropout_ ;
      /**
       * <pre>
       * When trees are built after dropout happen, they don't "advance" to the
       * optimal solution, they just rearrange the path. However you can still
       * choose to skip dropout periodically, to allow a new tree that "advances"
       * to be added.
       * For example, if running for 200 steps with probability of dropout 1/100,
       * you would expect the dropout to start happening for sure for all iterations
       * after 100. However you can add probability_of_skipping_dropout of 0.1, this
       * way iterations 100-200 will include approx 90 iterations of dropout and 10
       * iterations of normal steps.Set it to 0 if you want just keep building
       * the refinement trees after dropout kicks in.
       * </pre>
       *
       * <code>float probability_of_skipping_dropout = 2;</code>
       */
      public float getProbabilityOfSkippingDropout() {
        return probabilityOfSkippingDropout_;
      }
      /**
       * <pre>
       * When trees are built after dropout happen, they don't "advance" to the
       * optimal solution, they just rearrange the path. However you can still
       * choose to skip dropout periodically, to allow a new tree that "advances"
       * to be added.
       * For example, if running for 200 steps with probability of dropout 1/100,
       * you would expect the dropout to start happening for sure for all iterations
       * after 100. However you can add probability_of_skipping_dropout of 0.1, this
       * way iterations 100-200 will include approx 90 iterations of dropout and 10
       * iterations of normal steps.Set it to 0 if you want just keep building
       * the refinement trees after dropout kicks in.
       * </pre>
       *
       * <code>float probability_of_skipping_dropout = 2;</code>
       */
      public Builder setProbabilityOfSkippingDropout(float value) {
        
        probabilityOfSkippingDropout_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * When trees are built after dropout happen, they don't "advance" to the
       * optimal solution, they just rearrange the path. However you can still
       * choose to skip dropout periodically, to allow a new tree that "advances"
       * to be added.
       * For example, if running for 200 steps with probability of dropout 1/100,
       * you would expect the dropout to start happening for sure for all iterations
       * after 100. However you can add probability_of_skipping_dropout of 0.1, this
       * way iterations 100-200 will include approx 90 iterations of dropout and 10
       * iterations of normal steps.Set it to 0 if you want just keep building
       * the refinement trees after dropout kicks in.
       * </pre>
       *
       * <code>float probability_of_skipping_dropout = 2;</code>
       */
      public Builder clearProbabilityOfSkippingDropout() {
        
        probabilityOfSkippingDropout_ = 0F;
        onChanged();
        return this;
      }

      private float learningRate_ ;
      /**
       * <pre>
       * Between 0 and 1.
       * </pre>
       *
       * <code>float learning_rate = 3;</code>
       */
      public float getLearningRate() {
        return learningRate_;
      }
      /**
       * <pre>
       * Between 0 and 1.
       * </pre>
       *
       * <code>float learning_rate = 3;</code>
       */
      public Builder setLearningRate(float value) {
        
        learningRate_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Between 0 and 1.
       * </pre>
       *
       * <code>float learning_rate = 3;</code>
       */
      public Builder clearLearningRate() {
        
        learningRate_ = 0F;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearningRateDropoutDrivenConfig)
    private static final tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.LearningRateDropoutDrivenConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LearnerConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.learner.LearnerConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Number of classes.
     * </pre>
     *
     * <code>uint32 num_classes = 1;</code>
     */
    int getNumClasses();

    /**
     * <code>float feature_fraction_per_tree = 2;</code>
     */
    float getFeatureFractionPerTree();

    /**
     * <code>float feature_fraction_per_level = 3;</code>
     */
    float getFeatureFractionPerLevel();

    /**
     * <pre>
     * Regularization.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
     */
    boolean hasRegularization();
    /**
     * <pre>
     * Regularization.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
     */
    tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getRegularization();
    /**
     * <pre>
     * Regularization.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
     */
    tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder getRegularizationOrBuilder();

    /**
     * <pre>
     * Constraints.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
     */
    boolean hasConstraints();
    /**
     * <pre>
     * Constraints.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
     */
    tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getConstraints();
    /**
     * <pre>
     * Constraints.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
     */
    tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder getConstraintsOrBuilder();

    /**
     * <pre>
     * Pruning. POST_PRUNE is the default pruning mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
     */
    int getPruningModeValue();
    /**
     * <pre>
     * Pruning. POST_PRUNE is the default pruning mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode getPruningMode();

    /**
     * <pre>
     * Growing Mode. LAYER_BY_LAYER is the default growing mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
     */
    int getGrowingModeValue();
    /**
     * <pre>
     * Growing Mode. LAYER_BY_LAYER is the default growing mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode getGrowingMode();

    /**
     * <pre>
     * Learning rate. By default we use fixed learning rate of 0.1.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
     */
    boolean hasLearningRateTuner();
    /**
     * <pre>
     * Learning rate. By default we use fixed learning rate of 0.1.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateConfig getLearningRateTuner();
    /**
     * <pre>
     * Learning rate. By default we use fixed learning rate of 0.1.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder getLearningRateTunerOrBuilder();

    /**
     * <pre>
     * Multi-class strategy. By default we use TREE_PER_CLASS for binary
     * classification and linear regression. For other cases, we use
     * DIAGONAL_HESSIAN as the default.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
     */
    int getMultiClassStrategyValue();
    /**
     * <pre>
     * Multi-class strategy. By default we use TREE_PER_CLASS for binary
     * classification and linear regression. For other cases, we use
     * DIAGONAL_HESSIAN as the default.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
     */
    tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy getMultiClassStrategy();

    /**
     * <pre>
     * If you want to average the ensembles (for regularization), provide the
     * config below.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
     */
    boolean hasAveragingConfig();
    /**
     * <pre>
     * If you want to average the ensembles (for regularization), provide the
     * config below.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
     */
    tensorflow.boosted_trees.learner.Learner.AveragingConfig getAveragingConfig();
    /**
     * <pre>
     * If you want to average the ensembles (for regularization), provide the
     * config below.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
     */
    tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder getAveragingConfigOrBuilder();

    public tensorflow.boosted_trees.learner.Learner.LearnerConfig.FeatureFractionCase getFeatureFractionCase();
  }
  /**
   * Protobuf type {@code tensorflow.boosted_trees.learner.LearnerConfig}
   */
  public  static final class LearnerConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.learner.LearnerConfig)
      LearnerConfigOrBuilder {
    // Use LearnerConfig.newBuilder() to construct.
    private LearnerConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private LearnerConfig() {
      numClasses_ = 0;
      pruningMode_ = 0;
      growingMode_ = 0;
      multiClassStrategy_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private LearnerConfig(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 8: {

              numClasses_ = input.readUInt32();
              break;
            }
            case 21: {
              featureFractionCase_ = 2;
              featureFraction_ = input.readFloat();
              break;
            }
            case 29: {
              featureFractionCase_ = 3;
              featureFraction_ = input.readFloat();
              break;
            }
            case 34: {
              tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder subBuilder = null;
              if (regularization_ != null) {
                subBuilder = regularization_.toBuilder();
              }
              regularization_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(regularization_);
                regularization_ = subBuilder.buildPartial();
              }

              break;
            }
            case 42: {
              tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder subBuilder = null;
              if (constraints_ != null) {
                subBuilder = constraints_.toBuilder();
              }
              constraints_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(constraints_);
                constraints_ = subBuilder.buildPartial();
              }

              break;
            }
            case 50: {
              tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder subBuilder = null;
              if (learningRateTuner_ != null) {
                subBuilder = learningRateTuner_.toBuilder();
              }
              learningRateTuner_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.LearningRateConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(learningRateTuner_);
                learningRateTuner_ = subBuilder.buildPartial();
              }

              break;
            }
            case 64: {
              int rawValue = input.readEnum();

              pruningMode_ = rawValue;
              break;
            }
            case 72: {
              int rawValue = input.readEnum();

              growingMode_ = rawValue;
              break;
            }
            case 80: {
              int rawValue = input.readEnum();

              multiClassStrategy_ = rawValue;
              break;
            }
            case 90: {
              tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder subBuilder = null;
              if (averagingConfig_ != null) {
                subBuilder = averagingConfig_.toBuilder();
              }
              averagingConfig_ = input.readMessage(tensorflow.boosted_trees.learner.Learner.AveragingConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(averagingConfig_);
                averagingConfig_ = subBuilder.buildPartial();
              }

              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              tensorflow.boosted_trees.learner.Learner.LearnerConfig.class, tensorflow.boosted_trees.learner.Learner.LearnerConfig.Builder.class);
    }

    /**
     * Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.PruningMode}
     */
    public enum PruningMode
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>PRUNING_MODE_UNSPECIFIED = 0;</code>
       */
      PRUNING_MODE_UNSPECIFIED(0),
      /**
       * <code>PRE_PRUNE = 1;</code>
       */
      PRE_PRUNE(1),
      /**
       * <code>POST_PRUNE = 2;</code>
       */
      POST_PRUNE(2),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>PRUNING_MODE_UNSPECIFIED = 0;</code>
       */
      public static final int PRUNING_MODE_UNSPECIFIED_VALUE = 0;
      /**
       * <code>PRE_PRUNE = 1;</code>
       */
      public static final int PRE_PRUNE_VALUE = 1;
      /**
       * <code>POST_PRUNE = 2;</code>
       */
      public static final int POST_PRUNE_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 PruningMode valueOf(int value) {
        return forNumber(value);
      }

      public static PruningMode forNumber(int value) {
        switch (value) {
          case 0: return PRUNING_MODE_UNSPECIFIED;
          case 1: return PRE_PRUNE;
          case 2: return POST_PRUNE;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<PruningMode>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          PruningMode> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<PruningMode>() {
              public PruningMode findValueByNumber(int number) {
                return PruningMode.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 tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(0);
      }

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

      public static PruningMode 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 PruningMode(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.PruningMode)
    }

    /**
     * Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode}
     */
    public enum GrowingMode
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>GROWING_MODE_UNSPECIFIED = 0;</code>
       */
      GROWING_MODE_UNSPECIFIED(0),
      /**
       * <code>WHOLE_TREE = 1;</code>
       */
      WHOLE_TREE(1),
      /**
       * <code>LAYER_BY_LAYER = 2;</code>
       */
      LAYER_BY_LAYER(2),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>GROWING_MODE_UNSPECIFIED = 0;</code>
       */
      public static final int GROWING_MODE_UNSPECIFIED_VALUE = 0;
      /**
       * <code>WHOLE_TREE = 1;</code>
       */
      public static final int WHOLE_TREE_VALUE = 1;
      /**
       * <code>LAYER_BY_LAYER = 2;</code>
       */
      public static final int LAYER_BY_LAYER_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 GrowingMode valueOf(int value) {
        return forNumber(value);
      }

      public static GrowingMode forNumber(int value) {
        switch (value) {
          case 0: return GROWING_MODE_UNSPECIFIED;
          case 1: return WHOLE_TREE;
          case 2: return LAYER_BY_LAYER;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<GrowingMode>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          GrowingMode> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<GrowingMode>() {
              public GrowingMode findValueByNumber(int number) {
                return GrowingMode.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 tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(1);
      }

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

      public static GrowingMode 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 GrowingMode(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode)
    }

    /**
     * Protobuf enum {@code tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy}
     */
    public enum MultiClassStrategy
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>MULTI_CLASS_STRATEGY_UNSPECIFIED = 0;</code>
       */
      MULTI_CLASS_STRATEGY_UNSPECIFIED(0),
      /**
       * <code>TREE_PER_CLASS = 1;</code>
       */
      TREE_PER_CLASS(1),
      /**
       * <code>FULL_HESSIAN = 2;</code>
       */
      FULL_HESSIAN(2),
      /**
       * <code>DIAGONAL_HESSIAN = 3;</code>
       */
      DIAGONAL_HESSIAN(3),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>MULTI_CLASS_STRATEGY_UNSPECIFIED = 0;</code>
       */
      public static final int MULTI_CLASS_STRATEGY_UNSPECIFIED_VALUE = 0;
      /**
       * <code>TREE_PER_CLASS = 1;</code>
       */
      public static final int TREE_PER_CLASS_VALUE = 1;
      /**
       * <code>FULL_HESSIAN = 2;</code>
       */
      public static final int FULL_HESSIAN_VALUE = 2;
      /**
       * <code>DIAGONAL_HESSIAN = 3;</code>
       */
      public static final int DIAGONAL_HESSIAN_VALUE = 3;


      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 MultiClassStrategy valueOf(int value) {
        return forNumber(value);
      }

      public static MultiClassStrategy forNumber(int value) {
        switch (value) {
          case 0: return MULTI_CLASS_STRATEGY_UNSPECIFIED;
          case 1: return TREE_PER_CLASS;
          case 2: return FULL_HESSIAN;
          case 3: return DIAGONAL_HESSIAN;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<MultiClassStrategy>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          MultiClassStrategy> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<MultiClassStrategy>() {
              public MultiClassStrategy findValueByNumber(int number) {
                return MultiClassStrategy.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 tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDescriptor().getEnumTypes().get(2);
      }

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

      public static MultiClassStrategy 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 MultiClassStrategy(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy)
    }

    private int featureFractionCase_ = 0;
    private java.lang.Object featureFraction_;
    public enum FeatureFractionCase
        implements com.google.protobuf.Internal.EnumLite {
      FEATURE_FRACTION_PER_TREE(2),
      FEATURE_FRACTION_PER_LEVEL(3),
      FEATUREFRACTION_NOT_SET(0);
      private final int value;
      private FeatureFractionCase(int value) {
        this.value = value;
      }
      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static FeatureFractionCase valueOf(int value) {
        return forNumber(value);
      }

      public static FeatureFractionCase forNumber(int value) {
        switch (value) {
          case 2: return FEATURE_FRACTION_PER_TREE;
          case 3: return FEATURE_FRACTION_PER_LEVEL;
          case 0: return FEATUREFRACTION_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public FeatureFractionCase
    getFeatureFractionCase() {
      return FeatureFractionCase.forNumber(
          featureFractionCase_);
    }

    public static final int NUM_CLASSES_FIELD_NUMBER = 1;
    private int numClasses_;
    /**
     * <pre>
     * Number of classes.
     * </pre>
     *
     * <code>uint32 num_classes = 1;</code>
     */
    public int getNumClasses() {
      return numClasses_;
    }

    public static final int FEATURE_FRACTION_PER_TREE_FIELD_NUMBER = 2;
    /**
     * <code>float feature_fraction_per_tree = 2;</code>
     */
    public float getFeatureFractionPerTree() {
      if (featureFractionCase_ == 2) {
        return (java.lang.Float) featureFraction_;
      }
      return 0F;
    }

    public static final int FEATURE_FRACTION_PER_LEVEL_FIELD_NUMBER = 3;
    /**
     * <code>float feature_fraction_per_level = 3;</code>
     */
    public float getFeatureFractionPerLevel() {
      if (featureFractionCase_ == 3) {
        return (java.lang.Float) featureFraction_;
      }
      return 0F;
    }

    public static final int REGULARIZATION_FIELD_NUMBER = 4;
    private tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig regularization_;
    /**
     * <pre>
     * Regularization.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
     */
    public boolean hasRegularization() {
      return regularization_ != null;
    }
    /**
     * <pre>
     * Regularization.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getRegularization() {
      return regularization_ == null ? tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance() : regularization_;
    }
    /**
     * <pre>
     * Regularization.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder getRegularizationOrBuilder() {
      return getRegularization();
    }

    public static final int CONSTRAINTS_FIELD_NUMBER = 5;
    private tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig constraints_;
    /**
     * <pre>
     * Constraints.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
     */
    public boolean hasConstraints() {
      return constraints_ != null;
    }
    /**
     * <pre>
     * Constraints.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getConstraints() {
      return constraints_ == null ? tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance() : constraints_;
    }
    /**
     * <pre>
     * Constraints.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder getConstraintsOrBuilder() {
      return getConstraints();
    }

    public static final int PRUNING_MODE_FIELD_NUMBER = 8;
    private int pruningMode_;
    /**
     * <pre>
     * Pruning. POST_PRUNE is the default pruning mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
     */
    public int getPruningModeValue() {
      return pruningMode_;
    }
    /**
     * <pre>
     * Pruning. POST_PRUNE is the default pruning mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode getPruningMode() {
      tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.valueOf(pruningMode_);
      return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.UNRECOGNIZED : result;
    }

    public static final int GROWING_MODE_FIELD_NUMBER = 9;
    private int growingMode_;
    /**
     * <pre>
     * Growing Mode. LAYER_BY_LAYER is the default growing mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
     */
    public int getGrowingModeValue() {
      return growingMode_;
    }
    /**
     * <pre>
     * Growing Mode. LAYER_BY_LAYER is the default growing mode.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode getGrowingMode() {
      tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.valueOf(growingMode_);
      return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.UNRECOGNIZED : result;
    }

    public static final int LEARNING_RATE_TUNER_FIELD_NUMBER = 6;
    private tensorflow.boosted_trees.learner.Learner.LearningRateConfig learningRateTuner_;
    /**
     * <pre>
     * Learning rate. By default we use fixed learning rate of 0.1.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
     */
    public boolean hasLearningRateTuner() {
      return learningRateTuner_ != null;
    }
    /**
     * <pre>
     * Learning rate. By default we use fixed learning rate of 0.1.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getLearningRateTuner() {
      return learningRateTuner_ == null ? tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance() : learningRateTuner_;
    }
    /**
     * <pre>
     * Learning rate. By default we use fixed learning rate of 0.1.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder getLearningRateTunerOrBuilder() {
      return getLearningRateTuner();
    }

    public static final int MULTI_CLASS_STRATEGY_FIELD_NUMBER = 10;
    private int multiClassStrategy_;
    /**
     * <pre>
     * Multi-class strategy. By default we use TREE_PER_CLASS for binary
     * classification and linear regression. For other cases, we use
     * DIAGONAL_HESSIAN as the default.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
     */
    public int getMultiClassStrategyValue() {
      return multiClassStrategy_;
    }
    /**
     * <pre>
     * Multi-class strategy. By default we use TREE_PER_CLASS for binary
     * classification and linear regression. For other cases, we use
     * DIAGONAL_HESSIAN as the default.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy getMultiClassStrategy() {
      tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.valueOf(multiClassStrategy_);
      return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.UNRECOGNIZED : result;
    }

    public static final int AVERAGING_CONFIG_FIELD_NUMBER = 11;
    private tensorflow.boosted_trees.learner.Learner.AveragingConfig averagingConfig_;
    /**
     * <pre>
     * If you want to average the ensembles (for regularization), provide the
     * config below.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
     */
    public boolean hasAveragingConfig() {
      return averagingConfig_ != null;
    }
    /**
     * <pre>
     * If you want to average the ensembles (for regularization), provide the
     * config below.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.AveragingConfig getAveragingConfig() {
      return averagingConfig_ == null ? tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance() : averagingConfig_;
    }
    /**
     * <pre>
     * If you want to average the ensembles (for regularization), provide the
     * config below.
     * </pre>
     *
     * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
     */
    public tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder getAveragingConfigOrBuilder() {
      return getAveragingConfig();
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (numClasses_ != 0) {
        output.writeUInt32(1, numClasses_);
      }
      if (featureFractionCase_ == 2) {
        output.writeFloat(
            2, (float)((java.lang.Float) featureFraction_));
      }
      if (featureFractionCase_ == 3) {
        output.writeFloat(
            3, (float)((java.lang.Float) featureFraction_));
      }
      if (regularization_ != null) {
        output.writeMessage(4, getRegularization());
      }
      if (constraints_ != null) {
        output.writeMessage(5, getConstraints());
      }
      if (learningRateTuner_ != null) {
        output.writeMessage(6, getLearningRateTuner());
      }
      if (pruningMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.PRUNING_MODE_UNSPECIFIED.getNumber()) {
        output.writeEnum(8, pruningMode_);
      }
      if (growingMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.GROWING_MODE_UNSPECIFIED.getNumber()) {
        output.writeEnum(9, growingMode_);
      }
      if (multiClassStrategy_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.MULTI_CLASS_STRATEGY_UNSPECIFIED.getNumber()) {
        output.writeEnum(10, multiClassStrategy_);
      }
      if (averagingConfig_ != null) {
        output.writeMessage(11, getAveragingConfig());
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (numClasses_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, numClasses_);
      }
      if (featureFractionCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(
              2, (float)((java.lang.Float) featureFraction_));
      }
      if (featureFractionCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(
              3, (float)((java.lang.Float) featureFraction_));
      }
      if (regularization_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getRegularization());
      }
      if (constraints_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, getConstraints());
      }
      if (learningRateTuner_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, getLearningRateTuner());
      }
      if (pruningMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.PRUNING_MODE_UNSPECIFIED.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(8, pruningMode_);
      }
      if (growingMode_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.GROWING_MODE_UNSPECIFIED.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(9, growingMode_);
      }
      if (multiClassStrategy_ != tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.MULTI_CLASS_STRATEGY_UNSPECIFIED.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(10, multiClassStrategy_);
      }
      if (averagingConfig_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(11, getAveragingConfig());
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof tensorflow.boosted_trees.learner.Learner.LearnerConfig)) {
        return super.equals(obj);
      }
      tensorflow.boosted_trees.learner.Learner.LearnerConfig other = (tensorflow.boosted_trees.learner.Learner.LearnerConfig) obj;

      boolean result = true;
      result = result && (getNumClasses()
          == other.getNumClasses());
      result = result && (hasRegularization() == other.hasRegularization());
      if (hasRegularization()) {
        result = result && getRegularization()
            .equals(other.getRegularization());
      }
      result = result && (hasConstraints() == other.hasConstraints());
      if (hasConstraints()) {
        result = result && getConstraints()
            .equals(other.getConstraints());
      }
      result = result && pruningMode_ == other.pruningMode_;
      result = result && growingMode_ == other.growingMode_;
      result = result && (hasLearningRateTuner() == other.hasLearningRateTuner());
      if (hasLearningRateTuner()) {
        result = result && getLearningRateTuner()
            .equals(other.getLearningRateTuner());
      }
      result = result && multiClassStrategy_ == other.multiClassStrategy_;
      result = result && (hasAveragingConfig() == other.hasAveragingConfig());
      if (hasAveragingConfig()) {
        result = result && getAveragingConfig()
            .equals(other.getAveragingConfig());
      }
      result = result && getFeatureFractionCase().equals(
          other.getFeatureFractionCase());
      if (!result) return false;
      switch (featureFractionCase_) {
        case 2:
          result = result && (
              java.lang.Float.floatToIntBits(getFeatureFractionPerTree())
              == java.lang.Float.floatToIntBits(
                  other.getFeatureFractionPerTree()));
          break;
        case 3:
          result = result && (
              java.lang.Float.floatToIntBits(getFeatureFractionPerLevel())
              == java.lang.Float.floatToIntBits(
                  other.getFeatureFractionPerLevel()));
          break;
        case 0:
        default:
      }
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NUM_CLASSES_FIELD_NUMBER;
      hash = (53 * hash) + getNumClasses();
      if (hasRegularization()) {
        hash = (37 * hash) + REGULARIZATION_FIELD_NUMBER;
        hash = (53 * hash) + getRegularization().hashCode();
      }
      if (hasConstraints()) {
        hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
        hash = (53 * hash) + getConstraints().hashCode();
      }
      hash = (37 * hash) + PRUNING_MODE_FIELD_NUMBER;
      hash = (53 * hash) + pruningMode_;
      hash = (37 * hash) + GROWING_MODE_FIELD_NUMBER;
      hash = (53 * hash) + growingMode_;
      if (hasLearningRateTuner()) {
        hash = (37 * hash) + LEARNING_RATE_TUNER_FIELD_NUMBER;
        hash = (53 * hash) + getLearningRateTuner().hashCode();
      }
      hash = (37 * hash) + MULTI_CLASS_STRATEGY_FIELD_NUMBER;
      hash = (53 * hash) + multiClassStrategy_;
      if (hasAveragingConfig()) {
        hash = (37 * hash) + AVERAGING_CONFIG_FIELD_NUMBER;
        hash = (53 * hash) + getAveragingConfig().hashCode();
      }
      switch (featureFractionCase_) {
        case 2:
          hash = (37 * hash) + FEATURE_FRACTION_PER_TREE_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(
              getFeatureFractionPerTree());
          break;
        case 3:
          hash = (37 * hash) + FEATURE_FRACTION_PER_LEVEL_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(
              getFeatureFractionPerLevel());
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig 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 tensorflow.boosted_trees.learner.Learner.LearnerConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig 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 tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(tensorflow.boosted_trees.learner.Learner.LearnerConfig prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * Protobuf type {@code tensorflow.boosted_trees.learner.LearnerConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.learner.LearnerConfig)
        tensorflow.boosted_trees.learner.Learner.LearnerConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                tensorflow.boosted_trees.learner.Learner.LearnerConfig.class, tensorflow.boosted_trees.learner.Learner.LearnerConfig.Builder.class);
      }

      // Construct using tensorflow.boosted_trees.learner.Learner.LearnerConfig.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        numClasses_ = 0;

        if (regularizationBuilder_ == null) {
          regularization_ = null;
        } else {
          regularization_ = null;
          regularizationBuilder_ = null;
        }
        if (constraintsBuilder_ == null) {
          constraints_ = null;
        } else {
          constraints_ = null;
          constraintsBuilder_ = null;
        }
        pruningMode_ = 0;

        growingMode_ = 0;

        if (learningRateTunerBuilder_ == null) {
          learningRateTuner_ = null;
        } else {
          learningRateTuner_ = null;
          learningRateTunerBuilder_ = null;
        }
        multiClassStrategy_ = 0;

        if (averagingConfigBuilder_ == null) {
          averagingConfig_ = null;
        } else {
          averagingConfig_ = null;
          averagingConfigBuilder_ = null;
        }
        featureFractionCase_ = 0;
        featureFraction_ = null;
        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return tensorflow.boosted_trees.learner.Learner.internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
      }

      public tensorflow.boosted_trees.learner.Learner.LearnerConfig getDefaultInstanceForType() {
        return tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDefaultInstance();
      }

      public tensorflow.boosted_trees.learner.Learner.LearnerConfig build() {
        tensorflow.boosted_trees.learner.Learner.LearnerConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public tensorflow.boosted_trees.learner.Learner.LearnerConfig buildPartial() {
        tensorflow.boosted_trees.learner.Learner.LearnerConfig result = new tensorflow.boosted_trees.learner.Learner.LearnerConfig(this);
        result.numClasses_ = numClasses_;
        if (featureFractionCase_ == 2) {
          result.featureFraction_ = featureFraction_;
        }
        if (featureFractionCase_ == 3) {
          result.featureFraction_ = featureFraction_;
        }
        if (regularizationBuilder_ == null) {
          result.regularization_ = regularization_;
        } else {
          result.regularization_ = regularizationBuilder_.build();
        }
        if (constraintsBuilder_ == null) {
          result.constraints_ = constraints_;
        } else {
          result.constraints_ = constraintsBuilder_.build();
        }
        result.pruningMode_ = pruningMode_;
        result.growingMode_ = growingMode_;
        if (learningRateTunerBuilder_ == null) {
          result.learningRateTuner_ = learningRateTuner_;
        } else {
          result.learningRateTuner_ = learningRateTunerBuilder_.build();
        }
        result.multiClassStrategy_ = multiClassStrategy_;
        if (averagingConfigBuilder_ == null) {
          result.averagingConfig_ = averagingConfig_;
        } else {
          result.averagingConfig_ = averagingConfigBuilder_.build();
        }
        result.featureFractionCase_ = featureFractionCase_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof tensorflow.boosted_trees.learner.Learner.LearnerConfig) {
          return mergeFrom((tensorflow.boosted_trees.learner.Learner.LearnerConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(tensorflow.boosted_trees.learner.Learner.LearnerConfig other) {
        if (other == tensorflow.boosted_trees.learner.Learner.LearnerConfig.getDefaultInstance()) return this;
        if (other.getNumClasses() != 0) {
          setNumClasses(other.getNumClasses());
        }
        if (other.hasRegularization()) {
          mergeRegularization(other.getRegularization());
        }
        if (other.hasConstraints()) {
          mergeConstraints(other.getConstraints());
        }
        if (other.pruningMode_ != 0) {
          setPruningModeValue(other.getPruningModeValue());
        }
        if (other.growingMode_ != 0) {
          setGrowingModeValue(other.getGrowingModeValue());
        }
        if (other.hasLearningRateTuner()) {
          mergeLearningRateTuner(other.getLearningRateTuner());
        }
        if (other.multiClassStrategy_ != 0) {
          setMultiClassStrategyValue(other.getMultiClassStrategyValue());
        }
        if (other.hasAveragingConfig()) {
          mergeAveragingConfig(other.getAveragingConfig());
        }
        switch (other.getFeatureFractionCase()) {
          case FEATURE_FRACTION_PER_TREE: {
            setFeatureFractionPerTree(other.getFeatureFractionPerTree());
            break;
          }
          case FEATURE_FRACTION_PER_LEVEL: {
            setFeatureFractionPerLevel(other.getFeatureFractionPerLevel());
            break;
          }
          case FEATUREFRACTION_NOT_SET: {
            break;
          }
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        tensorflow.boosted_trees.learner.Learner.LearnerConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (tensorflow.boosted_trees.learner.Learner.LearnerConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int featureFractionCase_ = 0;
      private java.lang.Object featureFraction_;
      public FeatureFractionCase
          getFeatureFractionCase() {
        return FeatureFractionCase.forNumber(
            featureFractionCase_);
      }

      public Builder clearFeatureFraction() {
        featureFractionCase_ = 0;
        featureFraction_ = null;
        onChanged();
        return this;
      }


      private int numClasses_ ;
      /**
       * <pre>
       * Number of classes.
       * </pre>
       *
       * <code>uint32 num_classes = 1;</code>
       */
      public int getNumClasses() {
        return numClasses_;
      }
      /**
       * <pre>
       * Number of classes.
       * </pre>
       *
       * <code>uint32 num_classes = 1;</code>
       */
      public Builder setNumClasses(int value) {
        
        numClasses_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Number of classes.
       * </pre>
       *
       * <code>uint32 num_classes = 1;</code>
       */
      public Builder clearNumClasses() {
        
        numClasses_ = 0;
        onChanged();
        return this;
      }

      /**
       * <code>float feature_fraction_per_tree = 2;</code>
       */
      public float getFeatureFractionPerTree() {
        if (featureFractionCase_ == 2) {
          return (java.lang.Float) featureFraction_;
        }
        return 0F;
      }
      /**
       * <code>float feature_fraction_per_tree = 2;</code>
       */
      public Builder setFeatureFractionPerTree(float value) {
        featureFractionCase_ = 2;
        featureFraction_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>float feature_fraction_per_tree = 2;</code>
       */
      public Builder clearFeatureFractionPerTree() {
        if (featureFractionCase_ == 2) {
          featureFractionCase_ = 0;
          featureFraction_ = null;
          onChanged();
        }
        return this;
      }

      /**
       * <code>float feature_fraction_per_level = 3;</code>
       */
      public float getFeatureFractionPerLevel() {
        if (featureFractionCase_ == 3) {
          return (java.lang.Float) featureFraction_;
        }
        return 0F;
      }
      /**
       * <code>float feature_fraction_per_level = 3;</code>
       */
      public Builder setFeatureFractionPerLevel(float value) {
        featureFractionCase_ = 3;
        featureFraction_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>float feature_fraction_per_level = 3;</code>
       */
      public Builder clearFeatureFractionPerLevel() {
        if (featureFractionCase_ == 3) {
          featureFractionCase_ = 0;
          featureFraction_ = null;
          onChanged();
        }
        return this;
      }

      private tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig regularization_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder> regularizationBuilder_;
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public boolean hasRegularization() {
        return regularizationBuilder_ != null || regularization_ != null;
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig getRegularization() {
        if (regularizationBuilder_ == null) {
          return regularization_ == null ? tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance() : regularization_;
        } else {
          return regularizationBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public Builder setRegularization(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig value) {
        if (regularizationBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          regularization_ = value;
          onChanged();
        } else {
          regularizationBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public Builder setRegularization(
          tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder builderForValue) {
        if (regularizationBuilder_ == null) {
          regularization_ = builderForValue.build();
          onChanged();
        } else {
          regularizationBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public Builder mergeRegularization(tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig value) {
        if (regularizationBuilder_ == null) {
          if (regularization_ != null) {
            regularization_ =
              tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.newBuilder(regularization_).mergeFrom(value).buildPartial();
          } else {
            regularization_ = value;
          }
          onChanged();
        } else {
          regularizationBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public Builder clearRegularization() {
        if (regularizationBuilder_ == null) {
          regularization_ = null;
          onChanged();
        } else {
          regularization_ = null;
          regularizationBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder getRegularizationBuilder() {
        
        onChanged();
        return getRegularizationFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder getRegularizationOrBuilder() {
        if (regularizationBuilder_ != null) {
          return regularizationBuilder_.getMessageOrBuilder();
        } else {
          return regularization_ == null ?
              tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.getDefaultInstance() : regularization_;
        }
      }
      /**
       * <pre>
       * Regularization.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeRegularizationConfig regularization = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder> 
          getRegularizationFieldBuilder() {
        if (regularizationBuilder_ == null) {
          regularizationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeRegularizationConfigOrBuilder>(
                  getRegularization(),
                  getParentForChildren(),
                  isClean());
          regularization_ = null;
        }
        return regularizationBuilder_;
      }

      private tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig constraints_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder> constraintsBuilder_;
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public boolean hasConstraints() {
        return constraintsBuilder_ != null || constraints_ != null;
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig getConstraints() {
        if (constraintsBuilder_ == null) {
          return constraints_ == null ? tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance() : constraints_;
        } else {
          return constraintsBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public Builder setConstraints(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig value) {
        if (constraintsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          constraints_ = value;
          onChanged();
        } else {
          constraintsBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public Builder setConstraints(
          tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder builderForValue) {
        if (constraintsBuilder_ == null) {
          constraints_ = builderForValue.build();
          onChanged();
        } else {
          constraintsBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public Builder mergeConstraints(tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig value) {
        if (constraintsBuilder_ == null) {
          if (constraints_ != null) {
            constraints_ =
              tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.newBuilder(constraints_).mergeFrom(value).buildPartial();
          } else {
            constraints_ = value;
          }
          onChanged();
        } else {
          constraintsBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public Builder clearConstraints() {
        if (constraintsBuilder_ == null) {
          constraints_ = null;
          onChanged();
        } else {
          constraints_ = null;
          constraintsBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder getConstraintsBuilder() {
        
        onChanged();
        return getConstraintsFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder getConstraintsOrBuilder() {
        if (constraintsBuilder_ != null) {
          return constraintsBuilder_.getMessageOrBuilder();
        } else {
          return constraints_ == null ?
              tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.getDefaultInstance() : constraints_;
        }
      }
      /**
       * <pre>
       * Constraints.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.TreeConstraintsConfig constraints = 5;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder> 
          getConstraintsFieldBuilder() {
        if (constraintsBuilder_ == null) {
          constraintsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfig.Builder, tensorflow.boosted_trees.learner.Learner.TreeConstraintsConfigOrBuilder>(
                  getConstraints(),
                  getParentForChildren(),
                  isClean());
          constraints_ = null;
        }
        return constraintsBuilder_;
      }

      private int pruningMode_ = 0;
      /**
       * <pre>
       * Pruning. POST_PRUNE is the default pruning mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
       */
      public int getPruningModeValue() {
        return pruningMode_;
      }
      /**
       * <pre>
       * Pruning. POST_PRUNE is the default pruning mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
       */
      public Builder setPruningModeValue(int value) {
        pruningMode_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Pruning. POST_PRUNE is the default pruning mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode getPruningMode() {
        tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.valueOf(pruningMode_);
        return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * Pruning. POST_PRUNE is the default pruning mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
       */
      public Builder setPruningMode(tensorflow.boosted_trees.learner.Learner.LearnerConfig.PruningMode value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        pruningMode_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Pruning. POST_PRUNE is the default pruning mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.PruningMode pruning_mode = 8;</code>
       */
      public Builder clearPruningMode() {
        
        pruningMode_ = 0;
        onChanged();
        return this;
      }

      private int growingMode_ = 0;
      /**
       * <pre>
       * Growing Mode. LAYER_BY_LAYER is the default growing mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
       */
      public int getGrowingModeValue() {
        return growingMode_;
      }
      /**
       * <pre>
       * Growing Mode. LAYER_BY_LAYER is the default growing mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
       */
      public Builder setGrowingModeValue(int value) {
        growingMode_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Growing Mode. LAYER_BY_LAYER is the default growing mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode getGrowingMode() {
        tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.valueOf(growingMode_);
        return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * Growing Mode. LAYER_BY_LAYER is the default growing mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
       */
      public Builder setGrowingMode(tensorflow.boosted_trees.learner.Learner.LearnerConfig.GrowingMode value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        growingMode_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Growing Mode. LAYER_BY_LAYER is the default growing mode.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.GrowingMode growing_mode = 9;</code>
       */
      public Builder clearGrowingMode() {
        
        growingMode_ = 0;
        onChanged();
        return this;
      }

      private tensorflow.boosted_trees.learner.Learner.LearningRateConfig learningRateTuner_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateConfig, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder> learningRateTunerBuilder_;
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public boolean hasLearningRateTuner() {
        return learningRateTunerBuilder_ != null || learningRateTuner_ != null;
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateConfig getLearningRateTuner() {
        if (learningRateTunerBuilder_ == null) {
          return learningRateTuner_ == null ? tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance() : learningRateTuner_;
        } else {
          return learningRateTunerBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public Builder setLearningRateTuner(tensorflow.boosted_trees.learner.Learner.LearningRateConfig value) {
        if (learningRateTunerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          learningRateTuner_ = value;
          onChanged();
        } else {
          learningRateTunerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public Builder setLearningRateTuner(
          tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder builderForValue) {
        if (learningRateTunerBuilder_ == null) {
          learningRateTuner_ = builderForValue.build();
          onChanged();
        } else {
          learningRateTunerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public Builder mergeLearningRateTuner(tensorflow.boosted_trees.learner.Learner.LearningRateConfig value) {
        if (learningRateTunerBuilder_ == null) {
          if (learningRateTuner_ != null) {
            learningRateTuner_ =
              tensorflow.boosted_trees.learner.Learner.LearningRateConfig.newBuilder(learningRateTuner_).mergeFrom(value).buildPartial();
          } else {
            learningRateTuner_ = value;
          }
          onChanged();
        } else {
          learningRateTunerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public Builder clearLearningRateTuner() {
        if (learningRateTunerBuilder_ == null) {
          learningRateTuner_ = null;
          onChanged();
        } else {
          learningRateTuner_ = null;
          learningRateTunerBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder getLearningRateTunerBuilder() {
        
        onChanged();
        return getLearningRateTunerFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder getLearningRateTunerOrBuilder() {
        if (learningRateTunerBuilder_ != null) {
          return learningRateTunerBuilder_.getMessageOrBuilder();
        } else {
          return learningRateTuner_ == null ?
              tensorflow.boosted_trees.learner.Learner.LearningRateConfig.getDefaultInstance() : learningRateTuner_;
        }
      }
      /**
       * <pre>
       * Learning rate. By default we use fixed learning rate of 0.1.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearningRateConfig learning_rate_tuner = 6;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.LearningRateConfig, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder> 
          getLearningRateTunerFieldBuilder() {
        if (learningRateTunerBuilder_ == null) {
          learningRateTunerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.LearningRateConfig, tensorflow.boosted_trees.learner.Learner.LearningRateConfig.Builder, tensorflow.boosted_trees.learner.Learner.LearningRateConfigOrBuilder>(
                  getLearningRateTuner(),
                  getParentForChildren(),
                  isClean());
          learningRateTuner_ = null;
        }
        return learningRateTunerBuilder_;
      }

      private int multiClassStrategy_ = 0;
      /**
       * <pre>
       * Multi-class strategy. By default we use TREE_PER_CLASS for binary
       * classification and linear regression. For other cases, we use
       * DIAGONAL_HESSIAN as the default.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
       */
      public int getMultiClassStrategyValue() {
        return multiClassStrategy_;
      }
      /**
       * <pre>
       * Multi-class strategy. By default we use TREE_PER_CLASS for binary
       * classification and linear regression. For other cases, we use
       * DIAGONAL_HESSIAN as the default.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
       */
      public Builder setMultiClassStrategyValue(int value) {
        multiClassStrategy_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Multi-class strategy. By default we use TREE_PER_CLASS for binary
       * classification and linear regression. For other cases, we use
       * DIAGONAL_HESSIAN as the default.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy getMultiClassStrategy() {
        tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy result = tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.valueOf(multiClassStrategy_);
        return result == null ? tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * Multi-class strategy. By default we use TREE_PER_CLASS for binary
       * classification and linear regression. For other cases, we use
       * DIAGONAL_HESSIAN as the default.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
       */
      public Builder setMultiClassStrategy(tensorflow.boosted_trees.learner.Learner.LearnerConfig.MultiClassStrategy value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        multiClassStrategy_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Multi-class strategy. By default we use TREE_PER_CLASS for binary
       * classification and linear regression. For other cases, we use
       * DIAGONAL_HESSIAN as the default.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.LearnerConfig.MultiClassStrategy multi_class_strategy = 10;</code>
       */
      public Builder clearMultiClassStrategy() {
        
        multiClassStrategy_ = 0;
        onChanged();
        return this;
      }

      private tensorflow.boosted_trees.learner.Learner.AveragingConfig averagingConfig_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.AveragingConfig, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder, tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder> averagingConfigBuilder_;
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public boolean hasAveragingConfig() {
        return averagingConfigBuilder_ != null || averagingConfig_ != null;
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.AveragingConfig getAveragingConfig() {
        if (averagingConfigBuilder_ == null) {
          return averagingConfig_ == null ? tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance() : averagingConfig_;
        } else {
          return averagingConfigBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public Builder setAveragingConfig(tensorflow.boosted_trees.learner.Learner.AveragingConfig value) {
        if (averagingConfigBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          averagingConfig_ = value;
          onChanged();
        } else {
          averagingConfigBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public Builder setAveragingConfig(
          tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder builderForValue) {
        if (averagingConfigBuilder_ == null) {
          averagingConfig_ = builderForValue.build();
          onChanged();
        } else {
          averagingConfigBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public Builder mergeAveragingConfig(tensorflow.boosted_trees.learner.Learner.AveragingConfig value) {
        if (averagingConfigBuilder_ == null) {
          if (averagingConfig_ != null) {
            averagingConfig_ =
              tensorflow.boosted_trees.learner.Learner.AveragingConfig.newBuilder(averagingConfig_).mergeFrom(value).buildPartial();
          } else {
            averagingConfig_ = value;
          }
          onChanged();
        } else {
          averagingConfigBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public Builder clearAveragingConfig() {
        if (averagingConfigBuilder_ == null) {
          averagingConfig_ = null;
          onChanged();
        } else {
          averagingConfig_ = null;
          averagingConfigBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder getAveragingConfigBuilder() {
        
        onChanged();
        return getAveragingConfigFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      public tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder getAveragingConfigOrBuilder() {
        if (averagingConfigBuilder_ != null) {
          return averagingConfigBuilder_.getMessageOrBuilder();
        } else {
          return averagingConfig_ == null ?
              tensorflow.boosted_trees.learner.Learner.AveragingConfig.getDefaultInstance() : averagingConfig_;
        }
      }
      /**
       * <pre>
       * If you want to average the ensembles (for regularization), provide the
       * config below.
       * </pre>
       *
       * <code>.tensorflow.boosted_trees.learner.AveragingConfig averaging_config = 11;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          tensorflow.boosted_trees.learner.Learner.AveragingConfig, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder, tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder> 
          getAveragingConfigFieldBuilder() {
        if (averagingConfigBuilder_ == null) {
          averagingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              tensorflow.boosted_trees.learner.Learner.AveragingConfig, tensorflow.boosted_trees.learner.Learner.AveragingConfig.Builder, tensorflow.boosted_trees.learner.Learner.AveragingConfigOrBuilder>(
                  getAveragingConfig(),
                  getParentForChildren(),
                  isClean());
          averagingConfig_ = null;
        }
        return averagingConfigBuilder_;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.learner.LearnerConfig)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.learner.LearnerConfig)
    private static final tensorflow.boosted_trees.learner.Learner.LearnerConfig DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new tensorflow.boosted_trees.learner.Learner.LearnerConfig();
    }

    public static tensorflow.boosted_trees.learner.Learner.LearnerConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public tensorflow.boosted_trees.learner.Learner.LearnerConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n4tensorflow/contrib/boosted_trees/proto" +
      "/learner.proto\022 tensorflow.boosted_trees" +
      ".learner\"K\n\030TreeRegularizationConfig\022\n\n\002" +
      "l1\030\001 \001(\002\022\n\n\002l2\030\002 \001(\002\022\027\n\017tree_complexity\030" +
      "\003 \001(\002\"v\n\025TreeConstraintsConfig\022\026\n\016max_tr" +
      "ee_depth\030\001 \001(\r\022\027\n\017min_node_weight\030\002 \001(\002\022" +
      ",\n$max_number_of_unique_feature_columns\030" +
      "\003 \001(\003\"\226\002\n\022LearningRateConfig\022J\n\005fixed\030\001 " +
      "\001(\01329.tensorflow.boosted_trees.learner.L" +
      "earningRateFixedConfigH\000\022T\n\007dropout\030\002 \001(",
      "\0132A.tensorflow.boosted_trees.learner.Lea" +
      "rningRateDropoutDrivenConfigH\000\022U\n\013line_s" +
      "earch\030\003 \001(\0132>.tensorflow.boosted_trees.l" +
      "earner.LearningRateLineSearchConfigH\000B\007\n" +
      "\005tuner\"0\n\027LearningRateFixedConfig\022\025\n\rlea" +
      "rning_rate\030\001 \001(\002\"L\n\034LearningRateLineSear" +
      "chConfig\022\031\n\021max_learning_rate\030\001 \001(\002\022\021\n\tn" +
      "um_steps\030\002 \001(\005\"a\n\017AveragingConfig\022\036\n\024ave" +
      "rage_last_n_trees\030\001 \001(\002H\000\022$\n\032average_las" +
      "t_percent_trees\030\002 \001(\002H\000B\010\n\006config\"~\n\037Lea",
      "rningRateDropoutDrivenConfig\022\033\n\023dropout_" +
      "probability\030\001 \001(\002\022\'\n\037probability_of_skip" +
      "ping_dropout\030\002 \001(\002\022\025\n\rlearning_rate\030\003 \001(" +
      "\002\"\342\007\n\rLearnerConfig\022\023\n\013num_classes\030\001 \001(\r" +
      "\022#\n\031feature_fraction_per_tree\030\002 \001(\002H\000\022$\n" +
      "\032feature_fraction_per_level\030\003 \001(\002H\000\022R\n\016r" +
      "egularization\030\004 \001(\0132:.tensorflow.boosted" +
      "_trees.learner.TreeRegularizationConfig\022" +
      "L\n\013constraints\030\005 \001(\01327.tensorflow.booste" +
      "d_trees.learner.TreeConstraintsConfig\022Q\n",
      "\014pruning_mode\030\010 \001(\0162;.tensorflow.boosted" +
      "_trees.learner.LearnerConfig.PruningMode" +
      "\022Q\n\014growing_mode\030\t \001(\0162;.tensorflow.boos" +
      "ted_trees.learner.LearnerConfig.GrowingM" +
      "ode\022Q\n\023learning_rate_tuner\030\006 \001(\01324.tenso" +
      "rflow.boosted_trees.learner.LearningRate" +
      "Config\022`\n\024multi_class_strategy\030\n \001(\0162B.t" +
      "ensorflow.boosted_trees.learner.LearnerC" +
      "onfig.MultiClassStrategy\022K\n\020averaging_co" +
      "nfig\030\013 \001(\01321.tensorflow.boosted_trees.le",
      "arner.AveragingConfig\"J\n\013PruningMode\022\034\n\030" +
      "PRUNING_MODE_UNSPECIFIED\020\000\022\r\n\tPRE_PRUNE\020" +
      "\001\022\016\n\nPOST_PRUNE\020\002\"O\n\013GrowingMode\022\034\n\030GROW" +
      "ING_MODE_UNSPECIFIED\020\000\022\016\n\nWHOLE_TREE\020\001\022\022" +
      "\n\016LAYER_BY_LAYER\020\002\"v\n\022MultiClassStrategy" +
      "\022$\n MULTI_CLASS_STRATEGY_UNSPECIFIED\020\000\022\022" +
      "\n\016TREE_PER_CLASS\020\001\022\020\n\014FULL_HESSIAN\020\002\022\024\n\020" +
      "DIAGONAL_HESSIAN\020\003B\022\n\020feature_fractionB\003" +
      "\370\001\001b\006proto3"
    };
    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[] {
        }, assigner);
    internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_TreeRegularizationConfig_descriptor,
        new java.lang.String[] { "L1", "L2", "TreeComplexity", });
    internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_TreeConstraintsConfig_descriptor,
        new java.lang.String[] { "MaxTreeDepth", "MinNodeWeight", "MaxNumberOfUniqueFeatureColumns", });
    internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_LearningRateConfig_descriptor,
        new java.lang.String[] { "Fixed", "Dropout", "LineSearch", "Tuner", });
    internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_LearningRateFixedConfig_descriptor,
        new java.lang.String[] { "LearningRate", });
    internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_LearningRateLineSearchConfig_descriptor,
        new java.lang.String[] { "MaxLearningRate", "NumSteps", });
    internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor =
      getDescriptor().getMessageTypes().get(5);
    internal_static_tensorflow_boosted_trees_learner_AveragingConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_AveragingConfig_descriptor,
        new java.lang.String[] { "AverageLastNTrees", "AverageLastPercentTrees", "Config", });
    internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor =
      getDescriptor().getMessageTypes().get(6);
    internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_LearningRateDropoutDrivenConfig_descriptor,
        new java.lang.String[] { "DropoutProbability", "ProbabilityOfSkippingDropout", "LearningRate", });
    internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor =
      getDescriptor().getMessageTypes().get(7);
    internal_static_tensorflow_boosted_trees_learner_LearnerConfig_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tensorflow_boosted_trees_learner_LearnerConfig_descriptor,
        new java.lang.String[] { "NumClasses", "FeatureFractionPerTree", "FeatureFractionPerLevel", "Regularization", "Constraints", "PruningMode", "GrowingMode", "LearningRateTuner", "MultiClassStrategy", "AveragingConfig", "FeatureFraction", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
