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

package org.tensorflow.proto.util;

/**
 * <pre>
 * A debugger-instrumented graph.
 * </pre>
 *
 * Protobuf type {@code tensorflow.DebuggedGraph}
 */
public  final class DebuggedGraph extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.DebuggedGraph)
    DebuggedGraphOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DebuggedGraph.newBuilder() to construct.
  private DebuggedGraph(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private DebuggedGraph() {
    graphId_ = "";
    graphName_ = "";
    instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    originalGraphDef_ = com.google.protobuf.ByteString.EMPTY;
    instrumentedGraphDef_ = com.google.protobuf.ByteString.EMPTY;
    outerContextId_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private DebuggedGraph(
      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();

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

            graphName_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              instrumentedOps_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            instrumentedOps_.add(s);
            break;
          }
          case 34: {

            originalGraphDef_ = input.readBytes();
            break;
          }
          case 42: {

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

            outerContextId_ = 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 {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        instrumentedOps_ = instrumentedOps_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.util.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.util.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.util.DebuggedGraph.class, org.tensorflow.proto.util.DebuggedGraph.Builder.class);
  }

  public static final int GRAPH_ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object graphId_;
  /**
   * <pre>
   * An ID for the graph.
   * This can be used up to look up graph names. Generated by the debugger.
   * </pre>
   *
   * <code>string graph_id = 1;</code>
   */
  public java.lang.String getGraphId() {
    java.lang.Object ref = graphId_;
    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();
      graphId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * An ID for the graph.
   * This can be used up to look up graph names. Generated by the debugger.
   * </pre>
   *
   * <code>string graph_id = 1;</code>
   */
  public com.google.protobuf.ByteString
      getGraphIdBytes() {
    java.lang.Object ref = graphId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      graphId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int GRAPH_NAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object graphName_;
  /**
   * <pre>
   * Name of the graph (if available).
   * </pre>
   *
   * <code>string graph_name = 2;</code>
   */
  public java.lang.String getGraphName() {
    java.lang.Object ref = graphName_;
    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();
      graphName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the graph (if available).
   * </pre>
   *
   * <code>string graph_name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getGraphNameBytes() {
    java.lang.Object ref = graphName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      graphName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INSTRUMENTED_OPS_FIELD_NUMBER = 3;
  private com.google.protobuf.LazyStringList instrumentedOps_;
  /**
   * <pre>
   * Names of the instrumented ops. This can be used to look up op name
   * based on the numeric-summary tensors (2nd column).
   * </pre>
   *
   * <code>repeated string instrumented_ops = 3;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getInstrumentedOpsList() {
    return instrumentedOps_;
  }
  /**
   * <pre>
   * Names of the instrumented ops. This can be used to look up op name
   * based on the numeric-summary tensors (2nd column).
   * </pre>
   *
   * <code>repeated string instrumented_ops = 3;</code>
   */
  public int getInstrumentedOpsCount() {
    return instrumentedOps_.size();
  }
  /**
   * <pre>
   * Names of the instrumented ops. This can be used to look up op name
   * based on the numeric-summary tensors (2nd column).
   * </pre>
   *
   * <code>repeated string instrumented_ops = 3;</code>
   */
  public java.lang.String getInstrumentedOps(int index) {
    return instrumentedOps_.get(index);
  }
  /**
   * <pre>
   * Names of the instrumented ops. This can be used to look up op name
   * based on the numeric-summary tensors (2nd column).
   * </pre>
   *
   * <code>repeated string instrumented_ops = 3;</code>
   */
  public com.google.protobuf.ByteString
      getInstrumentedOpsBytes(int index) {
    return instrumentedOps_.getByteString(index);
  }

  public static final int ORIGINAL_GRAPH_DEF_FIELD_NUMBER = 4;
  private com.google.protobuf.ByteString originalGraphDef_;
  /**
   * <pre>
   * Original (uninstrumented) GraphDef (if available).
   * </pre>
   *
   * <code>bytes original_graph_def = 4;</code>
   */
  public com.google.protobuf.ByteString getOriginalGraphDef() {
    return originalGraphDef_;
  }

  public static final int INSTRUMENTED_GRAPH_DEF_FIELD_NUMBER = 5;
  private com.google.protobuf.ByteString instrumentedGraphDef_;
  /**
   * <pre>
   * An encoded version of a GraphDef.
   * This graph may include the debugger-inserted ops.
   * </pre>
   *
   * <code>bytes instrumented_graph_def = 5;</code>
   */
  public com.google.protobuf.ByteString getInstrumentedGraphDef() {
    return instrumentedGraphDef_;
  }

  public static final int OUTER_CONTEXT_ID_FIELD_NUMBER = 6;
  private volatile java.lang.Object outerContextId_;
  /**
   * <pre>
   * IDs of the immediate enclosing context (graph), if any.
   * </pre>
   *
   * <code>string outer_context_id = 6;</code>
   */
  public java.lang.String getOuterContextId() {
    java.lang.Object ref = outerContextId_;
    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();
      outerContextId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * IDs of the immediate enclosing context (graph), if any.
   * </pre>
   *
   * <code>string outer_context_id = 6;</code>
   */
  public com.google.protobuf.ByteString
      getOuterContextIdBytes() {
    java.lang.Object ref = outerContextId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      outerContextId_ = 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 (!getGraphIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, graphId_);
    }
    if (!getGraphNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, graphName_);
    }
    for (int i = 0; i < instrumentedOps_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instrumentedOps_.getRaw(i));
    }
    if (!originalGraphDef_.isEmpty()) {
      output.writeBytes(4, originalGraphDef_);
    }
    if (!instrumentedGraphDef_.isEmpty()) {
      output.writeBytes(5, instrumentedGraphDef_);
    }
    if (!getOuterContextIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, outerContextId_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getGraphIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, graphId_);
    }
    if (!getGraphNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, graphName_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < instrumentedOps_.size(); i++) {
        dataSize += computeStringSizeNoTag(instrumentedOps_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getInstrumentedOpsList().size();
    }
    if (!originalGraphDef_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(4, originalGraphDef_);
    }
    if (!instrumentedGraphDef_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(5, instrumentedGraphDef_);
    }
    if (!getOuterContextIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, outerContextId_);
    }
    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.util.DebuggedGraph)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.util.DebuggedGraph other = (org.tensorflow.proto.util.DebuggedGraph) obj;

    if (!getGraphId()
        .equals(other.getGraphId())) return false;
    if (!getGraphName()
        .equals(other.getGraphName())) return false;
    if (!getInstrumentedOpsList()
        .equals(other.getInstrumentedOpsList())) return false;
    if (!getOriginalGraphDef()
        .equals(other.getOriginalGraphDef())) return false;
    if (!getInstrumentedGraphDef()
        .equals(other.getInstrumentedGraphDef())) return false;
    if (!getOuterContextId()
        .equals(other.getOuterContextId())) 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) + GRAPH_ID_FIELD_NUMBER;
    hash = (53 * hash) + getGraphId().hashCode();
    hash = (37 * hash) + GRAPH_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getGraphName().hashCode();
    if (getInstrumentedOpsCount() > 0) {
      hash = (37 * hash) + INSTRUMENTED_OPS_FIELD_NUMBER;
      hash = (53 * hash) + getInstrumentedOpsList().hashCode();
    }
    hash = (37 * hash) + ORIGINAL_GRAPH_DEF_FIELD_NUMBER;
    hash = (53 * hash) + getOriginalGraphDef().hashCode();
    hash = (37 * hash) + INSTRUMENTED_GRAPH_DEF_FIELD_NUMBER;
    hash = (53 * hash) + getInstrumentedGraphDef().hashCode();
    hash = (37 * hash) + OUTER_CONTEXT_ID_FIELD_NUMBER;
    hash = (53 * hash) + getOuterContextId().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.util.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.util.DebuggedGraph.class, org.tensorflow.proto.util.DebuggedGraph.Builder.class);
    }

    // Construct using org.tensorflow.proto.util.DebuggedGraph.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();
      graphId_ = "";

      graphName_ = "";

      instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      originalGraphDef_ = com.google.protobuf.ByteString.EMPTY;

      instrumentedGraphDef_ = com.google.protobuf.ByteString.EMPTY;

      outerContextId_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.util.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_descriptor;
    }

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

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

    @java.lang.Override
    public org.tensorflow.proto.util.DebuggedGraph buildPartial() {
      org.tensorflow.proto.util.DebuggedGraph result = new org.tensorflow.proto.util.DebuggedGraph(this);
      int from_bitField0_ = bitField0_;
      result.graphId_ = graphId_;
      result.graphName_ = graphName_;
      if (((bitField0_ & 0x00000001) != 0)) {
        instrumentedOps_ = instrumentedOps_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.instrumentedOps_ = instrumentedOps_;
      result.originalGraphDef_ = originalGraphDef_;
      result.instrumentedGraphDef_ = instrumentedGraphDef_;
      result.outerContextId_ = outerContextId_;
      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.util.DebuggedGraph) {
        return mergeFrom((org.tensorflow.proto.util.DebuggedGraph)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.util.DebuggedGraph other) {
      if (other == org.tensorflow.proto.util.DebuggedGraph.getDefaultInstance()) return this;
      if (!other.getGraphId().isEmpty()) {
        graphId_ = other.graphId_;
        onChanged();
      }
      if (!other.getGraphName().isEmpty()) {
        graphName_ = other.graphName_;
        onChanged();
      }
      if (!other.instrumentedOps_.isEmpty()) {
        if (instrumentedOps_.isEmpty()) {
          instrumentedOps_ = other.instrumentedOps_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureInstrumentedOpsIsMutable();
          instrumentedOps_.addAll(other.instrumentedOps_);
        }
        onChanged();
      }
      if (other.getOriginalGraphDef() != com.google.protobuf.ByteString.EMPTY) {
        setOriginalGraphDef(other.getOriginalGraphDef());
      }
      if (other.getInstrumentedGraphDef() != com.google.protobuf.ByteString.EMPTY) {
        setInstrumentedGraphDef(other.getInstrumentedGraphDef());
      }
      if (!other.getOuterContextId().isEmpty()) {
        outerContextId_ = other.outerContextId_;
        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.util.DebuggedGraph parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.util.DebuggedGraph) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object graphId_ = "";
    /**
     * <pre>
     * An ID for the graph.
     * This can be used up to look up graph names. Generated by the debugger.
     * </pre>
     *
     * <code>string graph_id = 1;</code>
     */
    public java.lang.String getGraphId() {
      java.lang.Object ref = graphId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        graphId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * An ID for the graph.
     * This can be used up to look up graph names. Generated by the debugger.
     * </pre>
     *
     * <code>string graph_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getGraphIdBytes() {
      java.lang.Object ref = graphId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        graphId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * An ID for the graph.
     * This can be used up to look up graph names. Generated by the debugger.
     * </pre>
     *
     * <code>string graph_id = 1;</code>
     */
    public Builder setGraphId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      graphId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * An ID for the graph.
     * This can be used up to look up graph names. Generated by the debugger.
     * </pre>
     *
     * <code>string graph_id = 1;</code>
     */
    public Builder clearGraphId() {
      
      graphId_ = getDefaultInstance().getGraphId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * An ID for the graph.
     * This can be used up to look up graph names. Generated by the debugger.
     * </pre>
     *
     * <code>string graph_id = 1;</code>
     */
    public Builder setGraphIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      graphId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object graphName_ = "";
    /**
     * <pre>
     * Name of the graph (if available).
     * </pre>
     *
     * <code>string graph_name = 2;</code>
     */
    public java.lang.String getGraphName() {
      java.lang.Object ref = graphName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        graphName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the graph (if available).
     * </pre>
     *
     * <code>string graph_name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getGraphNameBytes() {
      java.lang.Object ref = graphName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        graphName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the graph (if available).
     * </pre>
     *
     * <code>string graph_name = 2;</code>
     */
    public Builder setGraphName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      graphName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the graph (if available).
     * </pre>
     *
     * <code>string graph_name = 2;</code>
     */
    public Builder clearGraphName() {
      
      graphName_ = getDefaultInstance().getGraphName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the graph (if available).
     * </pre>
     *
     * <code>string graph_name = 2;</code>
     */
    public Builder setGraphNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      graphName_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureInstrumentedOpsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        instrumentedOps_ = new com.google.protobuf.LazyStringArrayList(instrumentedOps_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getInstrumentedOpsList() {
      return instrumentedOps_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public int getInstrumentedOpsCount() {
      return instrumentedOps_.size();
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public java.lang.String getInstrumentedOps(int index) {
      return instrumentedOps_.get(index);
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public com.google.protobuf.ByteString
        getInstrumentedOpsBytes(int index) {
      return instrumentedOps_.getByteString(index);
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public Builder setInstrumentedOps(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureInstrumentedOpsIsMutable();
      instrumentedOps_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public Builder addInstrumentedOps(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureInstrumentedOpsIsMutable();
      instrumentedOps_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public Builder addAllInstrumentedOps(
        java.lang.Iterable<java.lang.String> values) {
      ensureInstrumentedOpsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, instrumentedOps_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public Builder clearInstrumentedOps() {
      instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Names of the instrumented ops. This can be used to look up op name
     * based on the numeric-summary tensors (2nd column).
     * </pre>
     *
     * <code>repeated string instrumented_ops = 3;</code>
     */
    public Builder addInstrumentedOpsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureInstrumentedOpsIsMutable();
      instrumentedOps_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString originalGraphDef_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <pre>
     * Original (uninstrumented) GraphDef (if available).
     * </pre>
     *
     * <code>bytes original_graph_def = 4;</code>
     */
    public com.google.protobuf.ByteString getOriginalGraphDef() {
      return originalGraphDef_;
    }
    /**
     * <pre>
     * Original (uninstrumented) GraphDef (if available).
     * </pre>
     *
     * <code>bytes original_graph_def = 4;</code>
     */
    public Builder setOriginalGraphDef(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      originalGraphDef_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Original (uninstrumented) GraphDef (if available).
     * </pre>
     *
     * <code>bytes original_graph_def = 4;</code>
     */
    public Builder clearOriginalGraphDef() {
      
      originalGraphDef_ = getDefaultInstance().getOriginalGraphDef();
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString instrumentedGraphDef_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <pre>
     * An encoded version of a GraphDef.
     * This graph may include the debugger-inserted ops.
     * </pre>
     *
     * <code>bytes instrumented_graph_def = 5;</code>
     */
    public com.google.protobuf.ByteString getInstrumentedGraphDef() {
      return instrumentedGraphDef_;
    }
    /**
     * <pre>
     * An encoded version of a GraphDef.
     * This graph may include the debugger-inserted ops.
     * </pre>
     *
     * <code>bytes instrumented_graph_def = 5;</code>
     */
    public Builder setInstrumentedGraphDef(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      instrumentedGraphDef_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * An encoded version of a GraphDef.
     * This graph may include the debugger-inserted ops.
     * </pre>
     *
     * <code>bytes instrumented_graph_def = 5;</code>
     */
    public Builder clearInstrumentedGraphDef() {
      
      instrumentedGraphDef_ = getDefaultInstance().getInstrumentedGraphDef();
      onChanged();
      return this;
    }

    private java.lang.Object outerContextId_ = "";
    /**
     * <pre>
     * IDs of the immediate enclosing context (graph), if any.
     * </pre>
     *
     * <code>string outer_context_id = 6;</code>
     */
    public java.lang.String getOuterContextId() {
      java.lang.Object ref = outerContextId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        outerContextId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * IDs of the immediate enclosing context (graph), if any.
     * </pre>
     *
     * <code>string outer_context_id = 6;</code>
     */
    public com.google.protobuf.ByteString
        getOuterContextIdBytes() {
      java.lang.Object ref = outerContextId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        outerContextId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * IDs of the immediate enclosing context (graph), if any.
     * </pre>
     *
     * <code>string outer_context_id = 6;</code>
     */
    public Builder setOuterContextId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      outerContextId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * IDs of the immediate enclosing context (graph), if any.
     * </pre>
     *
     * <code>string outer_context_id = 6;</code>
     */
    public Builder clearOuterContextId() {
      
      outerContextId_ = getDefaultInstance().getOuterContextId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * IDs of the immediate enclosing context (graph), if any.
     * </pre>
     *
     * <code>string outer_context_id = 6;</code>
     */
    public Builder setOuterContextIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      outerContextId_ = 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.DebuggedGraph)
  }

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

  public static org.tensorflow.proto.util.DebuggedGraph getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

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

}

