// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: src/main/proto/BookkeeperProtocol.proto

package org.apache.bookkeeper.proto;

public final class BookkeeperProtocol {
  private BookkeeperProtocol() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public enum ProtocolVersion
      implements com.google.protobuf.ProtocolMessageEnum {
    VERSION_ONE(0, 1),
    VERSION_TWO(1, 2),
    VERSION_THREE(2, 3),
    ;
    
    public static final int VERSION_ONE_VALUE = 1;
    public static final int VERSION_TWO_VALUE = 2;
    public static final int VERSION_THREE_VALUE = 3;
    
    
    public final int getNumber() { return value; }
    
    public static ProtocolVersion valueOf(int value) {
      switch (value) {
        case 1: return VERSION_ONE;
        case 2: return VERSION_TWO;
        case 3: return VERSION_THREE;
        default: return null;
      }
    }
    
    public static com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>
        internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>() {
            public ProtocolVersion findValueByNumber(int number) {
              return ProtocolVersion.valueOf(number);
            }
          };
    
    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      return getDescriptor().getValues().get(index);
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor().getEnumTypes().get(0);
    }
    
    private static final ProtocolVersion[] VALUES = {
      VERSION_ONE, VERSION_TWO, VERSION_THREE, 
    };
    
    public static ProtocolVersion valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      return VALUES[desc.getIndex()];
    }
    
    private final int index;
    private final int value;
    
    private ProtocolVersion(int index, int value) {
      this.index = index;
      this.value = value;
    }
    
    // @@protoc_insertion_point(enum_scope:ProtocolVersion)
  }
  
  public enum StatusCode
      implements com.google.protobuf.ProtocolMessageEnum {
    EOK(0, 0),
    ENOLEDGER(1, 402),
    ENOENTRY(2, 403),
    EBADREQ(3, 404),
    EIO(4, 501),
    EUA(5, 502),
    EBADVERSION(6, 503),
    EFENCED(7, 504),
    EREADONLY(8, 505),
    ;
    
    public static final int EOK_VALUE = 0;
    public static final int ENOLEDGER_VALUE = 402;
    public static final int ENOENTRY_VALUE = 403;
    public static final int EBADREQ_VALUE = 404;
    public static final int EIO_VALUE = 501;
    public static final int EUA_VALUE = 502;
    public static final int EBADVERSION_VALUE = 503;
    public static final int EFENCED_VALUE = 504;
    public static final int EREADONLY_VALUE = 505;
    
    
    public final int getNumber() { return value; }
    
    public static StatusCode valueOf(int value) {
      switch (value) {
        case 0: return EOK;
        case 402: return ENOLEDGER;
        case 403: return ENOENTRY;
        case 404: return EBADREQ;
        case 501: return EIO;
        case 502: return EUA;
        case 503: return EBADVERSION;
        case 504: return EFENCED;
        case 505: return EREADONLY;
        default: return null;
      }
    }
    
    public static com.google.protobuf.Internal.EnumLiteMap<StatusCode>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static com.google.protobuf.Internal.EnumLiteMap<StatusCode>
        internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<StatusCode>() {
            public StatusCode findValueByNumber(int number) {
              return StatusCode.valueOf(number);
            }
          };
    
    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      return getDescriptor().getValues().get(index);
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor().getEnumTypes().get(1);
    }
    
    private static final StatusCode[] VALUES = {
      EOK, ENOLEDGER, ENOENTRY, EBADREQ, EIO, EUA, EBADVERSION, EFENCED, EREADONLY, 
    };
    
    public static StatusCode valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      return VALUES[desc.getIndex()];
    }
    
    private final int index;
    private final int value;
    
    private StatusCode(int index, int value) {
      this.index = index;
      this.value = value;
    }
    
    // @@protoc_insertion_point(enum_scope:StatusCode)
  }
  
  public enum OperationType
      implements com.google.protobuf.ProtocolMessageEnum {
    READ_ENTRY(0, 1),
    ADD_ENTRY(1, 2),
    RANGE_READ_ENTRY(2, 3),
    RANGE_ADD_ENTRY(3, 4),
    AUTH(4, 5),
    ;
    
    public static final int READ_ENTRY_VALUE = 1;
    public static final int ADD_ENTRY_VALUE = 2;
    public static final int RANGE_READ_ENTRY_VALUE = 3;
    public static final int RANGE_ADD_ENTRY_VALUE = 4;
    public static final int AUTH_VALUE = 5;
    
    
    public final int getNumber() { return value; }
    
    public static OperationType valueOf(int value) {
      switch (value) {
        case 1: return READ_ENTRY;
        case 2: return ADD_ENTRY;
        case 3: return RANGE_READ_ENTRY;
        case 4: return RANGE_ADD_ENTRY;
        case 5: return AUTH;
        default: return null;
      }
    }
    
    public static com.google.protobuf.Internal.EnumLiteMap<OperationType>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static com.google.protobuf.Internal.EnumLiteMap<OperationType>
        internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<OperationType>() {
            public OperationType findValueByNumber(int number) {
              return OperationType.valueOf(number);
            }
          };
    
    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      return getDescriptor().getValues().get(index);
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor().getEnumTypes().get(2);
    }
    
    private static final OperationType[] VALUES = {
      READ_ENTRY, ADD_ENTRY, RANGE_READ_ENTRY, RANGE_ADD_ENTRY, AUTH, 
    };
    
    public static OperationType valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      return VALUES[desc.getIndex()];
    }
    
    private final int index;
    private final int value;
    
    private OperationType(int index, int value) {
      this.index = index;
      this.value = value;
    }
    
    // @@protoc_insertion_point(enum_scope:OperationType)
  }
  
  public interface BKPacketHeaderOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // required .ProtocolVersion version = 1;
    boolean hasVersion();
    org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion();
    
    // required .OperationType operation = 2;
    boolean hasOperation();
    org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation();
    
    // required uint64 txnId = 3;
    boolean hasTxnId();
    long getTxnId();
  }
  public static final class BKPacketHeader extends
      com.google.protobuf.GeneratedMessage
      implements BKPacketHeaderOrBuilder {
    // Use BKPacketHeader.newBuilder() to construct.
    private BKPacketHeader(Builder builder) {
      super(builder);
    }
    private BKPacketHeader(boolean noInit) {}
    
    private static final BKPacketHeader defaultInstance;
    public static BKPacketHeader getDefaultInstance() {
      return defaultInstance;
    }
    
    public BKPacketHeader getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable;
    }
    
    private int bitField0_;
    // required .ProtocolVersion version = 1;
    public static final int VERSION_FIELD_NUMBER = 1;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion version_;
    public boolean hasVersion() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion() {
      return version_;
    }
    
    // required .OperationType operation = 2;
    public static final int OPERATION_FIELD_NUMBER = 2;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType operation_;
    public boolean hasOperation() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation() {
      return operation_;
    }
    
    // required uint64 txnId = 3;
    public static final int TXNID_FIELD_NUMBER = 3;
    private long txnId_;
    public boolean hasTxnId() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getTxnId() {
      return txnId_;
    }
    
    private void initFields() {
      version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
      operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
      txnId_ = 0L;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasVersion()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasOperation()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasTxnId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeEnum(1, version_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeEnum(2, operation_.getNumber());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeUInt64(3, txnId_);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, version_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, operation_.getNumber());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(3, txnId_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
        bitField0_ = (bitField0_ & ~0x00000001);
        operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
        bitField0_ = (bitField0_ & ~0x00000002);
        txnId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = new org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.version_ = version_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.operation_ = operation_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.txnId_ = txnId_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance()) return this;
        if (other.hasVersion()) {
          setVersion(other.getVersion());
        }
        if (other.hasOperation()) {
          setOperation(other.getOperation());
        }
        if (other.hasTxnId()) {
          setTxnId(other.getTxnId());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasVersion()) {
          
          return false;
        }
        if (!hasOperation()) {
          
          return false;
        }
        if (!hasTxnId()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(1, rawValue);
              } else {
                bitField0_ |= 0x00000001;
                version_ = value;
              }
              break;
            }
            case 16: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(2, rawValue);
              } else {
                bitField0_ |= 0x00000002;
                operation_ = value;
              }
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              txnId_ = input.readUInt64();
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .ProtocolVersion version = 1;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
      public boolean hasVersion() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion() {
        return version_;
      }
      public Builder setVersion(org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        version_ = value;
        onChanged();
        return this;
      }
      public Builder clearVersion() {
        bitField0_ = (bitField0_ & ~0x00000001);
        version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
        onChanged();
        return this;
      }
      
      // required .OperationType operation = 2;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
      public boolean hasOperation() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation() {
        return operation_;
      }
      public Builder setOperation(org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000002;
        operation_ = value;
        onChanged();
        return this;
      }
      public Builder clearOperation() {
        bitField0_ = (bitField0_ & ~0x00000002);
        operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
        onChanged();
        return this;
      }
      
      // required uint64 txnId = 3;
      private long txnId_ ;
      public boolean hasTxnId() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getTxnId() {
        return txnId_;
      }
      public Builder setTxnId(long value) {
        bitField0_ |= 0x00000004;
        txnId_ = value;
        onChanged();
        return this;
      }
      public Builder clearTxnId() {
        bitField0_ = (bitField0_ & ~0x00000004);
        txnId_ = 0L;
        onChanged();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:BKPacketHeader)
    }
    
    static {
      defaultInstance = new BKPacketHeader(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:BKPacketHeader)
  }
  
  public interface RequestOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // required .BKPacketHeader header = 1;
    boolean hasHeader();
    org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader();
    org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder();
    
    // optional .ReadRequest readRequest = 100;
    boolean hasReadRequest();
    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest();
    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder();
    
    // optional .AddRequest addRequest = 101;
    boolean hasAddRequest();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder();
    
    // optional .AuthMessage authRequest = 102;
    boolean hasAuthRequest();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthRequest();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthRequestOrBuilder();
  }
  public static final class Request extends
      com.google.protobuf.GeneratedMessage
      implements RequestOrBuilder {
    // Use Request.newBuilder() to construct.
    private Request(Builder builder) {
      super(builder);
    }
    private Request(boolean noInit) {}
    
    private static final Request defaultInstance;
    public static Request getDefaultInstance() {
      return defaultInstance;
    }
    
    public Request getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable;
    }
    
    private int bitField0_;
    // required .BKPacketHeader header = 1;
    public static final int HEADER_FIELD_NUMBER = 1;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_;
    public boolean hasHeader() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
      return header_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
      return header_;
    }
    
    // optional .ReadRequest readRequest = 100;
    public static final int READREQUEST_FIELD_NUMBER = 100;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest_;
    public boolean hasReadRequest() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest() {
      return readRequest_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder() {
      return readRequest_;
    }
    
    // optional .AddRequest addRequest = 101;
    public static final int ADDREQUEST_FIELD_NUMBER = 101;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest addRequest_;
    public boolean hasAddRequest() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest() {
      return addRequest_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder() {
      return addRequest_;
    }
    
    // optional .AuthMessage authRequest = 102;
    public static final int AUTHREQUEST_FIELD_NUMBER = 102;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage authRequest_;
    public boolean hasAuthRequest() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthRequest() {
      return authRequest_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthRequestOrBuilder() {
      return authRequest_;
    }
    
    private void initFields() {
      header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
      readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
      addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
      authRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasHeader()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getHeader().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (hasReadRequest()) {
        if (!getReadRequest().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      if (hasAddRequest()) {
        if (!getAddRequest().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      if (hasAuthRequest()) {
        if (!getAuthRequest().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, header_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(100, readRequest_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(101, addRequest_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeMessage(102, authRequest_);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, header_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(100, readRequest_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(101, addRequest_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(102, authRequest_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.Request prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.RequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.Request.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getHeaderFieldBuilder();
          getReadRequestFieldBuilder();
          getAddRequestFieldBuilder();
          getAuthRequestFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        if (headerBuilder_ == null) {
          header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
        } else {
          headerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        if (readRequestBuilder_ == null) {
          readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
        } else {
          readRequestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        if (addRequestBuilder_ == null) {
          addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
        } else {
          addRequestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        if (authRequestBuilder_ == null) {
          authRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
        } else {
          authRequestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.Request getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.Request build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.Request buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.Request buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = new org.apache.bookkeeper.proto.BookkeeperProtocol.Request(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (readRequestBuilder_ == null) {
          result.readRequest_ = readRequest_;
        } else {
          result.readRequest_ = readRequestBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (addRequestBuilder_ == null) {
          result.addRequest_ = addRequest_;
        } else {
          result.addRequest_ = addRequestBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        if (authRequestBuilder_ == null) {
          result.authRequest_ = authRequest_;
        } else {
          result.authRequest_ = authRequestBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.Request) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.Request)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.Request other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.hasReadRequest()) {
          mergeReadRequest(other.getReadRequest());
        }
        if (other.hasAddRequest()) {
          mergeAddRequest(other.getAddRequest());
        }
        if (other.hasAuthRequest()) {
          mergeAuthRequest(other.getAuthRequest());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasHeader()) {
          
          return false;
        }
        if (!getHeader().isInitialized()) {
          
          return false;
        }
        if (hasReadRequest()) {
          if (!getReadRequest().isInitialized()) {
            
            return false;
          }
        }
        if (hasAddRequest()) {
          if (!getAddRequest().isInitialized()) {
            
            return false;
          }
        }
        if (hasAuthRequest()) {
          if (!getAuthRequest().isInitialized()) {
            
            return false;
          }
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder();
              if (hasHeader()) {
                subBuilder.mergeFrom(getHeader());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setHeader(subBuilder.buildPartial());
              break;
            }
            case 802: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.newBuilder();
              if (hasReadRequest()) {
                subBuilder.mergeFrom(getReadRequest());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setReadRequest(subBuilder.buildPartial());
              break;
            }
            case 810: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.newBuilder();
              if (hasAddRequest()) {
                subBuilder.mergeFrom(getAddRequest());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setAddRequest(subBuilder.buildPartial());
              break;
            }
            case 818: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.newBuilder();
              if (hasAuthRequest()) {
                subBuilder.mergeFrom(getAuthRequest());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setAuthRequest(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .BKPacketHeader header = 1;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> headerBuilder_;
      public boolean hasHeader() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      public Builder setHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder setHeader(
          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder mergeHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
        if (headerBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              header_ != org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance()) {
            header_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
          onChanged();
        } else {
          headerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder getHeaderBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder>(
                  header_,
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }
      
      // optional .ReadRequest readRequest = 100;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder> readRequestBuilder_;
      public boolean hasReadRequest() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest() {
        if (readRequestBuilder_ == null) {
          return readRequest_;
        } else {
          return readRequestBuilder_.getMessage();
        }
      }
      public Builder setReadRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest value) {
        if (readRequestBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          readRequest_ = value;
          onChanged();
        } else {
          readRequestBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      public Builder setReadRequest(
          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder builderForValue) {
        if (readRequestBuilder_ == null) {
          readRequest_ = builderForValue.build();
          onChanged();
        } else {
          readRequestBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      public Builder mergeReadRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest value) {
        if (readRequestBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              readRequest_ != org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance()) {
            readRequest_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.newBuilder(readRequest_).mergeFrom(value).buildPartial();
          } else {
            readRequest_ = value;
          }
          onChanged();
        } else {
          readRequestBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      public Builder clearReadRequest() {
        if (readRequestBuilder_ == null) {
          readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
          onChanged();
        } else {
          readRequestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder getReadRequestBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getReadRequestFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder() {
        if (readRequestBuilder_ != null) {
          return readRequestBuilder_.getMessageOrBuilder();
        } else {
          return readRequest_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder> 
          getReadRequestFieldBuilder() {
        if (readRequestBuilder_ == null) {
          readRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder>(
                  readRequest_,
                  getParentForChildren(),
                  isClean());
          readRequest_ = null;
        }
        return readRequestBuilder_;
      }
      
      // optional .AddRequest addRequest = 101;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder> addRequestBuilder_;
      public boolean hasAddRequest() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest() {
        if (addRequestBuilder_ == null) {
          return addRequest_;
        } else {
          return addRequestBuilder_.getMessage();
        }
      }
      public Builder setAddRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest value) {
        if (addRequestBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          addRequest_ = value;
          onChanged();
        } else {
          addRequestBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder setAddRequest(
          org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder builderForValue) {
        if (addRequestBuilder_ == null) {
          addRequest_ = builderForValue.build();
          onChanged();
        } else {
          addRequestBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder mergeAddRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest value) {
        if (addRequestBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004) &&
              addRequest_ != org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance()) {
            addRequest_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.newBuilder(addRequest_).mergeFrom(value).buildPartial();
          } else {
            addRequest_ = value;
          }
          onChanged();
        } else {
          addRequestBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder clearAddRequest() {
        if (addRequestBuilder_ == null) {
          addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
          onChanged();
        } else {
          addRequestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder getAddRequestBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getAddRequestFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder() {
        if (addRequestBuilder_ != null) {
          return addRequestBuilder_.getMessageOrBuilder();
        } else {
          return addRequest_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder> 
          getAddRequestFieldBuilder() {
        if (addRequestBuilder_ == null) {
          addRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder>(
                  addRequest_,
                  getParentForChildren(),
                  isClean());
          addRequest_ = null;
        }
        return addRequestBuilder_;
      }
      
      // optional .AuthMessage authRequest = 102;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage authRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder> authRequestBuilder_;
      public boolean hasAuthRequest() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthRequest() {
        if (authRequestBuilder_ == null) {
          return authRequest_;
        } else {
          return authRequestBuilder_.getMessage();
        }
      }
      public Builder setAuthRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage value) {
        if (authRequestBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          authRequest_ = value;
          onChanged();
        } else {
          authRequestBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000008;
        return this;
      }
      public Builder setAuthRequest(
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder builderForValue) {
        if (authRequestBuilder_ == null) {
          authRequest_ = builderForValue.build();
          onChanged();
        } else {
          authRequestBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000008;
        return this;
      }
      public Builder mergeAuthRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage value) {
        if (authRequestBuilder_ == null) {
          if (((bitField0_ & 0x00000008) == 0x00000008) &&
              authRequest_ != org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance()) {
            authRequest_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.newBuilder(authRequest_).mergeFrom(value).buildPartial();
          } else {
            authRequest_ = value;
          }
          onChanged();
        } else {
          authRequestBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000008;
        return this;
      }
      public Builder clearAuthRequest() {
        if (authRequestBuilder_ == null) {
          authRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
          onChanged();
        } else {
          authRequestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder getAuthRequestBuilder() {
        bitField0_ |= 0x00000008;
        onChanged();
        return getAuthRequestFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthRequestOrBuilder() {
        if (authRequestBuilder_ != null) {
          return authRequestBuilder_.getMessageOrBuilder();
        } else {
          return authRequest_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder> 
          getAuthRequestFieldBuilder() {
        if (authRequestBuilder_ == null) {
          authRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder>(
                  authRequest_,
                  getParentForChildren(),
                  isClean());
          authRequest_ = null;
        }
        return authRequestBuilder_;
      }
      
      // @@protoc_insertion_point(builder_scope:Request)
    }
    
    static {
      defaultInstance = new Request(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:Request)
  }
  
  public interface ReadRequestOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // optional .ReadRequest.Flag flag = 100;
    boolean hasFlag();
    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag();
    
    // required int64 ledgerId = 1;
    boolean hasLedgerId();
    long getLedgerId();
    
    // required int64 entryId = 2;
    boolean hasEntryId();
    long getEntryId();
    
    // optional bytes masterKey = 3;
    boolean hasMasterKey();
    com.google.protobuf.ByteString getMasterKey();
  }
  public static final class ReadRequest extends
      com.google.protobuf.GeneratedMessage
      implements ReadRequestOrBuilder {
    // Use ReadRequest.newBuilder() to construct.
    private ReadRequest(Builder builder) {
      super(builder);
    }
    private ReadRequest(boolean noInit) {}
    
    private static final ReadRequest defaultInstance;
    public static ReadRequest getDefaultInstance() {
      return defaultInstance;
    }
    
    public ReadRequest getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_fieldAccessorTable;
    }
    
    public enum Flag
        implements com.google.protobuf.ProtocolMessageEnum {
      FENCE_LEDGER(0, 1),
      ;
      
      public static final int FENCE_LEDGER_VALUE = 1;
      
      
      public final int getNumber() { return value; }
      
      public static Flag valueOf(int value) {
        switch (value) {
          case 1: return FENCE_LEDGER;
          default: return null;
        }
      }
      
      public static com.google.protobuf.Internal.EnumLiteMap<Flag>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap<Flag>
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<Flag>() {
              public Flag findValueByNumber(int number) {
                return Flag.valueOf(number);
              }
            };
      
      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(index);
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDescriptor().getEnumTypes().get(0);
      }
      
      private static final Flag[] VALUES = {
        FENCE_LEDGER, 
      };
      
      public static Flag valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        return VALUES[desc.getIndex()];
      }
      
      private final int index;
      private final int value;
      
      private Flag(int index, int value) {
        this.index = index;
        this.value = value;
      }
      
      // @@protoc_insertion_point(enum_scope:ReadRequest.Flag)
    }
    
    private int bitField0_;
    // optional .ReadRequest.Flag flag = 100;
    public static final int FLAG_FIELD_NUMBER = 100;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag_;
    public boolean hasFlag() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag() {
      return flag_;
    }
    
    // required int64 ledgerId = 1;
    public static final int LEDGERID_FIELD_NUMBER = 1;
    private long ledgerId_;
    public boolean hasLedgerId() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public long getLedgerId() {
      return ledgerId_;
    }
    
    // required int64 entryId = 2;
    public static final int ENTRYID_FIELD_NUMBER = 2;
    private long entryId_;
    public boolean hasEntryId() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getEntryId() {
      return entryId_;
    }
    
    // optional bytes masterKey = 3;
    public static final int MASTERKEY_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString masterKey_;
    public boolean hasMasterKey() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public com.google.protobuf.ByteString getMasterKey() {
      return masterKey_;
    }
    
    private void initFields() {
      flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
      ledgerId_ = 0L;
      entryId_ = 0L;
      masterKey_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasLedgerId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasEntryId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt64(1, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(2, entryId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeBytes(3, masterKey_);
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeEnum(100, flag_.getNumber());
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, entryId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, masterKey_);
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(100, flag_.getNumber());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
        bitField0_ = (bitField0_ & ~0x00000001);
        ledgerId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        entryId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        masterKey_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest result = new org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.flag_ = flag_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.ledgerId_ = ledgerId_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.entryId_ = entryId_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.masterKey_ = masterKey_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance()) return this;
        if (other.hasFlag()) {
          setFlag(other.getFlag());
        }
        if (other.hasLedgerId()) {
          setLedgerId(other.getLedgerId());
        }
        if (other.hasEntryId()) {
          setEntryId(other.getEntryId());
        }
        if (other.hasMasterKey()) {
          setMasterKey(other.getMasterKey());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasLedgerId()) {
          
          return false;
        }
        if (!hasEntryId()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000002;
              ledgerId_ = input.readInt64();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000004;
              entryId_ = input.readInt64();
              break;
            }
            case 26: {
              bitField0_ |= 0x00000008;
              masterKey_ = input.readBytes();
              break;
            }
            case 800: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag value = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(100, rawValue);
              } else {
                bitField0_ |= 0x00000001;
                flag_ = value;
              }
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // optional .ReadRequest.Flag flag = 100;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
      public boolean hasFlag() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag() {
        return flag_;
      }
      public Builder setFlag(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        flag_ = value;
        onChanged();
        return this;
      }
      public Builder clearFlag() {
        bitField0_ = (bitField0_ & ~0x00000001);
        flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
        onChanged();
        return this;
      }
      
      // required int64 ledgerId = 1;
      private long ledgerId_ ;
      public boolean hasLedgerId() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public long getLedgerId() {
        return ledgerId_;
      }
      public Builder setLedgerId(long value) {
        bitField0_ |= 0x00000002;
        ledgerId_ = value;
        onChanged();
        return this;
      }
      public Builder clearLedgerId() {
        bitField0_ = (bitField0_ & ~0x00000002);
        ledgerId_ = 0L;
        onChanged();
        return this;
      }
      
      // required int64 entryId = 2;
      private long entryId_ ;
      public boolean hasEntryId() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getEntryId() {
        return entryId_;
      }
      public Builder setEntryId(long value) {
        bitField0_ |= 0x00000004;
        entryId_ = value;
        onChanged();
        return this;
      }
      public Builder clearEntryId() {
        bitField0_ = (bitField0_ & ~0x00000004);
        entryId_ = 0L;
        onChanged();
        return this;
      }
      
      // optional bytes masterKey = 3;
      private com.google.protobuf.ByteString masterKey_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasMasterKey() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public com.google.protobuf.ByteString getMasterKey() {
        return masterKey_;
      }
      public Builder setMasterKey(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000008;
        masterKey_ = value;
        onChanged();
        return this;
      }
      public Builder clearMasterKey() {
        bitField0_ = (bitField0_ & ~0x00000008);
        masterKey_ = getDefaultInstance().getMasterKey();
        onChanged();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:ReadRequest)
    }
    
    static {
      defaultInstance = new ReadRequest(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:ReadRequest)
  }
  
  public interface AddRequestOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // optional .AddRequest.Flag flag = 100;
    boolean hasFlag();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag getFlag();
    
    // required int64 ledgerId = 1;
    boolean hasLedgerId();
    long getLedgerId();
    
    // required int64 entryId = 2;
    boolean hasEntryId();
    long getEntryId();
    
    // required bytes masterKey = 3;
    boolean hasMasterKey();
    com.google.protobuf.ByteString getMasterKey();
    
    // required bytes body = 4;
    boolean hasBody();
    com.google.protobuf.ByteString getBody();
  }
  public static final class AddRequest extends
      com.google.protobuf.GeneratedMessage
      implements AddRequestOrBuilder {
    // Use AddRequest.newBuilder() to construct.
    private AddRequest(Builder builder) {
      super(builder);
    }
    private AddRequest(boolean noInit) {}
    
    private static final AddRequest defaultInstance;
    public static AddRequest getDefaultInstance() {
      return defaultInstance;
    }
    
    public AddRequest getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddRequest_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddRequest_fieldAccessorTable;
    }
    
    public enum Flag
        implements com.google.protobuf.ProtocolMessageEnum {
      RECOVERY_ADD(0, 1),
      ;
      
      public static final int RECOVERY_ADD_VALUE = 1;
      
      
      public final int getNumber() { return value; }
      
      public static Flag valueOf(int value) {
        switch (value) {
          case 1: return RECOVERY_ADD;
          default: return null;
        }
      }
      
      public static com.google.protobuf.Internal.EnumLiteMap<Flag>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap<Flag>
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<Flag>() {
              public Flag findValueByNumber(int number) {
                return Flag.valueOf(number);
              }
            };
      
      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(index);
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDescriptor().getEnumTypes().get(0);
      }
      
      private static final Flag[] VALUES = {
        RECOVERY_ADD, 
      };
      
      public static Flag valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        return VALUES[desc.getIndex()];
      }
      
      private final int index;
      private final int value;
      
      private Flag(int index, int value) {
        this.index = index;
        this.value = value;
      }
      
      // @@protoc_insertion_point(enum_scope:AddRequest.Flag)
    }
    
    private int bitField0_;
    // optional .AddRequest.Flag flag = 100;
    public static final int FLAG_FIELD_NUMBER = 100;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag flag_;
    public boolean hasFlag() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag getFlag() {
      return flag_;
    }
    
    // required int64 ledgerId = 1;
    public static final int LEDGERID_FIELD_NUMBER = 1;
    private long ledgerId_;
    public boolean hasLedgerId() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public long getLedgerId() {
      return ledgerId_;
    }
    
    // required int64 entryId = 2;
    public static final int ENTRYID_FIELD_NUMBER = 2;
    private long entryId_;
    public boolean hasEntryId() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getEntryId() {
      return entryId_;
    }
    
    // required bytes masterKey = 3;
    public static final int MASTERKEY_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString masterKey_;
    public boolean hasMasterKey() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public com.google.protobuf.ByteString getMasterKey() {
      return masterKey_;
    }
    
    // required bytes body = 4;
    public static final int BODY_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString body_;
    public boolean hasBody() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }
    
    private void initFields() {
      flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag.RECOVERY_ADD;
      ledgerId_ = 0L;
      entryId_ = 0L;
      masterKey_ = com.google.protobuf.ByteString.EMPTY;
      body_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasLedgerId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasEntryId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasMasterKey()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasBody()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt64(1, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(2, entryId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeBytes(3, masterKey_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeBytes(4, body_);
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeEnum(100, flag_.getNumber());
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, entryId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, masterKey_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, body_);
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(100, flag_.getNumber());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddRequest_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddRequest_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag.RECOVERY_ADD;
        bitField0_ = (bitField0_ & ~0x00000001);
        ledgerId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        entryId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        masterKey_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000008);
        body_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest result = new org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.flag_ = flag_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.ledgerId_ = ledgerId_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.entryId_ = entryId_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.masterKey_ = masterKey_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        result.body_ = body_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance()) return this;
        if (other.hasFlag()) {
          setFlag(other.getFlag());
        }
        if (other.hasLedgerId()) {
          setLedgerId(other.getLedgerId());
        }
        if (other.hasEntryId()) {
          setEntryId(other.getEntryId());
        }
        if (other.hasMasterKey()) {
          setMasterKey(other.getMasterKey());
        }
        if (other.hasBody()) {
          setBody(other.getBody());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasLedgerId()) {
          
          return false;
        }
        if (!hasEntryId()) {
          
          return false;
        }
        if (!hasMasterKey()) {
          
          return false;
        }
        if (!hasBody()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000002;
              ledgerId_ = input.readInt64();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000004;
              entryId_ = input.readInt64();
              break;
            }
            case 26: {
              bitField0_ |= 0x00000008;
              masterKey_ = input.readBytes();
              break;
            }
            case 34: {
              bitField0_ |= 0x00000010;
              body_ = input.readBytes();
              break;
            }
            case 800: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag value = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(100, rawValue);
              } else {
                bitField0_ |= 0x00000001;
                flag_ = value;
              }
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // optional .AddRequest.Flag flag = 100;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag.RECOVERY_ADD;
      public boolean hasFlag() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag getFlag() {
        return flag_;
      }
      public Builder setFlag(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        flag_ = value;
        onChanged();
        return this;
      }
      public Builder clearFlag() {
        bitField0_ = (bitField0_ & ~0x00000001);
        flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag.RECOVERY_ADD;
        onChanged();
        return this;
      }
      
      // required int64 ledgerId = 1;
      private long ledgerId_ ;
      public boolean hasLedgerId() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public long getLedgerId() {
        return ledgerId_;
      }
      public Builder setLedgerId(long value) {
        bitField0_ |= 0x00000002;
        ledgerId_ = value;
        onChanged();
        return this;
      }
      public Builder clearLedgerId() {
        bitField0_ = (bitField0_ & ~0x00000002);
        ledgerId_ = 0L;
        onChanged();
        return this;
      }
      
      // required int64 entryId = 2;
      private long entryId_ ;
      public boolean hasEntryId() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getEntryId() {
        return entryId_;
      }
      public Builder setEntryId(long value) {
        bitField0_ |= 0x00000004;
        entryId_ = value;
        onChanged();
        return this;
      }
      public Builder clearEntryId() {
        bitField0_ = (bitField0_ & ~0x00000004);
        entryId_ = 0L;
        onChanged();
        return this;
      }
      
      // required bytes masterKey = 3;
      private com.google.protobuf.ByteString masterKey_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasMasterKey() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public com.google.protobuf.ByteString getMasterKey() {
        return masterKey_;
      }
      public Builder setMasterKey(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000008;
        masterKey_ = value;
        onChanged();
        return this;
      }
      public Builder clearMasterKey() {
        bitField0_ = (bitField0_ & ~0x00000008);
        masterKey_ = getDefaultInstance().getMasterKey();
        onChanged();
        return this;
      }
      
      // required bytes body = 4;
      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasBody() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000010;
        body_ = value;
        onChanged();
        return this;
      }
      public Builder clearBody() {
        bitField0_ = (bitField0_ & ~0x00000010);
        body_ = getDefaultInstance().getBody();
        onChanged();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:AddRequest)
    }
    
    static {
      defaultInstance = new AddRequest(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:AddRequest)
  }
  
  public interface ResponseOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // required .BKPacketHeader header = 1;
    boolean hasHeader();
    org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader();
    org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder();
    
    // required .StatusCode status = 2;
    boolean hasStatus();
    org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus();
    
    // optional .ReadResponse readResponse = 100;
    boolean hasReadResponse();
    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse getReadResponse();
    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder getReadResponseOrBuilder();
    
    // optional .AddResponse addResponse = 101;
    boolean hasAddResponse();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse getAddResponse();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder getAddResponseOrBuilder();
    
    // optional .AuthMessage authResponse = 102;
    boolean hasAuthResponse();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthResponse();
    org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthResponseOrBuilder();
  }
  public static final class Response extends
      com.google.protobuf.GeneratedMessage
      implements ResponseOrBuilder {
    // Use Response.newBuilder() to construct.
    private Response(Builder builder) {
      super(builder);
    }
    private Response(boolean noInit) {}
    
    private static final Response defaultInstance;
    public static Response getDefaultInstance() {
      return defaultInstance;
    }
    
    public Response getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Response_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Response_fieldAccessorTable;
    }
    
    private int bitField0_;
    // required .BKPacketHeader header = 1;
    public static final int HEADER_FIELD_NUMBER = 1;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_;
    public boolean hasHeader() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
      return header_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
      return header_;
    }
    
    // required .StatusCode status = 2;
    public static final int STATUS_FIELD_NUMBER = 2;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode status_;
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus() {
      return status_;
    }
    
    // optional .ReadResponse readResponse = 100;
    public static final int READRESPONSE_FIELD_NUMBER = 100;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readResponse_;
    public boolean hasReadResponse() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse getReadResponse() {
      return readResponse_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder getReadResponseOrBuilder() {
      return readResponse_;
    }
    
    // optional .AddResponse addResponse = 101;
    public static final int ADDRESPONSE_FIELD_NUMBER = 101;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse addResponse_;
    public boolean hasAddResponse() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse getAddResponse() {
      return addResponse_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder getAddResponseOrBuilder() {
      return addResponse_;
    }
    
    // optional .AuthMessage authResponse = 102;
    public static final int AUTHRESPONSE_FIELD_NUMBER = 102;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage authResponse_;
    public boolean hasAuthResponse() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthResponse() {
      return authResponse_;
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthResponseOrBuilder() {
      return authResponse_;
    }
    
    private void initFields() {
      header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
      status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
      readResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance();
      addResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance();
      authResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasHeader()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasStatus()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getHeader().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (hasReadResponse()) {
        if (!getReadResponse().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      if (hasAddResponse()) {
        if (!getAddResponse().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      if (hasAuthResponse()) {
        if (!getAuthResponse().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, header_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeEnum(2, status_.getNumber());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(100, readResponse_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeMessage(101, addResponse_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeMessage(102, authResponse_);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, header_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, status_.getNumber());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(100, readResponse_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(101, addResponse_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(102, authResponse_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Response parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.Response prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.ResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Response_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Response_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.Response.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getHeaderFieldBuilder();
          getReadResponseFieldBuilder();
          getAddResponseFieldBuilder();
          getAuthResponseFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        if (headerBuilder_ == null) {
          header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
        } else {
          headerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
        bitField0_ = (bitField0_ & ~0x00000002);
        if (readResponseBuilder_ == null) {
          readResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance();
        } else {
          readResponseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        if (addResponseBuilder_ == null) {
          addResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance();
        } else {
          addResponseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000008);
        if (authResponseBuilder_ == null) {
          authResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
        } else {
          authResponseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.Response.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.Response getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.Response.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.Response build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.Response result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.Response buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.Response result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.Response buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.Response result = new org.apache.bookkeeper.proto.BookkeeperProtocol.Response(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.status_ = status_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (readResponseBuilder_ == null) {
          result.readResponse_ = readResponse_;
        } else {
          result.readResponse_ = readResponseBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        if (addResponseBuilder_ == null) {
          result.addResponse_ = addResponse_;
        } else {
          result.addResponse_ = addResponseBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        if (authResponseBuilder_ == null) {
          result.authResponse_ = authResponse_;
        } else {
          result.authResponse_ = authResponseBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.Response) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.Response)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.Response other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.Response.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.hasStatus()) {
          setStatus(other.getStatus());
        }
        if (other.hasReadResponse()) {
          mergeReadResponse(other.getReadResponse());
        }
        if (other.hasAddResponse()) {
          mergeAddResponse(other.getAddResponse());
        }
        if (other.hasAuthResponse()) {
          mergeAuthResponse(other.getAuthResponse());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasHeader()) {
          
          return false;
        }
        if (!hasStatus()) {
          
          return false;
        }
        if (!getHeader().isInitialized()) {
          
          return false;
        }
        if (hasReadResponse()) {
          if (!getReadResponse().isInitialized()) {
            
            return false;
          }
        }
        if (hasAddResponse()) {
          if (!getAddResponse().isInitialized()) {
            
            return false;
          }
        }
        if (hasAuthResponse()) {
          if (!getAuthResponse().isInitialized()) {
            
            return false;
          }
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder();
              if (hasHeader()) {
                subBuilder.mergeFrom(getHeader());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setHeader(subBuilder.buildPartial());
              break;
            }
            case 16: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode value = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(2, rawValue);
              } else {
                bitField0_ |= 0x00000002;
                status_ = value;
              }
              break;
            }
            case 802: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.newBuilder();
              if (hasReadResponse()) {
                subBuilder.mergeFrom(getReadResponse());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setReadResponse(subBuilder.buildPartial());
              break;
            }
            case 810: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.newBuilder();
              if (hasAddResponse()) {
                subBuilder.mergeFrom(getAddResponse());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setAddResponse(subBuilder.buildPartial());
              break;
            }
            case 818: {
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.newBuilder();
              if (hasAuthResponse()) {
                subBuilder.mergeFrom(getAuthResponse());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setAuthResponse(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .BKPacketHeader header = 1;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> headerBuilder_;
      public boolean hasHeader() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      public Builder setHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder setHeader(
          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder mergeHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
        if (headerBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              header_ != org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance()) {
            header_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
          onChanged();
        } else {
          headerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder getHeaderBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder>(
                  header_,
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }
      
      // required .StatusCode status = 2;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
      public boolean hasStatus() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus() {
        return status_;
      }
      public Builder setStatus(org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000002;
        status_ = value;
        onChanged();
        return this;
      }
      public Builder clearStatus() {
        bitField0_ = (bitField0_ & ~0x00000002);
        status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
        onChanged();
        return this;
      }
      
      // optional .ReadResponse readResponse = 100;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse readResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder> readResponseBuilder_;
      public boolean hasReadResponse() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse getReadResponse() {
        if (readResponseBuilder_ == null) {
          return readResponse_;
        } else {
          return readResponseBuilder_.getMessage();
        }
      }
      public Builder setReadResponse(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse value) {
        if (readResponseBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          readResponse_ = value;
          onChanged();
        } else {
          readResponseBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder setReadResponse(
          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder builderForValue) {
        if (readResponseBuilder_ == null) {
          readResponse_ = builderForValue.build();
          onChanged();
        } else {
          readResponseBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder mergeReadResponse(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse value) {
        if (readResponseBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004) &&
              readResponse_ != org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance()) {
            readResponse_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.newBuilder(readResponse_).mergeFrom(value).buildPartial();
          } else {
            readResponse_ = value;
          }
          onChanged();
        } else {
          readResponseBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder clearReadResponse() {
        if (readResponseBuilder_ == null) {
          readResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance();
          onChanged();
        } else {
          readResponseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder getReadResponseBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getReadResponseFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder getReadResponseOrBuilder() {
        if (readResponseBuilder_ != null) {
          return readResponseBuilder_.getMessageOrBuilder();
        } else {
          return readResponse_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder> 
          getReadResponseFieldBuilder() {
        if (readResponseBuilder_ == null) {
          readResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder>(
                  readResponse_,
                  getParentForChildren(),
                  isClean());
          readResponse_ = null;
        }
        return readResponseBuilder_;
      }
      
      // optional .AddResponse addResponse = 101;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse addResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse, org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder> addResponseBuilder_;
      public boolean hasAddResponse() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse getAddResponse() {
        if (addResponseBuilder_ == null) {
          return addResponse_;
        } else {
          return addResponseBuilder_.getMessage();
        }
      }
      public Builder setAddResponse(org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse value) {
        if (addResponseBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          addResponse_ = value;
          onChanged();
        } else {
          addResponseBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000008;
        return this;
      }
      public Builder setAddResponse(
          org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder builderForValue) {
        if (addResponseBuilder_ == null) {
          addResponse_ = builderForValue.build();
          onChanged();
        } else {
          addResponseBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000008;
        return this;
      }
      public Builder mergeAddResponse(org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse value) {
        if (addResponseBuilder_ == null) {
          if (((bitField0_ & 0x00000008) == 0x00000008) &&
              addResponse_ != org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance()) {
            addResponse_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.newBuilder(addResponse_).mergeFrom(value).buildPartial();
          } else {
            addResponse_ = value;
          }
          onChanged();
        } else {
          addResponseBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000008;
        return this;
      }
      public Builder clearAddResponse() {
        if (addResponseBuilder_ == null) {
          addResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance();
          onChanged();
        } else {
          addResponseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder getAddResponseBuilder() {
        bitField0_ |= 0x00000008;
        onChanged();
        return getAddResponseFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder getAddResponseOrBuilder() {
        if (addResponseBuilder_ != null) {
          return addResponseBuilder_.getMessageOrBuilder();
        } else {
          return addResponse_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse, org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder> 
          getAddResponseFieldBuilder() {
        if (addResponseBuilder_ == null) {
          addResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse, org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder>(
                  addResponse_,
                  getParentForChildren(),
                  isClean());
          addResponse_ = null;
        }
        return addResponseBuilder_;
      }
      
      // optional .AuthMessage authResponse = 102;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage authResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder> authResponseBuilder_;
      public boolean hasAuthResponse() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthResponse() {
        if (authResponseBuilder_ == null) {
          return authResponse_;
        } else {
          return authResponseBuilder_.getMessage();
        }
      }
      public Builder setAuthResponse(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage value) {
        if (authResponseBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          authResponse_ = value;
          onChanged();
        } else {
          authResponseBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      public Builder setAuthResponse(
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder builderForValue) {
        if (authResponseBuilder_ == null) {
          authResponse_ = builderForValue.build();
          onChanged();
        } else {
          authResponseBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      public Builder mergeAuthResponse(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage value) {
        if (authResponseBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010) &&
              authResponse_ != org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance()) {
            authResponse_ =
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.newBuilder(authResponse_).mergeFrom(value).buildPartial();
          } else {
            authResponse_ = value;
          }
          onChanged();
        } else {
          authResponseBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      public Builder clearAuthResponse() {
        if (authResponseBuilder_ == null) {
          authResponse_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
          onChanged();
        } else {
          authResponseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder getAuthResponseBuilder() {
        bitField0_ |= 0x00000010;
        onChanged();
        return getAuthResponseFieldBuilder().getBuilder();
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthResponseOrBuilder() {
        if (authResponseBuilder_ != null) {
          return authResponseBuilder_.getMessageOrBuilder();
        } else {
          return authResponse_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder> 
          getAuthResponseFieldBuilder() {
        if (authResponseBuilder_ == null) {
          authResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder>(
                  authResponse_,
                  getParentForChildren(),
                  isClean());
          authResponse_ = null;
        }
        return authResponseBuilder_;
      }
      
      // @@protoc_insertion_point(builder_scope:Response)
    }
    
    static {
      defaultInstance = new Response(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:Response)
  }
  
  public interface ReadResponseOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // required .StatusCode status = 1;
    boolean hasStatus();
    org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus();
    
    // required int64 ledgerId = 2;
    boolean hasLedgerId();
    long getLedgerId();
    
    // required int64 entryId = 3;
    boolean hasEntryId();
    long getEntryId();
    
    // optional bytes body = 4;
    boolean hasBody();
    com.google.protobuf.ByteString getBody();
  }
  public static final class ReadResponse extends
      com.google.protobuf.GeneratedMessage
      implements ReadResponseOrBuilder {
    // Use ReadResponse.newBuilder() to construct.
    private ReadResponse(Builder builder) {
      super(builder);
    }
    private ReadResponse(boolean noInit) {}
    
    private static final ReadResponse defaultInstance;
    public static ReadResponse getDefaultInstance() {
      return defaultInstance;
    }
    
    public ReadResponse getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadResponse_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadResponse_fieldAccessorTable;
    }
    
    private int bitField0_;
    // required .StatusCode status = 1;
    public static final int STATUS_FIELD_NUMBER = 1;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode status_;
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus() {
      return status_;
    }
    
    // required int64 ledgerId = 2;
    public static final int LEDGERID_FIELD_NUMBER = 2;
    private long ledgerId_;
    public boolean hasLedgerId() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public long getLedgerId() {
      return ledgerId_;
    }
    
    // required int64 entryId = 3;
    public static final int ENTRYID_FIELD_NUMBER = 3;
    private long entryId_;
    public boolean hasEntryId() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getEntryId() {
      return entryId_;
    }
    
    // optional bytes body = 4;
    public static final int BODY_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString body_;
    public boolean hasBody() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }
    
    private void initFields() {
      status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
      ledgerId_ = 0L;
      entryId_ = 0L;
      body_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasStatus()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasLedgerId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasEntryId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeEnum(1, status_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt64(2, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(3, entryId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeBytes(4, body_);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, status_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, entryId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, body_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadResponse_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadResponse_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
        bitField0_ = (bitField0_ & ~0x00000001);
        ledgerId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        entryId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        body_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse result = new org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.status_ = status_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.ledgerId_ = ledgerId_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.entryId_ = entryId_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.body_ = body_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.getDefaultInstance()) return this;
        if (other.hasStatus()) {
          setStatus(other.getStatus());
        }
        if (other.hasLedgerId()) {
          setLedgerId(other.getLedgerId());
        }
        if (other.hasEntryId()) {
          setEntryId(other.getEntryId());
        }
        if (other.hasBody()) {
          setBody(other.getBody());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasStatus()) {
          
          return false;
        }
        if (!hasLedgerId()) {
          
          return false;
        }
        if (!hasEntryId()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode value = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(1, rawValue);
              } else {
                bitField0_ |= 0x00000001;
                status_ = value;
              }
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              ledgerId_ = input.readInt64();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              entryId_ = input.readInt64();
              break;
            }
            case 34: {
              bitField0_ |= 0x00000008;
              body_ = input.readBytes();
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .StatusCode status = 1;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
      public boolean hasStatus() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus() {
        return status_;
      }
      public Builder setStatus(org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        status_ = value;
        onChanged();
        return this;
      }
      public Builder clearStatus() {
        bitField0_ = (bitField0_ & ~0x00000001);
        status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
        onChanged();
        return this;
      }
      
      // required int64 ledgerId = 2;
      private long ledgerId_ ;
      public boolean hasLedgerId() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public long getLedgerId() {
        return ledgerId_;
      }
      public Builder setLedgerId(long value) {
        bitField0_ |= 0x00000002;
        ledgerId_ = value;
        onChanged();
        return this;
      }
      public Builder clearLedgerId() {
        bitField0_ = (bitField0_ & ~0x00000002);
        ledgerId_ = 0L;
        onChanged();
        return this;
      }
      
      // required int64 entryId = 3;
      private long entryId_ ;
      public boolean hasEntryId() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getEntryId() {
        return entryId_;
      }
      public Builder setEntryId(long value) {
        bitField0_ |= 0x00000004;
        entryId_ = value;
        onChanged();
        return this;
      }
      public Builder clearEntryId() {
        bitField0_ = (bitField0_ & ~0x00000004);
        entryId_ = 0L;
        onChanged();
        return this;
      }
      
      // optional bytes body = 4;
      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasBody() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000008;
        body_ = value;
        onChanged();
        return this;
      }
      public Builder clearBody() {
        bitField0_ = (bitField0_ & ~0x00000008);
        body_ = getDefaultInstance().getBody();
        onChanged();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:ReadResponse)
    }
    
    static {
      defaultInstance = new ReadResponse(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:ReadResponse)
  }
  
  public interface AddResponseOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // required .StatusCode status = 1;
    boolean hasStatus();
    org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus();
    
    // required int64 ledgerId = 2;
    boolean hasLedgerId();
    long getLedgerId();
    
    // required int64 entryId = 3;
    boolean hasEntryId();
    long getEntryId();
  }
  public static final class AddResponse extends
      com.google.protobuf.GeneratedMessage
      implements AddResponseOrBuilder {
    // Use AddResponse.newBuilder() to construct.
    private AddResponse(Builder builder) {
      super(builder);
    }
    private AddResponse(boolean noInit) {}
    
    private static final AddResponse defaultInstance;
    public static AddResponse getDefaultInstance() {
      return defaultInstance;
    }
    
    public AddResponse getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddResponse_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddResponse_fieldAccessorTable;
    }
    
    private int bitField0_;
    // required .StatusCode status = 1;
    public static final int STATUS_FIELD_NUMBER = 1;
    private org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode status_;
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus() {
      return status_;
    }
    
    // required int64 ledgerId = 2;
    public static final int LEDGERID_FIELD_NUMBER = 2;
    private long ledgerId_;
    public boolean hasLedgerId() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public long getLedgerId() {
      return ledgerId_;
    }
    
    // required int64 entryId = 3;
    public static final int ENTRYID_FIELD_NUMBER = 3;
    private long entryId_;
    public boolean hasEntryId() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getEntryId() {
      return entryId_;
    }
    
    private void initFields() {
      status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
      ledgerId_ = 0L;
      entryId_ = 0L;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasStatus()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasLedgerId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasEntryId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeEnum(1, status_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt64(2, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(3, entryId_);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, status_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, ledgerId_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, entryId_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddResponse_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddResponse_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
        bitField0_ = (bitField0_ & ~0x00000001);
        ledgerId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        entryId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse result = new org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.status_ = status_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.ledgerId_ = ledgerId_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.entryId_ = entryId_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.getDefaultInstance()) return this;
        if (other.hasStatus()) {
          setStatus(other.getStatus());
        }
        if (other.hasLedgerId()) {
          setLedgerId(other.getLedgerId());
        }
        if (other.hasEntryId()) {
          setEntryId(other.getEntryId());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasStatus()) {
          
          return false;
        }
        if (!hasLedgerId()) {
          
          return false;
        }
        if (!hasEntryId()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              int rawValue = input.readEnum();
              org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode value = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(1, rawValue);
              } else {
                bitField0_ |= 0x00000001;
                status_ = value;
              }
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              ledgerId_ = input.readInt64();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              entryId_ = input.readInt64();
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .StatusCode status = 1;
      private org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
      public boolean hasStatus() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode getStatus() {
        return status_;
      }
      public Builder setStatus(org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        status_ = value;
        onChanged();
        return this;
      }
      public Builder clearStatus() {
        bitField0_ = (bitField0_ & ~0x00000001);
        status_ = org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode.EOK;
        onChanged();
        return this;
      }
      
      // required int64 ledgerId = 2;
      private long ledgerId_ ;
      public boolean hasLedgerId() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public long getLedgerId() {
        return ledgerId_;
      }
      public Builder setLedgerId(long value) {
        bitField0_ |= 0x00000002;
        ledgerId_ = value;
        onChanged();
        return this;
      }
      public Builder clearLedgerId() {
        bitField0_ = (bitField0_ & ~0x00000002);
        ledgerId_ = 0L;
        onChanged();
        return this;
      }
      
      // required int64 entryId = 3;
      private long entryId_ ;
      public boolean hasEntryId() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getEntryId() {
        return entryId_;
      }
      public Builder setEntryId(long value) {
        bitField0_ |= 0x00000004;
        entryId_ = value;
        onChanged();
        return this;
      }
      public Builder clearEntryId() {
        bitField0_ = (bitField0_ & ~0x00000004);
        entryId_ = 0L;
        onChanged();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:AddResponse)
    }
    
    static {
      defaultInstance = new AddResponse(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:AddResponse)
  }
  
  public interface AuthMessageOrBuilder extends
      com.google.protobuf.GeneratedMessage.
          ExtendableMessageOrBuilder<AuthMessage> {
    
    // required string authPluginName = 1;
    boolean hasAuthPluginName();
    String getAuthPluginName();
  }
  public static final class AuthMessage extends
      com.google.protobuf.GeneratedMessage.ExtendableMessage<
        AuthMessage> implements AuthMessageOrBuilder {
    // Use AuthMessage.newBuilder() to construct.
    private AuthMessage(Builder builder) {
      super(builder);
    }
    private AuthMessage(boolean noInit) {}
    
    private static final AuthMessage defaultInstance;
    public static AuthMessage getDefaultInstance() {
      return defaultInstance;
    }
    
    public AuthMessage getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AuthMessage_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AuthMessage_fieldAccessorTable;
    }
    
    private int bitField0_;
    // required string authPluginName = 1;
    public static final int AUTHPLUGINNAME_FIELD_NUMBER = 1;
    private java.lang.Object authPluginName_;
    public boolean hasAuthPluginName() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public String getAuthPluginName() {
      java.lang.Object ref = authPluginName_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          authPluginName_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getAuthPluginNameBytes() {
      java.lang.Object ref = authPluginName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        authPluginName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    
    private void initFields() {
      authPluginName_ = "";
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasAuthPluginName()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!extensionsAreInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      com.google.protobuf.GeneratedMessage
        .ExtendableMessage<org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage>.ExtensionWriter extensionWriter =
          newExtensionWriter();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getAuthPluginNameBytes());
      }
      extensionWriter.writeUntil(536870912, output);
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getAuthPluginNameBytes());
      }
      size += extensionsSerializedSize();
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.ExtendableBuilder<
          org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, Builder> implements org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AuthMessage_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AuthMessage_fieldAccessorTable;
      }
      
      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        authPluginName_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDescriptor();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getDefaultInstanceForType() {
        return org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage build() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage buildPartial() {
        org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage result = new org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.authPluginName_ = authPluginName_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage) {
          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage other) {
        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance()) return this;
        if (other.hasAuthPluginName()) {
          setAuthPluginName(other.getAuthPluginName());
        }
        this.mergeExtensionFields(other);
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasAuthPluginName()) {
          
          return false;
        }
        if (!extensionsAreInitialized()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              authPluginName_ = input.readBytes();
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required string authPluginName = 1;
      private java.lang.Object authPluginName_ = "";
      public boolean hasAuthPluginName() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public String getAuthPluginName() {
        java.lang.Object ref = authPluginName_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          authPluginName_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setAuthPluginName(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        authPluginName_ = value;
        onChanged();
        return this;
      }
      public Builder clearAuthPluginName() {
        bitField0_ = (bitField0_ & ~0x00000001);
        authPluginName_ = getDefaultInstance().getAuthPluginName();
        onChanged();
        return this;
      }
      void setAuthPluginName(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000001;
        authPluginName_ = value;
        onChanged();
      }
      
      // @@protoc_insertion_point(builder_scope:AuthMessage)
    }
    
    static {
      defaultInstance = new AuthMessage(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:AuthMessage)
  }
  
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_BKPacketHeader_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_BKPacketHeader_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Request_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Request_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_ReadRequest_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ReadRequest_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_AddRequest_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_AddRequest_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Response_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Response_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_ReadResponse_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ReadResponse_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_AddResponse_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_AddResponse_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_AuthMessage_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_AuthMessage_fieldAccessorTable;
  
  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\'src/main/proto/BookkeeperProtocol.prot" +
      "o\"e\n\016BKPacketHeader\022!\n\007version\030\001 \002(\0162\020.P" +
      "rotocolVersion\022!\n\toperation\030\002 \002(\0162\016.Oper" +
      "ationType\022\r\n\005txnId\030\003 \002(\004\"\221\001\n\007Request\022\037\n\006" +
      "header\030\001 \002(\0132\017.BKPacketHeader\022!\n\013readReq" +
      "uest\030d \001(\0132\014.ReadRequest\022\037\n\naddRequest\030e" +
      " \001(\0132\013.AddRequest\022!\n\013authRequest\030f \001(\0132\014" +
      ".AuthMessage\"~\n\013ReadRequest\022\037\n\004flag\030d \001(" +
      "\0162\021.ReadRequest.Flag\022\020\n\010ledgerId\030\001 \002(\003\022\017" +
      "\n\007entryId\030\002 \002(\003\022\021\n\tmasterKey\030\003 \001(\014\"\030\n\004Fl",
      "ag\022\020\n\014FENCE_LEDGER\020\001\"\212\001\n\nAddRequest\022\036\n\004f" +
      "lag\030d \001(\0162\020.AddRequest.Flag\022\020\n\010ledgerId\030" +
      "\001 \002(\003\022\017\n\007entryId\030\002 \002(\003\022\021\n\tmasterKey\030\003 \002(" +
      "\014\022\014\n\004body\030\004 \002(\014\"\030\n\004Flag\022\020\n\014RECOVERY_ADD\020" +
      "\001\"\264\001\n\010Response\022\037\n\006header\030\001 \002(\0132\017.BKPacke" +
      "tHeader\022\033\n\006status\030\002 \002(\0162\013.StatusCode\022#\n\014" +
      "readResponse\030d \001(\0132\r.ReadResponse\022!\n\013add" +
      "Response\030e \001(\0132\014.AddResponse\022\"\n\014authResp" +
      "onse\030f \001(\0132\014.AuthMessage\"\\\n\014ReadResponse" +
      "\022\033\n\006status\030\001 \002(\0162\013.StatusCode\022\020\n\010ledgerI",
      "d\030\002 \002(\003\022\017\n\007entryId\030\003 \002(\003\022\014\n\004body\030\004 \001(\014\"M" +
      "\n\013AddResponse\022\033\n\006status\030\001 \002(\0162\013.StatusCo" +
      "de\022\020\n\010ledgerId\030\002 \002(\003\022\017\n\007entryId\030\003 \002(\003\"0\n" +
      "\013AuthMessage\022\026\n\016authPluginName\030\001 \002(\t*\t\010\350" +
      "\007\020\200\200\200\200\002*F\n\017ProtocolVersion\022\017\n\013VERSION_ON" +
      "E\020\001\022\017\n\013VERSION_TWO\020\002\022\021\n\rVERSION_THREE\020\003*" +
      "\206\001\n\nStatusCode\022\007\n\003EOK\020\000\022\016\n\tENOLEDGER\020\222\003\022" +
      "\r\n\010ENOENTRY\020\223\003\022\014\n\007EBADREQ\020\224\003\022\010\n\003EIO\020\365\003\022\010" +
      "\n\003EUA\020\366\003\022\020\n\013EBADVERSION\020\367\003\022\014\n\007EFENCED\020\370\003" +
      "\022\016\n\tEREADONLY\020\371\003*c\n\rOperationType\022\016\n\nREA",
      "D_ENTRY\020\001\022\r\n\tADD_ENTRY\020\002\022\024\n\020RANGE_READ_E" +
      "NTRY\020\003\022\023\n\017RANGE_ADD_ENTRY\020\004\022\010\n\004AUTH\020\005B\037\n" +
      "\033org.apache.bookkeeper.protoH\001"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_BKPacketHeader_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_BKPacketHeader_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_BKPacketHeader_descriptor,
              new java.lang.String[] { "Version", "Operation", "TxnId", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder.class);
          internal_static_Request_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_Request_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Request_descriptor,
              new java.lang.String[] { "Header", "ReadRequest", "AddRequest", "AuthRequest", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.Request.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.Request.Builder.class);
          internal_static_ReadRequest_descriptor =
            getDescriptor().getMessageTypes().get(2);
          internal_static_ReadRequest_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_ReadRequest_descriptor,
              new java.lang.String[] { "Flag", "LedgerId", "EntryId", "MasterKey", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder.class);
          internal_static_AddRequest_descriptor =
            getDescriptor().getMessageTypes().get(3);
          internal_static_AddRequest_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_AddRequest_descriptor,
              new java.lang.String[] { "Flag", "LedgerId", "EntryId", "MasterKey", "Body", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder.class);
          internal_static_Response_descriptor =
            getDescriptor().getMessageTypes().get(4);
          internal_static_Response_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Response_descriptor,
              new java.lang.String[] { "Header", "Status", "ReadResponse", "AddResponse", "AuthResponse", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.Response.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.Response.Builder.class);
          internal_static_ReadResponse_descriptor =
            getDescriptor().getMessageTypes().get(5);
          internal_static_ReadResponse_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_ReadResponse_descriptor,
              new java.lang.String[] { "Status", "LedgerId", "EntryId", "Body", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadResponse.Builder.class);
          internal_static_AddResponse_descriptor =
            getDescriptor().getMessageTypes().get(6);
          internal_static_AddResponse_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_AddResponse_descriptor,
              new java.lang.String[] { "Status", "LedgerId", "EntryId", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.AddResponse.Builder.class);
          internal_static_AuthMessage_descriptor =
            getDescriptor().getMessageTypes().get(7);
          internal_static_AuthMessage_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_AuthMessage_descriptor,
              new java.lang.String[] { "AuthPluginName", },
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.class,
              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }
  
  // @@protoc_insertion_point(outer_class_scope)
}
