content: /*
   * Tencent is pleased to support the open source community by making Angel available.
   *
   * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
   * compliance with the License. You may obtain a copy of the License at
   *
   * https://opensource.org/licenses/Apache-2.0
   *
   * Unless required by applicable law or agreed to in writing, software distributed under the License
   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
   * or implied. See the License for the specific language governing permissions and limitations under
   * the License.
   *
   */
  // Generated by the protocol buffer compiler.  DO NOT EDIT!
  // source: core/saver/saver.proto
  
  package com.tencent.angel.core.saver;
  
  public final class SaverProtos {
    private SaverProtos() {}
    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 SaverDefOrBuilder extends
        // @@protoc_insertion_point(interface_extends:angel.SaverDef)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <pre>
       * The name of the tensor in which to specify the filename when saving or
       * restoring a model checkpoint.
       * </pre>
       *
       * <code>string filename_tensor_name = 1;</code>
       */
      java.lang.String getFilenameTensorName();
      /**
       * <pre>
       * The name of the tensor in which to specify the filename when saving or
       * restoring a model checkpoint.
       * </pre>
       *
       * <code>string filename_tensor_name = 1;</code>
       */
      com.google.protobuf.ByteString
          getFilenameTensorNameBytes();
  
      /**
       * <pre>
       * The operation to run when saving a model checkpoint.
       * </pre>
       *
       * <code>string save_tensor_name = 2;</code>
       */
      java.lang.String getSaveTensorName();
      /**
       * <pre>
       * The operation to run when saving a model checkpoint.
       * </pre>
       *
       * <code>string save_tensor_name = 2;</code>
       */
      com.google.protobuf.ByteString
          getSaveTensorNameBytes();
  
      /**
       * <pre>
       * The operation to run when restoring a model checkpoint.
       * </pre>
       *
       * <code>string restore_op_name = 3;</code>
       */
      java.lang.String getRestoreOpName();
      /**
       * <pre>
       * The operation to run when restoring a model checkpoint.
       * </pre>
       *
       * <code>string restore_op_name = 3;</code>
       */
      com.google.protobuf.ByteString
          getRestoreOpNameBytes();
  
      /**
       * <pre>
       * Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
       * </pre>
       *
       * <code>int32 max_to_keep = 4;</code>
       */
      int getMaxToKeep();
  
      /**
       * <pre>
       * Shard the save files, one per device that has Variable nodes.
       * </pre>
       *
       * <code>bool sharded = 5;</code>
       */
      boolean getSharded();
  
      /**
       * <pre>
       * How often to keep an additional checkpoint. If not specified, only the last
       * "max_to_keep" checkpoints are kept; if specified, in addition to keeping
       * the last "max_to_keep" checkpoints, an additional checkpoint will be kept
       * for every n hours of training.
       * </pre>
       *
       * <code>float keep_checkpoint_every_n_hours = 6;</code>
       */
      float getKeepCheckpointEveryNHours();
  
      /**
       * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
       */
      int getVersionValue();
      /**
       * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
       */
      com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion getVersion();
    }
    /**
     * <pre>
     * Protocol buffer representing the configuration of a Saver.
     * </pre>
     *
     * Protobuf type {@code angel.SaverDef}
     */
    public  static final class SaverDef extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:angel.SaverDef)
        SaverDefOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use SaverDef.newBuilder() to construct.
      private SaverDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private SaverDef() {
        filenameTensorName_ = "";
        saveTensorName_ = "";
        restoreOpName_ = "";
        maxToKeep_ = 0;
        sharded_ = false;
        keepCheckpointEveryNHours_ = 0F;
        version_ = 0;
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private SaverDef(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              default: {
                if (!parseUnknownFieldProto3(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
              case 10: {
                java.lang.String s = input.readStringRequireUtf8();
  
                filenameTensorName_ = s;
                break;
              }
              case 18: {
                java.lang.String s = input.readStringRequireUtf8();
  
                saveTensorName_ = s;
                break;
              }
              case 26: {
                java.lang.String s = input.readStringRequireUtf8();
  
                restoreOpName_ = s;
                break;
              }
              case 32: {
  
                maxToKeep_ = input.readInt32();
                break;
              }
              case 40: {
  
                sharded_ = input.readBool();
                break;
              }
              case 53: {
  
                keepCheckpointEveryNHours_ = input.readFloat();
                break;
              }
              case 56: {
                int rawValue = input.readEnum();
  
                version_ = rawValue;
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.tencent.angel.core.saver.SaverProtos.internal_static_angel_SaverDef_descriptor;
      }
  
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.tencent.angel.core.saver.SaverProtos.internal_static_angel_SaverDef_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.tencent.angel.core.saver.SaverProtos.SaverDef.class, com.tencent.angel.core.saver.SaverProtos.SaverDef.Builder.class);
      }
  
      /**
       * <pre>
       * A version number that identifies a different on-disk checkpoint format.
       * Usually, each subclass of BaseSaverBuilder works with a particular
       * version/format.  However, it is possible that the same builder may be
       * upgraded to support a newer checkpoint format in the future.
       * </pre>
       *
       * Protobuf enum {@code angel.SaverDef.CheckpointFormatVersion}
       */
      public enum CheckpointFormatVersion
          implements com.google.protobuf.ProtocolMessageEnum {
        /**
         * <pre>
         * Internal legacy format.
         * </pre>
         *
         * <code>LEGACY = 0;</code>
         */
        LEGACY(0),
        /**
         * <pre>
         * Deprecated format: tf.Saver() which works with tensorflow::table::Table.
         * </pre>
         *
         * <code>V1 = 1;</code>
         */
        V1(1),
        /**
         * <pre>
         * Current format: more efficient.
         * </pre>
         *
         * <code>V2 = 2;</code>
         */
        V2(2),
        UNRECOGNIZED(-1),
        ;
  
        /**
         * <pre>
         * Internal legacy format.
         * </pre>
         *
         * <code>LEGACY = 0;</code>
         */
        public static final int LEGACY_VALUE = 0;
        /**
         * <pre>
         * Deprecated format: tf.Saver() which works with tensorflow::table::Table.
         * </pre>
         *
         * <code>V1 = 1;</code>
         */
        public static final int V1_VALUE = 1;
        /**
         * <pre>
         * Current format: more efficient.
         * </pre>
         *
         * <code>V2 = 2;</code>
         */
        public static final int V2_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 CheckpointFormatVersion valueOf(int value) {
          return forNumber(value);
        }
  
        public static CheckpointFormatVersion forNumber(int value) {
          switch (value) {
            case 0: return LEGACY;
            case 1: return V1;
            case 2: return V2;
            default: return null;
          }
        }
  
        public static com.google.protobuf.Internal.EnumLiteMap<CheckpointFormatVersion>
            internalGetValueMap() {
          return internalValueMap;
        }
        private static final com.google.protobuf.Internal.EnumLiteMap<
            CheckpointFormatVersion> internalValueMap =
              new com.google.protobuf.Internal.EnumLiteMap<CheckpointFormatVersion>() {
                public CheckpointFormatVersion findValueByNumber(int number) {
                  return CheckpointFormatVersion.forNumber(number);
                }
              };
  
        public final com.google.protobuf.Descriptors.EnumValueDescriptor
            getValueDescriptor() {
          return getDescriptor().getValues().get(ordinal());
        }
        public final com.google.protobuf.Descriptors.EnumDescriptor
            getDescriptorForType() {
          return getDescriptor();
        }
        public static final com.google.protobuf.Descriptors.EnumDescriptor
            getDescriptor() {
          return com.tencent.angel.core.saver.SaverProtos.SaverDef.getDescriptor().getEnumTypes().get(0);
        }
  
        private static final CheckpointFormatVersion[] VALUES = values();
  
        public static CheckpointFormatVersion 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 CheckpointFormatVersion(int value) {
          this.value = value;
        }
  
        // @@protoc_insertion_point(enum_scope:angel.SaverDef.CheckpointFormatVersion)
      }
  
      public static final int FILENAME_TENSOR_NAME_FIELD_NUMBER = 1;
      private volatile java.lang.Object filenameTensorName_;
      /**
       * <pre>
       * The name of the tensor in which to specify the filename when saving or
       * restoring a model checkpoint.
       * </pre>
       *
       * <code>string filename_tensor_name = 1;</code>
       */
      public java.lang.String getFilenameTensorName() {
        java.lang.Object ref = filenameTensorName_;
        if (ref instanceof java.lang.String) {
          return (java.lang.String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          filenameTensorName_ = s;
          return s;
        }
      }
      /**
       * <pre>
       * The name of the tensor in which to specify the filename when saving or
       * restoring a model checkpoint.
       * </pre>
       *
       * <code>string filename_tensor_name = 1;</code>
       */
      public com.google.protobuf.ByteString
          getFilenameTensorNameBytes() {
        java.lang.Object ref = filenameTensorName_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          filenameTensorName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
  
      public static final int SAVE_TENSOR_NAME_FIELD_NUMBER = 2;
      private volatile java.lang.Object saveTensorName_;
      /**
       * <pre>
       * The operation to run when saving a model checkpoint.
       * </pre>
       *
       * <code>string save_tensor_name = 2;</code>
       */
      public java.lang.String getSaveTensorName() {
        java.lang.Object ref = saveTensorName_;
        if (ref instanceof java.lang.String) {
          return (java.lang.String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          saveTensorName_ = s;
          return s;
        }
      }
      /**
       * <pre>
       * The operation to run when saving a model checkpoint.
       * </pre>
       *
       * <code>string save_tensor_name = 2;</code>
       */
      public com.google.protobuf.ByteString
          getSaveTensorNameBytes() {
        java.lang.Object ref = saveTensorName_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          saveTensorName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
  
      public static final int RESTORE_OP_NAME_FIELD_NUMBER = 3;
      private volatile java.lang.Object restoreOpName_;
      /**
       * <pre>
       * The operation to run when restoring a model checkpoint.
       * </pre>
       *
       * <code>string restore_op_name = 3;</code>
       */
      public java.lang.String getRestoreOpName() {
        java.lang.Object ref = restoreOpName_;
        if (ref instanceof java.lang.String) {
          return (java.lang.String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          restoreOpName_ = s;
          return s;
        }
      }
      /**
       * <pre>
       * The operation to run when restoring a model checkpoint.
       * </pre>
       *
       * <code>string restore_op_name = 3;</code>
       */
      public com.google.protobuf.ByteString
          getRestoreOpNameBytes() {
        java.lang.Object ref = restoreOpName_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          restoreOpName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
  
      public static final int MAX_TO_KEEP_FIELD_NUMBER = 4;
      private int maxToKeep_;
      /**
       * <pre>
       * Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
       * </pre>
       *
       * <code>int32 max_to_keep = 4;</code>
       */
      public int getMaxToKeep() {
        return maxToKeep_;
      }
  
      public static final int SHARDED_FIELD_NUMBER = 5;
      private boolean sharded_;
      /**
       * <pre>
       * Shard the save files, one per device that has Variable nodes.
       * </pre>
       *
       * <code>bool sharded = 5;</code>
       */
      public boolean getSharded() {
        return sharded_;
      }
  
      public static final int KEEP_CHECKPOINT_EVERY_N_HOURS_FIELD_NUMBER = 6;
      private float keepCheckpointEveryNHours_;
      /**
       * <pre>
       * How often to keep an additional checkpoint. If not specified, only the last
       * "max_to_keep" checkpoints are kept; if specified, in addition to keeping
       * the last "max_to_keep" checkpoints, an additional checkpoint will be kept
       * for every n hours of training.
       * </pre>
       *
       * <code>float keep_checkpoint_every_n_hours = 6;</code>
       */
      public float getKeepCheckpointEveryNHours() {
        return keepCheckpointEveryNHours_;
      }
  
      public static final int VERSION_FIELD_NUMBER = 7;
      private int version_;
      /**
       * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
       */
      public int getVersionValue() {
        return version_;
      }
      /**
       * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
       */
      public com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion getVersion() {
        com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion result = com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion.valueOf(version_);
        return result == null ? com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion.UNRECOGNIZED : result;
      }
  
      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 (!getFilenameTensorNameBytes().isEmpty()) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filenameTensorName_);
        }
        if (!getSaveTensorNameBytes().isEmpty()) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 2, saveTensorName_);
        }
        if (!getRestoreOpNameBytes().isEmpty()) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 3, restoreOpName_);
        }
        if (maxToKeep_ != 0) {
          output.writeInt32(4, maxToKeep_);
        }
        if (sharded_ != false) {
          output.writeBool(5, sharded_);
        }
        if (keepCheckpointEveryNHours_ != 0F) {
          output.writeFloat(6, keepCheckpointEveryNHours_);
        }
        if (version_ != com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion.LEGACY.getNumber()) {
          output.writeEnum(7, version_);
        }
        unknownFields.writeTo(output);
      }
  
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (!getFilenameTensorNameBytes().isEmpty()) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filenameTensorName_);
        }
        if (!getSaveTensorNameBytes().isEmpty()) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, saveTensorName_);
        }
        if (!getRestoreOpNameBytes().isEmpty()) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, restoreOpName_);
        }
        if (maxToKeep_ != 0) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(4, maxToKeep_);
        }
        if (sharded_ != false) {
          size += com.google.protobuf.CodedOutputStream
            .computeBoolSize(5, sharded_);
        }
        if (keepCheckpointEveryNHours_ != 0F) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(6, keepCheckpointEveryNHours_);
        }
        if (version_ != com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion.LEGACY.getNumber()) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(7, version_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof com.tencent.angel.core.saver.SaverProtos.SaverDef)) {
          return super.equals(obj);
        }
        com.tencent.angel.core.saver.SaverProtos.SaverDef other = (com.tencent.angel.core.saver.SaverProtos.SaverDef) obj;
  
        boolean result = true;
        result = result && getFilenameTensorName()
            .equals(other.getFilenameTensorName());
        result = result && getSaveTensorName()
            .equals(other.getSaveTensorName());
        result = result && getRestoreOpName()
            .equals(other.getRestoreOpName());
        result = result && (getMaxToKeep()
            == other.getMaxToKeep());
        result = result && (getSharded()
            == other.getSharded());
        result = result && (
            java.lang.Float.floatToIntBits(getKeepCheckpointEveryNHours())
            == java.lang.Float.floatToIntBits(
                other.getKeepCheckpointEveryNHours()));
        result = result && version_ == other.version_;
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + FILENAME_TENSOR_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getFilenameTensorName().hashCode();
        hash = (37 * hash) + SAVE_TENSOR_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getSaveTensorName().hashCode();
        hash = (37 * hash) + RESTORE_OP_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getRestoreOpName().hashCode();
        hash = (37 * hash) + MAX_TO_KEEP_FIELD_NUMBER;
        hash = (53 * hash) + getMaxToKeep();
        hash = (37 * hash) + SHARDED_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getSharded());
        hash = (37 * hash) + KEEP_CHECKPOINT_EVERY_N_HOURS_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getKeepCheckpointEveryNHours());
        hash = (37 * hash) + VERSION_FIELD_NUMBER;
        hash = (53 * hash) + version_;
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef 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(com.tencent.angel.core.saver.SaverProtos.SaverDef 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>
       * Protocol buffer representing the configuration of a Saver.
       * </pre>
       *
       * Protobuf type {@code angel.SaverDef}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:angel.SaverDef)
          com.tencent.angel.core.saver.SaverProtos.SaverDefOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return com.tencent.angel.core.saver.SaverProtos.internal_static_angel_SaverDef_descriptor;
        }
  
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.tencent.angel.core.saver.SaverProtos.internal_static_angel_SaverDef_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.tencent.angel.core.saver.SaverProtos.SaverDef.class, com.tencent.angel.core.saver.SaverProtos.SaverDef.Builder.class);
        }
  
        // Construct using com.tencent.angel.core.saver.SaverProtos.SaverDef.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();
          filenameTensorName_ = "";
  
          saveTensorName_ = "";
  
          restoreOpName_ = "";
  
          maxToKeep_ = 0;
  
          sharded_ = false;
  
          keepCheckpointEveryNHours_ = 0F;
  
          version_ = 0;
  
          return this;
        }
  
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return com.tencent.angel.core.saver.SaverProtos.internal_static_angel_SaverDef_descriptor;
        }
  
        public com.tencent.angel.core.saver.SaverProtos.SaverDef getDefaultInstanceForType() {
          return com.tencent.angel.core.saver.SaverProtos.SaverDef.getDefaultInstance();
        }
  
        public com.tencent.angel.core.saver.SaverProtos.SaverDef build() {
          com.tencent.angel.core.saver.SaverProtos.SaverDef result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        public com.tencent.angel.core.saver.SaverProtos.SaverDef buildPartial() {
          com.tencent.angel.core.saver.SaverProtos.SaverDef result = new com.tencent.angel.core.saver.SaverProtos.SaverDef(this);
          result.filenameTensorName_ = filenameTensorName_;
          result.saveTensorName_ = saveTensorName_;
          result.restoreOpName_ = restoreOpName_;
          result.maxToKeep_ = maxToKeep_;
          result.sharded_ = sharded_;
          result.keepCheckpointEveryNHours_ = keepCheckpointEveryNHours_;
          result.version_ = version_;
          onBuilt();
          return result;
        }
  
        public Builder clone() {
          return (Builder) super.clone();
        }
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.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, java.lang.Object value) {
          return (Builder) super.setRepeatedField(field, index, value);
        }
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.addRepeatedField(field, value);
        }
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.tencent.angel.core.saver.SaverProtos.SaverDef) {
            return mergeFrom((com.tencent.angel.core.saver.SaverProtos.SaverDef)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(com.tencent.angel.core.saver.SaverProtos.SaverDef other) {
          if (other == com.tencent.angel.core.saver.SaverProtos.SaverDef.getDefaultInstance()) return this;
          if (!other.getFilenameTensorName().isEmpty()) {
            filenameTensorName_ = other.filenameTensorName_;
            onChanged();
          }
          if (!other.getSaveTensorName().isEmpty()) {
            saveTensorName_ = other.saveTensorName_;
            onChanged();
          }
          if (!other.getRestoreOpName().isEmpty()) {
            restoreOpName_ = other.restoreOpName_;
            onChanged();
          }
          if (other.getMaxToKeep() != 0) {
            setMaxToKeep(other.getMaxToKeep());
          }
          if (other.getSharded() != false) {
            setSharded(other.getSharded());
          }
          if (other.getKeepCheckpointEveryNHours() != 0F) {
            setKeepCheckpointEveryNHours(other.getKeepCheckpointEveryNHours());
          }
          if (other.version_ != 0) {
            setVersionValue(other.getVersionValue());
          }
          this.mergeUnknownFields(other.unknownFields);
          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 {
          com.tencent.angel.core.saver.SaverProtos.SaverDef parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (com.tencent.angel.core.saver.SaverProtos.SaverDef) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
  
        private java.lang.Object filenameTensorName_ = "";
        /**
         * <pre>
         * The name of the tensor in which to specify the filename when saving or
         * restoring a model checkpoint.
         * </pre>
         *
         * <code>string filename_tensor_name = 1;</code>
         */
        public java.lang.String getFilenameTensorName() {
          java.lang.Object ref = filenameTensorName_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            filenameTensorName_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <pre>
         * The name of the tensor in which to specify the filename when saving or
         * restoring a model checkpoint.
         * </pre>
         *
         * <code>string filename_tensor_name = 1;</code>
         */
        public com.google.protobuf.ByteString
            getFilenameTensorNameBytes() {
          java.lang.Object ref = filenameTensorName_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            filenameTensorName_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <pre>
         * The name of the tensor in which to specify the filename when saving or
         * restoring a model checkpoint.
         * </pre>
         *
         * <code>string filename_tensor_name = 1;</code>
         */
        public Builder setFilenameTensorName(
            java.lang.String value) {
          if (value == null) {
      throw new NullPointerException();
    }
    
          filenameTensorName_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The name of the tensor in which to specify the filename when saving or
         * restoring a model checkpoint.
         * </pre>
         *
         * <code>string filename_tensor_name = 1;</code>
         */
        public Builder clearFilenameTensorName() {
          
          filenameTensorName_ = getDefaultInstance().getFilenameTensorName();
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The name of the tensor in which to specify the filename when saving or
         * restoring a model checkpoint.
         * </pre>
         *
         * <code>string filename_tensor_name = 1;</code>
         */
        public Builder setFilenameTensorNameBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    checkByteStringIsUtf8(value);
          
          filenameTensorName_ = value;
          onChanged();
          return this;
        }
  
        private java.lang.Object saveTensorName_ = "";
        /**
         * <pre>
         * The operation to run when saving a model checkpoint.
         * </pre>
         *
         * <code>string save_tensor_name = 2;</code>
         */
        public java.lang.String getSaveTensorName() {
          java.lang.Object ref = saveTensorName_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            saveTensorName_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <pre>
         * The operation to run when saving a model checkpoint.
         * </pre>
         *
         * <code>string save_tensor_name = 2;</code>
         */
        public com.google.protobuf.ByteString
            getSaveTensorNameBytes() {
          java.lang.Object ref = saveTensorName_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            saveTensorName_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <pre>
         * The operation to run when saving a model checkpoint.
         * </pre>
         *
         * <code>string save_tensor_name = 2;</code>
         */
        public Builder setSaveTensorName(
            java.lang.String value) {
          if (value == null) {
      throw new NullPointerException();
    }
    
          saveTensorName_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The operation to run when saving a model checkpoint.
         * </pre>
         *
         * <code>string save_tensor_name = 2;</code>
         */
        public Builder clearSaveTensorName() {
          
          saveTensorName_ = getDefaultInstance().getSaveTensorName();
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The operation to run when saving a model checkpoint.
         * </pre>
         *
         * <code>string save_tensor_name = 2;</code>
         */
        public Builder setSaveTensorNameBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    checkByteStringIsUtf8(value);
          
          saveTensorName_ = value;
          onChanged();
          return this;
        }
  
        private java.lang.Object restoreOpName_ = "";
        /**
         * <pre>
         * The operation to run when restoring a model checkpoint.
         * </pre>
         *
         * <code>string restore_op_name = 3;</code>
         */
        public java.lang.String getRestoreOpName() {
          java.lang.Object ref = restoreOpName_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            restoreOpName_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <pre>
         * The operation to run when restoring a model checkpoint.
         * </pre>
         *
         * <code>string restore_op_name = 3;</code>
         */
        public com.google.protobuf.ByteString
            getRestoreOpNameBytes() {
          java.lang.Object ref = restoreOpName_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            restoreOpName_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <pre>
         * The operation to run when restoring a model checkpoint.
         * </pre>
         *
         * <code>string restore_op_name = 3;</code>
         */
        public Builder setRestoreOpName(
            java.lang.String value) {
          if (value == null) {
      throw new NullPointerException();
    }
    
          restoreOpName_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The operation to run when restoring a model checkpoint.
         * </pre>
         *
         * <code>string restore_op_name = 3;</code>
         */
        public Builder clearRestoreOpName() {
          
          restoreOpName_ = getDefaultInstance().getRestoreOpName();
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The operation to run when restoring a model checkpoint.
         * </pre>
         *
         * <code>string restore_op_name = 3;</code>
         */
        public Builder setRestoreOpNameBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    checkByteStringIsUtf8(value);
          
          restoreOpName_ = value;
          onChanged();
          return this;
        }
  
        private int maxToKeep_ ;
        /**
         * <pre>
         * Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
         * </pre>
         *
         * <code>int32 max_to_keep = 4;</code>
         */
        public int getMaxToKeep() {
          return maxToKeep_;
        }
        /**
         * <pre>
         * Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
         * </pre>
         *
         * <code>int32 max_to_keep = 4;</code>
         */
        public Builder setMaxToKeep(int value) {
          
          maxToKeep_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
         * </pre>
         *
         * <code>int32 max_to_keep = 4;</code>
         */
        public Builder clearMaxToKeep() {
          
          maxToKeep_ = 0;
          onChanged();
          return this;
        }
  
        private boolean sharded_ ;
        /**
         * <pre>
         * Shard the save files, one per device that has Variable nodes.
         * </pre>
         *
         * <code>bool sharded = 5;</code>
         */
        public boolean getSharded() {
          return sharded_;
        }
        /**
         * <pre>
         * Shard the save files, one per device that has Variable nodes.
         * </pre>
         *
         * <code>bool sharded = 5;</code>
         */
        public Builder setSharded(boolean value) {
          
          sharded_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Shard the save files, one per device that has Variable nodes.
         * </pre>
         *
         * <code>bool sharded = 5;</code>
         */
        public Builder clearSharded() {
          
          sharded_ = false;
          onChanged();
          return this;
        }
  
        private float keepCheckpointEveryNHours_ ;
        /**
         * <pre>
         * How often to keep an additional checkpoint. If not specified, only the last
         * "max_to_keep" checkpoints are kept; if specified, in addition to keeping
         * the last "max_to_keep" checkpoints, an additional checkpoint will be kept
         * for every n hours of training.
         * </pre>
         *
         * <code>float keep_checkpoint_every_n_hours = 6;</code>
         */
        public float getKeepCheckpointEveryNHours() {
          return keepCheckpointEveryNHours_;
        }
        /**
         * <pre>
         * How often to keep an additional checkpoint. If not specified, only the last
         * "max_to_keep" checkpoints are kept; if specified, in addition to keeping
         * the last "max_to_keep" checkpoints, an additional checkpoint will be kept
         * for every n hours of training.
         * </pre>
         *
         * <code>float keep_checkpoint_every_n_hours = 6;</code>
         */
        public Builder setKeepCheckpointEveryNHours(float value) {
          
          keepCheckpointEveryNHours_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * How often to keep an additional checkpoint. If not specified, only the last
         * "max_to_keep" checkpoints are kept; if specified, in addition to keeping
         * the last "max_to_keep" checkpoints, an additional checkpoint will be kept
         * for every n hours of training.
         * </pre>
         *
         * <code>float keep_checkpoint_every_n_hours = 6;</code>
         */
        public Builder clearKeepCheckpointEveryNHours() {
          
          keepCheckpointEveryNHours_ = 0F;
          onChanged();
          return this;
        }
  
        private int version_ = 0;
        /**
         * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
         */
        public int getVersionValue() {
          return version_;
        }
        /**
         * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
         */
        public Builder setVersionValue(int value) {
          version_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
         */
        public com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion getVersion() {
          com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion result = com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion.valueOf(version_);
          return result == null ? com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion.UNRECOGNIZED : result;
        }
        /**
         * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
         */
        public Builder setVersion(com.tencent.angel.core.saver.SaverProtos.SaverDef.CheckpointFormatVersion value) {
          if (value == null) {
            throw new NullPointerException();
          }
          
          version_ = value.getNumber();
          onChanged();
          return this;
        }
        /**
         * <code>.angel.SaverDef.CheckpointFormatVersion version = 7;</code>
         */
        public Builder clearVersion() {
          
          version_ = 0;
          onChanged();
          return this;
        }
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFieldsProto3(unknownFields);
        }
  
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:angel.SaverDef)
      }
  
      // @@protoc_insertion_point(class_scope:angel.SaverDef)
      private static final com.tencent.angel.core.saver.SaverProtos.SaverDef DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new com.tencent.angel.core.saver.SaverProtos.SaverDef();
      }
  
      public static com.tencent.angel.core.saver.SaverProtos.SaverDef getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      private static final com.google.protobuf.Parser<SaverDef>
          PARSER = new com.google.protobuf.AbstractParser<SaverDef>() {
        public SaverDef parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new SaverDef(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<SaverDef> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<SaverDef> getParserForType() {
        return PARSER;
      }
  
      public com.tencent.angel.core.saver.SaverProtos.SaverDef getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_angel_SaverDef_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_angel_SaverDef_fieldAccessorTable;
  
    public static com.google.protobuf.Descriptors.FileDescriptor
        getDescriptor() {
      return descriptor;
    }
    private static  com.google.protobuf.Descriptors.FileDescriptor
        descriptor;
    static {
      java.lang.String[] descriptorData = {
        "\n\026core/saver/saver.proto\022\005angel\"\231\002\n\010Save" +
        "rDef\022\034\n\024filename_tensor_name\030\001 \001(\t\022\030\n\020sa" +
        "ve_tensor_name\030\002 \001(\t\022\027\n\017restore_op_name\030" +
        "\003 \001(\t\022\023\n\013max_to_keep\030\004 \001(\005\022\017\n\007sharded\030\005 " +
        "\001(\010\022%\n\035keep_checkpoint_every_n_hours\030\006 \001" +
        "(\002\0228\n\007version\030\007 \001(\0162\'.angel.SaverDef.Che" +
        "ckpointFormatVersion\"5\n\027CheckpointFormat" +
        "Version\022\n\n\006LEGACY\020\000\022\006\n\002V1\020\001\022\006\n\002V2\020\002B-\n\034c" +
        "om.tencent.angel.core.saverB\013SaverProtos" +
        "P\000b\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_angel_SaverDef_descriptor =
        getDescriptor().getMessageTypes().get(0);
      internal_static_angel_SaverDef_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_angel_SaverDef_descriptor,
          new java.lang.String[] { "FilenameTensorName", "SaveTensorName", "RestoreOpName", "MaxToKeep", "Sharded", "KeepCheckpointEveryNHours", "Version", });
    }
  
    // @@protoc_insertion_point(outer_class_scope)
  }
  