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

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Container for any kind of control flow context. Any other control flow
 * contexts that are added below should also be added here.
 * </pre>
 *
 * Protobuf type {@code tensorflow.ControlFlowContextDef}
 */
public  final class ControlFlowContextDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.ControlFlowContextDef)
    ControlFlowContextDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ControlFlowContextDef.newBuilder() to construct.
  private ControlFlowContextDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ControlFlowContextDef() {
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ControlFlowContextDef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            org.tensorflow.proto.framework.CondContextDef.Builder subBuilder = null;
            if (ctxtCase_ == 1) {
              subBuilder = ((org.tensorflow.proto.framework.CondContextDef) ctxt_).toBuilder();
            }
            ctxt_ =
                input.readMessage(org.tensorflow.proto.framework.CondContextDef.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.CondContextDef) ctxt_);
              ctxt_ = subBuilder.buildPartial();
            }
            ctxtCase_ = 1;
            break;
          }
          case 18: {
            org.tensorflow.proto.framework.WhileContextDef.Builder subBuilder = null;
            if (ctxtCase_ == 2) {
              subBuilder = ((org.tensorflow.proto.framework.WhileContextDef) ctxt_).toBuilder();
            }
            ctxt_ =
                input.readMessage(org.tensorflow.proto.framework.WhileContextDef.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.WhileContextDef) ctxt_);
              ctxt_ = subBuilder.buildPartial();
            }
            ctxtCase_ = 2;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_descriptor;
  }

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

  private int ctxtCase_ = 0;
  private java.lang.Object ctxt_;
  public enum CtxtCase
      implements com.google.protobuf.Internal.EnumLite {
    COND_CTXT(1),
    WHILE_CTXT(2),
    CTXT_NOT_SET(0);
    private final int value;
    private CtxtCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static CtxtCase valueOf(int value) {
      return forNumber(value);
    }

    public static CtxtCase forNumber(int value) {
      switch (value) {
        case 1: return COND_CTXT;
        case 2: return WHILE_CTXT;
        case 0: return CTXT_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public CtxtCase
  getCtxtCase() {
    return CtxtCase.forNumber(
        ctxtCase_);
  }

  public static final int COND_CTXT_FIELD_NUMBER = 1;
  /**
   * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
   */
  public boolean hasCondCtxt() {
    return ctxtCase_ == 1;
  }
  /**
   * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
   */
  public org.tensorflow.proto.framework.CondContextDef getCondCtxt() {
    if (ctxtCase_ == 1) {
       return (org.tensorflow.proto.framework.CondContextDef) ctxt_;
    }
    return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
   */
  public org.tensorflow.proto.framework.CondContextDefOrBuilder getCondCtxtOrBuilder() {
    if (ctxtCase_ == 1) {
       return (org.tensorflow.proto.framework.CondContextDef) ctxt_;
    }
    return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance();
  }

  public static final int WHILE_CTXT_FIELD_NUMBER = 2;
  /**
   * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
   */
  public boolean hasWhileCtxt() {
    return ctxtCase_ == 2;
  }
  /**
   * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
   */
  public org.tensorflow.proto.framework.WhileContextDef getWhileCtxt() {
    if (ctxtCase_ == 2) {
       return (org.tensorflow.proto.framework.WhileContextDef) ctxt_;
    }
    return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance();
  }
  /**
   * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
   */
  public org.tensorflow.proto.framework.WhileContextDefOrBuilder getWhileCtxtOrBuilder() {
    if (ctxtCase_ == 2) {
       return (org.tensorflow.proto.framework.WhileContextDef) ctxt_;
    }
    return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance();
  }

  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 (ctxtCase_ == 1) {
      output.writeMessage(1, (org.tensorflow.proto.framework.CondContextDef) ctxt_);
    }
    if (ctxtCase_ == 2) {
      output.writeMessage(2, (org.tensorflow.proto.framework.WhileContextDef) ctxt_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (ctxtCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (org.tensorflow.proto.framework.CondContextDef) ctxt_);
    }
    if (ctxtCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (org.tensorflow.proto.framework.WhileContextDef) ctxt_);
    }
    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.ControlFlowContextDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.ControlFlowContextDef other = (org.tensorflow.proto.framework.ControlFlowContextDef) obj;

    if (!getCtxtCase().equals(other.getCtxtCase())) return false;
    switch (ctxtCase_) {
      case 1:
        if (!getCondCtxt()
            .equals(other.getCondCtxt())) return false;
        break;
      case 2:
        if (!getWhileCtxt()
            .equals(other.getWhileCtxt())) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (ctxtCase_) {
      case 1:
        hash = (37 * hash) + COND_CTXT_FIELD_NUMBER;
        hash = (53 * hash) + getCondCtxt().hashCode();
        break;
      case 2:
        hash = (37 * hash) + WHILE_CTXT_FIELD_NUMBER;
        hash = (53 * hash) + getWhileCtxt().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef 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.ControlFlowContextDef parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef 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.ControlFlowContextDef parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef 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.ControlFlowContextDef parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef 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.ControlFlowContextDef parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.ControlFlowContextDef 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.ControlFlowContextDef 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>
   * Container for any kind of control flow context. Any other control flow
   * contexts that are added below should also be added here.
   * </pre>
   *
   * Protobuf type {@code tensorflow.ControlFlowContextDef}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.ControlFlowContextDef)
      org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_descriptor;
    }

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

    // Construct using org.tensorflow.proto.framework.ControlFlowContextDef.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();
      ctxtCase_ = 0;
      ctxt_ = null;
      return this;
    }

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

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.ControlFlowContextDef buildPartial() {
      org.tensorflow.proto.framework.ControlFlowContextDef result = new org.tensorflow.proto.framework.ControlFlowContextDef(this);
      if (ctxtCase_ == 1) {
        if (condCtxtBuilder_ == null) {
          result.ctxt_ = ctxt_;
        } else {
          result.ctxt_ = condCtxtBuilder_.build();
        }
      }
      if (ctxtCase_ == 2) {
        if (whileCtxtBuilder_ == null) {
          result.ctxt_ = ctxt_;
        } else {
          result.ctxt_ = whileCtxtBuilder_.build();
        }
      }
      result.ctxtCase_ = ctxtCase_;
      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.ControlFlowContextDef) {
        return mergeFrom((org.tensorflow.proto.framework.ControlFlowContextDef)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.framework.ControlFlowContextDef other) {
      if (other == org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance()) return this;
      switch (other.getCtxtCase()) {
        case COND_CTXT: {
          mergeCondCtxt(other.getCondCtxt());
          break;
        }
        case WHILE_CTXT: {
          mergeWhileCtxt(other.getWhileCtxt());
          break;
        }
        case CTXT_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      org.tensorflow.proto.framework.ControlFlowContextDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.ControlFlowContextDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int ctxtCase_ = 0;
    private java.lang.Object ctxt_;
    public CtxtCase
        getCtxtCase() {
      return CtxtCase.forNumber(
          ctxtCase_);
    }

    public Builder clearCtxt() {
      ctxtCase_ = 0;
      ctxt_ = null;
      onChanged();
      return this;
    }


    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.CondContextDef, org.tensorflow.proto.framework.CondContextDef.Builder, org.tensorflow.proto.framework.CondContextDefOrBuilder> condCtxtBuilder_;
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public boolean hasCondCtxt() {
      return ctxtCase_ == 1;
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public org.tensorflow.proto.framework.CondContextDef getCondCtxt() {
      if (condCtxtBuilder_ == null) {
        if (ctxtCase_ == 1) {
          return (org.tensorflow.proto.framework.CondContextDef) ctxt_;
        }
        return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance();
      } else {
        if (ctxtCase_ == 1) {
          return condCtxtBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public Builder setCondCtxt(org.tensorflow.proto.framework.CondContextDef value) {
      if (condCtxtBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ctxt_ = value;
        onChanged();
      } else {
        condCtxtBuilder_.setMessage(value);
      }
      ctxtCase_ = 1;
      return this;
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public Builder setCondCtxt(
        org.tensorflow.proto.framework.CondContextDef.Builder builderForValue) {
      if (condCtxtBuilder_ == null) {
        ctxt_ = builderForValue.build();
        onChanged();
      } else {
        condCtxtBuilder_.setMessage(builderForValue.build());
      }
      ctxtCase_ = 1;
      return this;
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public Builder mergeCondCtxt(org.tensorflow.proto.framework.CondContextDef value) {
      if (condCtxtBuilder_ == null) {
        if (ctxtCase_ == 1 &&
            ctxt_ != org.tensorflow.proto.framework.CondContextDef.getDefaultInstance()) {
          ctxt_ = org.tensorflow.proto.framework.CondContextDef.newBuilder((org.tensorflow.proto.framework.CondContextDef) ctxt_)
              .mergeFrom(value).buildPartial();
        } else {
          ctxt_ = value;
        }
        onChanged();
      } else {
        if (ctxtCase_ == 1) {
          condCtxtBuilder_.mergeFrom(value);
        }
        condCtxtBuilder_.setMessage(value);
      }
      ctxtCase_ = 1;
      return this;
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public Builder clearCondCtxt() {
      if (condCtxtBuilder_ == null) {
        if (ctxtCase_ == 1) {
          ctxtCase_ = 0;
          ctxt_ = null;
          onChanged();
        }
      } else {
        if (ctxtCase_ == 1) {
          ctxtCase_ = 0;
          ctxt_ = null;
        }
        condCtxtBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public org.tensorflow.proto.framework.CondContextDef.Builder getCondCtxtBuilder() {
      return getCondCtxtFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    public org.tensorflow.proto.framework.CondContextDefOrBuilder getCondCtxtOrBuilder() {
      if ((ctxtCase_ == 1) && (condCtxtBuilder_ != null)) {
        return condCtxtBuilder_.getMessageOrBuilder();
      } else {
        if (ctxtCase_ == 1) {
          return (org.tensorflow.proto.framework.CondContextDef) ctxt_;
        }
        return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.CondContextDef cond_ctxt = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.CondContextDef, org.tensorflow.proto.framework.CondContextDef.Builder, org.tensorflow.proto.framework.CondContextDefOrBuilder> 
        getCondCtxtFieldBuilder() {
      if (condCtxtBuilder_ == null) {
        if (!(ctxtCase_ == 1)) {
          ctxt_ = org.tensorflow.proto.framework.CondContextDef.getDefaultInstance();
        }
        condCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.CondContextDef, org.tensorflow.proto.framework.CondContextDef.Builder, org.tensorflow.proto.framework.CondContextDefOrBuilder>(
                (org.tensorflow.proto.framework.CondContextDef) ctxt_,
                getParentForChildren(),
                isClean());
        ctxt_ = null;
      }
      ctxtCase_ = 1;
      onChanged();;
      return condCtxtBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.WhileContextDef, org.tensorflow.proto.framework.WhileContextDef.Builder, org.tensorflow.proto.framework.WhileContextDefOrBuilder> whileCtxtBuilder_;
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public boolean hasWhileCtxt() {
      return ctxtCase_ == 2;
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public org.tensorflow.proto.framework.WhileContextDef getWhileCtxt() {
      if (whileCtxtBuilder_ == null) {
        if (ctxtCase_ == 2) {
          return (org.tensorflow.proto.framework.WhileContextDef) ctxt_;
        }
        return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance();
      } else {
        if (ctxtCase_ == 2) {
          return whileCtxtBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public Builder setWhileCtxt(org.tensorflow.proto.framework.WhileContextDef value) {
      if (whileCtxtBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ctxt_ = value;
        onChanged();
      } else {
        whileCtxtBuilder_.setMessage(value);
      }
      ctxtCase_ = 2;
      return this;
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public Builder setWhileCtxt(
        org.tensorflow.proto.framework.WhileContextDef.Builder builderForValue) {
      if (whileCtxtBuilder_ == null) {
        ctxt_ = builderForValue.build();
        onChanged();
      } else {
        whileCtxtBuilder_.setMessage(builderForValue.build());
      }
      ctxtCase_ = 2;
      return this;
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public Builder mergeWhileCtxt(org.tensorflow.proto.framework.WhileContextDef value) {
      if (whileCtxtBuilder_ == null) {
        if (ctxtCase_ == 2 &&
            ctxt_ != org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance()) {
          ctxt_ = org.tensorflow.proto.framework.WhileContextDef.newBuilder((org.tensorflow.proto.framework.WhileContextDef) ctxt_)
              .mergeFrom(value).buildPartial();
        } else {
          ctxt_ = value;
        }
        onChanged();
      } else {
        if (ctxtCase_ == 2) {
          whileCtxtBuilder_.mergeFrom(value);
        }
        whileCtxtBuilder_.setMessage(value);
      }
      ctxtCase_ = 2;
      return this;
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public Builder clearWhileCtxt() {
      if (whileCtxtBuilder_ == null) {
        if (ctxtCase_ == 2) {
          ctxtCase_ = 0;
          ctxt_ = null;
          onChanged();
        }
      } else {
        if (ctxtCase_ == 2) {
          ctxtCase_ = 0;
          ctxt_ = null;
        }
        whileCtxtBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public org.tensorflow.proto.framework.WhileContextDef.Builder getWhileCtxtBuilder() {
      return getWhileCtxtFieldBuilder().getBuilder();
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    public org.tensorflow.proto.framework.WhileContextDefOrBuilder getWhileCtxtOrBuilder() {
      if ((ctxtCase_ == 2) && (whileCtxtBuilder_ != null)) {
        return whileCtxtBuilder_.getMessageOrBuilder();
      } else {
        if (ctxtCase_ == 2) {
          return (org.tensorflow.proto.framework.WhileContextDef) ctxt_;
        }
        return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance();
      }
    }
    /**
     * <code>.tensorflow.WhileContextDef while_ctxt = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.WhileContextDef, org.tensorflow.proto.framework.WhileContextDef.Builder, org.tensorflow.proto.framework.WhileContextDefOrBuilder> 
        getWhileCtxtFieldBuilder() {
      if (whileCtxtBuilder_ == null) {
        if (!(ctxtCase_ == 2)) {
          ctxt_ = org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance();
        }
        whileCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.WhileContextDef, org.tensorflow.proto.framework.WhileContextDef.Builder, org.tensorflow.proto.framework.WhileContextDefOrBuilder>(
                (org.tensorflow.proto.framework.WhileContextDef) ctxt_,
                getParentForChildren(),
                isClean());
        ctxt_ = null;
      }
      ctxtCase_ = 2;
      onChanged();;
      return whileCtxtBuilder_;
    }
    @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.ControlFlowContextDef)
  }

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

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

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

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

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

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

}

