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

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Protocol buffer representing a WhileContext object.
 * </pre>
 *
 * Protobuf type {@code tensorflow.WhileContextDef}
 */
public  final class WhileContextDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.WhileContextDef)
    WhileContextDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use WhileContextDef.newBuilder() to construct.
  private WhileContextDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private WhileContextDef() {
    contextName_ = "";
    pivotName_ = "";
    pivotForPredName_ = "";
    pivotForBodyName_ = "";
    loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    maximumIterationsName_ = "";
    nestedContexts_ = java.util.Collections.emptyList();
  }

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

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

            contextName_ = s;
            break;
          }
          case 16: {

            parallelIterations_ = input.readInt32();
            break;
          }
          case 24: {

            backProp_ = input.readBool();
            break;
          }
          case 32: {

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

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

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

            pivotForBodyName_ = s;
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              loopExitNames_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            loopExitNames_.add(s);
            break;
          }
          case 74: {
            org.tensorflow.proto.framework.ValuesDef.Builder subBuilder = null;
            if (valuesDef_ != null) {
              subBuilder = valuesDef_.toBuilder();
            }
            valuesDef_ = input.readMessage(org.tensorflow.proto.framework.ValuesDef.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(valuesDef_);
              valuesDef_ = subBuilder.buildPartial();
            }

            break;
          }
          case 82: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              loopEnterNames_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000002;
            }
            loopEnterNames_.add(s);
            break;
          }
          case 90: {
            java.lang.String s = input.readStringRequireUtf8();

            maximumIterationsName_ = s;
            break;
          }
          case 98: {
            if (!((mutable_bitField0_ & 0x00000004) != 0)) {
              nestedContexts_ = new java.util.ArrayList<org.tensorflow.proto.framework.ControlFlowContextDef>();
              mutable_bitField0_ |= 0x00000004;
            }
            nestedContexts_.add(
                input.readMessage(org.tensorflow.proto.framework.ControlFlowContextDef.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)) {
        loopExitNames_ = loopExitNames_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        loopEnterNames_ = loopEnterNames_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000004) != 0)) {
        nestedContexts_ = java.util.Collections.unmodifiableList(nestedContexts_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_WhileContextDef_descriptor;
  }

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

  public static final int CONTEXT_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object contextName_;
  /**
   * <pre>
   * Name of the context.
   * </pre>
   *
   * <code>string context_name = 1;</code>
   */
  public java.lang.String getContextName() {
    java.lang.Object ref = contextName_;
    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();
      contextName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the context.
   * </pre>
   *
   * <code>string context_name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getContextNameBytes() {
    java.lang.Object ref = contextName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      contextName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PARALLEL_ITERATIONS_FIELD_NUMBER = 2;
  private int parallelIterations_;
  /**
   * <pre>
   * The number of iterations allowed to run in parallel.
   * </pre>
   *
   * <code>int32 parallel_iterations = 2;</code>
   */
  public int getParallelIterations() {
    return parallelIterations_;
  }

  public static final int BACK_PROP_FIELD_NUMBER = 3;
  private boolean backProp_;
  /**
   * <pre>
   * Whether backprop is enabled for this while loop.
   * </pre>
   *
   * <code>bool back_prop = 3;</code>
   */
  public boolean getBackProp() {
    return backProp_;
  }

  public static final int SWAP_MEMORY_FIELD_NUMBER = 4;
  private boolean swapMemory_;
  /**
   * <pre>
   * Whether GPU-CPU memory swap is enabled for this loop.
   * </pre>
   *
   * <code>bool swap_memory = 4;</code>
   */
  public boolean getSwapMemory() {
    return swapMemory_;
  }

  public static final int PIVOT_NAME_FIELD_NUMBER = 5;
  private volatile java.lang.Object pivotName_;
  /**
   * <pre>
   * Name of the pivot tensor.
   * </pre>
   *
   * <code>string pivot_name = 5;</code>
   */
  public java.lang.String getPivotName() {
    java.lang.Object ref = pivotName_;
    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();
      pivotName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the pivot tensor.
   * </pre>
   *
   * <code>string pivot_name = 5;</code>
   */
  public com.google.protobuf.ByteString
      getPivotNameBytes() {
    java.lang.Object ref = pivotName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      pivotName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PIVOT_FOR_PRED_NAME_FIELD_NUMBER = 6;
  private volatile java.lang.Object pivotForPredName_;
  /**
   * <pre>
   * Name of the pivot_for_pred tensor.
   * </pre>
   *
   * <code>string pivot_for_pred_name = 6;</code>
   */
  public java.lang.String getPivotForPredName() {
    java.lang.Object ref = pivotForPredName_;
    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();
      pivotForPredName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the pivot_for_pred tensor.
   * </pre>
   *
   * <code>string pivot_for_pred_name = 6;</code>
   */
  public com.google.protobuf.ByteString
      getPivotForPredNameBytes() {
    java.lang.Object ref = pivotForPredName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      pivotForPredName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PIVOT_FOR_BODY_NAME_FIELD_NUMBER = 7;
  private volatile java.lang.Object pivotForBodyName_;
  /**
   * <pre>
   * Name of the pivot_for_body tensor.
   * </pre>
   *
   * <code>string pivot_for_body_name = 7;</code>
   */
  public java.lang.String getPivotForBodyName() {
    java.lang.Object ref = pivotForBodyName_;
    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();
      pivotForBodyName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the pivot_for_body tensor.
   * </pre>
   *
   * <code>string pivot_for_body_name = 7;</code>
   */
  public com.google.protobuf.ByteString
      getPivotForBodyNameBytes() {
    java.lang.Object ref = pivotForBodyName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      pivotForBodyName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LOOP_EXIT_NAMES_FIELD_NUMBER = 8;
  private com.google.protobuf.LazyStringList loopExitNames_;
  /**
   * <pre>
   * List of names for exit tensors.
   * </pre>
   *
   * <code>repeated string loop_exit_names = 8;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getLoopExitNamesList() {
    return loopExitNames_;
  }
  /**
   * <pre>
   * List of names for exit tensors.
   * </pre>
   *
   * <code>repeated string loop_exit_names = 8;</code>
   */
  public int getLoopExitNamesCount() {
    return loopExitNames_.size();
  }
  /**
   * <pre>
   * List of names for exit tensors.
   * </pre>
   *
   * <code>repeated string loop_exit_names = 8;</code>
   */
  public java.lang.String getLoopExitNames(int index) {
    return loopExitNames_.get(index);
  }
  /**
   * <pre>
   * List of names for exit tensors.
   * </pre>
   *
   * <code>repeated string loop_exit_names = 8;</code>
   */
  public com.google.protobuf.ByteString
      getLoopExitNamesBytes(int index) {
    return loopExitNames_.getByteString(index);
  }

  public static final int LOOP_ENTER_NAMES_FIELD_NUMBER = 10;
  private com.google.protobuf.LazyStringList loopEnterNames_;
  /**
   * <pre>
   * List of names for enter tensors.
   * </pre>
   *
   * <code>repeated string loop_enter_names = 10;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getLoopEnterNamesList() {
    return loopEnterNames_;
  }
  /**
   * <pre>
   * List of names for enter tensors.
   * </pre>
   *
   * <code>repeated string loop_enter_names = 10;</code>
   */
  public int getLoopEnterNamesCount() {
    return loopEnterNames_.size();
  }
  /**
   * <pre>
   * List of names for enter tensors.
   * </pre>
   *
   * <code>repeated string loop_enter_names = 10;</code>
   */
  public java.lang.String getLoopEnterNames(int index) {
    return loopEnterNames_.get(index);
  }
  /**
   * <pre>
   * List of names for enter tensors.
   * </pre>
   *
   * <code>repeated string loop_enter_names = 10;</code>
   */
  public com.google.protobuf.ByteString
      getLoopEnterNamesBytes(int index) {
    return loopEnterNames_.getByteString(index);
  }

  public static final int VALUES_DEF_FIELD_NUMBER = 9;
  private org.tensorflow.proto.framework.ValuesDef valuesDef_;
  /**
   * <pre>
   * Values and external values in control flow context.
   * </pre>
   *
   * <code>.tensorflow.ValuesDef values_def = 9;</code>
   */
  public boolean hasValuesDef() {
    return valuesDef_ != null;
  }
  /**
   * <pre>
   * Values and external values in control flow context.
   * </pre>
   *
   * <code>.tensorflow.ValuesDef values_def = 9;</code>
   */
  public org.tensorflow.proto.framework.ValuesDef getValuesDef() {
    return valuesDef_ == null ? org.tensorflow.proto.framework.ValuesDef.getDefaultInstance() : valuesDef_;
  }
  /**
   * <pre>
   * Values and external values in control flow context.
   * </pre>
   *
   * <code>.tensorflow.ValuesDef values_def = 9;</code>
   */
  public org.tensorflow.proto.framework.ValuesDefOrBuilder getValuesDefOrBuilder() {
    return getValuesDef();
  }

  public static final int MAXIMUM_ITERATIONS_NAME_FIELD_NUMBER = 11;
  private volatile java.lang.Object maximumIterationsName_;
  /**
   * <pre>
   * Optional name of the maximum_iterations tensor.
   * </pre>
   *
   * <code>string maximum_iterations_name = 11;</code>
   */
  public java.lang.String getMaximumIterationsName() {
    java.lang.Object ref = maximumIterationsName_;
    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();
      maximumIterationsName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Optional name of the maximum_iterations tensor.
   * </pre>
   *
   * <code>string maximum_iterations_name = 11;</code>
   */
  public com.google.protobuf.ByteString
      getMaximumIterationsNameBytes() {
    java.lang.Object ref = maximumIterationsName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      maximumIterationsName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int NESTED_CONTEXTS_FIELD_NUMBER = 12;
  private java.util.List<org.tensorflow.proto.framework.ControlFlowContextDef> nestedContexts_;
  /**
   * <pre>
   * Contexts contained inside this context (e.g. nested whiles).
   * </pre>
   *
   * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.ControlFlowContextDef> getNestedContextsList() {
    return nestedContexts_;
  }
  /**
   * <pre>
   * Contexts contained inside this context (e.g. nested whiles).
   * </pre>
   *
   * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder> 
      getNestedContextsOrBuilderList() {
    return nestedContexts_;
  }
  /**
   * <pre>
   * Contexts contained inside this context (e.g. nested whiles).
   * </pre>
   *
   * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
   */
  public int getNestedContextsCount() {
    return nestedContexts_.size();
  }
  /**
   * <pre>
   * Contexts contained inside this context (e.g. nested whiles).
   * </pre>
   *
   * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
   */
  public org.tensorflow.proto.framework.ControlFlowContextDef getNestedContexts(int index) {
    return nestedContexts_.get(index);
  }
  /**
   * <pre>
   * Contexts contained inside this context (e.g. nested whiles).
   * </pre>
   *
   * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
   */
  public org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder getNestedContextsOrBuilder(
      int index) {
    return nestedContexts_.get(index);
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getContextNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contextName_);
    }
    if (parallelIterations_ != 0) {
      output.writeInt32(2, parallelIterations_);
    }
    if (backProp_ != false) {
      output.writeBool(3, backProp_);
    }
    if (swapMemory_ != false) {
      output.writeBool(4, swapMemory_);
    }
    if (!getPivotNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pivotName_);
    }
    if (!getPivotForPredNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pivotForPredName_);
    }
    if (!getPivotForBodyNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pivotForBodyName_);
    }
    for (int i = 0; i < loopExitNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, loopExitNames_.getRaw(i));
    }
    if (valuesDef_ != null) {
      output.writeMessage(9, getValuesDef());
    }
    for (int i = 0; i < loopEnterNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, loopEnterNames_.getRaw(i));
    }
    if (!getMaximumIterationsNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, maximumIterationsName_);
    }
    for (int i = 0; i < nestedContexts_.size(); i++) {
      output.writeMessage(12, nestedContexts_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getContextNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contextName_);
    }
    if (parallelIterations_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, parallelIterations_);
    }
    if (backProp_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(3, backProp_);
    }
    if (swapMemory_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(4, swapMemory_);
    }
    if (!getPivotNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pivotName_);
    }
    if (!getPivotForPredNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pivotForPredName_);
    }
    if (!getPivotForBodyNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pivotForBodyName_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < loopExitNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(loopExitNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getLoopExitNamesList().size();
    }
    if (valuesDef_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, getValuesDef());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < loopEnterNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(loopEnterNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getLoopEnterNamesList().size();
    }
    if (!getMaximumIterationsNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, maximumIterationsName_);
    }
    for (int i = 0; i < nestedContexts_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(12, nestedContexts_.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.WhileContextDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.WhileContextDef other = (org.tensorflow.proto.framework.WhileContextDef) obj;

    if (!getContextName()
        .equals(other.getContextName())) return false;
    if (getParallelIterations()
        != other.getParallelIterations()) return false;
    if (getBackProp()
        != other.getBackProp()) return false;
    if (getSwapMemory()
        != other.getSwapMemory()) return false;
    if (!getPivotName()
        .equals(other.getPivotName())) return false;
    if (!getPivotForPredName()
        .equals(other.getPivotForPredName())) return false;
    if (!getPivotForBodyName()
        .equals(other.getPivotForBodyName())) return false;
    if (!getLoopExitNamesList()
        .equals(other.getLoopExitNamesList())) return false;
    if (!getLoopEnterNamesList()
        .equals(other.getLoopEnterNamesList())) return false;
    if (hasValuesDef() != other.hasValuesDef()) return false;
    if (hasValuesDef()) {
      if (!getValuesDef()
          .equals(other.getValuesDef())) return false;
    }
    if (!getMaximumIterationsName()
        .equals(other.getMaximumIterationsName())) return false;
    if (!getNestedContextsList()
        .equals(other.getNestedContextsList())) 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) + CONTEXT_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getContextName().hashCode();
    hash = (37 * hash) + PARALLEL_ITERATIONS_FIELD_NUMBER;
    hash = (53 * hash) + getParallelIterations();
    hash = (37 * hash) + BACK_PROP_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getBackProp());
    hash = (37 * hash) + SWAP_MEMORY_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getSwapMemory());
    hash = (37 * hash) + PIVOT_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getPivotName().hashCode();
    hash = (37 * hash) + PIVOT_FOR_PRED_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getPivotForPredName().hashCode();
    hash = (37 * hash) + PIVOT_FOR_BODY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getPivotForBodyName().hashCode();
    if (getLoopExitNamesCount() > 0) {
      hash = (37 * hash) + LOOP_EXIT_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getLoopExitNamesList().hashCode();
    }
    if (getLoopEnterNamesCount() > 0) {
      hash = (37 * hash) + LOOP_ENTER_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getLoopEnterNamesList().hashCode();
    }
    if (hasValuesDef()) {
      hash = (37 * hash) + VALUES_DEF_FIELD_NUMBER;
      hash = (53 * hash) + getValuesDef().hashCode();
    }
    hash = (37 * hash) + MAXIMUM_ITERATIONS_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getMaximumIterationsName().hashCode();
    if (getNestedContextsCount() > 0) {
      hash = (37 * hash) + NESTED_CONTEXTS_FIELD_NUMBER;
      hash = (53 * hash) + getNestedContextsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

      parallelIterations_ = 0;

      backProp_ = false;

      swapMemory_ = false;

      pivotName_ = "";

      pivotForPredName_ = "";

      pivotForBodyName_ = "";

      loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      if (valuesDefBuilder_ == null) {
        valuesDef_ = null;
      } else {
        valuesDef_ = null;
        valuesDefBuilder_ = null;
      }
      maximumIterationsName_ = "";

      if (nestedContextsBuilder_ == null) {
        nestedContexts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        nestedContextsBuilder_.clear();
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.WhileContextDef buildPartial() {
      org.tensorflow.proto.framework.WhileContextDef result = new org.tensorflow.proto.framework.WhileContextDef(this);
      int from_bitField0_ = bitField0_;
      result.contextName_ = contextName_;
      result.parallelIterations_ = parallelIterations_;
      result.backProp_ = backProp_;
      result.swapMemory_ = swapMemory_;
      result.pivotName_ = pivotName_;
      result.pivotForPredName_ = pivotForPredName_;
      result.pivotForBodyName_ = pivotForBodyName_;
      if (((bitField0_ & 0x00000001) != 0)) {
        loopExitNames_ = loopExitNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.loopExitNames_ = loopExitNames_;
      if (((bitField0_ & 0x00000002) != 0)) {
        loopEnterNames_ = loopEnterNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.loopEnterNames_ = loopEnterNames_;
      if (valuesDefBuilder_ == null) {
        result.valuesDef_ = valuesDef_;
      } else {
        result.valuesDef_ = valuesDefBuilder_.build();
      }
      result.maximumIterationsName_ = maximumIterationsName_;
      if (nestedContextsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)) {
          nestedContexts_ = java.util.Collections.unmodifiableList(nestedContexts_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.nestedContexts_ = nestedContexts_;
      } else {
        result.nestedContexts_ = nestedContextsBuilder_.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.WhileContextDef) {
        return mergeFrom((org.tensorflow.proto.framework.WhileContextDef)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.framework.WhileContextDef other) {
      if (other == org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance()) return this;
      if (!other.getContextName().isEmpty()) {
        contextName_ = other.contextName_;
        onChanged();
      }
      if (other.getParallelIterations() != 0) {
        setParallelIterations(other.getParallelIterations());
      }
      if (other.getBackProp() != false) {
        setBackProp(other.getBackProp());
      }
      if (other.getSwapMemory() != false) {
        setSwapMemory(other.getSwapMemory());
      }
      if (!other.getPivotName().isEmpty()) {
        pivotName_ = other.pivotName_;
        onChanged();
      }
      if (!other.getPivotForPredName().isEmpty()) {
        pivotForPredName_ = other.pivotForPredName_;
        onChanged();
      }
      if (!other.getPivotForBodyName().isEmpty()) {
        pivotForBodyName_ = other.pivotForBodyName_;
        onChanged();
      }
      if (!other.loopExitNames_.isEmpty()) {
        if (loopExitNames_.isEmpty()) {
          loopExitNames_ = other.loopExitNames_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureLoopExitNamesIsMutable();
          loopExitNames_.addAll(other.loopExitNames_);
        }
        onChanged();
      }
      if (!other.loopEnterNames_.isEmpty()) {
        if (loopEnterNames_.isEmpty()) {
          loopEnterNames_ = other.loopEnterNames_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureLoopEnterNamesIsMutable();
          loopEnterNames_.addAll(other.loopEnterNames_);
        }
        onChanged();
      }
      if (other.hasValuesDef()) {
        mergeValuesDef(other.getValuesDef());
      }
      if (!other.getMaximumIterationsName().isEmpty()) {
        maximumIterationsName_ = other.maximumIterationsName_;
        onChanged();
      }
      if (nestedContextsBuilder_ == null) {
        if (!other.nestedContexts_.isEmpty()) {
          if (nestedContexts_.isEmpty()) {
            nestedContexts_ = other.nestedContexts_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureNestedContextsIsMutable();
            nestedContexts_.addAll(other.nestedContexts_);
          }
          onChanged();
        }
      } else {
        if (!other.nestedContexts_.isEmpty()) {
          if (nestedContextsBuilder_.isEmpty()) {
            nestedContextsBuilder_.dispose();
            nestedContextsBuilder_ = null;
            nestedContexts_ = other.nestedContexts_;
            bitField0_ = (bitField0_ & ~0x00000004);
            nestedContextsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getNestedContextsFieldBuilder() : null;
          } else {
            nestedContextsBuilder_.addAllMessages(other.nestedContexts_);
          }
        }
      }
      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.WhileContextDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.WhileContextDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object contextName_ = "";
    /**
     * <pre>
     * Name of the context.
     * </pre>
     *
     * <code>string context_name = 1;</code>
     */
    public java.lang.String getContextName() {
      java.lang.Object ref = contextName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        contextName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the context.
     * </pre>
     *
     * <code>string context_name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getContextNameBytes() {
      java.lang.Object ref = contextName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        contextName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the context.
     * </pre>
     *
     * <code>string context_name = 1;</code>
     */
    public Builder setContextName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      contextName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the context.
     * </pre>
     *
     * <code>string context_name = 1;</code>
     */
    public Builder clearContextName() {
      
      contextName_ = getDefaultInstance().getContextName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the context.
     * </pre>
     *
     * <code>string context_name = 1;</code>
     */
    public Builder setContextNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      contextName_ = value;
      onChanged();
      return this;
    }

    private int parallelIterations_ ;
    /**
     * <pre>
     * The number of iterations allowed to run in parallel.
     * </pre>
     *
     * <code>int32 parallel_iterations = 2;</code>
     */
    public int getParallelIterations() {
      return parallelIterations_;
    }
    /**
     * <pre>
     * The number of iterations allowed to run in parallel.
     * </pre>
     *
     * <code>int32 parallel_iterations = 2;</code>
     */
    public Builder setParallelIterations(int value) {
      
      parallelIterations_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The number of iterations allowed to run in parallel.
     * </pre>
     *
     * <code>int32 parallel_iterations = 2;</code>
     */
    public Builder clearParallelIterations() {
      
      parallelIterations_ = 0;
      onChanged();
      return this;
    }

    private boolean backProp_ ;
    /**
     * <pre>
     * Whether backprop is enabled for this while loop.
     * </pre>
     *
     * <code>bool back_prop = 3;</code>
     */
    public boolean getBackProp() {
      return backProp_;
    }
    /**
     * <pre>
     * Whether backprop is enabled for this while loop.
     * </pre>
     *
     * <code>bool back_prop = 3;</code>
     */
    public Builder setBackProp(boolean value) {
      
      backProp_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Whether backprop is enabled for this while loop.
     * </pre>
     *
     * <code>bool back_prop = 3;</code>
     */
    public Builder clearBackProp() {
      
      backProp_ = false;
      onChanged();
      return this;
    }

    private boolean swapMemory_ ;
    /**
     * <pre>
     * Whether GPU-CPU memory swap is enabled for this loop.
     * </pre>
     *
     * <code>bool swap_memory = 4;</code>
     */
    public boolean getSwapMemory() {
      return swapMemory_;
    }
    /**
     * <pre>
     * Whether GPU-CPU memory swap is enabled for this loop.
     * </pre>
     *
     * <code>bool swap_memory = 4;</code>
     */
    public Builder setSwapMemory(boolean value) {
      
      swapMemory_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Whether GPU-CPU memory swap is enabled for this loop.
     * </pre>
     *
     * <code>bool swap_memory = 4;</code>
     */
    public Builder clearSwapMemory() {
      
      swapMemory_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object pivotName_ = "";
    /**
     * <pre>
     * Name of the pivot tensor.
     * </pre>
     *
     * <code>string pivot_name = 5;</code>
     */
    public java.lang.String getPivotName() {
      java.lang.Object ref = pivotName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pivotName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the pivot tensor.
     * </pre>
     *
     * <code>string pivot_name = 5;</code>
     */
    public com.google.protobuf.ByteString
        getPivotNameBytes() {
      java.lang.Object ref = pivotName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pivotName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the pivot tensor.
     * </pre>
     *
     * <code>string pivot_name = 5;</code>
     */
    public Builder setPivotName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pivotName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the pivot tensor.
     * </pre>
     *
     * <code>string pivot_name = 5;</code>
     */
    public Builder clearPivotName() {
      
      pivotName_ = getDefaultInstance().getPivotName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the pivot tensor.
     * </pre>
     *
     * <code>string pivot_name = 5;</code>
     */
    public Builder setPivotNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      pivotName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object pivotForPredName_ = "";
    /**
     * <pre>
     * Name of the pivot_for_pred tensor.
     * </pre>
     *
     * <code>string pivot_for_pred_name = 6;</code>
     */
    public java.lang.String getPivotForPredName() {
      java.lang.Object ref = pivotForPredName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pivotForPredName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the pivot_for_pred tensor.
     * </pre>
     *
     * <code>string pivot_for_pred_name = 6;</code>
     */
    public com.google.protobuf.ByteString
        getPivotForPredNameBytes() {
      java.lang.Object ref = pivotForPredName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pivotForPredName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the pivot_for_pred tensor.
     * </pre>
     *
     * <code>string pivot_for_pred_name = 6;</code>
     */
    public Builder setPivotForPredName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pivotForPredName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the pivot_for_pred tensor.
     * </pre>
     *
     * <code>string pivot_for_pred_name = 6;</code>
     */
    public Builder clearPivotForPredName() {
      
      pivotForPredName_ = getDefaultInstance().getPivotForPredName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the pivot_for_pred tensor.
     * </pre>
     *
     * <code>string pivot_for_pred_name = 6;</code>
     */
    public Builder setPivotForPredNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      pivotForPredName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object pivotForBodyName_ = "";
    /**
     * <pre>
     * Name of the pivot_for_body tensor.
     * </pre>
     *
     * <code>string pivot_for_body_name = 7;</code>
     */
    public java.lang.String getPivotForBodyName() {
      java.lang.Object ref = pivotForBodyName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pivotForBodyName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the pivot_for_body tensor.
     * </pre>
     *
     * <code>string pivot_for_body_name = 7;</code>
     */
    public com.google.protobuf.ByteString
        getPivotForBodyNameBytes() {
      java.lang.Object ref = pivotForBodyName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pivotForBodyName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the pivot_for_body tensor.
     * </pre>
     *
     * <code>string pivot_for_body_name = 7;</code>
     */
    public Builder setPivotForBodyName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pivotForBodyName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the pivot_for_body tensor.
     * </pre>
     *
     * <code>string pivot_for_body_name = 7;</code>
     */
    public Builder clearPivotForBodyName() {
      
      pivotForBodyName_ = getDefaultInstance().getPivotForBodyName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the pivot_for_body tensor.
     * </pre>
     *
     * <code>string pivot_for_body_name = 7;</code>
     */
    public Builder setPivotForBodyNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      pivotForBodyName_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureLoopExitNamesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        loopExitNames_ = new com.google.protobuf.LazyStringArrayList(loopExitNames_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getLoopExitNamesList() {
      return loopExitNames_.getUnmodifiableView();
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public int getLoopExitNamesCount() {
      return loopExitNames_.size();
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public java.lang.String getLoopExitNames(int index) {
      return loopExitNames_.get(index);
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public com.google.protobuf.ByteString
        getLoopExitNamesBytes(int index) {
      return loopExitNames_.getByteString(index);
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public Builder setLoopExitNames(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureLoopExitNamesIsMutable();
      loopExitNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public Builder addLoopExitNames(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureLoopExitNamesIsMutable();
      loopExitNames_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public Builder addAllLoopExitNames(
        java.lang.Iterable<java.lang.String> values) {
      ensureLoopExitNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, loopExitNames_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public Builder clearLoopExitNames() {
      loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for exit tensors.
     * </pre>
     *
     * <code>repeated string loop_exit_names = 8;</code>
     */
    public Builder addLoopExitNamesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureLoopExitNamesIsMutable();
      loopExitNames_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureLoopEnterNamesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        loopEnterNames_ = new com.google.protobuf.LazyStringArrayList(loopEnterNames_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getLoopEnterNamesList() {
      return loopEnterNames_.getUnmodifiableView();
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public int getLoopEnterNamesCount() {
      return loopEnterNames_.size();
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public java.lang.String getLoopEnterNames(int index) {
      return loopEnterNames_.get(index);
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public com.google.protobuf.ByteString
        getLoopEnterNamesBytes(int index) {
      return loopEnterNames_.getByteString(index);
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public Builder setLoopEnterNames(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureLoopEnterNamesIsMutable();
      loopEnterNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public Builder addLoopEnterNames(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureLoopEnterNamesIsMutable();
      loopEnterNames_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public Builder addAllLoopEnterNames(
        java.lang.Iterable<java.lang.String> values) {
      ensureLoopEnterNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, loopEnterNames_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public Builder clearLoopEnterNames() {
      loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * List of names for enter tensors.
     * </pre>
     *
     * <code>repeated string loop_enter_names = 10;</code>
     */
    public Builder addLoopEnterNamesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureLoopEnterNamesIsMutable();
      loopEnterNames_.add(value);
      onChanged();
      return this;
    }

    private org.tensorflow.proto.framework.ValuesDef valuesDef_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.ValuesDef, org.tensorflow.proto.framework.ValuesDef.Builder, org.tensorflow.proto.framework.ValuesDefOrBuilder> valuesDefBuilder_;
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public boolean hasValuesDef() {
      return valuesDefBuilder_ != null || valuesDef_ != null;
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public org.tensorflow.proto.framework.ValuesDef getValuesDef() {
      if (valuesDefBuilder_ == null) {
        return valuesDef_ == null ? org.tensorflow.proto.framework.ValuesDef.getDefaultInstance() : valuesDef_;
      } else {
        return valuesDefBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public Builder setValuesDef(org.tensorflow.proto.framework.ValuesDef value) {
      if (valuesDefBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        valuesDef_ = value;
        onChanged();
      } else {
        valuesDefBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public Builder setValuesDef(
        org.tensorflow.proto.framework.ValuesDef.Builder builderForValue) {
      if (valuesDefBuilder_ == null) {
        valuesDef_ = builderForValue.build();
        onChanged();
      } else {
        valuesDefBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public Builder mergeValuesDef(org.tensorflow.proto.framework.ValuesDef value) {
      if (valuesDefBuilder_ == null) {
        if (valuesDef_ != null) {
          valuesDef_ =
            org.tensorflow.proto.framework.ValuesDef.newBuilder(valuesDef_).mergeFrom(value).buildPartial();
        } else {
          valuesDef_ = value;
        }
        onChanged();
      } else {
        valuesDefBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public Builder clearValuesDef() {
      if (valuesDefBuilder_ == null) {
        valuesDef_ = null;
        onChanged();
      } else {
        valuesDef_ = null;
        valuesDefBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public org.tensorflow.proto.framework.ValuesDef.Builder getValuesDefBuilder() {
      
      onChanged();
      return getValuesDefFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    public org.tensorflow.proto.framework.ValuesDefOrBuilder getValuesDefOrBuilder() {
      if (valuesDefBuilder_ != null) {
        return valuesDefBuilder_.getMessageOrBuilder();
      } else {
        return valuesDef_ == null ?
            org.tensorflow.proto.framework.ValuesDef.getDefaultInstance() : valuesDef_;
      }
    }
    /**
     * <pre>
     * Values and external values in control flow context.
     * </pre>
     *
     * <code>.tensorflow.ValuesDef values_def = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.ValuesDef, org.tensorflow.proto.framework.ValuesDef.Builder, org.tensorflow.proto.framework.ValuesDefOrBuilder> 
        getValuesDefFieldBuilder() {
      if (valuesDefBuilder_ == null) {
        valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.ValuesDef, org.tensorflow.proto.framework.ValuesDef.Builder, org.tensorflow.proto.framework.ValuesDefOrBuilder>(
                getValuesDef(),
                getParentForChildren(),
                isClean());
        valuesDef_ = null;
      }
      return valuesDefBuilder_;
    }

    private java.lang.Object maximumIterationsName_ = "";
    /**
     * <pre>
     * Optional name of the maximum_iterations tensor.
     * </pre>
     *
     * <code>string maximum_iterations_name = 11;</code>
     */
    public java.lang.String getMaximumIterationsName() {
      java.lang.Object ref = maximumIterationsName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        maximumIterationsName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Optional name of the maximum_iterations tensor.
     * </pre>
     *
     * <code>string maximum_iterations_name = 11;</code>
     */
    public com.google.protobuf.ByteString
        getMaximumIterationsNameBytes() {
      java.lang.Object ref = maximumIterationsName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        maximumIterationsName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Optional name of the maximum_iterations tensor.
     * </pre>
     *
     * <code>string maximum_iterations_name = 11;</code>
     */
    public Builder setMaximumIterationsName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      maximumIterationsName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional name of the maximum_iterations tensor.
     * </pre>
     *
     * <code>string maximum_iterations_name = 11;</code>
     */
    public Builder clearMaximumIterationsName() {
      
      maximumIterationsName_ = getDefaultInstance().getMaximumIterationsName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional name of the maximum_iterations tensor.
     * </pre>
     *
     * <code>string maximum_iterations_name = 11;</code>
     */
    public Builder setMaximumIterationsNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      maximumIterationsName_ = value;
      onChanged();
      return this;
    }

    private java.util.List<org.tensorflow.proto.framework.ControlFlowContextDef> nestedContexts_ =
      java.util.Collections.emptyList();
    private void ensureNestedContextsIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        nestedContexts_ = new java.util.ArrayList<org.tensorflow.proto.framework.ControlFlowContextDef>(nestedContexts_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.ControlFlowContextDef, org.tensorflow.proto.framework.ControlFlowContextDef.Builder, org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder> nestedContextsBuilder_;

    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.ControlFlowContextDef> getNestedContextsList() {
      if (nestedContextsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(nestedContexts_);
      } else {
        return nestedContextsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public int getNestedContextsCount() {
      if (nestedContextsBuilder_ == null) {
        return nestedContexts_.size();
      } else {
        return nestedContextsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public org.tensorflow.proto.framework.ControlFlowContextDef getNestedContexts(int index) {
      if (nestedContextsBuilder_ == null) {
        return nestedContexts_.get(index);
      } else {
        return nestedContextsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder setNestedContexts(
        int index, org.tensorflow.proto.framework.ControlFlowContextDef value) {
      if (nestedContextsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNestedContextsIsMutable();
        nestedContexts_.set(index, value);
        onChanged();
      } else {
        nestedContextsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder setNestedContexts(
        int index, org.tensorflow.proto.framework.ControlFlowContextDef.Builder builderForValue) {
      if (nestedContextsBuilder_ == null) {
        ensureNestedContextsIsMutable();
        nestedContexts_.set(index, builderForValue.build());
        onChanged();
      } else {
        nestedContextsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder addNestedContexts(org.tensorflow.proto.framework.ControlFlowContextDef value) {
      if (nestedContextsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNestedContextsIsMutable();
        nestedContexts_.add(value);
        onChanged();
      } else {
        nestedContextsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder addNestedContexts(
        int index, org.tensorflow.proto.framework.ControlFlowContextDef value) {
      if (nestedContextsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNestedContextsIsMutable();
        nestedContexts_.add(index, value);
        onChanged();
      } else {
        nestedContextsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder addNestedContexts(
        org.tensorflow.proto.framework.ControlFlowContextDef.Builder builderForValue) {
      if (nestedContextsBuilder_ == null) {
        ensureNestedContextsIsMutable();
        nestedContexts_.add(builderForValue.build());
        onChanged();
      } else {
        nestedContextsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder addNestedContexts(
        int index, org.tensorflow.proto.framework.ControlFlowContextDef.Builder builderForValue) {
      if (nestedContextsBuilder_ == null) {
        ensureNestedContextsIsMutable();
        nestedContexts_.add(index, builderForValue.build());
        onChanged();
      } else {
        nestedContextsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder addAllNestedContexts(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.ControlFlowContextDef> values) {
      if (nestedContextsBuilder_ == null) {
        ensureNestedContextsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, nestedContexts_);
        onChanged();
      } else {
        nestedContextsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder clearNestedContexts() {
      if (nestedContextsBuilder_ == null) {
        nestedContexts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        nestedContextsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public Builder removeNestedContexts(int index) {
      if (nestedContextsBuilder_ == null) {
        ensureNestedContextsIsMutable();
        nestedContexts_.remove(index);
        onChanged();
      } else {
        nestedContextsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public org.tensorflow.proto.framework.ControlFlowContextDef.Builder getNestedContextsBuilder(
        int index) {
      return getNestedContextsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder getNestedContextsOrBuilder(
        int index) {
      if (nestedContextsBuilder_ == null) {
        return nestedContexts_.get(index);  } else {
        return nestedContextsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder> 
         getNestedContextsOrBuilderList() {
      if (nestedContextsBuilder_ != null) {
        return nestedContextsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(nestedContexts_);
      }
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public org.tensorflow.proto.framework.ControlFlowContextDef.Builder addNestedContextsBuilder() {
      return getNestedContextsFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance());
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public org.tensorflow.proto.framework.ControlFlowContextDef.Builder addNestedContextsBuilder(
        int index) {
      return getNestedContextsFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance());
    }
    /**
     * <pre>
     * Contexts contained inside this context (e.g. nested whiles).
     * </pre>
     *
     * <code>repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.ControlFlowContextDef.Builder> 
         getNestedContextsBuilderList() {
      return getNestedContextsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.ControlFlowContextDef, org.tensorflow.proto.framework.ControlFlowContextDef.Builder, org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder> 
        getNestedContextsFieldBuilder() {
      if (nestedContextsBuilder_ == null) {
        nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.ControlFlowContextDef, org.tensorflow.proto.framework.ControlFlowContextDef.Builder, org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder>(
                nestedContexts_,
                ((bitField0_ & 0x00000004) != 0),
                getParentForChildren(),
                isClean());
        nestedContexts_ = null;
      }
      return nestedContextsBuilder_;
    }
    @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.WhileContextDef)
  }

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

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

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

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

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

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

}

