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

package org.tensorflow.proto.framework;

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

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private CostGraphDef(
      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)) {
              node_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.Node>();
              mutable_bitField0_ |= 0x00000001;
            }
            node_.add(
                input.readMessage(org.tensorflow.proto.framework.CostGraphDef.Node.parser(), extensionRegistry));
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              cost_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost>();
              mutable_bitField0_ |= 0x00000002;
            }
            cost_.add(
                input.readMessage(org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.parser(), extensionRegistry));
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        node_ = java.util.Collections.unmodifiableList(node_);
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        cost_ = java.util.Collections.unmodifiableList(cost_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor;
  }

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

  public interface NodeOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The name of the node. Names are globally unique.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    java.lang.String getName();
    /**
     * <pre>
     * The name of the node. Names are globally unique.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <pre>
     * The device of the node. Can be empty if the node is mapped to the
     * default partition or partitioning hasn't been run yet.
     * </pre>
     *
     * <code>string device = 2;</code>
     */
    java.lang.String getDevice();
    /**
     * <pre>
     * The device of the node. Can be empty if the node is mapped to the
     * default partition or partitioning hasn't been run yet.
     * </pre>
     *
     * <code>string device = 2;</code>
     */
    com.google.protobuf.ByteString
        getDeviceBytes();

    /**
     * <pre>
     * The id of the node. Node ids are only unique inside a partition.
     * </pre>
     *
     * <code>int32 id = 3;</code>
     */
    int getId();

    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo> 
        getInputInfoList();
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getInputInfo(int index);
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    int getInputInfoCount();
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> 
        getInputInfoOrBuilderList();
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder(
        int index);

    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo> 
        getOutputInfoList();
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index);
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    int getOutputInfoCount();
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> 
        getOutputInfoOrBuilderList();
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder(
        int index);

    /**
     * <pre>
     * Temporary memory used by this node.
     * </pre>
     *
     * <code>int64 temporary_memory_size = 6;</code>
     */
    long getTemporaryMemorySize();

    /**
     * <pre>
     * Persistent memory used by this node.
     * </pre>
     *
     * <code>int64 persistent_memory_size = 12;</code>
     */
    long getPersistentMemorySize();

    /**
     * <code>int64 host_temp_memory_size = 10 [deprecated = true];</code>
     */
    @java.lang.Deprecated long getHostTempMemorySize();

    /**
     * <code>int64 device_temp_memory_size = 11 [deprecated = true];</code>
     */
    @java.lang.Deprecated long getDeviceTempMemorySize();

    /**
     * <code>int64 device_persistent_memory_size = 16 [deprecated = true];</code>
     */
    @java.lang.Deprecated long getDevicePersistentMemorySize();

    /**
     * <pre>
     * Estimate of the computational cost of this node, in microseconds.
     * </pre>
     *
     * <code>int64 compute_cost = 9;</code>
     */
    long getComputeCost();

    /**
     * <pre>
     * Analytical estimate of the computational cost of this node, in
     * microseconds.
     * </pre>
     *
     * <code>int64 compute_time = 14;</code>
     */
    long getComputeTime();

    /**
     * <pre>
     * Analytical estimate of the memory access cost of this node, in
     * microseconds.
     * </pre>
     *
     * <code>int64 memory_time = 15;</code>
     */
    long getMemoryTime();

    /**
     * <pre>
     * If true, the output is permanent: it can't be discarded, because this
     * node is part of the "final output". Nodes may depend on final nodes.
     * </pre>
     *
     * <code>bool is_final = 7;</code>
     */
    boolean getIsFinal();

    /**
     * <pre>
     * Ids of the control inputs for this node.
     * </pre>
     *
     * <code>repeated int32 control_input = 8;</code>
     */
    java.util.List<java.lang.Integer> getControlInputList();
    /**
     * <pre>
     * Ids of the control inputs for this node.
     * </pre>
     *
     * <code>repeated int32 control_input = 8;</code>
     */
    int getControlInputCount();
    /**
     * <pre>
     * Ids of the control inputs for this node.
     * </pre>
     *
     * <code>repeated int32 control_input = 8;</code>
     */
    int getControlInput(int index);

    /**
     * <pre>
     * Are the costs inaccurate?
     * </pre>
     *
     * <code>bool inaccurate = 17;</code>
     */
    boolean getInaccurate();
  }
  /**
   * Protobuf type {@code tensorflow.CostGraphDef.Node}
   */
  public  static final class Node extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node)
      NodeOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Node.newBuilder() to construct.
    private Node(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Node() {
      name_ = "";
      device_ = "";
      inputInfo_ = java.util.Collections.emptyList();
      outputInfo_ = java.util.Collections.emptyList();
      controlInput_ = emptyIntList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Node(
        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: {
              java.lang.String s = input.readStringRequireUtf8();

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

              device_ = s;
              break;
            }
            case 24: {

              id_ = input.readInt32();
              break;
            }
            case 34: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                inputInfo_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo>();
                mutable_bitField0_ |= 0x00000001;
              }
              inputInfo_.add(
                  input.readMessage(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.parser(), extensionRegistry));
              break;
            }
            case 42: {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                outputInfo_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo>();
                mutable_bitField0_ |= 0x00000002;
              }
              outputInfo_.add(
                  input.readMessage(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.parser(), extensionRegistry));
              break;
            }
            case 48: {

              temporaryMemorySize_ = input.readInt64();
              break;
            }
            case 56: {

              isFinal_ = input.readBool();
              break;
            }
            case 64: {
              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                controlInput_ = newIntList();
                mutable_bitField0_ |= 0x00000004;
              }
              controlInput_.addInt(input.readInt32());
              break;
            }
            case 66: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
                controlInput_ = newIntList();
                mutable_bitField0_ |= 0x00000004;
              }
              while (input.getBytesUntilLimit() > 0) {
                controlInput_.addInt(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 72: {

              computeCost_ = input.readInt64();
              break;
            }
            case 80: {

              hostTempMemorySize_ = input.readInt64();
              break;
            }
            case 88: {

              deviceTempMemorySize_ = input.readInt64();
              break;
            }
            case 96: {

              persistentMemorySize_ = input.readInt64();
              break;
            }
            case 112: {

              computeTime_ = input.readInt64();
              break;
            }
            case 120: {

              memoryTime_ = input.readInt64();
              break;
            }
            case 128: {

              devicePersistentMemorySize_ = input.readInt64();
              break;
            }
            case 136: {

              inaccurate_ = input.readBool();
              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)) {
          inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_);
        }
        if (((mutable_bitField0_ & 0x00000002) != 0)) {
          outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_);
        }
        if (((mutable_bitField0_ & 0x00000004) != 0)) {
          controlInput_.makeImmutable(); // C
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.framework.CostGraphDef.Node.class, org.tensorflow.proto.framework.CostGraphDef.Node.Builder.class);
    }

    public interface InputInfoOrBuilder extends
        // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node.InputInfo)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>int32 preceding_node = 1;</code>
       */
      int getPrecedingNode();

      /**
       * <code>int32 preceding_port = 2;</code>
       */
      int getPrecedingPort();
    }
    /**
     * <pre>
     * Inputs of this node. They must be executed before this node can be
     * executed. An input is a particular output of another node, specified
     * by the node id and the output index.
     * </pre>
     *
     * Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo}
     */
    public  static final class InputInfo extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.InputInfo)
        InputInfoOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use InputInfo.newBuilder() to construct.
      private InputInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private InputInfo() {
      }

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

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

                precedingNode_ = input.readInt32();
                break;
              }
              case 16: {

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder.class);
      }

      public static final int PRECEDING_NODE_FIELD_NUMBER = 1;
      private int precedingNode_;
      /**
       * <code>int32 preceding_node = 1;</code>
       */
      public int getPrecedingNode() {
        return precedingNode_;
      }

      public static final int PRECEDING_PORT_FIELD_NUMBER = 2;
      private int precedingPort_;
      /**
       * <code>int32 preceding_port = 2;</code>
       */
      public int getPrecedingPort() {
        return precedingPort_;
      }

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

        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (precedingNode_ != 0) {
          output.writeInt32(1, precedingNode_);
        }
        if (precedingPort_ != 0) {
          output.writeInt32(2, precedingPort_);
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        if (precedingNode_ != 0) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(1, precedingNode_);
        }
        if (precedingPort_ != 0) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(2, precedingPort_);
        }
        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.CostGraphDef.Node.InputInfo)) {
          return super.equals(obj);
        }
        org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo other = (org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo) obj;

        if (getPrecedingNode()
            != other.getPrecedingNode()) return false;
        if (getPrecedingPort()
            != other.getPrecedingPort()) return false;
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + PRECEDING_NODE_FIELD_NUMBER;
        hash = (53 * hash) + getPrecedingNode();
        hash = (37 * hash) + PRECEDING_PORT_FIELD_NUMBER;
        hash = (53 * hash) + getPrecedingPort();
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo 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.CostGraphDef.Node.InputInfo parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo 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.CostGraphDef.Node.InputInfo parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo 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.CostGraphDef.Node.InputInfo parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo 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.CostGraphDef.Node.InputInfo parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo 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.CostGraphDef.Node.InputInfo prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * <pre>
       * Inputs of this node. They must be executed before this node can be
       * executed. An input is a particular output of another node, specified
       * by the node id and the output index.
       * </pre>
       *
       * Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.InputInfo)
          org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder.class);
        }

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

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

          precedingPort_ = 0;

          return this;
        }

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

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

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

        @java.lang.Override
        public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo buildPartial() {
          org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo result = new org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo(this);
          result.precedingNode_ = precedingNode_;
          result.precedingPort_ = precedingPort_;
          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.CostGraphDef.Node.InputInfo) {
            return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo other) {
          if (other == org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance()) return this;
          if (other.getPrecedingNode() != 0) {
            setPrecedingNode(other.getPrecedingNode());
          }
          if (other.getPrecedingPort() != 0) {
            setPrecedingPort(other.getPrecedingPort());
          }
          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.CostGraphDef.Node.InputInfo parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private int precedingNode_ ;
        /**
         * <code>int32 preceding_node = 1;</code>
         */
        public int getPrecedingNode() {
          return precedingNode_;
        }
        /**
         * <code>int32 preceding_node = 1;</code>
         */
        public Builder setPrecedingNode(int value) {
          
          precedingNode_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>int32 preceding_node = 1;</code>
         */
        public Builder clearPrecedingNode() {
          
          precedingNode_ = 0;
          onChanged();
          return this;
        }

        private int precedingPort_ ;
        /**
         * <code>int32 preceding_port = 2;</code>
         */
        public int getPrecedingPort() {
          return precedingPort_;
        }
        /**
         * <code>int32 preceding_port = 2;</code>
         */
        public Builder setPrecedingPort(int value) {
          
          precedingPort_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>int32 preceding_port = 2;</code>
         */
        public Builder clearPrecedingPort() {
          
          precedingPort_ = 0;
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

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


        // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.InputInfo)
      }

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

      public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

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

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

    }

    public interface OutputInfoOrBuilder extends
        // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node.OutputInfo)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>int64 size = 1;</code>
       */
      long getSize();

      /**
       * <pre>
       * If &gt;= 0, the output is an alias of an input. Note that an alias input
       * may itself be an alias. The algorithm will therefore need to follow
       * those pointers.
       * </pre>
       *
       * <code>int64 alias_input_port = 2;</code>
       */
      long getAliasInputPort();

      /**
       * <code>.tensorflow.TensorShapeProto shape = 3;</code>
       */
      boolean hasShape();
      /**
       * <code>.tensorflow.TensorShapeProto shape = 3;</code>
       */
      org.tensorflow.proto.framework.TensorShapeProto getShape();
      /**
       * <code>.tensorflow.TensorShapeProto shape = 3;</code>
       */
      org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder();

      /**
       * <code>.tensorflow.DataType dtype = 4;</code>
       */
      int getDtypeValue();
      /**
       * <code>.tensorflow.DataType dtype = 4;</code>
       */
      org.tensorflow.proto.framework.DataType getDtype();
    }
    /**
     * <pre>
     * Outputs of this node.
     * </pre>
     *
     * Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo}
     */
    public  static final class OutputInfo extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.OutputInfo)
        OutputInfoOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use OutputInfo.newBuilder() to construct.
      private OutputInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private OutputInfo() {
        dtype_ = 0;
      }

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

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

                size_ = input.readInt64();
                break;
              }
              case 16: {

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

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

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder.class);
      }

      public static final int SIZE_FIELD_NUMBER = 1;
      private long size_;
      /**
       * <code>int64 size = 1;</code>
       */
      public long getSize() {
        return size_;
      }

      public static final int ALIAS_INPUT_PORT_FIELD_NUMBER = 2;
      private long aliasInputPort_;
      /**
       * <pre>
       * If &gt;= 0, the output is an alias of an input. Note that an alias input
       * may itself be an alias. The algorithm will therefore need to follow
       * those pointers.
       * </pre>
       *
       * <code>int64 alias_input_port = 2;</code>
       */
      public long getAliasInputPort() {
        return aliasInputPort_;
      }

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

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

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

        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (size_ != 0L) {
          output.writeInt64(1, size_);
        }
        if (aliasInputPort_ != 0L) {
          output.writeInt64(2, aliasInputPort_);
        }
        if (shape_ != null) {
          output.writeMessage(3, getShape());
        }
        if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) {
          output.writeEnum(4, dtype_);
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        if (size_ != 0L) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt64Size(1, size_);
        }
        if (aliasInputPort_ != 0L) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt64Size(2, aliasInputPort_);
        }
        if (shape_ != null) {
          size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(3, getShape());
        }
        if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(4, dtype_);
        }
        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.CostGraphDef.Node.OutputInfo)) {
          return super.equals(obj);
        }
        org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo other = (org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo) obj;

        if (getSize()
            != other.getSize()) return false;
        if (getAliasInputPort()
            != other.getAliasInputPort()) return false;
        if (hasShape() != other.hasShape()) return false;
        if (hasShape()) {
          if (!getShape()
              .equals(other.getShape())) return false;
        }
        if (dtype_ != other.dtype_) return false;
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + SIZE_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getSize());
        hash = (37 * hash) + ALIAS_INPUT_PORT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getAliasInputPort());
        if (hasShape()) {
          hash = (37 * hash) + SHAPE_FIELD_NUMBER;
          hash = (53 * hash) + getShape().hashCode();
        }
        hash = (37 * hash) + DTYPE_FIELD_NUMBER;
        hash = (53 * hash) + dtype_;
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo 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.CostGraphDef.Node.OutputInfo parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo 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.CostGraphDef.Node.OutputInfo parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo 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.CostGraphDef.Node.OutputInfo parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo 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.CostGraphDef.Node.OutputInfo parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo 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.CostGraphDef.Node.OutputInfo prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * <pre>
       * Outputs of this node.
       * </pre>
       *
       * Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.OutputInfo)
          org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder.class);
        }

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

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

          aliasInputPort_ = 0L;

          if (shapeBuilder_ == null) {
            shape_ = null;
          } else {
            shape_ = null;
            shapeBuilder_ = null;
          }
          dtype_ = 0;

          return this;
        }

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

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

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

        @java.lang.Override
        public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo buildPartial() {
          org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo result = new org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo(this);
          result.size_ = size_;
          result.aliasInputPort_ = aliasInputPort_;
          if (shapeBuilder_ == null) {
            result.shape_ = shape_;
          } else {
            result.shape_ = shapeBuilder_.build();
          }
          result.dtype_ = dtype_;
          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.CostGraphDef.Node.OutputInfo) {
            return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo other) {
          if (other == org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance()) return this;
          if (other.getSize() != 0L) {
            setSize(other.getSize());
          }
          if (other.getAliasInputPort() != 0L) {
            setAliasInputPort(other.getAliasInputPort());
          }
          if (other.hasShape()) {
            mergeShape(other.getShape());
          }
          if (other.dtype_ != 0) {
            setDtypeValue(other.getDtypeValue());
          }
          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.CostGraphDef.Node.OutputInfo parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private long size_ ;
        /**
         * <code>int64 size = 1;</code>
         */
        public long getSize() {
          return size_;
        }
        /**
         * <code>int64 size = 1;</code>
         */
        public Builder setSize(long value) {
          
          size_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>int64 size = 1;</code>
         */
        public Builder clearSize() {
          
          size_ = 0L;
          onChanged();
          return this;
        }

        private long aliasInputPort_ ;
        /**
         * <pre>
         * If &gt;= 0, the output is an alias of an input. Note that an alias input
         * may itself be an alias. The algorithm will therefore need to follow
         * those pointers.
         * </pre>
         *
         * <code>int64 alias_input_port = 2;</code>
         */
        public long getAliasInputPort() {
          return aliasInputPort_;
        }
        /**
         * <pre>
         * If &gt;= 0, the output is an alias of an input. Note that an alias input
         * may itself be an alias. The algorithm will therefore need to follow
         * those pointers.
         * </pre>
         *
         * <code>int64 alias_input_port = 2;</code>
         */
        public Builder setAliasInputPort(long value) {
          
          aliasInputPort_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * If &gt;= 0, the output is an alias of an input. Note that an alias input
         * may itself be an alias. The algorithm will therefore need to follow
         * those pointers.
         * </pre>
         *
         * <code>int64 alias_input_port = 2;</code>
         */
        public Builder clearAliasInputPort() {
          
          aliasInputPort_ = 0L;
          onChanged();
          return this;
        }

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

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

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

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

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

        private int dtype_ = 0;
        /**
         * <code>.tensorflow.DataType dtype = 4;</code>
         */
        public int getDtypeValue() {
          return dtype_;
        }
        /**
         * <code>.tensorflow.DataType dtype = 4;</code>
         */
        public Builder setDtypeValue(int value) {
          dtype_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>.tensorflow.DataType dtype = 4;</code>
         */
        public org.tensorflow.proto.framework.DataType getDtype() {
          @SuppressWarnings("deprecation")
          org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_);
          return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result;
        }
        /**
         * <code>.tensorflow.DataType dtype = 4;</code>
         */
        public Builder setDtype(org.tensorflow.proto.framework.DataType value) {
          if (value == null) {
            throw new NullPointerException();
          }
          
          dtype_ = value.getNumber();
          onChanged();
          return this;
        }
        /**
         * <code>.tensorflow.DataType dtype = 4;</code>
         */
        public Builder clearDtype() {
          
          dtype_ = 0;
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

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


        // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.OutputInfo)
      }

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

      public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

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

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

    }

    public static final int NAME_FIELD_NUMBER = 1;
    private volatile java.lang.Object name_;
    /**
     * <pre>
     * The name of the node. Names are globally unique.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The name of the node. Names are globally unique.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DEVICE_FIELD_NUMBER = 2;
    private volatile java.lang.Object device_;
    /**
     * <pre>
     * The device of the node. Can be empty if the node is mapped to the
     * default partition or partitioning hasn't been run yet.
     * </pre>
     *
     * <code>string device = 2;</code>
     */
    public java.lang.String getDevice() {
      java.lang.Object ref = device_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        device_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The device of the node. Can be empty if the node is mapped to the
     * default partition or partitioning hasn't been run yet.
     * </pre>
     *
     * <code>string device = 2;</code>
     */
    public com.google.protobuf.ByteString
        getDeviceBytes() {
      java.lang.Object ref = device_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        device_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ID_FIELD_NUMBER = 3;
    private int id_;
    /**
     * <pre>
     * The id of the node. Node ids are only unique inside a partition.
     * </pre>
     *
     * <code>int32 id = 3;</code>
     */
    public int getId() {
      return id_;
    }

    public static final int INPUT_INFO_FIELD_NUMBER = 4;
    private java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo> inputInfo_;
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo> getInputInfoList() {
      return inputInfo_;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> 
        getInputInfoOrBuilderList() {
      return inputInfo_;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    public int getInputInfoCount() {
      return inputInfo_.size();
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getInputInfo(int index) {
      return inputInfo_.get(index);
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder(
        int index) {
      return inputInfo_.get(index);
    }

    public static final int OUTPUT_INFO_FIELD_NUMBER = 5;
    private java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo> outputInfo_;
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo> getOutputInfoList() {
      return outputInfo_;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> 
        getOutputInfoOrBuilderList() {
      return outputInfo_;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    public int getOutputInfoCount() {
      return outputInfo_.size();
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index) {
      return outputInfo_.get(index);
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder(
        int index) {
      return outputInfo_.get(index);
    }

    public static final int TEMPORARY_MEMORY_SIZE_FIELD_NUMBER = 6;
    private long temporaryMemorySize_;
    /**
     * <pre>
     * Temporary memory used by this node.
     * </pre>
     *
     * <code>int64 temporary_memory_size = 6;</code>
     */
    public long getTemporaryMemorySize() {
      return temporaryMemorySize_;
    }

    public static final int PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 12;
    private long persistentMemorySize_;
    /**
     * <pre>
     * Persistent memory used by this node.
     * </pre>
     *
     * <code>int64 persistent_memory_size = 12;</code>
     */
    public long getPersistentMemorySize() {
      return persistentMemorySize_;
    }

    public static final int HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER = 10;
    private long hostTempMemorySize_;
    /**
     * <code>int64 host_temp_memory_size = 10 [deprecated = true];</code>
     */
    @java.lang.Deprecated public long getHostTempMemorySize() {
      return hostTempMemorySize_;
    }

    public static final int DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER = 11;
    private long deviceTempMemorySize_;
    /**
     * <code>int64 device_temp_memory_size = 11 [deprecated = true];</code>
     */
    @java.lang.Deprecated public long getDeviceTempMemorySize() {
      return deviceTempMemorySize_;
    }

    public static final int DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 16;
    private long devicePersistentMemorySize_;
    /**
     * <code>int64 device_persistent_memory_size = 16 [deprecated = true];</code>
     */
    @java.lang.Deprecated public long getDevicePersistentMemorySize() {
      return devicePersistentMemorySize_;
    }

    public static final int COMPUTE_COST_FIELD_NUMBER = 9;
    private long computeCost_;
    /**
     * <pre>
     * Estimate of the computational cost of this node, in microseconds.
     * </pre>
     *
     * <code>int64 compute_cost = 9;</code>
     */
    public long getComputeCost() {
      return computeCost_;
    }

    public static final int COMPUTE_TIME_FIELD_NUMBER = 14;
    private long computeTime_;
    /**
     * <pre>
     * Analytical estimate of the computational cost of this node, in
     * microseconds.
     * </pre>
     *
     * <code>int64 compute_time = 14;</code>
     */
    public long getComputeTime() {
      return computeTime_;
    }

    public static final int MEMORY_TIME_FIELD_NUMBER = 15;
    private long memoryTime_;
    /**
     * <pre>
     * Analytical estimate of the memory access cost of this node, in
     * microseconds.
     * </pre>
     *
     * <code>int64 memory_time = 15;</code>
     */
    public long getMemoryTime() {
      return memoryTime_;
    }

    public static final int IS_FINAL_FIELD_NUMBER = 7;
    private boolean isFinal_;
    /**
     * <pre>
     * If true, the output is permanent: it can't be discarded, because this
     * node is part of the "final output". Nodes may depend on final nodes.
     * </pre>
     *
     * <code>bool is_final = 7;</code>
     */
    public boolean getIsFinal() {
      return isFinal_;
    }

    public static final int CONTROL_INPUT_FIELD_NUMBER = 8;
    private com.google.protobuf.Internal.IntList controlInput_;
    /**
     * <pre>
     * Ids of the control inputs for this node.
     * </pre>
     *
     * <code>repeated int32 control_input = 8;</code>
     */
    public java.util.List<java.lang.Integer>
        getControlInputList() {
      return controlInput_;
    }
    /**
     * <pre>
     * Ids of the control inputs for this node.
     * </pre>
     *
     * <code>repeated int32 control_input = 8;</code>
     */
    public int getControlInputCount() {
      return controlInput_.size();
    }
    /**
     * <pre>
     * Ids of the control inputs for this node.
     * </pre>
     *
     * <code>repeated int32 control_input = 8;</code>
     */
    public int getControlInput(int index) {
      return controlInput_.getInt(index);
    }
    private int controlInputMemoizedSerializedSize = -1;

    public static final int INACCURATE_FIELD_NUMBER = 17;
    private boolean inaccurate_;
    /**
     * <pre>
     * Are the costs inaccurate?
     * </pre>
     *
     * <code>bool inaccurate = 17;</code>
     */
    public boolean getInaccurate() {
      return inaccurate_;
    }

    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 {
      getSerializedSize();
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (!getDeviceBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, device_);
      }
      if (id_ != 0) {
        output.writeInt32(3, id_);
      }
      for (int i = 0; i < inputInfo_.size(); i++) {
        output.writeMessage(4, inputInfo_.get(i));
      }
      for (int i = 0; i < outputInfo_.size(); i++) {
        output.writeMessage(5, outputInfo_.get(i));
      }
      if (temporaryMemorySize_ != 0L) {
        output.writeInt64(6, temporaryMemorySize_);
      }
      if (isFinal_ != false) {
        output.writeBool(7, isFinal_);
      }
      if (getControlInputList().size() > 0) {
        output.writeUInt32NoTag(66);
        output.writeUInt32NoTag(controlInputMemoizedSerializedSize);
      }
      for (int i = 0; i < controlInput_.size(); i++) {
        output.writeInt32NoTag(controlInput_.getInt(i));
      }
      if (computeCost_ != 0L) {
        output.writeInt64(9, computeCost_);
      }
      if (hostTempMemorySize_ != 0L) {
        output.writeInt64(10, hostTempMemorySize_);
      }
      if (deviceTempMemorySize_ != 0L) {
        output.writeInt64(11, deviceTempMemorySize_);
      }
      if (persistentMemorySize_ != 0L) {
        output.writeInt64(12, persistentMemorySize_);
      }
      if (computeTime_ != 0L) {
        output.writeInt64(14, computeTime_);
      }
      if (memoryTime_ != 0L) {
        output.writeInt64(15, memoryTime_);
      }
      if (devicePersistentMemorySize_ != 0L) {
        output.writeInt64(16, devicePersistentMemorySize_);
      }
      if (inaccurate_ != false) {
        output.writeBool(17, inaccurate_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (!getDeviceBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, device_);
      }
      if (id_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, id_);
      }
      for (int i = 0; i < inputInfo_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, inputInfo_.get(i));
      }
      for (int i = 0; i < outputInfo_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, outputInfo_.get(i));
      }
      if (temporaryMemorySize_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(6, temporaryMemorySize_);
      }
      if (isFinal_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(7, isFinal_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < controlInput_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(controlInput_.getInt(i));
        }
        size += dataSize;
        if (!getControlInputList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        controlInputMemoizedSerializedSize = dataSize;
      }
      if (computeCost_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(9, computeCost_);
      }
      if (hostTempMemorySize_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(10, hostTempMemorySize_);
      }
      if (deviceTempMemorySize_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(11, deviceTempMemorySize_);
      }
      if (persistentMemorySize_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(12, persistentMemorySize_);
      }
      if (computeTime_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(14, computeTime_);
      }
      if (memoryTime_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(15, memoryTime_);
      }
      if (devicePersistentMemorySize_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(16, devicePersistentMemorySize_);
      }
      if (inaccurate_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(17, inaccurate_);
      }
      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.CostGraphDef.Node)) {
        return super.equals(obj);
      }
      org.tensorflow.proto.framework.CostGraphDef.Node other = (org.tensorflow.proto.framework.CostGraphDef.Node) obj;

      if (!getName()
          .equals(other.getName())) return false;
      if (!getDevice()
          .equals(other.getDevice())) return false;
      if (getId()
          != other.getId()) return false;
      if (!getInputInfoList()
          .equals(other.getInputInfoList())) return false;
      if (!getOutputInfoList()
          .equals(other.getOutputInfoList())) return false;
      if (getTemporaryMemorySize()
          != other.getTemporaryMemorySize()) return false;
      if (getPersistentMemorySize()
          != other.getPersistentMemorySize()) return false;
      if (getHostTempMemorySize()
          != other.getHostTempMemorySize()) return false;
      if (getDeviceTempMemorySize()
          != other.getDeviceTempMemorySize()) return false;
      if (getDevicePersistentMemorySize()
          != other.getDevicePersistentMemorySize()) return false;
      if (getComputeCost()
          != other.getComputeCost()) return false;
      if (getComputeTime()
          != other.getComputeTime()) return false;
      if (getMemoryTime()
          != other.getMemoryTime()) return false;
      if (getIsFinal()
          != other.getIsFinal()) return false;
      if (!getControlInputList()
          .equals(other.getControlInputList())) return false;
      if (getInaccurate()
          != other.getInaccurate()) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + DEVICE_FIELD_NUMBER;
      hash = (53 * hash) + getDevice().hashCode();
      hash = (37 * hash) + ID_FIELD_NUMBER;
      hash = (53 * hash) + getId();
      if (getInputInfoCount() > 0) {
        hash = (37 * hash) + INPUT_INFO_FIELD_NUMBER;
        hash = (53 * hash) + getInputInfoList().hashCode();
      }
      if (getOutputInfoCount() > 0) {
        hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER;
        hash = (53 * hash) + getOutputInfoList().hashCode();
      }
      hash = (37 * hash) + TEMPORARY_MEMORY_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getTemporaryMemorySize());
      hash = (37 * hash) + PERSISTENT_MEMORY_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getPersistentMemorySize());
      hash = (37 * hash) + HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getHostTempMemorySize());
      hash = (37 * hash) + DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getDeviceTempMemorySize());
      hash = (37 * hash) + DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getDevicePersistentMemorySize());
      hash = (37 * hash) + COMPUTE_COST_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getComputeCost());
      hash = (37 * hash) + COMPUTE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getComputeTime());
      hash = (37 * hash) + MEMORY_TIME_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getMemoryTime());
      hash = (37 * hash) + IS_FINAL_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getIsFinal());
      if (getControlInputCount() > 0) {
        hash = (37 * hash) + CONTROL_INPUT_FIELD_NUMBER;
        hash = (53 * hash) + getControlInputList().hashCode();
      }
      hash = (37 * hash) + INACCURATE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getInaccurate());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.tensorflow.proto.framework.CostGraphDef.Node.class, org.tensorflow.proto.framework.CostGraphDef.Node.Builder.class);
      }

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

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

        device_ = "";

        id_ = 0;

        if (inputInfoBuilder_ == null) {
          inputInfo_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          inputInfoBuilder_.clear();
        }
        if (outputInfoBuilder_ == null) {
          outputInfo_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          outputInfoBuilder_.clear();
        }
        temporaryMemorySize_ = 0L;

        persistentMemorySize_ = 0L;

        hostTempMemorySize_ = 0L;

        deviceTempMemorySize_ = 0L;

        devicePersistentMemorySize_ = 0L;

        computeCost_ = 0L;

        computeTime_ = 0L;

        memoryTime_ = 0L;

        isFinal_ = false;

        controlInput_ = emptyIntList();
        bitField0_ = (bitField0_ & ~0x00000004);
        inaccurate_ = false;

        return this;
      }

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

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

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

      @java.lang.Override
      public org.tensorflow.proto.framework.CostGraphDef.Node buildPartial() {
        org.tensorflow.proto.framework.CostGraphDef.Node result = new org.tensorflow.proto.framework.CostGraphDef.Node(this);
        int from_bitField0_ = bitField0_;
        result.name_ = name_;
        result.device_ = device_;
        result.id_ = id_;
        if (inputInfoBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.inputInfo_ = inputInfo_;
        } else {
          result.inputInfo_ = inputInfoBuilder_.build();
        }
        if (outputInfoBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0)) {
            outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_);
            bitField0_ = (bitField0_ & ~0x00000002);
          }
          result.outputInfo_ = outputInfo_;
        } else {
          result.outputInfo_ = outputInfoBuilder_.build();
        }
        result.temporaryMemorySize_ = temporaryMemorySize_;
        result.persistentMemorySize_ = persistentMemorySize_;
        result.hostTempMemorySize_ = hostTempMemorySize_;
        result.deviceTempMemorySize_ = deviceTempMemorySize_;
        result.devicePersistentMemorySize_ = devicePersistentMemorySize_;
        result.computeCost_ = computeCost_;
        result.computeTime_ = computeTime_;
        result.memoryTime_ = memoryTime_;
        result.isFinal_ = isFinal_;
        if (((bitField0_ & 0x00000004) != 0)) {
          controlInput_.makeImmutable();
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.controlInput_ = controlInput_;
        result.inaccurate_ = inaccurate_;
        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.CostGraphDef.Node) {
          return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.Node)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.Node other) {
        if (other == org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance()) return this;
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (!other.getDevice().isEmpty()) {
          device_ = other.device_;
          onChanged();
        }
        if (other.getId() != 0) {
          setId(other.getId());
        }
        if (inputInfoBuilder_ == null) {
          if (!other.inputInfo_.isEmpty()) {
            if (inputInfo_.isEmpty()) {
              inputInfo_ = other.inputInfo_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureInputInfoIsMutable();
              inputInfo_.addAll(other.inputInfo_);
            }
            onChanged();
          }
        } else {
          if (!other.inputInfo_.isEmpty()) {
            if (inputInfoBuilder_.isEmpty()) {
              inputInfoBuilder_.dispose();
              inputInfoBuilder_ = null;
              inputInfo_ = other.inputInfo_;
              bitField0_ = (bitField0_ & ~0x00000001);
              inputInfoBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getInputInfoFieldBuilder() : null;
            } else {
              inputInfoBuilder_.addAllMessages(other.inputInfo_);
            }
          }
        }
        if (outputInfoBuilder_ == null) {
          if (!other.outputInfo_.isEmpty()) {
            if (outputInfo_.isEmpty()) {
              outputInfo_ = other.outputInfo_;
              bitField0_ = (bitField0_ & ~0x00000002);
            } else {
              ensureOutputInfoIsMutable();
              outputInfo_.addAll(other.outputInfo_);
            }
            onChanged();
          }
        } else {
          if (!other.outputInfo_.isEmpty()) {
            if (outputInfoBuilder_.isEmpty()) {
              outputInfoBuilder_.dispose();
              outputInfoBuilder_ = null;
              outputInfo_ = other.outputInfo_;
              bitField0_ = (bitField0_ & ~0x00000002);
              outputInfoBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getOutputInfoFieldBuilder() : null;
            } else {
              outputInfoBuilder_.addAllMessages(other.outputInfo_);
            }
          }
        }
        if (other.getTemporaryMemorySize() != 0L) {
          setTemporaryMemorySize(other.getTemporaryMemorySize());
        }
        if (other.getPersistentMemorySize() != 0L) {
          setPersistentMemorySize(other.getPersistentMemorySize());
        }
        if (other.getHostTempMemorySize() != 0L) {
          setHostTempMemorySize(other.getHostTempMemorySize());
        }
        if (other.getDeviceTempMemorySize() != 0L) {
          setDeviceTempMemorySize(other.getDeviceTempMemorySize());
        }
        if (other.getDevicePersistentMemorySize() != 0L) {
          setDevicePersistentMemorySize(other.getDevicePersistentMemorySize());
        }
        if (other.getComputeCost() != 0L) {
          setComputeCost(other.getComputeCost());
        }
        if (other.getComputeTime() != 0L) {
          setComputeTime(other.getComputeTime());
        }
        if (other.getMemoryTime() != 0L) {
          setMemoryTime(other.getMemoryTime());
        }
        if (other.getIsFinal() != false) {
          setIsFinal(other.getIsFinal());
        }
        if (!other.controlInput_.isEmpty()) {
          if (controlInput_.isEmpty()) {
            controlInput_ = other.controlInput_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureControlInputIsMutable();
            controlInput_.addAll(other.controlInput_);
          }
          onChanged();
        }
        if (other.getInaccurate() != false) {
          setInaccurate(other.getInaccurate());
        }
        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.CostGraphDef.Node parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.Node) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

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

      private java.lang.Object device_ = "";
      /**
       * <pre>
       * The device of the node. Can be empty if the node is mapped to the
       * default partition or partitioning hasn't been run yet.
       * </pre>
       *
       * <code>string device = 2;</code>
       */
      public java.lang.String getDevice() {
        java.lang.Object ref = device_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          device_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The device of the node. Can be empty if the node is mapped to the
       * default partition or partitioning hasn't been run yet.
       * </pre>
       *
       * <code>string device = 2;</code>
       */
      public com.google.protobuf.ByteString
          getDeviceBytes() {
        java.lang.Object ref = device_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          device_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The device of the node. Can be empty if the node is mapped to the
       * default partition or partitioning hasn't been run yet.
       * </pre>
       *
       * <code>string device = 2;</code>
       */
      public Builder setDevice(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        device_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The device of the node. Can be empty if the node is mapped to the
       * default partition or partitioning hasn't been run yet.
       * </pre>
       *
       * <code>string device = 2;</code>
       */
      public Builder clearDevice() {
        
        device_ = getDefaultInstance().getDevice();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The device of the node. Can be empty if the node is mapped to the
       * default partition or partitioning hasn't been run yet.
       * </pre>
       *
       * <code>string device = 2;</code>
       */
      public Builder setDeviceBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        device_ = value;
        onChanged();
        return this;
      }

      private int id_ ;
      /**
       * <pre>
       * The id of the node. Node ids are only unique inside a partition.
       * </pre>
       *
       * <code>int32 id = 3;</code>
       */
      public int getId() {
        return id_;
      }
      /**
       * <pre>
       * The id of the node. Node ids are only unique inside a partition.
       * </pre>
       *
       * <code>int32 id = 3;</code>
       */
      public Builder setId(int value) {
        
        id_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The id of the node. Node ids are only unique inside a partition.
       * </pre>
       *
       * <code>int32 id = 3;</code>
       */
      public Builder clearId() {
        
        id_ = 0;
        onChanged();
        return this;
      }

      private java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo> inputInfo_ =
        java.util.Collections.emptyList();
      private void ensureInputInfoIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          inputInfo_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo>(inputInfo_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> inputInfoBuilder_;

      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo> getInputInfoList() {
        if (inputInfoBuilder_ == null) {
          return java.util.Collections.unmodifiableList(inputInfo_);
        } else {
          return inputInfoBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public int getInputInfoCount() {
        if (inputInfoBuilder_ == null) {
          return inputInfo_.size();
        } else {
          return inputInfoBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getInputInfo(int index) {
        if (inputInfoBuilder_ == null) {
          return inputInfo_.get(index);
        } else {
          return inputInfoBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder setInputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo value) {
        if (inputInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureInputInfoIsMutable();
          inputInfo_.set(index, value);
          onChanged();
        } else {
          inputInfoBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder setInputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) {
        if (inputInfoBuilder_ == null) {
          ensureInputInfoIsMutable();
          inputInfo_.set(index, builderForValue.build());
          onChanged();
        } else {
          inputInfoBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder addInputInfo(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo value) {
        if (inputInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureInputInfoIsMutable();
          inputInfo_.add(value);
          onChanged();
        } else {
          inputInfoBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder addInputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo value) {
        if (inputInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureInputInfoIsMutable();
          inputInfo_.add(index, value);
          onChanged();
        } else {
          inputInfoBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder addInputInfo(
          org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) {
        if (inputInfoBuilder_ == null) {
          ensureInputInfoIsMutable();
          inputInfo_.add(builderForValue.build());
          onChanged();
        } else {
          inputInfoBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder addInputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) {
        if (inputInfoBuilder_ == null) {
          ensureInputInfoIsMutable();
          inputInfo_.add(index, builderForValue.build());
          onChanged();
        } else {
          inputInfoBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder addAllInputInfo(
          java.lang.Iterable<? extends org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo> values) {
        if (inputInfoBuilder_ == null) {
          ensureInputInfoIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, inputInfo_);
          onChanged();
        } else {
          inputInfoBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder clearInputInfo() {
        if (inputInfoBuilder_ == null) {
          inputInfo_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          inputInfoBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public Builder removeInputInfo(int index) {
        if (inputInfoBuilder_ == null) {
          ensureInputInfoIsMutable();
          inputInfo_.remove(index);
          onChanged();
        } else {
          inputInfoBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder getInputInfoBuilder(
          int index) {
        return getInputInfoFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder(
          int index) {
        if (inputInfoBuilder_ == null) {
          return inputInfo_.get(index);  } else {
          return inputInfoBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> 
           getInputInfoOrBuilderList() {
        if (inputInfoBuilder_ != null) {
          return inputInfoBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(inputInfo_);
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder() {
        return getInputInfoFieldBuilder().addBuilder(
            org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance());
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder(
          int index) {
        return getInputInfoFieldBuilder().addBuilder(
            index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance());
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;</code>
       */
      public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder> 
           getInputInfoBuilderList() {
        return getInputInfoFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> 
          getInputInfoFieldBuilder() {
        if (inputInfoBuilder_ == null) {
          inputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder>(
                  inputInfo_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          inputInfo_ = null;
        }
        return inputInfoBuilder_;
      }

      private java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo> outputInfo_ =
        java.util.Collections.emptyList();
      private void ensureOutputInfoIsMutable() {
        if (!((bitField0_ & 0x00000002) != 0)) {
          outputInfo_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo>(outputInfo_);
          bitField0_ |= 0x00000002;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> outputInfoBuilder_;

      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo> getOutputInfoList() {
        if (outputInfoBuilder_ == null) {
          return java.util.Collections.unmodifiableList(outputInfo_);
        } else {
          return outputInfoBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public int getOutputInfoCount() {
        if (outputInfoBuilder_ == null) {
          return outputInfo_.size();
        } else {
          return outputInfoBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index) {
        if (outputInfoBuilder_ == null) {
          return outputInfo_.get(index);
        } else {
          return outputInfoBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder setOutputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo value) {
        if (outputInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureOutputInfoIsMutable();
          outputInfo_.set(index, value);
          onChanged();
        } else {
          outputInfoBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder setOutputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) {
        if (outputInfoBuilder_ == null) {
          ensureOutputInfoIsMutable();
          outputInfo_.set(index, builderForValue.build());
          onChanged();
        } else {
          outputInfoBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder addOutputInfo(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo value) {
        if (outputInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureOutputInfoIsMutable();
          outputInfo_.add(value);
          onChanged();
        } else {
          outputInfoBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder addOutputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo value) {
        if (outputInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureOutputInfoIsMutable();
          outputInfo_.add(index, value);
          onChanged();
        } else {
          outputInfoBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder addOutputInfo(
          org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) {
        if (outputInfoBuilder_ == null) {
          ensureOutputInfoIsMutable();
          outputInfo_.add(builderForValue.build());
          onChanged();
        } else {
          outputInfoBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder addOutputInfo(
          int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) {
        if (outputInfoBuilder_ == null) {
          ensureOutputInfoIsMutable();
          outputInfo_.add(index, builderForValue.build());
          onChanged();
        } else {
          outputInfoBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder addAllOutputInfo(
          java.lang.Iterable<? extends org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo> values) {
        if (outputInfoBuilder_ == null) {
          ensureOutputInfoIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, outputInfo_);
          onChanged();
        } else {
          outputInfoBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder clearOutputInfo() {
        if (outputInfoBuilder_ == null) {
          outputInfo_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000002);
          onChanged();
        } else {
          outputInfoBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public Builder removeOutputInfo(int index) {
        if (outputInfoBuilder_ == null) {
          ensureOutputInfoIsMutable();
          outputInfo_.remove(index);
          onChanged();
        } else {
          outputInfoBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder getOutputInfoBuilder(
          int index) {
        return getOutputInfoFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder(
          int index) {
        if (outputInfoBuilder_ == null) {
          return outputInfo_.get(index);  } else {
          return outputInfoBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> 
           getOutputInfoOrBuilderList() {
        if (outputInfoBuilder_ != null) {
          return outputInfoBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(outputInfo_);
        }
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder() {
        return getOutputInfoFieldBuilder().addBuilder(
            org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance());
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder(
          int index) {
        return getOutputInfoFieldBuilder().addBuilder(
            index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance());
      }
      /**
       * <code>repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;</code>
       */
      public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder> 
           getOutputInfoBuilderList() {
        return getOutputInfoFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> 
          getOutputInfoFieldBuilder() {
        if (outputInfoBuilder_ == null) {
          outputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder>(
                  outputInfo_,
                  ((bitField0_ & 0x00000002) != 0),
                  getParentForChildren(),
                  isClean());
          outputInfo_ = null;
        }
        return outputInfoBuilder_;
      }

      private long temporaryMemorySize_ ;
      /**
       * <pre>
       * Temporary memory used by this node.
       * </pre>
       *
       * <code>int64 temporary_memory_size = 6;</code>
       */
      public long getTemporaryMemorySize() {
        return temporaryMemorySize_;
      }
      /**
       * <pre>
       * Temporary memory used by this node.
       * </pre>
       *
       * <code>int64 temporary_memory_size = 6;</code>
       */
      public Builder setTemporaryMemorySize(long value) {
        
        temporaryMemorySize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Temporary memory used by this node.
       * </pre>
       *
       * <code>int64 temporary_memory_size = 6;</code>
       */
      public Builder clearTemporaryMemorySize() {
        
        temporaryMemorySize_ = 0L;
        onChanged();
        return this;
      }

      private long persistentMemorySize_ ;
      /**
       * <pre>
       * Persistent memory used by this node.
       * </pre>
       *
       * <code>int64 persistent_memory_size = 12;</code>
       */
      public long getPersistentMemorySize() {
        return persistentMemorySize_;
      }
      /**
       * <pre>
       * Persistent memory used by this node.
       * </pre>
       *
       * <code>int64 persistent_memory_size = 12;</code>
       */
      public Builder setPersistentMemorySize(long value) {
        
        persistentMemorySize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Persistent memory used by this node.
       * </pre>
       *
       * <code>int64 persistent_memory_size = 12;</code>
       */
      public Builder clearPersistentMemorySize() {
        
        persistentMemorySize_ = 0L;
        onChanged();
        return this;
      }

      private long hostTempMemorySize_ ;
      /**
       * <code>int64 host_temp_memory_size = 10 [deprecated = true];</code>
       */
      @java.lang.Deprecated public long getHostTempMemorySize() {
        return hostTempMemorySize_;
      }
      /**
       * <code>int64 host_temp_memory_size = 10 [deprecated = true];</code>
       */
      @java.lang.Deprecated public Builder setHostTempMemorySize(long value) {
        
        hostTempMemorySize_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int64 host_temp_memory_size = 10 [deprecated = true];</code>
       */
      @java.lang.Deprecated public Builder clearHostTempMemorySize() {
        
        hostTempMemorySize_ = 0L;
        onChanged();
        return this;
      }

      private long deviceTempMemorySize_ ;
      /**
       * <code>int64 device_temp_memory_size = 11 [deprecated = true];</code>
       */
      @java.lang.Deprecated public long getDeviceTempMemorySize() {
        return deviceTempMemorySize_;
      }
      /**
       * <code>int64 device_temp_memory_size = 11 [deprecated = true];</code>
       */
      @java.lang.Deprecated public Builder setDeviceTempMemorySize(long value) {
        
        deviceTempMemorySize_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int64 device_temp_memory_size = 11 [deprecated = true];</code>
       */
      @java.lang.Deprecated public Builder clearDeviceTempMemorySize() {
        
        deviceTempMemorySize_ = 0L;
        onChanged();
        return this;
      }

      private long devicePersistentMemorySize_ ;
      /**
       * <code>int64 device_persistent_memory_size = 16 [deprecated = true];</code>
       */
      @java.lang.Deprecated public long getDevicePersistentMemorySize() {
        return devicePersistentMemorySize_;
      }
      /**
       * <code>int64 device_persistent_memory_size = 16 [deprecated = true];</code>
       */
      @java.lang.Deprecated public Builder setDevicePersistentMemorySize(long value) {
        
        devicePersistentMemorySize_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int64 device_persistent_memory_size = 16 [deprecated = true];</code>
       */
      @java.lang.Deprecated public Builder clearDevicePersistentMemorySize() {
        
        devicePersistentMemorySize_ = 0L;
        onChanged();
        return this;
      }

      private long computeCost_ ;
      /**
       * <pre>
       * Estimate of the computational cost of this node, in microseconds.
       * </pre>
       *
       * <code>int64 compute_cost = 9;</code>
       */
      public long getComputeCost() {
        return computeCost_;
      }
      /**
       * <pre>
       * Estimate of the computational cost of this node, in microseconds.
       * </pre>
       *
       * <code>int64 compute_cost = 9;</code>
       */
      public Builder setComputeCost(long value) {
        
        computeCost_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Estimate of the computational cost of this node, in microseconds.
       * </pre>
       *
       * <code>int64 compute_cost = 9;</code>
       */
      public Builder clearComputeCost() {
        
        computeCost_ = 0L;
        onChanged();
        return this;
      }

      private long computeTime_ ;
      /**
       * <pre>
       * Analytical estimate of the computational cost of this node, in
       * microseconds.
       * </pre>
       *
       * <code>int64 compute_time = 14;</code>
       */
      public long getComputeTime() {
        return computeTime_;
      }
      /**
       * <pre>
       * Analytical estimate of the computational cost of this node, in
       * microseconds.
       * </pre>
       *
       * <code>int64 compute_time = 14;</code>
       */
      public Builder setComputeTime(long value) {
        
        computeTime_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Analytical estimate of the computational cost of this node, in
       * microseconds.
       * </pre>
       *
       * <code>int64 compute_time = 14;</code>
       */
      public Builder clearComputeTime() {
        
        computeTime_ = 0L;
        onChanged();
        return this;
      }

      private long memoryTime_ ;
      /**
       * <pre>
       * Analytical estimate of the memory access cost of this node, in
       * microseconds.
       * </pre>
       *
       * <code>int64 memory_time = 15;</code>
       */
      public long getMemoryTime() {
        return memoryTime_;
      }
      /**
       * <pre>
       * Analytical estimate of the memory access cost of this node, in
       * microseconds.
       * </pre>
       *
       * <code>int64 memory_time = 15;</code>
       */
      public Builder setMemoryTime(long value) {
        
        memoryTime_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Analytical estimate of the memory access cost of this node, in
       * microseconds.
       * </pre>
       *
       * <code>int64 memory_time = 15;</code>
       */
      public Builder clearMemoryTime() {
        
        memoryTime_ = 0L;
        onChanged();
        return this;
      }

      private boolean isFinal_ ;
      /**
       * <pre>
       * If true, the output is permanent: it can't be discarded, because this
       * node is part of the "final output". Nodes may depend on final nodes.
       * </pre>
       *
       * <code>bool is_final = 7;</code>
       */
      public boolean getIsFinal() {
        return isFinal_;
      }
      /**
       * <pre>
       * If true, the output is permanent: it can't be discarded, because this
       * node is part of the "final output". Nodes may depend on final nodes.
       * </pre>
       *
       * <code>bool is_final = 7;</code>
       */
      public Builder setIsFinal(boolean value) {
        
        isFinal_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If true, the output is permanent: it can't be discarded, because this
       * node is part of the "final output". Nodes may depend on final nodes.
       * </pre>
       *
       * <code>bool is_final = 7;</code>
       */
      public Builder clearIsFinal() {
        
        isFinal_ = false;
        onChanged();
        return this;
      }

      private com.google.protobuf.Internal.IntList controlInput_ = emptyIntList();
      private void ensureControlInputIsMutable() {
        if (!((bitField0_ & 0x00000004) != 0)) {
          controlInput_ = mutableCopy(controlInput_);
          bitField0_ |= 0x00000004;
         }
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public java.util.List<java.lang.Integer>
          getControlInputList() {
        return ((bitField0_ & 0x00000004) != 0) ?
                 java.util.Collections.unmodifiableList(controlInput_) : controlInput_;
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public int getControlInputCount() {
        return controlInput_.size();
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public int getControlInput(int index) {
        return controlInput_.getInt(index);
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public Builder setControlInput(
          int index, int value) {
        ensureControlInputIsMutable();
        controlInput_.setInt(index, value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public Builder addControlInput(int value) {
        ensureControlInputIsMutable();
        controlInput_.addInt(value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public Builder addAllControlInput(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        ensureControlInputIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, controlInput_);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Ids of the control inputs for this node.
       * </pre>
       *
       * <code>repeated int32 control_input = 8;</code>
       */
      public Builder clearControlInput() {
        controlInput_ = emptyIntList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }

      private boolean inaccurate_ ;
      /**
       * <pre>
       * Are the costs inaccurate?
       * </pre>
       *
       * <code>bool inaccurate = 17;</code>
       */
      public boolean getInaccurate() {
        return inaccurate_;
      }
      /**
       * <pre>
       * Are the costs inaccurate?
       * </pre>
       *
       * <code>bool inaccurate = 17;</code>
       */
      public Builder setInaccurate(boolean value) {
        
        inaccurate_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Are the costs inaccurate?
       * </pre>
       *
       * <code>bool inaccurate = 17;</code>
       */
      public Builder clearInaccurate() {
        
        inaccurate_ = false;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node)
    }

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

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

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

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

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

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

  }

  public interface AggregatedCostOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.AggregatedCost)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Aggregated cost value.
     * </pre>
     *
     * <code>float cost = 1;</code>
     */
    float getCost();

    /**
     * <pre>
     * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
     * </pre>
     *
     * <code>string dimension = 2;</code>
     */
    java.lang.String getDimension();
    /**
     * <pre>
     * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
     * </pre>
     *
     * <code>string dimension = 2;</code>
     */
    com.google.protobuf.ByteString
        getDimensionBytes();
  }
  /**
   * <pre>
   * Total cost of this graph, typically used for balancing decisions.
   * </pre>
   *
   * Protobuf type {@code tensorflow.CostGraphDef.AggregatedCost}
   */
  public  static final class AggregatedCost extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.AggregatedCost)
      AggregatedCostOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use AggregatedCost.newBuilder() to construct.
    private AggregatedCost(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private AggregatedCost() {
      dimension_ = "";
    }

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

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

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

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_AggregatedCost_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.class, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder.class);
    }

    public static final int COST_FIELD_NUMBER = 1;
    private float cost_;
    /**
     * <pre>
     * Aggregated cost value.
     * </pre>
     *
     * <code>float cost = 1;</code>
     */
    public float getCost() {
      return cost_;
    }

    public static final int DIMENSION_FIELD_NUMBER = 2;
    private volatile java.lang.Object dimension_;
    /**
     * <pre>
     * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
     * </pre>
     *
     * <code>string dimension = 2;</code>
     */
    public java.lang.String getDimension() {
      java.lang.Object ref = dimension_;
      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();
        dimension_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
     * </pre>
     *
     * <code>string dimension = 2;</code>
     */
    public com.google.protobuf.ByteString
        getDimensionBytes() {
      java.lang.Object ref = dimension_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        dimension_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (cost_ != 0F) {
        output.writeFloat(1, cost_);
      }
      if (!getDimensionBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dimension_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (cost_ != 0F) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(1, cost_);
      }
      if (!getDimensionBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dimension_);
      }
      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.CostGraphDef.AggregatedCost)) {
        return super.equals(obj);
      }
      org.tensorflow.proto.framework.CostGraphDef.AggregatedCost other = (org.tensorflow.proto.framework.CostGraphDef.AggregatedCost) obj;

      if (java.lang.Float.floatToIntBits(getCost())
          != java.lang.Float.floatToIntBits(
              other.getCost())) return false;
      if (!getDimension()
          .equals(other.getDimension())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

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

    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost 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.CostGraphDef.AggregatedCost parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost 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.CostGraphDef.AggregatedCost parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost 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.CostGraphDef.AggregatedCost parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost 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.CostGraphDef.AggregatedCost parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static org.tensorflow.proto.framework.CostGraphDef.AggregatedCost 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.CostGraphDef.AggregatedCost prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * Total cost of this graph, typically used for balancing decisions.
     * </pre>
     *
     * Protobuf type {@code tensorflow.CostGraphDef.AggregatedCost}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.AggregatedCost)
        org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_AggregatedCost_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_AggregatedCost_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.class, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder.class);
      }

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

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

        dimension_ = "";

        return this;
      }

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

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

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

      @java.lang.Override
      public org.tensorflow.proto.framework.CostGraphDef.AggregatedCost buildPartial() {
        org.tensorflow.proto.framework.CostGraphDef.AggregatedCost result = new org.tensorflow.proto.framework.CostGraphDef.AggregatedCost(this);
        result.cost_ = cost_;
        result.dimension_ = dimension_;
        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.CostGraphDef.AggregatedCost) {
          return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.AggregatedCost)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.AggregatedCost other) {
        if (other == org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.getDefaultInstance()) return this;
        if (other.getCost() != 0F) {
          setCost(other.getCost());
        }
        if (!other.getDimension().isEmpty()) {
          dimension_ = other.dimension_;
          onChanged();
        }
        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.CostGraphDef.AggregatedCost parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.AggregatedCost) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private float cost_ ;
      /**
       * <pre>
       * Aggregated cost value.
       * </pre>
       *
       * <code>float cost = 1;</code>
       */
      public float getCost() {
        return cost_;
      }
      /**
       * <pre>
       * Aggregated cost value.
       * </pre>
       *
       * <code>float cost = 1;</code>
       */
      public Builder setCost(float value) {
        
        cost_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Aggregated cost value.
       * </pre>
       *
       * <code>float cost = 1;</code>
       */
      public Builder clearCost() {
        
        cost_ = 0F;
        onChanged();
        return this;
      }

      private java.lang.Object dimension_ = "";
      /**
       * <pre>
       * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
       * </pre>
       *
       * <code>string dimension = 2;</code>
       */
      public java.lang.String getDimension() {
        java.lang.Object ref = dimension_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          dimension_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
       * </pre>
       *
       * <code>string dimension = 2;</code>
       */
      public com.google.protobuf.ByteString
          getDimensionBytes() {
        java.lang.Object ref = dimension_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          dimension_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
       * </pre>
       *
       * <code>string dimension = 2;</code>
       */
      public Builder setDimension(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        dimension_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
       * </pre>
       *
       * <code>string dimension = 2;</code>
       */
      public Builder clearDimension() {
        
        dimension_ = getDefaultInstance().getDimension();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
       * </pre>
       *
       * <code>string dimension = 2;</code>
       */
      public Builder setDimensionBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        dimension_ = value;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.AggregatedCost)
    }

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

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

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

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

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

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

  }

  public static final int NODE_FIELD_NUMBER = 1;
  private java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node> node_;
  /**
   * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node> getNodeList() {
    return node_;
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder> 
      getNodeOrBuilderList() {
    return node_;
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
   */
  public int getNodeCount() {
    return node_.size();
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
   */
  public org.tensorflow.proto.framework.CostGraphDef.Node getNode(int index) {
    return node_.get(index);
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
   */
  public org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder(
      int index) {
    return node_.get(index);
  }

  public static final int COST_FIELD_NUMBER = 2;
  private java.util.List<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost> cost_;
  /**
   * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost> getCostList() {
    return cost_;
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder> 
      getCostOrBuilderList() {
    return cost_;
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
   */
  public int getCostCount() {
    return cost_.size();
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
   */
  public org.tensorflow.proto.framework.CostGraphDef.AggregatedCost getCost(int index) {
    return cost_.get(index);
  }
  /**
   * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
   */
  public org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder getCostOrBuilder(
      int index) {
    return cost_.get(index);
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    for (int i = 0; i < node_.size(); i++) {
      output.writeMessage(1, node_.get(i));
    }
    for (int i = 0; i < cost_.size(); i++) {
      output.writeMessage(2, cost_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < node_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, node_.get(i));
    }
    for (int i = 0; i < cost_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, cost_.get(i));
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

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

    if (!getNodeList()
        .equals(other.getNodeList())) return false;
    if (!getCostList()
        .equals(other.getCostList())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getNodeCount() > 0) {
      hash = (37 * hash) + NODE_FIELD_NUMBER;
      hash = (53 * hash) + getNodeList().hashCode();
    }
    if (getCostCount() > 0) {
      hash = (37 * hash) + COST_FIELD_NUMBER;
      hash = (53 * hash) + getCostList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getNodeFieldBuilder();
        getCostFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (nodeBuilder_ == null) {
        node_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        nodeBuilder_.clear();
      }
      if (costBuilder_ == null) {
        cost_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        costBuilder_.clear();
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.CostGraphDef buildPartial() {
      org.tensorflow.proto.framework.CostGraphDef result = new org.tensorflow.proto.framework.CostGraphDef(this);
      int from_bitField0_ = bitField0_;
      if (nodeBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          node_ = java.util.Collections.unmodifiableList(node_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.node_ = node_;
      } else {
        result.node_ = nodeBuilder_.build();
      }
      if (costBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          cost_ = java.util.Collections.unmodifiableList(cost_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.cost_ = cost_;
      } else {
        result.cost_ = costBuilder_.build();
      }
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef other) {
      if (other == org.tensorflow.proto.framework.CostGraphDef.getDefaultInstance()) return this;
      if (nodeBuilder_ == null) {
        if (!other.node_.isEmpty()) {
          if (node_.isEmpty()) {
            node_ = other.node_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureNodeIsMutable();
            node_.addAll(other.node_);
          }
          onChanged();
        }
      } else {
        if (!other.node_.isEmpty()) {
          if (nodeBuilder_.isEmpty()) {
            nodeBuilder_.dispose();
            nodeBuilder_ = null;
            node_ = other.node_;
            bitField0_ = (bitField0_ & ~0x00000001);
            nodeBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getNodeFieldBuilder() : null;
          } else {
            nodeBuilder_.addAllMessages(other.node_);
          }
        }
      }
      if (costBuilder_ == null) {
        if (!other.cost_.isEmpty()) {
          if (cost_.isEmpty()) {
            cost_ = other.cost_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureCostIsMutable();
            cost_.addAll(other.cost_);
          }
          onChanged();
        }
      } else {
        if (!other.cost_.isEmpty()) {
          if (costBuilder_.isEmpty()) {
            costBuilder_.dispose();
            costBuilder_ = null;
            cost_ = other.cost_;
            bitField0_ = (bitField0_ & ~0x00000002);
            costBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getCostFieldBuilder() : null;
          } else {
            costBuilder_.addAllMessages(other.cost_);
          }
        }
      }
      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.CostGraphDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.CostGraphDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

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

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.CostGraphDef.Node, org.tensorflow.proto.framework.CostGraphDef.Node.Builder, org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder> nodeBuilder_;

    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node> getNodeList() {
      if (nodeBuilder_ == null) {
        return java.util.Collections.unmodifiableList(node_);
      } else {
        return nodeBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public int getNodeCount() {
      if (nodeBuilder_ == null) {
        return node_.size();
      } else {
        return nodeBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node getNode(int index) {
      if (nodeBuilder_ == null) {
        return node_.get(index);
      } else {
        return nodeBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder setNode(
        int index, org.tensorflow.proto.framework.CostGraphDef.Node value) {
      if (nodeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodeIsMutable();
        node_.set(index, value);
        onChanged();
      } else {
        nodeBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder setNode(
        int index, org.tensorflow.proto.framework.CostGraphDef.Node.Builder builderForValue) {
      if (nodeBuilder_ == null) {
        ensureNodeIsMutable();
        node_.set(index, builderForValue.build());
        onChanged();
      } else {
        nodeBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder addNode(org.tensorflow.proto.framework.CostGraphDef.Node value) {
      if (nodeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodeIsMutable();
        node_.add(value);
        onChanged();
      } else {
        nodeBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder addNode(
        int index, org.tensorflow.proto.framework.CostGraphDef.Node value) {
      if (nodeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodeIsMutable();
        node_.add(index, value);
        onChanged();
      } else {
        nodeBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder addNode(
        org.tensorflow.proto.framework.CostGraphDef.Node.Builder builderForValue) {
      if (nodeBuilder_ == null) {
        ensureNodeIsMutable();
        node_.add(builderForValue.build());
        onChanged();
      } else {
        nodeBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder addNode(
        int index, org.tensorflow.proto.framework.CostGraphDef.Node.Builder builderForValue) {
      if (nodeBuilder_ == null) {
        ensureNodeIsMutable();
        node_.add(index, builderForValue.build());
        onChanged();
      } else {
        nodeBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder addAllNode(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.CostGraphDef.Node> values) {
      if (nodeBuilder_ == null) {
        ensureNodeIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, node_);
        onChanged();
      } else {
        nodeBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder clearNode() {
      if (nodeBuilder_ == null) {
        node_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        nodeBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public Builder removeNode(int index) {
      if (nodeBuilder_ == null) {
        ensureNodeIsMutable();
        node_.remove(index);
        onChanged();
      } else {
        nodeBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.Builder getNodeBuilder(
        int index) {
      return getNodeFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder(
        int index) {
      if (nodeBuilder_ == null) {
        return node_.get(index);  } else {
        return nodeBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder> 
         getNodeOrBuilderList() {
      if (nodeBuilder_ != null) {
        return nodeBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(node_);
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.Builder addNodeBuilder() {
      return getNodeFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance());
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.Node.Builder addNodeBuilder(
        int index) {
      return getNodeFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance());
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.Node node = 1;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.CostGraphDef.Node.Builder> 
         getNodeBuilderList() {
      return getNodeFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.CostGraphDef.Node, org.tensorflow.proto.framework.CostGraphDef.Node.Builder, org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder> 
        getNodeFieldBuilder() {
      if (nodeBuilder_ == null) {
        nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.CostGraphDef.Node, org.tensorflow.proto.framework.CostGraphDef.Node.Builder, org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder>(
                node_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        node_ = null;
      }
      return nodeBuilder_;
    }

    private java.util.List<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost> cost_ =
      java.util.Collections.emptyList();
    private void ensureCostIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        cost_ = new java.util.ArrayList<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost>(cost_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.CostGraphDef.AggregatedCost, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder> costBuilder_;

    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost> getCostList() {
      if (costBuilder_ == null) {
        return java.util.Collections.unmodifiableList(cost_);
      } else {
        return costBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public int getCostCount() {
      if (costBuilder_ == null) {
        return cost_.size();
      } else {
        return costBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.AggregatedCost getCost(int index) {
      if (costBuilder_ == null) {
        return cost_.get(index);
      } else {
        return costBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder setCost(
        int index, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost value) {
      if (costBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCostIsMutable();
        cost_.set(index, value);
        onChanged();
      } else {
        costBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder setCost(
        int index, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder builderForValue) {
      if (costBuilder_ == null) {
        ensureCostIsMutable();
        cost_.set(index, builderForValue.build());
        onChanged();
      } else {
        costBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder addCost(org.tensorflow.proto.framework.CostGraphDef.AggregatedCost value) {
      if (costBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCostIsMutable();
        cost_.add(value);
        onChanged();
      } else {
        costBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder addCost(
        int index, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost value) {
      if (costBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCostIsMutable();
        cost_.add(index, value);
        onChanged();
      } else {
        costBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder addCost(
        org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder builderForValue) {
      if (costBuilder_ == null) {
        ensureCostIsMutable();
        cost_.add(builderForValue.build());
        onChanged();
      } else {
        costBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder addCost(
        int index, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder builderForValue) {
      if (costBuilder_ == null) {
        ensureCostIsMutable();
        cost_.add(index, builderForValue.build());
        onChanged();
      } else {
        costBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder addAllCost(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.CostGraphDef.AggregatedCost> values) {
      if (costBuilder_ == null) {
        ensureCostIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, cost_);
        onChanged();
      } else {
        costBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder clearCost() {
      if (costBuilder_ == null) {
        cost_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        costBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public Builder removeCost(int index) {
      if (costBuilder_ == null) {
        ensureCostIsMutable();
        cost_.remove(index);
        onChanged();
      } else {
        costBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder getCostBuilder(
        int index) {
      return getCostFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder getCostOrBuilder(
        int index) {
      if (costBuilder_ == null) {
        return cost_.get(index);  } else {
        return costBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder> 
         getCostOrBuilderList() {
      if (costBuilder_ != null) {
        return costBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(cost_);
      }
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder addCostBuilder() {
      return getCostFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.getDefaultInstance());
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder addCostBuilder(
        int index) {
      return getCostFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.getDefaultInstance());
    }
    /**
     * <code>repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder> 
         getCostBuilderList() {
      return getCostFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.CostGraphDef.AggregatedCost, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder> 
        getCostFieldBuilder() {
      if (costBuilder_ == null) {
        costBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.CostGraphDef.AggregatedCost, org.tensorflow.proto.framework.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.framework.CostGraphDef.AggregatedCostOrBuilder>(
                cost_,
                ((bitField0_ & 0x00000002) != 0),
                getParentForChildren(),
                isClean());
        cost_ = null;
      }
      return costBuilder_;
    }
    @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.CostGraphDef)
  }

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

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

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

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

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

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

}

