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

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Represents a Variable that is initialized by loading the contents from the
 * checkpoint.
 * </pre>
 *
 * Protobuf type {@code tensorflow.SavedVariable}
 */
public  final class SavedVariable extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.SavedVariable)
    SavedVariableOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SavedVariable.newBuilder() to construct.
  private SavedVariable(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SavedVariable() {
    dtype_ = 0;
    synchronization_ = 0;
    aggregation_ = 0;
    name_ = "";
    device_ = "";
    experimentalDistributedVariableComponents_ = java.util.Collections.emptyList();
  }

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

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

            dtype_ = rawValue;
            break;
          }
          case 18: {
            org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null;
            if (shape_ != null) {
              subBuilder = shape_.toBuilder();
            }
            shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(shape_);
              shape_ = subBuilder.buildPartial();
            }

            break;
          }
          case 24: {

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

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

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

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

            device_ = s;
            break;
          }
          case 66: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              experimentalDistributedVariableComponents_ = new java.util.ArrayList<org.tensorflow.proto.framework.SavedVariable>();
              mutable_bitField0_ |= 0x00000001;
            }
            experimentalDistributedVariableComponents_.add(
                input.readMessage(org.tensorflow.proto.framework.SavedVariable.parser(), extensionRegistry));
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        experimentalDistributedVariableComponents_ = java.util.Collections.unmodifiableList(experimentalDistributedVariableComponents_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_descriptor;
  }

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

  public static final int DTYPE_FIELD_NUMBER = 1;
  private int dtype_;
  /**
   * <code>.tensorflow.DataType dtype = 1;</code>
   */
  public int getDtypeValue() {
    return dtype_;
  }
  /**
   * <code>.tensorflow.DataType dtype = 1;</code>
   */
  public org.tensorflow.proto.framework.DataType getDtype() {
    @SuppressWarnings("deprecation")
    org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_);
    return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result;
  }

  public static final int SHAPE_FIELD_NUMBER = 2;
  private org.tensorflow.proto.framework.TensorShapeProto shape_;
  /**
   * <code>.tensorflow.TensorShapeProto shape = 2;</code>
   */
  public boolean hasShape() {
    return shape_ != null;
  }
  /**
   * <code>.tensorflow.TensorShapeProto shape = 2;</code>
   */
  public org.tensorflow.proto.framework.TensorShapeProto getShape() {
    return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_;
  }
  /**
   * <code>.tensorflow.TensorShapeProto shape = 2;</code>
   */
  public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    return getShape();
  }

  public static final int TRAINABLE_FIELD_NUMBER = 3;
  private boolean trainable_;
  /**
   * <code>bool trainable = 3;</code>
   */
  public boolean getTrainable() {
    return trainable_;
  }

  public static final int SYNCHRONIZATION_FIELD_NUMBER = 4;
  private int synchronization_;
  /**
   * <code>.tensorflow.VariableSynchronization synchronization = 4;</code>
   */
  public int getSynchronizationValue() {
    return synchronization_;
  }
  /**
   * <code>.tensorflow.VariableSynchronization synchronization = 4;</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 = 5;
  private int aggregation_;
  /**
   * <code>.tensorflow.VariableAggregation aggregation = 5;</code>
   */
  public int getAggregationValue() {
    return aggregation_;
  }
  /**
   * <code>.tensorflow.VariableAggregation aggregation = 5;</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;
  }

  public static final int NAME_FIELD_NUMBER = 6;
  private volatile java.lang.Object name_;
  /**
   * <code>string name = 6;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   * <code>string name = 6;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEVICE_FIELD_NUMBER = 7;
  private volatile java.lang.Object device_;
  /**
   * <code>string device = 7;</code>
   */
  public java.lang.String getDevice() {
    java.lang.Object ref = device_;
    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();
      device_ = s;
      return s;
    }
  }
  /**
   * <code>string device = 7;</code>
   */
  public com.google.protobuf.ByteString
      getDeviceBytes() {
    java.lang.Object ref = device_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      device_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EXPERIMENTAL_DISTRIBUTED_VARIABLE_COMPONENTS_FIELD_NUMBER = 8;
  private java.util.List<org.tensorflow.proto.framework.SavedVariable> experimentalDistributedVariableComponents_;
  /**
   * <pre>
   * List of component variables for a distributed variable.
   * When this field is non-empty, the SavedVariable will be assumed
   * to be a distributed variable defined by the components listed here.
   * This is only supported by experimental loaders at the moment.
   * </pre>
   *
   * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.SavedVariable> getExperimentalDistributedVariableComponentsList() {
    return experimentalDistributedVariableComponents_;
  }
  /**
   * <pre>
   * List of component variables for a distributed variable.
   * When this field is non-empty, the SavedVariable will be assumed
   * to be a distributed variable defined by the components listed here.
   * This is only supported by experimental loaders at the moment.
   * </pre>
   *
   * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.SavedVariableOrBuilder> 
      getExperimentalDistributedVariableComponentsOrBuilderList() {
    return experimentalDistributedVariableComponents_;
  }
  /**
   * <pre>
   * List of component variables for a distributed variable.
   * When this field is non-empty, the SavedVariable will be assumed
   * to be a distributed variable defined by the components listed here.
   * This is only supported by experimental loaders at the moment.
   * </pre>
   *
   * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
   */
  public int getExperimentalDistributedVariableComponentsCount() {
    return experimentalDistributedVariableComponents_.size();
  }
  /**
   * <pre>
   * List of component variables for a distributed variable.
   * When this field is non-empty, the SavedVariable will be assumed
   * to be a distributed variable defined by the components listed here.
   * This is only supported by experimental loaders at the moment.
   * </pre>
   *
   * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
   */
  public org.tensorflow.proto.framework.SavedVariable getExperimentalDistributedVariableComponents(int index) {
    return experimentalDistributedVariableComponents_.get(index);
  }
  /**
   * <pre>
   * List of component variables for a distributed variable.
   * When this field is non-empty, the SavedVariable will be assumed
   * to be a distributed variable defined by the components listed here.
   * This is only supported by experimental loaders at the moment.
   * </pre>
   *
   * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
   */
  public org.tensorflow.proto.framework.SavedVariableOrBuilder getExperimentalDistributedVariableComponentsOrBuilder(
      int index) {
    return experimentalDistributedVariableComponents_.get(index);
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) {
      output.writeEnum(1, dtype_);
    }
    if (shape_ != null) {
      output.writeMessage(2, getShape());
    }
    if (trainable_ != false) {
      output.writeBool(3, trainable_);
    }
    if (synchronization_ != org.tensorflow.proto.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) {
      output.writeEnum(4, synchronization_);
    }
    if (aggregation_ != org.tensorflow.proto.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) {
      output.writeEnum(5, aggregation_);
    }
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_);
    }
    if (!getDeviceBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, device_);
    }
    for (int i = 0; i < experimentalDistributedVariableComponents_.size(); i++) {
      output.writeMessage(8, experimentalDistributedVariableComponents_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, dtype_);
    }
    if (shape_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getShape());
    }
    if (trainable_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(3, trainable_);
    }
    if (synchronization_ != org.tensorflow.proto.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, synchronization_);
    }
    if (aggregation_ != org.tensorflow.proto.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(5, aggregation_);
    }
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_);
    }
    if (!getDeviceBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, device_);
    }
    for (int i = 0; i < experimentalDistributedVariableComponents_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, experimentalDistributedVariableComponents_.get(i));
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof org.tensorflow.proto.framework.SavedVariable)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.SavedVariable other = (org.tensorflow.proto.framework.SavedVariable) obj;

    if (dtype_ != other.dtype_) return false;
    if (hasShape() != other.hasShape()) return false;
    if (hasShape()) {
      if (!getShape()
          .equals(other.getShape())) return false;
    }
    if (getTrainable()
        != other.getTrainable()) return false;
    if (synchronization_ != other.synchronization_) return false;
    if (aggregation_ != other.aggregation_) return false;
    if (!getName()
        .equals(other.getName())) return false;
    if (!getDevice()
        .equals(other.getDevice())) return false;
    if (!getExperimentalDistributedVariableComponentsList()
        .equals(other.getExperimentalDistributedVariableComponentsList())) 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) + DTYPE_FIELD_NUMBER;
    hash = (53 * hash) + dtype_;
    if (hasShape()) {
      hash = (37 * hash) + SHAPE_FIELD_NUMBER;
      hash = (53 * hash) + getShape().hashCode();
    }
    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 = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + DEVICE_FIELD_NUMBER;
    hash = (53 * hash) + getDevice().hashCode();
    if (getExperimentalDistributedVariableComponentsCount() > 0) {
      hash = (37 * hash) + EXPERIMENTAL_DISTRIBUTED_VARIABLE_COMPONENTS_FIELD_NUMBER;
      hash = (53 * hash) + getExperimentalDistributedVariableComponentsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.framework.SavedVariable parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SavedVariable 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.SavedVariable parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SavedVariable 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.SavedVariable parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SavedVariable parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.framework.SavedVariable parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SavedVariable 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.SavedVariable parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SavedVariable 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.SavedVariable parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SavedVariable 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.SavedVariable 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>
   * Represents a Variable that is initialized by loading the contents from the
   * checkpoint.
   * </pre>
   *
   * Protobuf type {@code tensorflow.SavedVariable}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.SavedVariable)
      org.tensorflow.proto.framework.SavedVariableOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_descriptor;
    }

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

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

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

      if (shapeBuilder_ == null) {
        shape_ = null;
      } else {
        shape_ = null;
        shapeBuilder_ = null;
      }
      trainable_ = false;

      synchronization_ = 0;

      aggregation_ = 0;

      name_ = "";

      device_ = "";

      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        experimentalDistributedVariableComponents_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        experimentalDistributedVariableComponentsBuilder_.clear();
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.SavedVariable buildPartial() {
      org.tensorflow.proto.framework.SavedVariable result = new org.tensorflow.proto.framework.SavedVariable(this);
      int from_bitField0_ = bitField0_;
      result.dtype_ = dtype_;
      if (shapeBuilder_ == null) {
        result.shape_ = shape_;
      } else {
        result.shape_ = shapeBuilder_.build();
      }
      result.trainable_ = trainable_;
      result.synchronization_ = synchronization_;
      result.aggregation_ = aggregation_;
      result.name_ = name_;
      result.device_ = device_;
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          experimentalDistributedVariableComponents_ = java.util.Collections.unmodifiableList(experimentalDistributedVariableComponents_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.experimentalDistributedVariableComponents_ = experimentalDistributedVariableComponents_;
      } else {
        result.experimentalDistributedVariableComponents_ = experimentalDistributedVariableComponentsBuilder_.build();
      }
      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.SavedVariable) {
        return mergeFrom((org.tensorflow.proto.framework.SavedVariable)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.framework.SavedVariable other) {
      if (other == org.tensorflow.proto.framework.SavedVariable.getDefaultInstance()) return this;
      if (other.dtype_ != 0) {
        setDtypeValue(other.getDtypeValue());
      }
      if (other.hasShape()) {
        mergeShape(other.getShape());
      }
      if (other.getTrainable() != false) {
        setTrainable(other.getTrainable());
      }
      if (other.synchronization_ != 0) {
        setSynchronizationValue(other.getSynchronizationValue());
      }
      if (other.aggregation_ != 0) {
        setAggregationValue(other.getAggregationValue());
      }
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getDevice().isEmpty()) {
        device_ = other.device_;
        onChanged();
      }
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        if (!other.experimentalDistributedVariableComponents_.isEmpty()) {
          if (experimentalDistributedVariableComponents_.isEmpty()) {
            experimentalDistributedVariableComponents_ = other.experimentalDistributedVariableComponents_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureExperimentalDistributedVariableComponentsIsMutable();
            experimentalDistributedVariableComponents_.addAll(other.experimentalDistributedVariableComponents_);
          }
          onChanged();
        }
      } else {
        if (!other.experimentalDistributedVariableComponents_.isEmpty()) {
          if (experimentalDistributedVariableComponentsBuilder_.isEmpty()) {
            experimentalDistributedVariableComponentsBuilder_.dispose();
            experimentalDistributedVariableComponentsBuilder_ = null;
            experimentalDistributedVariableComponents_ = other.experimentalDistributedVariableComponents_;
            bitField0_ = (bitField0_ & ~0x00000001);
            experimentalDistributedVariableComponentsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getExperimentalDistributedVariableComponentsFieldBuilder() : null;
          } else {
            experimentalDistributedVariableComponentsBuilder_.addAllMessages(other.experimentalDistributedVariableComponents_);
          }
        }
      }
      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.SavedVariable parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.SavedVariable) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private int dtype_ = 0;
    /**
     * <code>.tensorflow.DataType dtype = 1;</code>
     */
    public int getDtypeValue() {
      return dtype_;
    }
    /**
     * <code>.tensorflow.DataType dtype = 1;</code>
     */
    public Builder setDtypeValue(int value) {
      dtype_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>.tensorflow.DataType dtype = 1;</code>
     */
    public org.tensorflow.proto.framework.DataType getDtype() {
      @SuppressWarnings("deprecation")
      org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_);
      return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result;
    }
    /**
     * <code>.tensorflow.DataType dtype = 1;</code>
     */
    public Builder setDtype(org.tensorflow.proto.framework.DataType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      dtype_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.tensorflow.DataType dtype = 1;</code>
     */
    public Builder clearDtype() {
      
      dtype_ = 0;
      onChanged();
      return this;
    }

    private org.tensorflow.proto.framework.TensorShapeProto shape_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public boolean hasShape() {
      return shapeBuilder_ != null || shape_ != null;
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public org.tensorflow.proto.framework.TensorShapeProto getShape() {
      if (shapeBuilder_ == null) {
        return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_;
      } else {
        return shapeBuilder_.getMessage();
      }
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) {
      if (shapeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        shape_ = value;
        onChanged();
      } else {
        shapeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder setShape(
        org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) {
      if (shapeBuilder_ == null) {
        shape_ = builderForValue.build();
        onChanged();
      } else {
        shapeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) {
      if (shapeBuilder_ == null) {
        if (shape_ != null) {
          shape_ =
            org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
        } else {
          shape_ = value;
        }
        onChanged();
      } else {
        shapeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder clearShape() {
      if (shapeBuilder_ == null) {
        shape_ = null;
        onChanged();
      } else {
        shape_ = null;
        shapeBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() {
      
      onChanged();
      return getShapeFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      if (shapeBuilder_ != null) {
        return shapeBuilder_.getMessageOrBuilder();
      } else {
        return shape_ == null ?
            org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_;
      }
    }
    /**
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> 
        getShapeFieldBuilder() {
      if (shapeBuilder_ == null) {
        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>(
                getShape(),
                getParentForChildren(),
                isClean());
        shape_ = null;
      }
      return shapeBuilder_;
    }

    private boolean trainable_ ;
    /**
     * <code>bool trainable = 3;</code>
     */
    public boolean getTrainable() {
      return trainable_;
    }
    /**
     * <code>bool trainable = 3;</code>
     */
    public Builder setTrainable(boolean value) {
      
      trainable_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool trainable = 3;</code>
     */
    public Builder clearTrainable() {
      
      trainable_ = false;
      onChanged();
      return this;
    }

    private int synchronization_ = 0;
    /**
     * <code>.tensorflow.VariableSynchronization synchronization = 4;</code>
     */
    public int getSynchronizationValue() {
      return synchronization_;
    }
    /**
     * <code>.tensorflow.VariableSynchronization synchronization = 4;</code>
     */
    public Builder setSynchronizationValue(int value) {
      synchronization_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>.tensorflow.VariableSynchronization synchronization = 4;</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;
    }
    /**
     * <code>.tensorflow.VariableSynchronization synchronization = 4;</code>
     */
    public Builder setSynchronization(org.tensorflow.proto.framework.VariableSynchronization value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      synchronization_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.tensorflow.VariableSynchronization synchronization = 4;</code>
     */
    public Builder clearSynchronization() {
      
      synchronization_ = 0;
      onChanged();
      return this;
    }

    private int aggregation_ = 0;
    /**
     * <code>.tensorflow.VariableAggregation aggregation = 5;</code>
     */
    public int getAggregationValue() {
      return aggregation_;
    }
    /**
     * <code>.tensorflow.VariableAggregation aggregation = 5;</code>
     */
    public Builder setAggregationValue(int value) {
      aggregation_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>.tensorflow.VariableAggregation aggregation = 5;</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;
    }
    /**
     * <code>.tensorflow.VariableAggregation aggregation = 5;</code>
     */
    public Builder setAggregation(org.tensorflow.proto.framework.VariableAggregation value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      aggregation_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.tensorflow.VariableAggregation aggregation = 5;</code>
     */
    public Builder clearAggregation() {
      
      aggregation_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     * <code>string name = 6;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string name = 6;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string name = 6;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string name = 6;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <code>string name = 6;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object device_ = "";
    /**
     * <code>string device = 7;</code>
     */
    public java.lang.String getDevice() {
      java.lang.Object ref = device_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        device_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string device = 7;</code>
     */
    public com.google.protobuf.ByteString
        getDeviceBytes() {
      java.lang.Object ref = device_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        device_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string device = 7;</code>
     */
    public Builder setDevice(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      device_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string device = 7;</code>
     */
    public Builder clearDevice() {
      
      device_ = getDefaultInstance().getDevice();
      onChanged();
      return this;
    }
    /**
     * <code>string device = 7;</code>
     */
    public Builder setDeviceBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      device_ = value;
      onChanged();
      return this;
    }

    private java.util.List<org.tensorflow.proto.framework.SavedVariable> experimentalDistributedVariableComponents_ =
      java.util.Collections.emptyList();
    private void ensureExperimentalDistributedVariableComponentsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        experimentalDistributedVariableComponents_ = new java.util.ArrayList<org.tensorflow.proto.framework.SavedVariable>(experimentalDistributedVariableComponents_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder> experimentalDistributedVariableComponentsBuilder_;

    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.SavedVariable> getExperimentalDistributedVariableComponentsList() {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(experimentalDistributedVariableComponents_);
      } else {
        return experimentalDistributedVariableComponentsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public int getExperimentalDistributedVariableComponentsCount() {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        return experimentalDistributedVariableComponents_.size();
      } else {
        return experimentalDistributedVariableComponentsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedVariable getExperimentalDistributedVariableComponents(int index) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        return experimentalDistributedVariableComponents_.get(index);
      } else {
        return experimentalDistributedVariableComponentsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder setExperimentalDistributedVariableComponents(
        int index, org.tensorflow.proto.framework.SavedVariable value) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.set(index, value);
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder setExperimentalDistributedVariableComponents(
        int index, org.tensorflow.proto.framework.SavedVariable.Builder builderForValue) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.set(index, builderForValue.build());
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder addExperimentalDistributedVariableComponents(org.tensorflow.proto.framework.SavedVariable value) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.add(value);
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder addExperimentalDistributedVariableComponents(
        int index, org.tensorflow.proto.framework.SavedVariable value) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.add(index, value);
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder addExperimentalDistributedVariableComponents(
        org.tensorflow.proto.framework.SavedVariable.Builder builderForValue) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.add(builderForValue.build());
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder addExperimentalDistributedVariableComponents(
        int index, org.tensorflow.proto.framework.SavedVariable.Builder builderForValue) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.add(index, builderForValue.build());
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder addAllExperimentalDistributedVariableComponents(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.SavedVariable> values) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        ensureExperimentalDistributedVariableComponentsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, experimentalDistributedVariableComponents_);
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder clearExperimentalDistributedVariableComponents() {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        experimentalDistributedVariableComponents_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public Builder removeExperimentalDistributedVariableComponents(int index) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        ensureExperimentalDistributedVariableComponentsIsMutable();
        experimentalDistributedVariableComponents_.remove(index);
        onChanged();
      } else {
        experimentalDistributedVariableComponentsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedVariable.Builder getExperimentalDistributedVariableComponentsBuilder(
        int index) {
      return getExperimentalDistributedVariableComponentsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedVariableOrBuilder getExperimentalDistributedVariableComponentsOrBuilder(
        int index) {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        return experimentalDistributedVariableComponents_.get(index);  } else {
        return experimentalDistributedVariableComponentsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.SavedVariableOrBuilder> 
         getExperimentalDistributedVariableComponentsOrBuilderList() {
      if (experimentalDistributedVariableComponentsBuilder_ != null) {
        return experimentalDistributedVariableComponentsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(experimentalDistributedVariableComponents_);
      }
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedVariable.Builder addExperimentalDistributedVariableComponentsBuilder() {
      return getExperimentalDistributedVariableComponentsFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.SavedVariable.getDefaultInstance());
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedVariable.Builder addExperimentalDistributedVariableComponentsBuilder(
        int index) {
      return getExperimentalDistributedVariableComponentsFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.SavedVariable.getDefaultInstance());
    }
    /**
     * <pre>
     * List of component variables for a distributed variable.
     * When this field is non-empty, the SavedVariable will be assumed
     * to be a distributed variable defined by the components listed here.
     * This is only supported by experimental loaders at the moment.
     * </pre>
     *
     * <code>repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.SavedVariable.Builder> 
         getExperimentalDistributedVariableComponentsBuilderList() {
      return getExperimentalDistributedVariableComponentsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder> 
        getExperimentalDistributedVariableComponentsFieldBuilder() {
      if (experimentalDistributedVariableComponentsBuilder_ == null) {
        experimentalDistributedVariableComponentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder>(
                experimentalDistributedVariableComponents_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        experimentalDistributedVariableComponents_ = null;
      }
      return experimentalDistributedVariableComponentsBuilder_;
    }
    @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.SavedVariable)
  }

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

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

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

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

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

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

}

