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

package org.tensorflow.proto.framework;

/**
 * Protobuf type {@code tensorflow.SavedObject}
 */
public  final class SavedObject extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.SavedObject)
    SavedObjectOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SavedObject.newBuilder() to construct.
  private SavedObject(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SavedObject() {
    children_ = java.util.Collections.emptyList();
    slotVariables_ = java.util.Collections.emptyList();
    registeredName_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private SavedObject(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              children_ = new java.util.ArrayList<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference>();
              mutable_bitField0_ |= 0x00000001;
            }
            children_.add(
                input.readMessage(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.parser(), extensionRegistry));
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              slotVariables_ = new java.util.ArrayList<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference>();
              mutable_bitField0_ |= 0x00000002;
            }
            slotVariables_.add(
                input.readMessage(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.parser(), extensionRegistry));
            break;
          }
          case 34: {
            org.tensorflow.proto.framework.SavedUserObject.Builder subBuilder = null;
            if (kindCase_ == 4) {
              subBuilder = ((org.tensorflow.proto.framework.SavedUserObject) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedUserObject.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedUserObject) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 4;
            break;
          }
          case 42: {
            org.tensorflow.proto.framework.SavedAsset.Builder subBuilder = null;
            if (kindCase_ == 5) {
              subBuilder = ((org.tensorflow.proto.framework.SavedAsset) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedAsset.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedAsset) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 5;
            break;
          }
          case 50: {
            org.tensorflow.proto.framework.SavedFunction.Builder subBuilder = null;
            if (kindCase_ == 6) {
              subBuilder = ((org.tensorflow.proto.framework.SavedFunction) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedFunction.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedFunction) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 6;
            break;
          }
          case 58: {
            org.tensorflow.proto.framework.SavedVariable.Builder subBuilder = null;
            if (kindCase_ == 7) {
              subBuilder = ((org.tensorflow.proto.framework.SavedVariable) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedVariable.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedVariable) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 7;
            break;
          }
          case 66: {
            org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder subBuilder = null;
            if (kindCase_ == 8) {
              subBuilder = ((org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedBareConcreteFunction.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 8;
            break;
          }
          case 74: {
            org.tensorflow.proto.framework.SavedConstant.Builder subBuilder = null;
            if (kindCase_ == 9) {
              subBuilder = ((org.tensorflow.proto.framework.SavedConstant) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedConstant.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedConstant) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 9;
            break;
          }
          case 82: {
            org.tensorflow.proto.framework.SavedResource.Builder subBuilder = null;
            if (kindCase_ == 10) {
              subBuilder = ((org.tensorflow.proto.framework.SavedResource) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.SavedResource.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedResource) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 10;
            break;
          }
          case 90: {
            if (!((mutable_bitField0_ & 0x00000004) != 0)) {
              saveableObjects_ = com.google.protobuf.MapField.newMapField(
                  SaveableObjectsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000004;
            }
            com.google.protobuf.MapEntry<java.lang.String, org.tensorflow.proto.framework.SaveableObject>
            saveableObjects__ = input.readMessage(
                SaveableObjectsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            saveableObjects_.getMutableMap().put(
                saveableObjects__.getKey(), saveableObjects__.getValue());
            break;
          }
          case 98: {
            org.tensorflow.proto.framework.CapturedTensor.Builder subBuilder = null;
            if (kindCase_ == 12) {
              subBuilder = ((org.tensorflow.proto.framework.CapturedTensor) kind_).toBuilder();
            }
            kind_ =
                input.readMessage(org.tensorflow.proto.framework.CapturedTensor.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.CapturedTensor) kind_);
              kind_ = subBuilder.buildPartial();
            }
            kindCase_ = 12;
            break;
          }
          case 106: {
            java.lang.String s = input.readStringRequireUtf8();

            registeredName_ = s;
            break;
          }
          case 114: {
            com.google.protobuf.Any.Builder subBuilder = null;
            if (serializedUserProto_ != null) {
              subBuilder = serializedUserProto_.toBuilder();
            }
            serializedUserProto_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(serializedUserProto_);
              serializedUserProto_ = subBuilder.buildPartial();
            }

            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)) {
        children_ = java.util.Collections.unmodifiableList(children_);
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        slotVariables_ = java.util.Collections.unmodifiableList(slotVariables_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 11:
        return internalGetSaveableObjects();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.framework.SavedObject.class, org.tensorflow.proto.framework.SavedObject.Builder.class);
  }

  private int kindCase_ = 0;
  private java.lang.Object kind_;
  public enum KindCase
      implements com.google.protobuf.Internal.EnumLite {
    USER_OBJECT(4),
    ASSET(5),
    FUNCTION(6),
    VARIABLE(7),
    BARE_CONCRETE_FUNCTION(8),
    CONSTANT(9),
    RESOURCE(10),
    CAPTURED_TENSOR(12),
    KIND_NOT_SET(0);
    private final int value;
    private KindCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static KindCase valueOf(int value) {
      return forNumber(value);
    }

    public static KindCase forNumber(int value) {
      switch (value) {
        case 4: return USER_OBJECT;
        case 5: return ASSET;
        case 6: return FUNCTION;
        case 7: return VARIABLE;
        case 8: return BARE_CONCRETE_FUNCTION;
        case 9: return CONSTANT;
        case 10: return RESOURCE;
        case 12: return CAPTURED_TENSOR;
        case 0: return KIND_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public KindCase
  getKindCase() {
    return KindCase.forNumber(
        kindCase_);
  }

  public static final int CHILDREN_FIELD_NUMBER = 1;
  private java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference> children_;
  /**
   * <pre>
   * Objects which this object depends on: named edges in the dependency
   * graph.
   * Note: currently only valid if kind == "user_object" or "resource".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference> getChildrenList() {
    return children_;
  }
  /**
   * <pre>
   * Objects which this object depends on: named edges in the dependency
   * graph.
   * Note: currently only valid if kind == "user_object" or "resource".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
      getChildrenOrBuilderList() {
    return children_;
  }
  /**
   * <pre>
   * Objects which this object depends on: named edges in the dependency
   * graph.
   * Note: currently only valid if kind == "user_object" or "resource".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
   */
  public int getChildrenCount() {
    return children_.size();
  }
  /**
   * <pre>
   * Objects which this object depends on: named edges in the dependency
   * graph.
   * Note: currently only valid if kind == "user_object" or "resource".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
   */
  public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference getChildren(int index) {
    return children_.get(index);
  }
  /**
   * <pre>
   * Objects which this object depends on: named edges in the dependency
   * graph.
   * Note: currently only valid if kind == "user_object" or "resource".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
   */
  public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder getChildrenOrBuilder(
      int index) {
    return children_.get(index);
  }

  public static final int SLOT_VARIABLES_FIELD_NUMBER = 3;
  private java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference> slotVariables_;
  /**
   * <pre>
   * Slot variables owned by this object. This describes the three-way
   * (optimizer, variable, slot variable) relationship; none of the three
   * depend on the others directly.
   * Note: currently only valid if kind == "user_object".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference> getSlotVariablesList() {
    return slotVariables_;
  }
  /**
   * <pre>
   * Slot variables owned by this object. This describes the three-way
   * (optimizer, variable, slot variable) relationship; none of the three
   * depend on the others directly.
   * Note: currently only valid if kind == "user_object".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> 
      getSlotVariablesOrBuilderList() {
    return slotVariables_;
  }
  /**
   * <pre>
   * Slot variables owned by this object. This describes the three-way
   * (optimizer, variable, slot variable) relationship; none of the three
   * depend on the others directly.
   * Note: currently only valid if kind == "user_object".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
   */
  public int getSlotVariablesCount() {
    return slotVariables_.size();
  }
  /**
   * <pre>
   * Slot variables owned by this object. This describes the three-way
   * (optimizer, variable, slot variable) relationship; none of the three
   * depend on the others directly.
   * Note: currently only valid if kind == "user_object".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
   */
  public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference getSlotVariables(int index) {
    return slotVariables_.get(index);
  }
  /**
   * <pre>
   * Slot variables owned by this object. This describes the three-way
   * (optimizer, variable, slot variable) relationship; none of the three
   * depend on the others directly.
   * Note: currently only valid if kind == "user_object".
   * </pre>
   *
   * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
   */
  public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder getSlotVariablesOrBuilder(
      int index) {
    return slotVariables_.get(index);
  }

  public static final int USER_OBJECT_FIELD_NUMBER = 4;
  /**
   * <code>.tensorflow.SavedUserObject user_object = 4;</code>
   */
  public boolean hasUserObject() {
    return kindCase_ == 4;
  }
  /**
   * <code>.tensorflow.SavedUserObject user_object = 4;</code>
   */
  public org.tensorflow.proto.framework.SavedUserObject getUserObject() {
    if (kindCase_ == 4) {
       return (org.tensorflow.proto.framework.SavedUserObject) kind_;
    }
    return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedUserObject user_object = 4;</code>
   */
  public org.tensorflow.proto.framework.SavedUserObjectOrBuilder getUserObjectOrBuilder() {
    if (kindCase_ == 4) {
       return (org.tensorflow.proto.framework.SavedUserObject) kind_;
    }
    return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance();
  }

  public static final int ASSET_FIELD_NUMBER = 5;
  /**
   * <code>.tensorflow.SavedAsset asset = 5;</code>
   */
  public boolean hasAsset() {
    return kindCase_ == 5;
  }
  /**
   * <code>.tensorflow.SavedAsset asset = 5;</code>
   */
  public org.tensorflow.proto.framework.SavedAsset getAsset() {
    if (kindCase_ == 5) {
       return (org.tensorflow.proto.framework.SavedAsset) kind_;
    }
    return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedAsset asset = 5;</code>
   */
  public org.tensorflow.proto.framework.SavedAssetOrBuilder getAssetOrBuilder() {
    if (kindCase_ == 5) {
       return (org.tensorflow.proto.framework.SavedAsset) kind_;
    }
    return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance();
  }

  public static final int FUNCTION_FIELD_NUMBER = 6;
  /**
   * <code>.tensorflow.SavedFunction function = 6;</code>
   */
  public boolean hasFunction() {
    return kindCase_ == 6;
  }
  /**
   * <code>.tensorflow.SavedFunction function = 6;</code>
   */
  public org.tensorflow.proto.framework.SavedFunction getFunction() {
    if (kindCase_ == 6) {
       return (org.tensorflow.proto.framework.SavedFunction) kind_;
    }
    return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedFunction function = 6;</code>
   */
  public org.tensorflow.proto.framework.SavedFunctionOrBuilder getFunctionOrBuilder() {
    if (kindCase_ == 6) {
       return (org.tensorflow.proto.framework.SavedFunction) kind_;
    }
    return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance();
  }

  public static final int VARIABLE_FIELD_NUMBER = 7;
  /**
   * <code>.tensorflow.SavedVariable variable = 7;</code>
   */
  public boolean hasVariable() {
    return kindCase_ == 7;
  }
  /**
   * <code>.tensorflow.SavedVariable variable = 7;</code>
   */
  public org.tensorflow.proto.framework.SavedVariable getVariable() {
    if (kindCase_ == 7) {
       return (org.tensorflow.proto.framework.SavedVariable) kind_;
    }
    return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedVariable variable = 7;</code>
   */
  public org.tensorflow.proto.framework.SavedVariableOrBuilder getVariableOrBuilder() {
    if (kindCase_ == 7) {
       return (org.tensorflow.proto.framework.SavedVariable) kind_;
    }
    return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance();
  }

  public static final int BARE_CONCRETE_FUNCTION_FIELD_NUMBER = 8;
  /**
   * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
   */
  public boolean hasBareConcreteFunction() {
    return kindCase_ == 8;
  }
  /**
   * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
   */
  public org.tensorflow.proto.framework.SavedBareConcreteFunction getBareConcreteFunction() {
    if (kindCase_ == 8) {
       return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_;
    }
    return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
   */
  public org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder getBareConcreteFunctionOrBuilder() {
    if (kindCase_ == 8) {
       return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_;
    }
    return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance();
  }

  public static final int CONSTANT_FIELD_NUMBER = 9;
  /**
   * <code>.tensorflow.SavedConstant constant = 9;</code>
   */
  public boolean hasConstant() {
    return kindCase_ == 9;
  }
  /**
   * <code>.tensorflow.SavedConstant constant = 9;</code>
   */
  public org.tensorflow.proto.framework.SavedConstant getConstant() {
    if (kindCase_ == 9) {
       return (org.tensorflow.proto.framework.SavedConstant) kind_;
    }
    return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedConstant constant = 9;</code>
   */
  public org.tensorflow.proto.framework.SavedConstantOrBuilder getConstantOrBuilder() {
    if (kindCase_ == 9) {
       return (org.tensorflow.proto.framework.SavedConstant) kind_;
    }
    return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance();
  }

  public static final int RESOURCE_FIELD_NUMBER = 10;
  /**
   * <code>.tensorflow.SavedResource resource = 10;</code>
   */
  public boolean hasResource() {
    return kindCase_ == 10;
  }
  /**
   * <code>.tensorflow.SavedResource resource = 10;</code>
   */
  public org.tensorflow.proto.framework.SavedResource getResource() {
    if (kindCase_ == 10) {
       return (org.tensorflow.proto.framework.SavedResource) kind_;
    }
    return org.tensorflow.proto.framework.SavedResource.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.SavedResource resource = 10;</code>
   */
  public org.tensorflow.proto.framework.SavedResourceOrBuilder getResourceOrBuilder() {
    if (kindCase_ == 10) {
       return (org.tensorflow.proto.framework.SavedResource) kind_;
    }
    return org.tensorflow.proto.framework.SavedResource.getDefaultInstance();
  }

  public static final int CAPTURED_TENSOR_FIELD_NUMBER = 12;
  /**
   * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
   */
  public boolean hasCapturedTensor() {
    return kindCase_ == 12;
  }
  /**
   * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
   */
  public org.tensorflow.proto.framework.CapturedTensor getCapturedTensor() {
    if (kindCase_ == 12) {
       return (org.tensorflow.proto.framework.CapturedTensor) kind_;
    }
    return org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
   */
  public org.tensorflow.proto.framework.CapturedTensorOrBuilder getCapturedTensorOrBuilder() {
    if (kindCase_ == 12) {
       return (org.tensorflow.proto.framework.CapturedTensor) kind_;
    }
    return org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance();
  }

  public static final int SAVEABLE_OBJECTS_FIELD_NUMBER = 11;
  private static final class SaveableObjectsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, org.tensorflow.proto.framework.SaveableObject> defaultEntry =
            com.google.protobuf.MapEntry
            .<java.lang.String, org.tensorflow.proto.framework.SaveableObject>newDefaultInstance(
                org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_SaveableObjectsEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.MESSAGE,
                org.tensorflow.proto.framework.SaveableObject.getDefaultInstance());
  }
  private com.google.protobuf.MapField<
      java.lang.String, org.tensorflow.proto.framework.SaveableObject> saveableObjects_;
  private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.SaveableObject>
  internalGetSaveableObjects() {
    if (saveableObjects_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          SaveableObjectsDefaultEntryHolder.defaultEntry);
    }
    return saveableObjects_;
  }

  public int getSaveableObjectsCount() {
    return internalGetSaveableObjects().getMap().size();
  }
  /**
   * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
   */

  public boolean containsSaveableObjects(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetSaveableObjects().getMap().containsKey(key);
  }
  /**
   * Use {@link #getSaveableObjectsMap()} instead.
   */
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> getSaveableObjects() {
    return getSaveableObjectsMap();
  }
  /**
   * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
   */

  public java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> getSaveableObjectsMap() {
    return internalGetSaveableObjects().getMap();
  }
  /**
   * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
   */

  public org.tensorflow.proto.framework.SaveableObject getSaveableObjectsOrDefault(
      java.lang.String key,
      org.tensorflow.proto.framework.SaveableObject defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> map =
        internalGetSaveableObjects().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
   */

  public org.tensorflow.proto.framework.SaveableObject getSaveableObjectsOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> map =
        internalGetSaveableObjects().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int REGISTERED_NAME_FIELD_NUMBER = 13;
  private volatile java.lang.Object registeredName_;
  /**
   * <pre>
   * The fields below are filled when the user serializes a registered Trackable
   * class. Registered classes may save additional metadata and supersede the
   * default loading process where nodes are recreated from the proto.
   * The name of the registered class of the form "{package}.{class_name}".
   * This field is used to search for the registered class at loading time.
   * </pre>
   *
   * <code>string registered_name = 13;</code>
   */
  public java.lang.String getRegisteredName() {
    java.lang.Object ref = registeredName_;
    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();
      registeredName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The fields below are filled when the user serializes a registered Trackable
   * class. Registered classes may save additional metadata and supersede the
   * default loading process where nodes are recreated from the proto.
   * The name of the registered class of the form "{package}.{class_name}".
   * This field is used to search for the registered class at loading time.
   * </pre>
   *
   * <code>string registered_name = 13;</code>
   */
  public com.google.protobuf.ByteString
      getRegisteredNameBytes() {
    java.lang.Object ref = registeredName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      registeredName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SERIALIZED_USER_PROTO_FIELD_NUMBER = 14;
  private com.google.protobuf.Any serializedUserProto_;
  /**
   * <pre>
   * The user-generated proto storing metadata for this object, to be passed to
   * the registered classes's _deserialize_from_proto method when this object is
   * loaded from the SavedModel.
   * </pre>
   *
   * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
   */
  public boolean hasSerializedUserProto() {
    return serializedUserProto_ != null;
  }
  /**
   * <pre>
   * The user-generated proto storing metadata for this object, to be passed to
   * the registered classes's _deserialize_from_proto method when this object is
   * loaded from the SavedModel.
   * </pre>
   *
   * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
   */
  public com.google.protobuf.Any getSerializedUserProto() {
    return serializedUserProto_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedUserProto_;
  }
  /**
   * <pre>
   * The user-generated proto storing metadata for this object, to be passed to
   * the registered classes's _deserialize_from_proto method when this object is
   * loaded from the SavedModel.
   * </pre>
   *
   * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
   */
  public com.google.protobuf.AnyOrBuilder getSerializedUserProtoOrBuilder() {
    return getSerializedUserProto();
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    for (int i = 0; i < children_.size(); i++) {
      output.writeMessage(1, children_.get(i));
    }
    for (int i = 0; i < slotVariables_.size(); i++) {
      output.writeMessage(3, slotVariables_.get(i));
    }
    if (kindCase_ == 4) {
      output.writeMessage(4, (org.tensorflow.proto.framework.SavedUserObject) kind_);
    }
    if (kindCase_ == 5) {
      output.writeMessage(5, (org.tensorflow.proto.framework.SavedAsset) kind_);
    }
    if (kindCase_ == 6) {
      output.writeMessage(6, (org.tensorflow.proto.framework.SavedFunction) kind_);
    }
    if (kindCase_ == 7) {
      output.writeMessage(7, (org.tensorflow.proto.framework.SavedVariable) kind_);
    }
    if (kindCase_ == 8) {
      output.writeMessage(8, (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_);
    }
    if (kindCase_ == 9) {
      output.writeMessage(9, (org.tensorflow.proto.framework.SavedConstant) kind_);
    }
    if (kindCase_ == 10) {
      output.writeMessage(10, (org.tensorflow.proto.framework.SavedResource) kind_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetSaveableObjects(),
        SaveableObjectsDefaultEntryHolder.defaultEntry,
        11);
    if (kindCase_ == 12) {
      output.writeMessage(12, (org.tensorflow.proto.framework.CapturedTensor) kind_);
    }
    if (!getRegisteredNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, registeredName_);
    }
    if (serializedUserProto_ != null) {
      output.writeMessage(14, getSerializedUserProto());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < children_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, children_.get(i));
    }
    for (int i = 0; i < slotVariables_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, slotVariables_.get(i));
    }
    if (kindCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (org.tensorflow.proto.framework.SavedUserObject) kind_);
    }
    if (kindCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, (org.tensorflow.proto.framework.SavedAsset) kind_);
    }
    if (kindCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, (org.tensorflow.proto.framework.SavedFunction) kind_);
    }
    if (kindCase_ == 7) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, (org.tensorflow.proto.framework.SavedVariable) kind_);
    }
    if (kindCase_ == 8) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_);
    }
    if (kindCase_ == 9) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, (org.tensorflow.proto.framework.SavedConstant) kind_);
    }
    if (kindCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, (org.tensorflow.proto.framework.SavedResource) kind_);
    }
    for (java.util.Map.Entry<java.lang.String, org.tensorflow.proto.framework.SaveableObject> entry
         : internalGetSaveableObjects().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, org.tensorflow.proto.framework.SaveableObject>
      saveableObjects__ = SaveableObjectsDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(11, saveableObjects__);
    }
    if (kindCase_ == 12) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(12, (org.tensorflow.proto.framework.CapturedTensor) kind_);
    }
    if (!getRegisteredNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, registeredName_);
    }
    if (serializedUserProto_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(14, getSerializedUserProto());
    }
    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.SavedObject)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.SavedObject other = (org.tensorflow.proto.framework.SavedObject) obj;

    if (!getChildrenList()
        .equals(other.getChildrenList())) return false;
    if (!getSlotVariablesList()
        .equals(other.getSlotVariablesList())) return false;
    if (!internalGetSaveableObjects().equals(
        other.internalGetSaveableObjects())) return false;
    if (!getRegisteredName()
        .equals(other.getRegisteredName())) return false;
    if (hasSerializedUserProto() != other.hasSerializedUserProto()) return false;
    if (hasSerializedUserProto()) {
      if (!getSerializedUserProto()
          .equals(other.getSerializedUserProto())) return false;
    }
    if (!getKindCase().equals(other.getKindCase())) return false;
    switch (kindCase_) {
      case 4:
        if (!getUserObject()
            .equals(other.getUserObject())) return false;
        break;
      case 5:
        if (!getAsset()
            .equals(other.getAsset())) return false;
        break;
      case 6:
        if (!getFunction()
            .equals(other.getFunction())) return false;
        break;
      case 7:
        if (!getVariable()
            .equals(other.getVariable())) return false;
        break;
      case 8:
        if (!getBareConcreteFunction()
            .equals(other.getBareConcreteFunction())) return false;
        break;
      case 9:
        if (!getConstant()
            .equals(other.getConstant())) return false;
        break;
      case 10:
        if (!getResource()
            .equals(other.getResource())) return false;
        break;
      case 12:
        if (!getCapturedTensor()
            .equals(other.getCapturedTensor())) return false;
        break;
      case 0:
      default:
    }
    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();
    if (getChildrenCount() > 0) {
      hash = (37 * hash) + CHILDREN_FIELD_NUMBER;
      hash = (53 * hash) + getChildrenList().hashCode();
    }
    if (getSlotVariablesCount() > 0) {
      hash = (37 * hash) + SLOT_VARIABLES_FIELD_NUMBER;
      hash = (53 * hash) + getSlotVariablesList().hashCode();
    }
    if (!internalGetSaveableObjects().getMap().isEmpty()) {
      hash = (37 * hash) + SAVEABLE_OBJECTS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetSaveableObjects().hashCode();
    }
    hash = (37 * hash) + REGISTERED_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getRegisteredName().hashCode();
    if (hasSerializedUserProto()) {
      hash = (37 * hash) + SERIALIZED_USER_PROTO_FIELD_NUMBER;
      hash = (53 * hash) + getSerializedUserProto().hashCode();
    }
    switch (kindCase_) {
      case 4:
        hash = (37 * hash) + USER_OBJECT_FIELD_NUMBER;
        hash = (53 * hash) + getUserObject().hashCode();
        break;
      case 5:
        hash = (37 * hash) + ASSET_FIELD_NUMBER;
        hash = (53 * hash) + getAsset().hashCode();
        break;
      case 6:
        hash = (37 * hash) + FUNCTION_FIELD_NUMBER;
        hash = (53 * hash) + getFunction().hashCode();
        break;
      case 7:
        hash = (37 * hash) + VARIABLE_FIELD_NUMBER;
        hash = (53 * hash) + getVariable().hashCode();
        break;
      case 8:
        hash = (37 * hash) + BARE_CONCRETE_FUNCTION_FIELD_NUMBER;
        hash = (53 * hash) + getBareConcreteFunction().hashCode();
        break;
      case 9:
        hash = (37 * hash) + CONSTANT_FIELD_NUMBER;
        hash = (53 * hash) + getConstant().hashCode();
        break;
      case 10:
        hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
        hash = (53 * hash) + getResource().hashCode();
        break;
      case 12:
        hash = (37 * hash) + CAPTURED_TENSOR_FIELD_NUMBER;
        hash = (53 * hash) + getCapturedTensor().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.framework.SavedObject parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SavedObject 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.SavedObject parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SavedObject 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.SavedObject parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SavedObject parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.framework.SavedObject parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SavedObject 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.SavedObject parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SavedObject 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.SavedObject parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SavedObject 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.SavedObject 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;
  }
  /**
   * Protobuf type {@code tensorflow.SavedObject}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.SavedObject)
      org.tensorflow.proto.framework.SavedObjectOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 11:
          return internalGetSaveableObjects();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 11:
          return internalGetMutableSaveableObjects();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.framework.SavedObject.class, org.tensorflow.proto.framework.SavedObject.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getChildrenFieldBuilder();
        getSlotVariablesFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (childrenBuilder_ == null) {
        children_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        childrenBuilder_.clear();
      }
      if (slotVariablesBuilder_ == null) {
        slotVariables_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        slotVariablesBuilder_.clear();
      }
      internalGetMutableSaveableObjects().clear();
      registeredName_ = "";

      if (serializedUserProtoBuilder_ == null) {
        serializedUserProto_ = null;
      } else {
        serializedUserProto_ = null;
        serializedUserProtoBuilder_ = null;
      }
      kindCase_ = 0;
      kind_ = null;
      return this;
    }

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

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.SavedObject buildPartial() {
      org.tensorflow.proto.framework.SavedObject result = new org.tensorflow.proto.framework.SavedObject(this);
      int from_bitField0_ = bitField0_;
      if (childrenBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          children_ = java.util.Collections.unmodifiableList(children_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.children_ = children_;
      } else {
        result.children_ = childrenBuilder_.build();
      }
      if (slotVariablesBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          slotVariables_ = java.util.Collections.unmodifiableList(slotVariables_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.slotVariables_ = slotVariables_;
      } else {
        result.slotVariables_ = slotVariablesBuilder_.build();
      }
      if (kindCase_ == 4) {
        if (userObjectBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = userObjectBuilder_.build();
        }
      }
      if (kindCase_ == 5) {
        if (assetBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = assetBuilder_.build();
        }
      }
      if (kindCase_ == 6) {
        if (functionBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = functionBuilder_.build();
        }
      }
      if (kindCase_ == 7) {
        if (variableBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = variableBuilder_.build();
        }
      }
      if (kindCase_ == 8) {
        if (bareConcreteFunctionBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = bareConcreteFunctionBuilder_.build();
        }
      }
      if (kindCase_ == 9) {
        if (constantBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = constantBuilder_.build();
        }
      }
      if (kindCase_ == 10) {
        if (resourceBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = resourceBuilder_.build();
        }
      }
      if (kindCase_ == 12) {
        if (capturedTensorBuilder_ == null) {
          result.kind_ = kind_;
        } else {
          result.kind_ = capturedTensorBuilder_.build();
        }
      }
      result.saveableObjects_ = internalGetSaveableObjects();
      result.saveableObjects_.makeImmutable();
      result.registeredName_ = registeredName_;
      if (serializedUserProtoBuilder_ == null) {
        result.serializedUserProto_ = serializedUserProto_;
      } else {
        result.serializedUserProto_ = serializedUserProtoBuilder_.build();
      }
      result.kindCase_ = kindCase_;
      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.SavedObject) {
        return mergeFrom((org.tensorflow.proto.framework.SavedObject)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.framework.SavedObject other) {
      if (other == org.tensorflow.proto.framework.SavedObject.getDefaultInstance()) return this;
      if (childrenBuilder_ == null) {
        if (!other.children_.isEmpty()) {
          if (children_.isEmpty()) {
            children_ = other.children_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureChildrenIsMutable();
            children_.addAll(other.children_);
          }
          onChanged();
        }
      } else {
        if (!other.children_.isEmpty()) {
          if (childrenBuilder_.isEmpty()) {
            childrenBuilder_.dispose();
            childrenBuilder_ = null;
            children_ = other.children_;
            bitField0_ = (bitField0_ & ~0x00000001);
            childrenBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getChildrenFieldBuilder() : null;
          } else {
            childrenBuilder_.addAllMessages(other.children_);
          }
        }
      }
      if (slotVariablesBuilder_ == null) {
        if (!other.slotVariables_.isEmpty()) {
          if (slotVariables_.isEmpty()) {
            slotVariables_ = other.slotVariables_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureSlotVariablesIsMutable();
            slotVariables_.addAll(other.slotVariables_);
          }
          onChanged();
        }
      } else {
        if (!other.slotVariables_.isEmpty()) {
          if (slotVariablesBuilder_.isEmpty()) {
            slotVariablesBuilder_.dispose();
            slotVariablesBuilder_ = null;
            slotVariables_ = other.slotVariables_;
            bitField0_ = (bitField0_ & ~0x00000002);
            slotVariablesBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getSlotVariablesFieldBuilder() : null;
          } else {
            slotVariablesBuilder_.addAllMessages(other.slotVariables_);
          }
        }
      }
      internalGetMutableSaveableObjects().mergeFrom(
          other.internalGetSaveableObjects());
      if (!other.getRegisteredName().isEmpty()) {
        registeredName_ = other.registeredName_;
        onChanged();
      }
      if (other.hasSerializedUserProto()) {
        mergeSerializedUserProto(other.getSerializedUserProto());
      }
      switch (other.getKindCase()) {
        case USER_OBJECT: {
          mergeUserObject(other.getUserObject());
          break;
        }
        case ASSET: {
          mergeAsset(other.getAsset());
          break;
        }
        case FUNCTION: {
          mergeFunction(other.getFunction());
          break;
        }
        case VARIABLE: {
          mergeVariable(other.getVariable());
          break;
        }
        case BARE_CONCRETE_FUNCTION: {
          mergeBareConcreteFunction(other.getBareConcreteFunction());
          break;
        }
        case CONSTANT: {
          mergeConstant(other.getConstant());
          break;
        }
        case RESOURCE: {
          mergeResource(other.getResource());
          break;
        }
        case CAPTURED_TENSOR: {
          mergeCapturedTensor(other.getCapturedTensor());
          break;
        }
        case KIND_NOT_SET: {
          break;
        }
      }
      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.SavedObject parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.SavedObject) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int kindCase_ = 0;
    private java.lang.Object kind_;
    public KindCase
        getKindCase() {
      return KindCase.forNumber(
          kindCase_);
    }

    public Builder clearKind() {
      kindCase_ = 0;
      kind_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference> children_ =
      java.util.Collections.emptyList();
    private void ensureChildrenIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        children_ = new java.util.ArrayList<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference>(children_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> childrenBuilder_;

    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference> getChildrenList() {
      if (childrenBuilder_ == null) {
        return java.util.Collections.unmodifiableList(children_);
      } else {
        return childrenBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public int getChildrenCount() {
      if (childrenBuilder_ == null) {
        return children_.size();
      } else {
        return childrenBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference getChildren(int index) {
      if (childrenBuilder_ == null) {
        return children_.get(index);
      } else {
        return childrenBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder setChildren(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference value) {
      if (childrenBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureChildrenIsMutable();
        children_.set(index, value);
        onChanged();
      } else {
        childrenBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder setChildren(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder builderForValue) {
      if (childrenBuilder_ == null) {
        ensureChildrenIsMutable();
        children_.set(index, builderForValue.build());
        onChanged();
      } else {
        childrenBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder addChildren(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference value) {
      if (childrenBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureChildrenIsMutable();
        children_.add(value);
        onChanged();
      } else {
        childrenBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder addChildren(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference value) {
      if (childrenBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureChildrenIsMutable();
        children_.add(index, value);
        onChanged();
      } else {
        childrenBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder addChildren(
        org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder builderForValue) {
      if (childrenBuilder_ == null) {
        ensureChildrenIsMutable();
        children_.add(builderForValue.build());
        onChanged();
      } else {
        childrenBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder addChildren(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder builderForValue) {
      if (childrenBuilder_ == null) {
        ensureChildrenIsMutable();
        children_.add(index, builderForValue.build());
        onChanged();
      } else {
        childrenBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder addAllChildren(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference> values) {
      if (childrenBuilder_ == null) {
        ensureChildrenIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, children_);
        onChanged();
      } else {
        childrenBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder clearChildren() {
      if (childrenBuilder_ == null) {
        children_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        childrenBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public Builder removeChildren(int index) {
      if (childrenBuilder_ == null) {
        ensureChildrenIsMutable();
        children_.remove(index);
        onChanged();
      } else {
        childrenBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder getChildrenBuilder(
        int index) {
      return getChildrenFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder getChildrenOrBuilder(
        int index) {
      if (childrenBuilder_ == null) {
        return children_.get(index);  } else {
        return childrenBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
         getChildrenOrBuilderList() {
      if (childrenBuilder_ != null) {
        return childrenBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(children_);
      }
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder() {
      return getChildrenFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder(
        int index) {
      return getChildrenFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
    }
    /**
     * <pre>
     * Objects which this object depends on: named edges in the dependency
     * graph.
     * Note: currently only valid if kind == "user_object" or "resource".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder> 
         getChildrenBuilderList() {
      return getChildrenFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
        getChildrenFieldBuilder() {
      if (childrenBuilder_ == null) {
        childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>(
                children_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        children_ = null;
      }
      return childrenBuilder_;
    }

    private java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference> slotVariables_ =
      java.util.Collections.emptyList();
    private void ensureSlotVariablesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        slotVariables_ = new java.util.ArrayList<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference>(slotVariables_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> slotVariablesBuilder_;

    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference> getSlotVariablesList() {
      if (slotVariablesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(slotVariables_);
      } else {
        return slotVariablesBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public int getSlotVariablesCount() {
      if (slotVariablesBuilder_ == null) {
        return slotVariables_.size();
      } else {
        return slotVariablesBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference getSlotVariables(int index) {
      if (slotVariablesBuilder_ == null) {
        return slotVariables_.get(index);
      } else {
        return slotVariablesBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder setSlotVariables(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference value) {
      if (slotVariablesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSlotVariablesIsMutable();
        slotVariables_.set(index, value);
        onChanged();
      } else {
        slotVariablesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder setSlotVariables(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder builderForValue) {
      if (slotVariablesBuilder_ == null) {
        ensureSlotVariablesIsMutable();
        slotVariables_.set(index, builderForValue.build());
        onChanged();
      } else {
        slotVariablesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder addSlotVariables(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference value) {
      if (slotVariablesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSlotVariablesIsMutable();
        slotVariables_.add(value);
        onChanged();
      } else {
        slotVariablesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder addSlotVariables(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference value) {
      if (slotVariablesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSlotVariablesIsMutable();
        slotVariables_.add(index, value);
        onChanged();
      } else {
        slotVariablesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder addSlotVariables(
        org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder builderForValue) {
      if (slotVariablesBuilder_ == null) {
        ensureSlotVariablesIsMutable();
        slotVariables_.add(builderForValue.build());
        onChanged();
      } else {
        slotVariablesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder addSlotVariables(
        int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder builderForValue) {
      if (slotVariablesBuilder_ == null) {
        ensureSlotVariablesIsMutable();
        slotVariables_.add(index, builderForValue.build());
        onChanged();
      } else {
        slotVariablesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder addAllSlotVariables(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference> values) {
      if (slotVariablesBuilder_ == null) {
        ensureSlotVariablesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, slotVariables_);
        onChanged();
      } else {
        slotVariablesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder clearSlotVariables() {
      if (slotVariablesBuilder_ == null) {
        slotVariables_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        slotVariablesBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public Builder removeSlotVariables(int index) {
      if (slotVariablesBuilder_ == null) {
        ensureSlotVariablesIsMutable();
        slotVariables_.remove(index);
        onChanged();
      } else {
        slotVariablesBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder getSlotVariablesBuilder(
        int index) {
      return getSlotVariablesFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder getSlotVariablesOrBuilder(
        int index) {
      if (slotVariablesBuilder_ == null) {
        return slotVariables_.get(index);  } else {
        return slotVariablesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> 
         getSlotVariablesOrBuilderList() {
      if (slotVariablesBuilder_ != null) {
        return slotVariablesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(slotVariables_);
      }
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder() {
      return getSlotVariablesFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance());
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder(
        int index) {
      return getSlotVariablesFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance());
    }
    /**
     * <pre>
     * Slot variables owned by this object. This describes the three-way
     * (optimizer, variable, slot variable) relationship; none of the three
     * depend on the others directly.
     * Note: currently only valid if kind == "user_object".
     * </pre>
     *
     * <code>repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder> 
         getSlotVariablesBuilderList() {
      return getSlotVariablesFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> 
        getSlotVariablesFieldBuilder() {
      if (slotVariablesBuilder_ == null) {
        slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder>(
                slotVariables_,
                ((bitField0_ & 0x00000002) != 0),
                getParentForChildren(),
                isClean());
        slotVariables_ = null;
      }
      return slotVariablesBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedUserObject, org.tensorflow.proto.framework.SavedUserObject.Builder, org.tensorflow.proto.framework.SavedUserObjectOrBuilder> userObjectBuilder_;
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public boolean hasUserObject() {
      return kindCase_ == 4;
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public org.tensorflow.proto.framework.SavedUserObject getUserObject() {
      if (userObjectBuilder_ == null) {
        if (kindCase_ == 4) {
          return (org.tensorflow.proto.framework.SavedUserObject) kind_;
        }
        return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance();
      } else {
        if (kindCase_ == 4) {
          return userObjectBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public Builder setUserObject(org.tensorflow.proto.framework.SavedUserObject value) {
      if (userObjectBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        userObjectBuilder_.setMessage(value);
      }
      kindCase_ = 4;
      return this;
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public Builder setUserObject(
        org.tensorflow.proto.framework.SavedUserObject.Builder builderForValue) {
      if (userObjectBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        userObjectBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 4;
      return this;
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public Builder mergeUserObject(org.tensorflow.proto.framework.SavedUserObject value) {
      if (userObjectBuilder_ == null) {
        if (kindCase_ == 4 &&
            kind_ != org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedUserObject.newBuilder((org.tensorflow.proto.framework.SavedUserObject) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 4) {
          userObjectBuilder_.mergeFrom(value);
        }
        userObjectBuilder_.setMessage(value);
      }
      kindCase_ = 4;
      return this;
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public Builder clearUserObject() {
      if (userObjectBuilder_ == null) {
        if (kindCase_ == 4) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 4) {
          kindCase_ = 0;
          kind_ = null;
        }
        userObjectBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public org.tensorflow.proto.framework.SavedUserObject.Builder getUserObjectBuilder() {
      return getUserObjectFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    public org.tensorflow.proto.framework.SavedUserObjectOrBuilder getUserObjectOrBuilder() {
      if ((kindCase_ == 4) && (userObjectBuilder_ != null)) {
        return userObjectBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 4) {
          return (org.tensorflow.proto.framework.SavedUserObject) kind_;
        }
        return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedUserObject user_object = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedUserObject, org.tensorflow.proto.framework.SavedUserObject.Builder, org.tensorflow.proto.framework.SavedUserObjectOrBuilder> 
        getUserObjectFieldBuilder() {
      if (userObjectBuilder_ == null) {
        if (!(kindCase_ == 4)) {
          kind_ = org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance();
        }
        userObjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedUserObject, org.tensorflow.proto.framework.SavedUserObject.Builder, org.tensorflow.proto.framework.SavedUserObjectOrBuilder>(
                (org.tensorflow.proto.framework.SavedUserObject) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 4;
      onChanged();;
      return userObjectBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedAsset, org.tensorflow.proto.framework.SavedAsset.Builder, org.tensorflow.proto.framework.SavedAssetOrBuilder> assetBuilder_;
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public boolean hasAsset() {
      return kindCase_ == 5;
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public org.tensorflow.proto.framework.SavedAsset getAsset() {
      if (assetBuilder_ == null) {
        if (kindCase_ == 5) {
          return (org.tensorflow.proto.framework.SavedAsset) kind_;
        }
        return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance();
      } else {
        if (kindCase_ == 5) {
          return assetBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public Builder setAsset(org.tensorflow.proto.framework.SavedAsset value) {
      if (assetBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        assetBuilder_.setMessage(value);
      }
      kindCase_ = 5;
      return this;
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public Builder setAsset(
        org.tensorflow.proto.framework.SavedAsset.Builder builderForValue) {
      if (assetBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        assetBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 5;
      return this;
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public Builder mergeAsset(org.tensorflow.proto.framework.SavedAsset value) {
      if (assetBuilder_ == null) {
        if (kindCase_ == 5 &&
            kind_ != org.tensorflow.proto.framework.SavedAsset.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedAsset.newBuilder((org.tensorflow.proto.framework.SavedAsset) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 5) {
          assetBuilder_.mergeFrom(value);
        }
        assetBuilder_.setMessage(value);
      }
      kindCase_ = 5;
      return this;
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public Builder clearAsset() {
      if (assetBuilder_ == null) {
        if (kindCase_ == 5) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 5) {
          kindCase_ = 0;
          kind_ = null;
        }
        assetBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public org.tensorflow.proto.framework.SavedAsset.Builder getAssetBuilder() {
      return getAssetFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    public org.tensorflow.proto.framework.SavedAssetOrBuilder getAssetOrBuilder() {
      if ((kindCase_ == 5) && (assetBuilder_ != null)) {
        return assetBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 5) {
          return (org.tensorflow.proto.framework.SavedAsset) kind_;
        }
        return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedAsset asset = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedAsset, org.tensorflow.proto.framework.SavedAsset.Builder, org.tensorflow.proto.framework.SavedAssetOrBuilder> 
        getAssetFieldBuilder() {
      if (assetBuilder_ == null) {
        if (!(kindCase_ == 5)) {
          kind_ = org.tensorflow.proto.framework.SavedAsset.getDefaultInstance();
        }
        assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedAsset, org.tensorflow.proto.framework.SavedAsset.Builder, org.tensorflow.proto.framework.SavedAssetOrBuilder>(
                (org.tensorflow.proto.framework.SavedAsset) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 5;
      onChanged();;
      return assetBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedFunction, org.tensorflow.proto.framework.SavedFunction.Builder, org.tensorflow.proto.framework.SavedFunctionOrBuilder> functionBuilder_;
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public boolean hasFunction() {
      return kindCase_ == 6;
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public org.tensorflow.proto.framework.SavedFunction getFunction() {
      if (functionBuilder_ == null) {
        if (kindCase_ == 6) {
          return (org.tensorflow.proto.framework.SavedFunction) kind_;
        }
        return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance();
      } else {
        if (kindCase_ == 6) {
          return functionBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public Builder setFunction(org.tensorflow.proto.framework.SavedFunction value) {
      if (functionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        functionBuilder_.setMessage(value);
      }
      kindCase_ = 6;
      return this;
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public Builder setFunction(
        org.tensorflow.proto.framework.SavedFunction.Builder builderForValue) {
      if (functionBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        functionBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 6;
      return this;
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public Builder mergeFunction(org.tensorflow.proto.framework.SavedFunction value) {
      if (functionBuilder_ == null) {
        if (kindCase_ == 6 &&
            kind_ != org.tensorflow.proto.framework.SavedFunction.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedFunction.newBuilder((org.tensorflow.proto.framework.SavedFunction) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 6) {
          functionBuilder_.mergeFrom(value);
        }
        functionBuilder_.setMessage(value);
      }
      kindCase_ = 6;
      return this;
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public Builder clearFunction() {
      if (functionBuilder_ == null) {
        if (kindCase_ == 6) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 6) {
          kindCase_ = 0;
          kind_ = null;
        }
        functionBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public org.tensorflow.proto.framework.SavedFunction.Builder getFunctionBuilder() {
      return getFunctionFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    public org.tensorflow.proto.framework.SavedFunctionOrBuilder getFunctionOrBuilder() {
      if ((kindCase_ == 6) && (functionBuilder_ != null)) {
        return functionBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 6) {
          return (org.tensorflow.proto.framework.SavedFunction) kind_;
        }
        return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedFunction function = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedFunction, org.tensorflow.proto.framework.SavedFunction.Builder, org.tensorflow.proto.framework.SavedFunctionOrBuilder> 
        getFunctionFieldBuilder() {
      if (functionBuilder_ == null) {
        if (!(kindCase_ == 6)) {
          kind_ = org.tensorflow.proto.framework.SavedFunction.getDefaultInstance();
        }
        functionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedFunction, org.tensorflow.proto.framework.SavedFunction.Builder, org.tensorflow.proto.framework.SavedFunctionOrBuilder>(
                (org.tensorflow.proto.framework.SavedFunction) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 6;
      onChanged();;
      return functionBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder> variableBuilder_;
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public boolean hasVariable() {
      return kindCase_ == 7;
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public org.tensorflow.proto.framework.SavedVariable getVariable() {
      if (variableBuilder_ == null) {
        if (kindCase_ == 7) {
          return (org.tensorflow.proto.framework.SavedVariable) kind_;
        }
        return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance();
      } else {
        if (kindCase_ == 7) {
          return variableBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public Builder setVariable(org.tensorflow.proto.framework.SavedVariable value) {
      if (variableBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        variableBuilder_.setMessage(value);
      }
      kindCase_ = 7;
      return this;
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public Builder setVariable(
        org.tensorflow.proto.framework.SavedVariable.Builder builderForValue) {
      if (variableBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        variableBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 7;
      return this;
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public Builder mergeVariable(org.tensorflow.proto.framework.SavedVariable value) {
      if (variableBuilder_ == null) {
        if (kindCase_ == 7 &&
            kind_ != org.tensorflow.proto.framework.SavedVariable.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedVariable.newBuilder((org.tensorflow.proto.framework.SavedVariable) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 7) {
          variableBuilder_.mergeFrom(value);
        }
        variableBuilder_.setMessage(value);
      }
      kindCase_ = 7;
      return this;
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public Builder clearVariable() {
      if (variableBuilder_ == null) {
        if (kindCase_ == 7) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 7) {
          kindCase_ = 0;
          kind_ = null;
        }
        variableBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public org.tensorflow.proto.framework.SavedVariable.Builder getVariableBuilder() {
      return getVariableFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    public org.tensorflow.proto.framework.SavedVariableOrBuilder getVariableOrBuilder() {
      if ((kindCase_ == 7) && (variableBuilder_ != null)) {
        return variableBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 7) {
          return (org.tensorflow.proto.framework.SavedVariable) kind_;
        }
        return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedVariable variable = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder> 
        getVariableFieldBuilder() {
      if (variableBuilder_ == null) {
        if (!(kindCase_ == 7)) {
          kind_ = org.tensorflow.proto.framework.SavedVariable.getDefaultInstance();
        }
        variableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder>(
                (org.tensorflow.proto.framework.SavedVariable) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 7;
      onChanged();;
      return variableBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedBareConcreteFunction, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder, org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder> bareConcreteFunctionBuilder_;
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public boolean hasBareConcreteFunction() {
      return kindCase_ == 8;
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedBareConcreteFunction getBareConcreteFunction() {
      if (bareConcreteFunctionBuilder_ == null) {
        if (kindCase_ == 8) {
          return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_;
        }
        return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance();
      } else {
        if (kindCase_ == 8) {
          return bareConcreteFunctionBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public Builder setBareConcreteFunction(org.tensorflow.proto.framework.SavedBareConcreteFunction value) {
      if (bareConcreteFunctionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        bareConcreteFunctionBuilder_.setMessage(value);
      }
      kindCase_ = 8;
      return this;
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public Builder setBareConcreteFunction(
        org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder builderForValue) {
      if (bareConcreteFunctionBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        bareConcreteFunctionBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 8;
      return this;
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public Builder mergeBareConcreteFunction(org.tensorflow.proto.framework.SavedBareConcreteFunction value) {
      if (bareConcreteFunctionBuilder_ == null) {
        if (kindCase_ == 8 &&
            kind_ != org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedBareConcreteFunction.newBuilder((org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 8) {
          bareConcreteFunctionBuilder_.mergeFrom(value);
        }
        bareConcreteFunctionBuilder_.setMessage(value);
      }
      kindCase_ = 8;
      return this;
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public Builder clearBareConcreteFunction() {
      if (bareConcreteFunctionBuilder_ == null) {
        if (kindCase_ == 8) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 8) {
          kindCase_ = 0;
          kind_ = null;
        }
        bareConcreteFunctionBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder getBareConcreteFunctionBuilder() {
      return getBareConcreteFunctionFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    public org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder getBareConcreteFunctionOrBuilder() {
      if ((kindCase_ == 8) && (bareConcreteFunctionBuilder_ != null)) {
        return bareConcreteFunctionBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 8) {
          return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_;
        }
        return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedBareConcreteFunction, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder, org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder> 
        getBareConcreteFunctionFieldBuilder() {
      if (bareConcreteFunctionBuilder_ == null) {
        if (!(kindCase_ == 8)) {
          kind_ = org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance();
        }
        bareConcreteFunctionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedBareConcreteFunction, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder, org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder>(
                (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 8;
      onChanged();;
      return bareConcreteFunctionBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedConstant, org.tensorflow.proto.framework.SavedConstant.Builder, org.tensorflow.proto.framework.SavedConstantOrBuilder> constantBuilder_;
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public boolean hasConstant() {
      return kindCase_ == 9;
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public org.tensorflow.proto.framework.SavedConstant getConstant() {
      if (constantBuilder_ == null) {
        if (kindCase_ == 9) {
          return (org.tensorflow.proto.framework.SavedConstant) kind_;
        }
        return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance();
      } else {
        if (kindCase_ == 9) {
          return constantBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public Builder setConstant(org.tensorflow.proto.framework.SavedConstant value) {
      if (constantBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        constantBuilder_.setMessage(value);
      }
      kindCase_ = 9;
      return this;
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public Builder setConstant(
        org.tensorflow.proto.framework.SavedConstant.Builder builderForValue) {
      if (constantBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        constantBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 9;
      return this;
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public Builder mergeConstant(org.tensorflow.proto.framework.SavedConstant value) {
      if (constantBuilder_ == null) {
        if (kindCase_ == 9 &&
            kind_ != org.tensorflow.proto.framework.SavedConstant.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedConstant.newBuilder((org.tensorflow.proto.framework.SavedConstant) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 9) {
          constantBuilder_.mergeFrom(value);
        }
        constantBuilder_.setMessage(value);
      }
      kindCase_ = 9;
      return this;
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public Builder clearConstant() {
      if (constantBuilder_ == null) {
        if (kindCase_ == 9) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 9) {
          kindCase_ = 0;
          kind_ = null;
        }
        constantBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public org.tensorflow.proto.framework.SavedConstant.Builder getConstantBuilder() {
      return getConstantFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    public org.tensorflow.proto.framework.SavedConstantOrBuilder getConstantOrBuilder() {
      if ((kindCase_ == 9) && (constantBuilder_ != null)) {
        return constantBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 9) {
          return (org.tensorflow.proto.framework.SavedConstant) kind_;
        }
        return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedConstant constant = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedConstant, org.tensorflow.proto.framework.SavedConstant.Builder, org.tensorflow.proto.framework.SavedConstantOrBuilder> 
        getConstantFieldBuilder() {
      if (constantBuilder_ == null) {
        if (!(kindCase_ == 9)) {
          kind_ = org.tensorflow.proto.framework.SavedConstant.getDefaultInstance();
        }
        constantBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedConstant, org.tensorflow.proto.framework.SavedConstant.Builder, org.tensorflow.proto.framework.SavedConstantOrBuilder>(
                (org.tensorflow.proto.framework.SavedConstant) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 9;
      onChanged();;
      return constantBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedResource, org.tensorflow.proto.framework.SavedResource.Builder, org.tensorflow.proto.framework.SavedResourceOrBuilder> resourceBuilder_;
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public boolean hasResource() {
      return kindCase_ == 10;
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public org.tensorflow.proto.framework.SavedResource getResource() {
      if (resourceBuilder_ == null) {
        if (kindCase_ == 10) {
          return (org.tensorflow.proto.framework.SavedResource) kind_;
        }
        return org.tensorflow.proto.framework.SavedResource.getDefaultInstance();
      } else {
        if (kindCase_ == 10) {
          return resourceBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.SavedResource.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public Builder setResource(org.tensorflow.proto.framework.SavedResource value) {
      if (resourceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        resourceBuilder_.setMessage(value);
      }
      kindCase_ = 10;
      return this;
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public Builder setResource(
        org.tensorflow.proto.framework.SavedResource.Builder builderForValue) {
      if (resourceBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        resourceBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 10;
      return this;
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public Builder mergeResource(org.tensorflow.proto.framework.SavedResource value) {
      if (resourceBuilder_ == null) {
        if (kindCase_ == 10 &&
            kind_ != org.tensorflow.proto.framework.SavedResource.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.SavedResource.newBuilder((org.tensorflow.proto.framework.SavedResource) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 10) {
          resourceBuilder_.mergeFrom(value);
        }
        resourceBuilder_.setMessage(value);
      }
      kindCase_ = 10;
      return this;
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public Builder clearResource() {
      if (resourceBuilder_ == null) {
        if (kindCase_ == 10) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 10) {
          kindCase_ = 0;
          kind_ = null;
        }
        resourceBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public org.tensorflow.proto.framework.SavedResource.Builder getResourceBuilder() {
      return getResourceFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    public org.tensorflow.proto.framework.SavedResourceOrBuilder getResourceOrBuilder() {
      if ((kindCase_ == 10) && (resourceBuilder_ != null)) {
        return resourceBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 10) {
          return (org.tensorflow.proto.framework.SavedResource) kind_;
        }
        return org.tensorflow.proto.framework.SavedResource.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.SavedResource resource = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.SavedResource, org.tensorflow.proto.framework.SavedResource.Builder, org.tensorflow.proto.framework.SavedResourceOrBuilder> 
        getResourceFieldBuilder() {
      if (resourceBuilder_ == null) {
        if (!(kindCase_ == 10)) {
          kind_ = org.tensorflow.proto.framework.SavedResource.getDefaultInstance();
        }
        resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.SavedResource, org.tensorflow.proto.framework.SavedResource.Builder, org.tensorflow.proto.framework.SavedResourceOrBuilder>(
                (org.tensorflow.proto.framework.SavedResource) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 10;
      onChanged();;
      return resourceBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.CapturedTensor, org.tensorflow.proto.framework.CapturedTensor.Builder, org.tensorflow.proto.framework.CapturedTensorOrBuilder> capturedTensorBuilder_;
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public boolean hasCapturedTensor() {
      return kindCase_ == 12;
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public org.tensorflow.proto.framework.CapturedTensor getCapturedTensor() {
      if (capturedTensorBuilder_ == null) {
        if (kindCase_ == 12) {
          return (org.tensorflow.proto.framework.CapturedTensor) kind_;
        }
        return org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance();
      } else {
        if (kindCase_ == 12) {
          return capturedTensorBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public Builder setCapturedTensor(org.tensorflow.proto.framework.CapturedTensor value) {
      if (capturedTensorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        onChanged();
      } else {
        capturedTensorBuilder_.setMessage(value);
      }
      kindCase_ = 12;
      return this;
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public Builder setCapturedTensor(
        org.tensorflow.proto.framework.CapturedTensor.Builder builderForValue) {
      if (capturedTensorBuilder_ == null) {
        kind_ = builderForValue.build();
        onChanged();
      } else {
        capturedTensorBuilder_.setMessage(builderForValue.build());
      }
      kindCase_ = 12;
      return this;
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public Builder mergeCapturedTensor(org.tensorflow.proto.framework.CapturedTensor value) {
      if (capturedTensorBuilder_ == null) {
        if (kindCase_ == 12 &&
            kind_ != org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance()) {
          kind_ = org.tensorflow.proto.framework.CapturedTensor.newBuilder((org.tensorflow.proto.framework.CapturedTensor) kind_)
              .mergeFrom(value).buildPartial();
        } else {
          kind_ = value;
        }
        onChanged();
      } else {
        if (kindCase_ == 12) {
          capturedTensorBuilder_.mergeFrom(value);
        }
        capturedTensorBuilder_.setMessage(value);
      }
      kindCase_ = 12;
      return this;
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public Builder clearCapturedTensor() {
      if (capturedTensorBuilder_ == null) {
        if (kindCase_ == 12) {
          kindCase_ = 0;
          kind_ = null;
          onChanged();
        }
      } else {
        if (kindCase_ == 12) {
          kindCase_ = 0;
          kind_ = null;
        }
        capturedTensorBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public org.tensorflow.proto.framework.CapturedTensor.Builder getCapturedTensorBuilder() {
      return getCapturedTensorFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    public org.tensorflow.proto.framework.CapturedTensorOrBuilder getCapturedTensorOrBuilder() {
      if ((kindCase_ == 12) && (capturedTensorBuilder_ != null)) {
        return capturedTensorBuilder_.getMessageOrBuilder();
      } else {
        if (kindCase_ == 12) {
          return (org.tensorflow.proto.framework.CapturedTensor) kind_;
        }
        return org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.CapturedTensor captured_tensor = 12;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.CapturedTensor, org.tensorflow.proto.framework.CapturedTensor.Builder, org.tensorflow.proto.framework.CapturedTensorOrBuilder> 
        getCapturedTensorFieldBuilder() {
      if (capturedTensorBuilder_ == null) {
        if (!(kindCase_ == 12)) {
          kind_ = org.tensorflow.proto.framework.CapturedTensor.getDefaultInstance();
        }
        capturedTensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.CapturedTensor, org.tensorflow.proto.framework.CapturedTensor.Builder, org.tensorflow.proto.framework.CapturedTensorOrBuilder>(
                (org.tensorflow.proto.framework.CapturedTensor) kind_,
                getParentForChildren(),
                isClean());
        kind_ = null;
      }
      kindCase_ = 12;
      onChanged();;
      return capturedTensorBuilder_;
    }

    private com.google.protobuf.MapField<
        java.lang.String, org.tensorflow.proto.framework.SaveableObject> saveableObjects_;
    private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.SaveableObject>
    internalGetSaveableObjects() {
      if (saveableObjects_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            SaveableObjectsDefaultEntryHolder.defaultEntry);
      }
      return saveableObjects_;
    }
    private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.SaveableObject>
    internalGetMutableSaveableObjects() {
      onChanged();;
      if (saveableObjects_ == null) {
        saveableObjects_ = com.google.protobuf.MapField.newMapField(
            SaveableObjectsDefaultEntryHolder.defaultEntry);
      }
      if (!saveableObjects_.isMutable()) {
        saveableObjects_ = saveableObjects_.copy();
      }
      return saveableObjects_;
    }

    public int getSaveableObjectsCount() {
      return internalGetSaveableObjects().getMap().size();
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */

    public boolean containsSaveableObjects(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      return internalGetSaveableObjects().getMap().containsKey(key);
    }
    /**
     * Use {@link #getSaveableObjectsMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> getSaveableObjects() {
      return getSaveableObjectsMap();
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */

    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> getSaveableObjectsMap() {
      return internalGetSaveableObjects().getMap();
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */

    public org.tensorflow.proto.framework.SaveableObject getSaveableObjectsOrDefault(
        java.lang.String key,
        org.tensorflow.proto.framework.SaveableObject defaultValue) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> map =
          internalGetSaveableObjects().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */

    public org.tensorflow.proto.framework.SaveableObject getSaveableObjectsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> map =
          internalGetSaveableObjects().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearSaveableObjects() {
      internalGetMutableSaveableObjects().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */

    public Builder removeSaveableObjects(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableSaveableObjects().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject>
    getMutableSaveableObjects() {
      return internalGetMutableSaveableObjects().getMutableMap();
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */
    public Builder putSaveableObjects(
        java.lang.String key,
        org.tensorflow.proto.framework.SaveableObject value) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      if (value == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableSaveableObjects().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * <code>map&lt;string, .tensorflow.SaveableObject&gt; saveable_objects = 11;</code>
     */

    public Builder putAllSaveableObjects(
        java.util.Map<java.lang.String, org.tensorflow.proto.framework.SaveableObject> values) {
      internalGetMutableSaveableObjects().getMutableMap()
          .putAll(values);
      return this;
    }

    private java.lang.Object registeredName_ = "";
    /**
     * <pre>
     * The fields below are filled when the user serializes a registered Trackable
     * class. Registered classes may save additional metadata and supersede the
     * default loading process where nodes are recreated from the proto.
     * The name of the registered class of the form "{package}.{class_name}".
     * This field is used to search for the registered class at loading time.
     * </pre>
     *
     * <code>string registered_name = 13;</code>
     */
    public java.lang.String getRegisteredName() {
      java.lang.Object ref = registeredName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        registeredName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The fields below are filled when the user serializes a registered Trackable
     * class. Registered classes may save additional metadata and supersede the
     * default loading process where nodes are recreated from the proto.
     * The name of the registered class of the form "{package}.{class_name}".
     * This field is used to search for the registered class at loading time.
     * </pre>
     *
     * <code>string registered_name = 13;</code>
     */
    public com.google.protobuf.ByteString
        getRegisteredNameBytes() {
      java.lang.Object ref = registeredName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        registeredName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The fields below are filled when the user serializes a registered Trackable
     * class. Registered classes may save additional metadata and supersede the
     * default loading process where nodes are recreated from the proto.
     * The name of the registered class of the form "{package}.{class_name}".
     * This field is used to search for the registered class at loading time.
     * </pre>
     *
     * <code>string registered_name = 13;</code>
     */
    public Builder setRegisteredName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      registeredName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The fields below are filled when the user serializes a registered Trackable
     * class. Registered classes may save additional metadata and supersede the
     * default loading process where nodes are recreated from the proto.
     * The name of the registered class of the form "{package}.{class_name}".
     * This field is used to search for the registered class at loading time.
     * </pre>
     *
     * <code>string registered_name = 13;</code>
     */
    public Builder clearRegisteredName() {
      
      registeredName_ = getDefaultInstance().getRegisteredName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The fields below are filled when the user serializes a registered Trackable
     * class. Registered classes may save additional metadata and supersede the
     * default loading process where nodes are recreated from the proto.
     * The name of the registered class of the form "{package}.{class_name}".
     * This field is used to search for the registered class at loading time.
     * </pre>
     *
     * <code>string registered_name = 13;</code>
     */
    public Builder setRegisteredNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      registeredName_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.Any serializedUserProto_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedUserProtoBuilder_;
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public boolean hasSerializedUserProto() {
      return serializedUserProtoBuilder_ != null || serializedUserProto_ != null;
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public com.google.protobuf.Any getSerializedUserProto() {
      if (serializedUserProtoBuilder_ == null) {
        return serializedUserProto_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedUserProto_;
      } else {
        return serializedUserProtoBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public Builder setSerializedUserProto(com.google.protobuf.Any value) {
      if (serializedUserProtoBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        serializedUserProto_ = value;
        onChanged();
      } else {
        serializedUserProtoBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public Builder setSerializedUserProto(
        com.google.protobuf.Any.Builder builderForValue) {
      if (serializedUserProtoBuilder_ == null) {
        serializedUserProto_ = builderForValue.build();
        onChanged();
      } else {
        serializedUserProtoBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public Builder mergeSerializedUserProto(com.google.protobuf.Any value) {
      if (serializedUserProtoBuilder_ == null) {
        if (serializedUserProto_ != null) {
          serializedUserProto_ =
            com.google.protobuf.Any.newBuilder(serializedUserProto_).mergeFrom(value).buildPartial();
        } else {
          serializedUserProto_ = value;
        }
        onChanged();
      } else {
        serializedUserProtoBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public Builder clearSerializedUserProto() {
      if (serializedUserProtoBuilder_ == null) {
        serializedUserProto_ = null;
        onChanged();
      } else {
        serializedUserProto_ = null;
        serializedUserProtoBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public com.google.protobuf.Any.Builder getSerializedUserProtoBuilder() {
      
      onChanged();
      return getSerializedUserProtoFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    public com.google.protobuf.AnyOrBuilder getSerializedUserProtoOrBuilder() {
      if (serializedUserProtoBuilder_ != null) {
        return serializedUserProtoBuilder_.getMessageOrBuilder();
      } else {
        return serializedUserProto_ == null ?
            com.google.protobuf.Any.getDefaultInstance() : serializedUserProto_;
      }
    }
    /**
     * <pre>
     * The user-generated proto storing metadata for this object, to be passed to
     * the registered classes's _deserialize_from_proto method when this object is
     * loaded from the SavedModel.
     * </pre>
     *
     * <code>.google.protobuf.Any serialized_user_proto = 14;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
        getSerializedUserProtoFieldBuilder() {
      if (serializedUserProtoBuilder_ == null) {
        serializedUserProtoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                getSerializedUserProto(),
                getParentForChildren(),
                isClean());
        serializedUserProto_ = null;
      }
      return serializedUserProtoBuilder_;
    }
    @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.SavedObject)
  }

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

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

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

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

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

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

}

