// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/variable.proto

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Protocol buffer representing a Variable.
 * </pre>
 *
 * Protobuf type {@code tensorflow.VariableDef}
 */
public  final class VariableDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.VariableDef)
    VariableDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use VariableDef.newBuilder() to construct.
  private VariableDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private VariableDef() {
    variableName_ = "";
    initialValueName_ = "";
    initializerName_ = "";
    snapshotName_ = "";
    synchronization_ = 0;
    aggregation_ = 0;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new VariableDef();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private VariableDef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            variableName_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            initializerName_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            snapshotName_ = s;
            break;
          }
          case 34: {
            org.tensorflow.proto.framework.SaveSliceInfoDef.Builder subBuilder = null;
            if (saveSliceInfoDef_ != null) {
              subBuilder = saveSliceInfoDef_.toBuilder();
            }
            saveSliceInfoDef_ = input.readMessage(org.tensorflow.proto.framework.SaveSliceInfoDef.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(saveSliceInfoDef_);
              saveSliceInfoDef_ = subBuilder.buildPartial();
            }

            break;
          }
          case 40: {

            isResource_ = input.readBool();
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            initialValueName_ = s;
            break;
          }
          case 56: {

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

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

            aggregation_ = rawValue;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.framework.VariableDef.class, org.tensorflow.proto.framework.VariableDef.Builder.class);
  }

  public static final int VARIABLE_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object variableName_;
  /**
   * <pre>
   * Name of the variable tensor.
   * </pre>
   *
   * <code>string variable_name = 1;</code>
   */
  public java.lang.String getVariableName() {
    java.lang.Object ref = variableName_;
    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();
      variableName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the variable tensor.
   * </pre>
   *
   * <code>string variable_name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getVariableNameBytes() {
    java.lang.Object ref = variableName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      variableName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INITIAL_VALUE_NAME_FIELD_NUMBER = 6;
  private volatile java.lang.Object initialValueName_;
  /**
   * <pre>
   * Name of the tensor holding the variable's initial value.
   * </pre>
   *
   * <code>string initial_value_name = 6;</code>
   */
  public java.lang.String getInitialValueName() {
    java.lang.Object ref = initialValueName_;
    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();
      initialValueName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the tensor holding the variable's initial value.
   * </pre>
   *
   * <code>string initial_value_name = 6;</code>
   */
  public com.google.protobuf.ByteString
      getInitialValueNameBytes() {
    java.lang.Object ref = initialValueName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      initialValueName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INITIALIZER_NAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object initializerName_;
  /**
   * <pre>
   * Name of the initializer op.
   * </pre>
   *
   * <code>string initializer_name = 2;</code>
   */
  public java.lang.String getInitializerName() {
    java.lang.Object ref = initializerName_;
    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();
      initializerName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the initializer op.
   * </pre>
   *
   * <code>string initializer_name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getInitializerNameBytes() {
    java.lang.Object ref = initializerName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      initializerName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SNAPSHOT_NAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object snapshotName_;
  /**
   * <pre>
   * Name of the snapshot tensor.
   * </pre>
   *
   * <code>string snapshot_name = 3;</code>
   */
  public java.lang.String getSnapshotName() {
    java.lang.Object ref = snapshotName_;
    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();
      snapshotName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the snapshot tensor.
   * </pre>
   *
   * <code>string snapshot_name = 3;</code>
   */
  public com.google.protobuf.ByteString
      getSnapshotNameBytes() {
    java.lang.Object ref = snapshotName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      snapshotName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SAVE_SLICE_INFO_DEF_FIELD_NUMBER = 4;
  private org.tensorflow.proto.framework.SaveSliceInfoDef saveSliceInfoDef_;
  /**
   * <pre>
   * Support for saving variables as slices of a larger variable.
   * </pre>
   *
   * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
   */
  public boolean hasSaveSliceInfoDef() {
    return saveSliceInfoDef_ != null;
  }
  /**
   * <pre>
   * Support for saving variables as slices of a larger variable.
   * </pre>
   *
   * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
   */
  public org.tensorflow.proto.framework.SaveSliceInfoDef getSaveSliceInfoDef() {
    return saveSliceInfoDef_ == null ? org.tensorflow.proto.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_;
  }
  /**
   * <pre>
   * Support for saving variables as slices of a larger variable.
   * </pre>
   *
   * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
   */
  public org.tensorflow.proto.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() {
    return getSaveSliceInfoDef();
  }

  public static final int IS_RESOURCE_FIELD_NUMBER = 5;
  private boolean isResource_;
  /**
   * <pre>
   * Whether to represent this as a ResourceVariable.
   * </pre>
   *
   * <code>bool is_resource = 5;</code>
   */
  public boolean getIsResource() {
    return isResource_;
  }

  public static final int TRAINABLE_FIELD_NUMBER = 7;
  private boolean trainable_;
  /**
   * <pre>
   * Whether this variable should be trained.
   * </pre>
   *
   * <code>bool trainable = 7;</code>
   */
  public boolean getTrainable() {
    return trainable_;
  }

  public static final int SYNCHRONIZATION_FIELD_NUMBER = 8;
  private int synchronization_;
  /**
   * <pre>
   * Indicates when a distributed variable will be synced.
   * </pre>
   *
   * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
   */
  public int getSynchronizationValue() {
    return synchronization_;
  }
  /**
   * <pre>
   * Indicates when a distributed variable will be synced.
   * </pre>
   *
   * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
   */
  public org.tensorflow.proto.framework.VariableSynchronization getSynchronization() {
    @SuppressWarnings("deprecation")
    org.tensorflow.proto.framework.VariableSynchronization result = org.tensorflow.proto.framework.VariableSynchronization.valueOf(synchronization_);
    return result == null ? org.tensorflow.proto.framework.VariableSynchronization.UNRECOGNIZED : result;
  }

  public static final int AGGREGATION_FIELD_NUMBER = 9;
  private int aggregation_;
  /**
   * <pre>
   * Indicates how a distributed variable will be aggregated.
   * </pre>
   *
   * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
   */
  public int getAggregationValue() {
    return aggregation_;
  }
  /**
   * <pre>
   * Indicates how a distributed variable will be aggregated.
   * </pre>
   *
   * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
   */
  public org.tensorflow.proto.framework.VariableAggregation getAggregation() {
    @SuppressWarnings("deprecation")
    org.tensorflow.proto.framework.VariableAggregation result = org.tensorflow.proto.framework.VariableAggregation.valueOf(aggregation_);
    return result == null ? org.tensorflow.proto.framework.VariableAggregation.UNRECOGNIZED : result;
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getVariableNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, variableName_);
    }
    if (!getInitializerNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, initializerName_);
    }
    if (!getSnapshotNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snapshotName_);
    }
    if (saveSliceInfoDef_ != null) {
      output.writeMessage(4, getSaveSliceInfoDef());
    }
    if (isResource_ != false) {
      output.writeBool(5, isResource_);
    }
    if (!getInitialValueNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, initialValueName_);
    }
    if (trainable_ != false) {
      output.writeBool(7, trainable_);
    }
    if (synchronization_ != org.tensorflow.proto.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) {
      output.writeEnum(8, synchronization_);
    }
    if (aggregation_ != org.tensorflow.proto.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) {
      output.writeEnum(9, aggregation_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getVariableNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, variableName_);
    }
    if (!getInitializerNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, initializerName_);
    }
    if (!getSnapshotNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snapshotName_);
    }
    if (saveSliceInfoDef_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getSaveSliceInfoDef());
    }
    if (isResource_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(5, isResource_);
    }
    if (!getInitialValueNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, initialValueName_);
    }
    if (trainable_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(7, trainable_);
    }
    if (synchronization_ != org.tensorflow.proto.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(8, synchronization_);
    }
    if (aggregation_ != org.tensorflow.proto.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(9, aggregation_);
    }
    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 org.tensorflow.proto.framework.VariableDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.VariableDef other = (org.tensorflow.proto.framework.VariableDef) obj;

    if (!getVariableName()
        .equals(other.getVariableName())) return false;
    if (!getInitialValueName()
        .equals(other.getInitialValueName())) return false;
    if (!getInitializerName()
        .equals(other.getInitializerName())) return false;
    if (!getSnapshotName()
        .equals(other.getSnapshotName())) return false;
    if (hasSaveSliceInfoDef() != other.hasSaveSliceInfoDef()) return false;
    if (hasSaveSliceInfoDef()) {
      if (!getSaveSliceInfoDef()
          .equals(other.getSaveSliceInfoDef())) return false;
    }
    if (getIsResource()
        != other.getIsResource()) return false;
    if (getTrainable()
        != other.getTrainable()) return false;
    if (synchronization_ != other.synchronization_) return false;
    if (aggregation_ != other.aggregation_) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + VARIABLE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getVariableName().hashCode();
    hash = (37 * hash) + INITIAL_VALUE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getInitialValueName().hashCode();
    hash = (37 * hash) + INITIALIZER_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getInitializerName().hashCode();
    hash = (37 * hash) + SNAPSHOT_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getSnapshotName().hashCode();
    if (hasSaveSliceInfoDef()) {
      hash = (37 * hash) + SAVE_SLICE_INFO_DEF_FIELD_NUMBER;
      hash = (53 * hash) + getSaveSliceInfoDef().hashCode();
    }
    hash = (37 * hash) + IS_RESOURCE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getIsResource());
    hash = (37 * hash) + TRAINABLE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getTrainable());
    hash = (37 * hash) + SYNCHRONIZATION_FIELD_NUMBER;
    hash = (53 * hash) + synchronization_;
    hash = (37 * hash) + AGGREGATION_FIELD_NUMBER;
    hash = (53 * hash) + aggregation_;
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.tensorflow.proto.framework.VariableDef prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * Protocol buffer representing a Variable.
   * </pre>
   *
   * Protobuf type {@code tensorflow.VariableDef}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.VariableDef)
      org.tensorflow.proto.framework.VariableDefOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.framework.VariableDef.class, org.tensorflow.proto.framework.VariableDef.Builder.class);
    }

    // Construct using org.tensorflow.proto.framework.VariableDef.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

      initialValueName_ = "";

      initializerName_ = "";

      snapshotName_ = "";

      if (saveSliceInfoDefBuilder_ == null) {
        saveSliceInfoDef_ = null;
      } else {
        saveSliceInfoDef_ = null;
        saveSliceInfoDefBuilder_ = null;
      }
      isResource_ = false;

      trainable_ = false;

      synchronization_ = 0;

      aggregation_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor;
    }

    @java.lang.Override
    public org.tensorflow.proto.framework.VariableDef getDefaultInstanceForType() {
      return org.tensorflow.proto.framework.VariableDef.getDefaultInstance();
    }

    @java.lang.Override
    public org.tensorflow.proto.framework.VariableDef build() {
      org.tensorflow.proto.framework.VariableDef result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.tensorflow.proto.framework.VariableDef buildPartial() {
      org.tensorflow.proto.framework.VariableDef result = new org.tensorflow.proto.framework.VariableDef(this);
      result.variableName_ = variableName_;
      result.initialValueName_ = initialValueName_;
      result.initializerName_ = initializerName_;
      result.snapshotName_ = snapshotName_;
      if (saveSliceInfoDefBuilder_ == null) {
        result.saveSliceInfoDef_ = saveSliceInfoDef_;
      } else {
        result.saveSliceInfoDef_ = saveSliceInfoDefBuilder_.build();
      }
      result.isResource_ = isResource_;
      result.trainable_ = trainable_;
      result.synchronization_ = synchronization_;
      result.aggregation_ = aggregation_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(org.tensorflow.proto.framework.VariableDef other) {
      if (other == org.tensorflow.proto.framework.VariableDef.getDefaultInstance()) return this;
      if (!other.getVariableName().isEmpty()) {
        variableName_ = other.variableName_;
        onChanged();
      }
      if (!other.getInitialValueName().isEmpty()) {
        initialValueName_ = other.initialValueName_;
        onChanged();
      }
      if (!other.getInitializerName().isEmpty()) {
        initializerName_ = other.initializerName_;
        onChanged();
      }
      if (!other.getSnapshotName().isEmpty()) {
        snapshotName_ = other.snapshotName_;
        onChanged();
      }
      if (other.hasSaveSliceInfoDef()) {
        mergeSaveSliceInfoDef(other.getSaveSliceInfoDef());
      }
      if (other.getIsResource() != false) {
        setIsResource(other.getIsResource());
      }
      if (other.getTrainable() != false) {
        setTrainable(other.getTrainable());
      }
      if (other.synchronization_ != 0) {
        setSynchronizationValue(other.getSynchronizationValue());
      }
      if (other.aggregation_ != 0) {
        setAggregationValue(other.getAggregationValue());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private java.lang.Object variableName_ = "";
    /**
     * <pre>
     * Name of the variable tensor.
     * </pre>
     *
     * <code>string variable_name = 1;</code>
     */
    public java.lang.String getVariableName() {
      java.lang.Object ref = variableName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        variableName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the variable tensor.
     * </pre>
     *
     * <code>string variable_name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getVariableNameBytes() {
      java.lang.Object ref = variableName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        variableName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the variable tensor.
     * </pre>
     *
     * <code>string variable_name = 1;</code>
     */
    public Builder setVariableName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      variableName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the variable tensor.
     * </pre>
     *
     * <code>string variable_name = 1;</code>
     */
    public Builder clearVariableName() {
      
      variableName_ = getDefaultInstance().getVariableName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the variable tensor.
     * </pre>
     *
     * <code>string variable_name = 1;</code>
     */
    public Builder setVariableNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      variableName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object initialValueName_ = "";
    /**
     * <pre>
     * Name of the tensor holding the variable's initial value.
     * </pre>
     *
     * <code>string initial_value_name = 6;</code>
     */
    public java.lang.String getInitialValueName() {
      java.lang.Object ref = initialValueName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        initialValueName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the tensor holding the variable's initial value.
     * </pre>
     *
     * <code>string initial_value_name = 6;</code>
     */
    public com.google.protobuf.ByteString
        getInitialValueNameBytes() {
      java.lang.Object ref = initialValueName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        initialValueName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the tensor holding the variable's initial value.
     * </pre>
     *
     * <code>string initial_value_name = 6;</code>
     */
    public Builder setInitialValueName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      initialValueName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the tensor holding the variable's initial value.
     * </pre>
     *
     * <code>string initial_value_name = 6;</code>
     */
    public Builder clearInitialValueName() {
      
      initialValueName_ = getDefaultInstance().getInitialValueName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the tensor holding the variable's initial value.
     * </pre>
     *
     * <code>string initial_value_name = 6;</code>
     */
    public Builder setInitialValueNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      initialValueName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object initializerName_ = "";
    /**
     * <pre>
     * Name of the initializer op.
     * </pre>
     *
     * <code>string initializer_name = 2;</code>
     */
    public java.lang.String getInitializerName() {
      java.lang.Object ref = initializerName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        initializerName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the initializer op.
     * </pre>
     *
     * <code>string initializer_name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getInitializerNameBytes() {
      java.lang.Object ref = initializerName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        initializerName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the initializer op.
     * </pre>
     *
     * <code>string initializer_name = 2;</code>
     */
    public Builder setInitializerName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      initializerName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the initializer op.
     * </pre>
     *
     * <code>string initializer_name = 2;</code>
     */
    public Builder clearInitializerName() {
      
      initializerName_ = getDefaultInstance().getInitializerName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the initializer op.
     * </pre>
     *
     * <code>string initializer_name = 2;</code>
     */
    public Builder setInitializerNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      initializerName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object snapshotName_ = "";
    /**
     * <pre>
     * Name of the snapshot tensor.
     * </pre>
     *
     * <code>string snapshot_name = 3;</code>
     */
    public java.lang.String getSnapshotName() {
      java.lang.Object ref = snapshotName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        snapshotName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the snapshot tensor.
     * </pre>
     *
     * <code>string snapshot_name = 3;</code>
     */
    public com.google.protobuf.ByteString
        getSnapshotNameBytes() {
      java.lang.Object ref = snapshotName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        snapshotName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the snapshot tensor.
     * </pre>
     *
     * <code>string snapshot_name = 3;</code>
     */
    public Builder setSnapshotName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      snapshotName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the snapshot tensor.
     * </pre>
     *
     * <code>string snapshot_name = 3;</code>
     */
    public Builder clearSnapshotName() {
      
      snapshotName_ = getDefaultInstance().getSnapshotName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the snapshot tensor.
     * </pre>
     *
     * <code>string snapshot_name = 3;</code>
     */
    public Builder setSnapshotNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      snapshotName_ = value;
      onChanged();
      return this;
    }

    private org.tensorflow.proto.framework.SaveSliceInfoDef saveSliceInfoDef_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SaveSliceInfoDef, org.tensorflow.proto.framework.SaveSliceInfoDef.Builder, org.tensorflow.proto.framework.SaveSliceInfoDefOrBuilder> saveSliceInfoDefBuilder_;
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public boolean hasSaveSliceInfoDef() {
      return saveSliceInfoDefBuilder_ != null || saveSliceInfoDef_ != null;
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public org.tensorflow.proto.framework.SaveSliceInfoDef getSaveSliceInfoDef() {
      if (saveSliceInfoDefBuilder_ == null) {
        return saveSliceInfoDef_ == null ? org.tensorflow.proto.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_;
      } else {
        return saveSliceInfoDefBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public Builder setSaveSliceInfoDef(org.tensorflow.proto.framework.SaveSliceInfoDef value) {
      if (saveSliceInfoDefBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        saveSliceInfoDef_ = value;
        onChanged();
      } else {
        saveSliceInfoDefBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public Builder setSaveSliceInfoDef(
        org.tensorflow.proto.framework.SaveSliceInfoDef.Builder builderForValue) {
      if (saveSliceInfoDefBuilder_ == null) {
        saveSliceInfoDef_ = builderForValue.build();
        onChanged();
      } else {
        saveSliceInfoDefBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public Builder mergeSaveSliceInfoDef(org.tensorflow.proto.framework.SaveSliceInfoDef value) {
      if (saveSliceInfoDefBuilder_ == null) {
        if (saveSliceInfoDef_ != null) {
          saveSliceInfoDef_ =
            org.tensorflow.proto.framework.SaveSliceInfoDef.newBuilder(saveSliceInfoDef_).mergeFrom(value).buildPartial();
        } else {
          saveSliceInfoDef_ = value;
        }
        onChanged();
      } else {
        saveSliceInfoDefBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public Builder clearSaveSliceInfoDef() {
      if (saveSliceInfoDefBuilder_ == null) {
        saveSliceInfoDef_ = null;
        onChanged();
      } else {
        saveSliceInfoDef_ = null;
        saveSliceInfoDefBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public org.tensorflow.proto.framework.SaveSliceInfoDef.Builder getSaveSliceInfoDefBuilder() {
      
      onChanged();
      return getSaveSliceInfoDefFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    public org.tensorflow.proto.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() {
      if (saveSliceInfoDefBuilder_ != null) {
        return saveSliceInfoDefBuilder_.getMessageOrBuilder();
      } else {
        return saveSliceInfoDef_ == null ?
            org.tensorflow.proto.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_;
      }
    }
    /**
     * <pre>
     * Support for saving variables as slices of a larger variable.
     * </pre>
     *
     * <code>.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SaveSliceInfoDef, org.tensorflow.proto.framework.SaveSliceInfoDef.Builder, org.tensorflow.proto.framework.SaveSliceInfoDefOrBuilder> 
        getSaveSliceInfoDefFieldBuilder() {
      if (saveSliceInfoDefBuilder_ == null) {
        saveSliceInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SaveSliceInfoDef, org.tensorflow.proto.framework.SaveSliceInfoDef.Builder, org.tensorflow.proto.framework.SaveSliceInfoDefOrBuilder>(
                getSaveSliceInfoDef(),
                getParentForChildren(),
                isClean());
        saveSliceInfoDef_ = null;
      }
      return saveSliceInfoDefBuilder_;
    }

    private boolean isResource_ ;
    /**
     * <pre>
     * Whether to represent this as a ResourceVariable.
     * </pre>
     *
     * <code>bool is_resource = 5;</code>
     */
    public boolean getIsResource() {
      return isResource_;
    }
    /**
     * <pre>
     * Whether to represent this as a ResourceVariable.
     * </pre>
     *
     * <code>bool is_resource = 5;</code>
     */
    public Builder setIsResource(boolean value) {
      
      isResource_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Whether to represent this as a ResourceVariable.
     * </pre>
     *
     * <code>bool is_resource = 5;</code>
     */
    public Builder clearIsResource() {
      
      isResource_ = false;
      onChanged();
      return this;
    }

    private boolean trainable_ ;
    /**
     * <pre>
     * Whether this variable should be trained.
     * </pre>
     *
     * <code>bool trainable = 7;</code>
     */
    public boolean getTrainable() {
      return trainable_;
    }
    /**
     * <pre>
     * Whether this variable should be trained.
     * </pre>
     *
     * <code>bool trainable = 7;</code>
     */
    public Builder setTrainable(boolean value) {
      
      trainable_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Whether this variable should be trained.
     * </pre>
     *
     * <code>bool trainable = 7;</code>
     */
    public Builder clearTrainable() {
      
      trainable_ = false;
      onChanged();
      return this;
    }

    private int synchronization_ = 0;
    /**
     * <pre>
     * Indicates when a distributed variable will be synced.
     * </pre>
     *
     * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
     */
    public int getSynchronizationValue() {
      return synchronization_;
    }
    /**
     * <pre>
     * Indicates when a distributed variable will be synced.
     * </pre>
     *
     * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
     */
    public Builder setSynchronizationValue(int value) {
      synchronization_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Indicates when a distributed variable will be synced.
     * </pre>
     *
     * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
     */
    public org.tensorflow.proto.framework.VariableSynchronization getSynchronization() {
      @SuppressWarnings("deprecation")
      org.tensorflow.proto.framework.VariableSynchronization result = org.tensorflow.proto.framework.VariableSynchronization.valueOf(synchronization_);
      return result == null ? org.tensorflow.proto.framework.VariableSynchronization.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * Indicates when a distributed variable will be synced.
     * </pre>
     *
     * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
     */
    public Builder setSynchronization(org.tensorflow.proto.framework.VariableSynchronization value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      synchronization_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Indicates when a distributed variable will be synced.
     * </pre>
     *
     * <code>.tensorflow.VariableSynchronization synchronization = 8;</code>
     */
    public Builder clearSynchronization() {
      
      synchronization_ = 0;
      onChanged();
      return this;
    }

    private int aggregation_ = 0;
    /**
     * <pre>
     * Indicates how a distributed variable will be aggregated.
     * </pre>
     *
     * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
     */
    public int getAggregationValue() {
      return aggregation_;
    }
    /**
     * <pre>
     * Indicates how a distributed variable will be aggregated.
     * </pre>
     *
     * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
     */
    public Builder setAggregationValue(int value) {
      aggregation_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Indicates how a distributed variable will be aggregated.
     * </pre>
     *
     * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
     */
    public org.tensorflow.proto.framework.VariableAggregation getAggregation() {
      @SuppressWarnings("deprecation")
      org.tensorflow.proto.framework.VariableAggregation result = org.tensorflow.proto.framework.VariableAggregation.valueOf(aggregation_);
      return result == null ? org.tensorflow.proto.framework.VariableAggregation.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * Indicates how a distributed variable will be aggregated.
     * </pre>
     *
     * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
     */
    public Builder setAggregation(org.tensorflow.proto.framework.VariableAggregation value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      aggregation_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Indicates how a distributed variable will be aggregated.
     * </pre>
     *
     * <code>.tensorflow.VariableAggregation aggregation = 9;</code>
     */
    public Builder clearAggregation() {
      
      aggregation_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:tensorflow.VariableDef)
  }

  // @@protoc_insertion_point(class_scope:tensorflow.VariableDef)
  private static final org.tensorflow.proto.framework.VariableDef DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tensorflow.proto.framework.VariableDef();
  }

  public static org.tensorflow.proto.framework.VariableDef getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public org.tensorflow.proto.framework.VariableDef getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

