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

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Protocol buffer representing a QueueRunner.
 * </pre>
 *
 * Protobuf type {@code tensorflow.QueueRunnerDef}
 */
public  final class QueueRunnerDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.QueueRunnerDef)
    QueueRunnerDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use QueueRunnerDef.newBuilder() to construct.
  private QueueRunnerDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private QueueRunnerDef() {
    queueName_ = "";
    enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    closeOpName_ = "";
    cancelOpName_ = "";
    queueClosedExceptionTypes_ = java.util.Collections.emptyList();
  }

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

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

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

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

            cancelOpName_ = s;
            break;
          }
          case 40: {
            int rawValue = input.readEnum();
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              queueClosedExceptionTypes_ = new java.util.ArrayList<java.lang.Integer>();
              mutable_bitField0_ |= 0x00000002;
            }
            queueClosedExceptionTypes_.add(rawValue);
            break;
          }
          case 42: {
            int length = input.readRawVarint32();
            int oldLimit = input.pushLimit(length);
            while(input.getBytesUntilLimit() > 0) {
              int rawValue = input.readEnum();
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                queueClosedExceptionTypes_ = new java.util.ArrayList<java.lang.Integer>();
                mutable_bitField0_ |= 0x00000002;
              }
              queueClosedExceptionTypes_.add(rawValue);
            }
            input.popLimit(oldLimit);
            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)) {
        enqueueOpName_ = enqueueOpName_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        queueClosedExceptionTypes_ = java.util.Collections.unmodifiableList(queueClosedExceptionTypes_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_descriptor;
  }

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

  public static final int QUEUE_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object queueName_;
  /**
   * <pre>
   * Queue name.
   * </pre>
   *
   * <code>string queue_name = 1;</code>
   */
  public java.lang.String getQueueName() {
    java.lang.Object ref = queueName_;
    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();
      queueName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Queue name.
   * </pre>
   *
   * <code>string queue_name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getQueueNameBytes() {
    java.lang.Object ref = queueName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      queueName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ENQUEUE_OP_NAME_FIELD_NUMBER = 2;
  private com.google.protobuf.LazyStringList enqueueOpName_;
  /**
   * <pre>
   * A list of enqueue operations.
   * </pre>
   *
   * <code>repeated string enqueue_op_name = 2;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getEnqueueOpNameList() {
    return enqueueOpName_;
  }
  /**
   * <pre>
   * A list of enqueue operations.
   * </pre>
   *
   * <code>repeated string enqueue_op_name = 2;</code>
   */
  public int getEnqueueOpNameCount() {
    return enqueueOpName_.size();
  }
  /**
   * <pre>
   * A list of enqueue operations.
   * </pre>
   *
   * <code>repeated string enqueue_op_name = 2;</code>
   */
  public java.lang.String getEnqueueOpName(int index) {
    return enqueueOpName_.get(index);
  }
  /**
   * <pre>
   * A list of enqueue operations.
   * </pre>
   *
   * <code>repeated string enqueue_op_name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getEnqueueOpNameBytes(int index) {
    return enqueueOpName_.getByteString(index);
  }

  public static final int CLOSE_OP_NAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object closeOpName_;
  /**
   * <pre>
   * The operation to run to close the queue.
   * </pre>
   *
   * <code>string close_op_name = 3;</code>
   */
  public java.lang.String getCloseOpName() {
    java.lang.Object ref = closeOpName_;
    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();
      closeOpName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The operation to run to close the queue.
   * </pre>
   *
   * <code>string close_op_name = 3;</code>
   */
  public com.google.protobuf.ByteString
      getCloseOpNameBytes() {
    java.lang.Object ref = closeOpName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      closeOpName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CANCEL_OP_NAME_FIELD_NUMBER = 4;
  private volatile java.lang.Object cancelOpName_;
  /**
   * <pre>
   * The operation to run to cancel the queue.
   * </pre>
   *
   * <code>string cancel_op_name = 4;</code>
   */
  public java.lang.String getCancelOpName() {
    java.lang.Object ref = cancelOpName_;
    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();
      cancelOpName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The operation to run to cancel the queue.
   * </pre>
   *
   * <code>string cancel_op_name = 4;</code>
   */
  public com.google.protobuf.ByteString
      getCancelOpNameBytes() {
    java.lang.Object ref = cancelOpName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      cancelOpName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int QUEUE_CLOSED_EXCEPTION_TYPES_FIELD_NUMBER = 5;
  private java.util.List<java.lang.Integer> queueClosedExceptionTypes_;
  private static final com.google.protobuf.Internal.ListAdapter.Converter<
      java.lang.Integer, org.tensorflow.proto.framework.Code> queueClosedExceptionTypes_converter_ =
          new com.google.protobuf.Internal.ListAdapter.Converter<
              java.lang.Integer, org.tensorflow.proto.framework.Code>() {
            public org.tensorflow.proto.framework.Code convert(java.lang.Integer from) {
              @SuppressWarnings("deprecation")
              org.tensorflow.proto.framework.Code result = org.tensorflow.proto.framework.Code.valueOf(from);
              return result == null ? org.tensorflow.proto.framework.Code.UNRECOGNIZED : result;
            }
          };
  /**
   * <pre>
   * A list of exception types considered to signal a safely closed queue
   * if raised during enqueue operations.
   * </pre>
   *
   * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.Code> getQueueClosedExceptionTypesList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, org.tensorflow.proto.framework.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_);
  }
  /**
   * <pre>
   * A list of exception types considered to signal a safely closed queue
   * if raised during enqueue operations.
   * </pre>
   *
   * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
   */
  public int getQueueClosedExceptionTypesCount() {
    return queueClosedExceptionTypes_.size();
  }
  /**
   * <pre>
   * A list of exception types considered to signal a safely closed queue
   * if raised during enqueue operations.
   * </pre>
   *
   * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
   */
  public org.tensorflow.proto.framework.Code getQueueClosedExceptionTypes(int index) {
    return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.get(index));
  }
  /**
   * <pre>
   * A list of exception types considered to signal a safely closed queue
   * if raised during enqueue operations.
   * </pre>
   *
   * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
   */
  public java.util.List<java.lang.Integer>
  getQueueClosedExceptionTypesValueList() {
    return queueClosedExceptionTypes_;
  }
  /**
   * <pre>
   * A list of exception types considered to signal a safely closed queue
   * if raised during enqueue operations.
   * </pre>
   *
   * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
   */
  public int getQueueClosedExceptionTypesValue(int index) {
    return queueClosedExceptionTypes_.get(index);
  }
  private int queueClosedExceptionTypesMemoizedSerializedSize;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    getSerializedSize();
    if (!getQueueNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queueName_);
    }
    for (int i = 0; i < enqueueOpName_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, enqueueOpName_.getRaw(i));
    }
    if (!getCloseOpNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, closeOpName_);
    }
    if (!getCancelOpNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cancelOpName_);
    }
    if (getQueueClosedExceptionTypesList().size() > 0) {
      output.writeUInt32NoTag(42);
      output.writeUInt32NoTag(queueClosedExceptionTypesMemoizedSerializedSize);
    }
    for (int i = 0; i < queueClosedExceptionTypes_.size(); i++) {
      output.writeEnumNoTag(queueClosedExceptionTypes_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getQueueNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queueName_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < enqueueOpName_.size(); i++) {
        dataSize += computeStringSizeNoTag(enqueueOpName_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getEnqueueOpNameList().size();
    }
    if (!getCloseOpNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, closeOpName_);
    }
    if (!getCancelOpNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cancelOpName_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < queueClosedExceptionTypes_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeEnumSizeNoTag(queueClosedExceptionTypes_.get(i));
      }
      size += dataSize;
      if (!getQueueClosedExceptionTypesList().isEmpty()) {  size += 1;
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32SizeNoTag(dataSize);
      }queueClosedExceptionTypesMemoizedSerializedSize = dataSize;
    }
    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.QueueRunnerDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.QueueRunnerDef other = (org.tensorflow.proto.framework.QueueRunnerDef) obj;

    if (!getQueueName()
        .equals(other.getQueueName())) return false;
    if (!getEnqueueOpNameList()
        .equals(other.getEnqueueOpNameList())) return false;
    if (!getCloseOpName()
        .equals(other.getCloseOpName())) return false;
    if (!getCancelOpName()
        .equals(other.getCancelOpName())) return false;
    if (!queueClosedExceptionTypes_.equals(other.queueClosedExceptionTypes_)) 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) + QUEUE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getQueueName().hashCode();
    if (getEnqueueOpNameCount() > 0) {
      hash = (37 * hash) + ENQUEUE_OP_NAME_FIELD_NUMBER;
      hash = (53 * hash) + getEnqueueOpNameList().hashCode();
    }
    hash = (37 * hash) + CLOSE_OP_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getCloseOpName().hashCode();
    hash = (37 * hash) + CANCEL_OP_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getCancelOpName().hashCode();
    if (getQueueClosedExceptionTypesCount() > 0) {
      hash = (37 * hash) + QUEUE_CLOSED_EXCEPTION_TYPES_FIELD_NUMBER;
      hash = (53 * hash) + queueClosedExceptionTypes_.hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

    // Construct using org.tensorflow.proto.framework.QueueRunnerDef.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();
      queueName_ = "";

      enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      closeOpName_ = "";

      cancelOpName_ = "";

      queueClosedExceptionTypes_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

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

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.QueueRunnerDef buildPartial() {
      org.tensorflow.proto.framework.QueueRunnerDef result = new org.tensorflow.proto.framework.QueueRunnerDef(this);
      int from_bitField0_ = bitField0_;
      result.queueName_ = queueName_;
      if (((bitField0_ & 0x00000001) != 0)) {
        enqueueOpName_ = enqueueOpName_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.enqueueOpName_ = enqueueOpName_;
      result.closeOpName_ = closeOpName_;
      result.cancelOpName_ = cancelOpName_;
      if (((bitField0_ & 0x00000002) != 0)) {
        queueClosedExceptionTypes_ = java.util.Collections.unmodifiableList(queueClosedExceptionTypes_);
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.queueClosedExceptionTypes_ = queueClosedExceptionTypes_;
      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.QueueRunnerDef) {
        return mergeFrom((org.tensorflow.proto.framework.QueueRunnerDef)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.framework.QueueRunnerDef other) {
      if (other == org.tensorflow.proto.framework.QueueRunnerDef.getDefaultInstance()) return this;
      if (!other.getQueueName().isEmpty()) {
        queueName_ = other.queueName_;
        onChanged();
      }
      if (!other.enqueueOpName_.isEmpty()) {
        if (enqueueOpName_.isEmpty()) {
          enqueueOpName_ = other.enqueueOpName_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureEnqueueOpNameIsMutable();
          enqueueOpName_.addAll(other.enqueueOpName_);
        }
        onChanged();
      }
      if (!other.getCloseOpName().isEmpty()) {
        closeOpName_ = other.closeOpName_;
        onChanged();
      }
      if (!other.getCancelOpName().isEmpty()) {
        cancelOpName_ = other.cancelOpName_;
        onChanged();
      }
      if (!other.queueClosedExceptionTypes_.isEmpty()) {
        if (queueClosedExceptionTypes_.isEmpty()) {
          queueClosedExceptionTypes_ = other.queueClosedExceptionTypes_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureQueueClosedExceptionTypesIsMutable();
          queueClosedExceptionTypes_.addAll(other.queueClosedExceptionTypes_);
        }
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private java.lang.Object queueName_ = "";
    /**
     * <pre>
     * Queue name.
     * </pre>
     *
     * <code>string queue_name = 1;</code>
     */
    public java.lang.String getQueueName() {
      java.lang.Object ref = queueName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        queueName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Queue name.
     * </pre>
     *
     * <code>string queue_name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getQueueNameBytes() {
      java.lang.Object ref = queueName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        queueName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Queue name.
     * </pre>
     *
     * <code>string queue_name = 1;</code>
     */
    public Builder setQueueName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      queueName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Queue name.
     * </pre>
     *
     * <code>string queue_name = 1;</code>
     */
    public Builder clearQueueName() {
      
      queueName_ = getDefaultInstance().getQueueName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Queue name.
     * </pre>
     *
     * <code>string queue_name = 1;</code>
     */
    public Builder setQueueNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      queueName_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureEnqueueOpNameIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        enqueueOpName_ = new com.google.protobuf.LazyStringArrayList(enqueueOpName_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getEnqueueOpNameList() {
      return enqueueOpName_.getUnmodifiableView();
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public int getEnqueueOpNameCount() {
      return enqueueOpName_.size();
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public java.lang.String getEnqueueOpName(int index) {
      return enqueueOpName_.get(index);
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getEnqueueOpNameBytes(int index) {
      return enqueueOpName_.getByteString(index);
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public Builder setEnqueueOpName(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureEnqueueOpNameIsMutable();
      enqueueOpName_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public Builder addEnqueueOpName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureEnqueueOpNameIsMutable();
      enqueueOpName_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public Builder addAllEnqueueOpName(
        java.lang.Iterable<java.lang.String> values) {
      ensureEnqueueOpNameIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, enqueueOpName_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public Builder clearEnqueueOpName() {
      enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of enqueue operations.
     * </pre>
     *
     * <code>repeated string enqueue_op_name = 2;</code>
     */
    public Builder addEnqueueOpNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureEnqueueOpNameIsMutable();
      enqueueOpName_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object closeOpName_ = "";
    /**
     * <pre>
     * The operation to run to close the queue.
     * </pre>
     *
     * <code>string close_op_name = 3;</code>
     */
    public java.lang.String getCloseOpName() {
      java.lang.Object ref = closeOpName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        closeOpName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The operation to run to close the queue.
     * </pre>
     *
     * <code>string close_op_name = 3;</code>
     */
    public com.google.protobuf.ByteString
        getCloseOpNameBytes() {
      java.lang.Object ref = closeOpName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        closeOpName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The operation to run to close the queue.
     * </pre>
     *
     * <code>string close_op_name = 3;</code>
     */
    public Builder setCloseOpName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      closeOpName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The operation to run to close the queue.
     * </pre>
     *
     * <code>string close_op_name = 3;</code>
     */
    public Builder clearCloseOpName() {
      
      closeOpName_ = getDefaultInstance().getCloseOpName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The operation to run to close the queue.
     * </pre>
     *
     * <code>string close_op_name = 3;</code>
     */
    public Builder setCloseOpNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      closeOpName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object cancelOpName_ = "";
    /**
     * <pre>
     * The operation to run to cancel the queue.
     * </pre>
     *
     * <code>string cancel_op_name = 4;</code>
     */
    public java.lang.String getCancelOpName() {
      java.lang.Object ref = cancelOpName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        cancelOpName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The operation to run to cancel the queue.
     * </pre>
     *
     * <code>string cancel_op_name = 4;</code>
     */
    public com.google.protobuf.ByteString
        getCancelOpNameBytes() {
      java.lang.Object ref = cancelOpName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        cancelOpName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The operation to run to cancel the queue.
     * </pre>
     *
     * <code>string cancel_op_name = 4;</code>
     */
    public Builder setCancelOpName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      cancelOpName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The operation to run to cancel the queue.
     * </pre>
     *
     * <code>string cancel_op_name = 4;</code>
     */
    public Builder clearCancelOpName() {
      
      cancelOpName_ = getDefaultInstance().getCancelOpName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The operation to run to cancel the queue.
     * </pre>
     *
     * <code>string cancel_op_name = 4;</code>
     */
    public Builder setCancelOpNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      cancelOpName_ = value;
      onChanged();
      return this;
    }

    private java.util.List<java.lang.Integer> queueClosedExceptionTypes_ =
      java.util.Collections.emptyList();
    private void ensureQueueClosedExceptionTypesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        queueClosedExceptionTypes_ = new java.util.ArrayList<java.lang.Integer>(queueClosedExceptionTypes_);
        bitField0_ |= 0x00000002;
      }
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.Code> getQueueClosedExceptionTypesList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, org.tensorflow.proto.framework.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_);
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public int getQueueClosedExceptionTypesCount() {
      return queueClosedExceptionTypes_.size();
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public org.tensorflow.proto.framework.Code getQueueClosedExceptionTypes(int index) {
      return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.get(index));
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder setQueueClosedExceptionTypes(
        int index, org.tensorflow.proto.framework.Code value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureQueueClosedExceptionTypesIsMutable();
      queueClosedExceptionTypes_.set(index, value.getNumber());
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder addQueueClosedExceptionTypes(org.tensorflow.proto.framework.Code value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureQueueClosedExceptionTypesIsMutable();
      queueClosedExceptionTypes_.add(value.getNumber());
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder addAllQueueClosedExceptionTypes(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.Code> values) {
      ensureQueueClosedExceptionTypesIsMutable();
      for (org.tensorflow.proto.framework.Code value : values) {
        queueClosedExceptionTypes_.add(value.getNumber());
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder clearQueueClosedExceptionTypes() {
      queueClosedExceptionTypes_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public java.util.List<java.lang.Integer>
    getQueueClosedExceptionTypesValueList() {
      return java.util.Collections.unmodifiableList(queueClosedExceptionTypes_);
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public int getQueueClosedExceptionTypesValue(int index) {
      return queueClosedExceptionTypes_.get(index);
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder setQueueClosedExceptionTypesValue(
        int index, int value) {
      ensureQueueClosedExceptionTypesIsMutable();
      queueClosedExceptionTypes_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder addQueueClosedExceptionTypesValue(int value) {
      ensureQueueClosedExceptionTypesIsMutable();
      queueClosedExceptionTypes_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A list of exception types considered to signal a safely closed queue
     * if raised during enqueue operations.
     * </pre>
     *
     * <code>repeated .tensorflow.error.Code queue_closed_exception_types = 5;</code>
     */
    public Builder addAllQueueClosedExceptionTypesValue(
        java.lang.Iterable<java.lang.Integer> values) {
      ensureQueueClosedExceptionTypesIsMutable();
      for (int value : values) {
        queueClosedExceptionTypes_.add(value);
      }
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:tensorflow.QueueRunnerDef)
  }

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

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

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

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

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

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

}

